Build AI-powered applications with zero vendor lock-in.
Building production AI applications requires more than just connecting to an LLM. You need authentication, vector databases, RAG pipelines, and infrastructure that scales. AI Stack gives you all of this out of the box.
| Challenge | AI Stack Solution |
|---|---|
| Vendor Lock-in | Swap LLMs or Vector DBs with one environment variable |
| Production Readiness | Built-in auth, error handling, observability, and cost tracking |
| Type Safety | Full TypeScript + Pydantic across the entire stack |
| Infrastructure | Docker Compose dev, Kubernetes prod - ready to deploy |
npx create-ai-stack-starter@latest my-ai-appYou'll be prompted to select:
- Architecture: Next.js Fullstack, FastAPI + Next.js, or TypeScript Backend
- Database: Neon, Supabase, Turso, or SQLite
- Auth: Better Auth, NextAuth, Clerk, or None
- LLM Provider: OpenAI, Anthropic, or Novita AI
- Add-ons: Tailwind, Biome, PWA, Analytics
|
Best for: Rapid prototyping, Vercel deployment
|
Best for: ML teams, complex AI pipelines
|
Best for: TypeScript teams, edge deployment
|
Abstract interfaces for every integration. Switch providers with one env variable:
# Switch LLM provider
LLM_PROVIDER=openai # or: anthropic, gemini, ollama
# Switch Vector DB
VECTOR_DB=qdrant # or: weaviate, pgvector, pineconeComplete document ingestion, chunking, embedding, and retrieval:
// Ingest documents
await rag.ingest(documents, { chunkSize: 512, overlap: 50 });
// Query with context
const response = await rag.query("What is the refund policy?", {
topK: 5,
rerank: true,
});Multiple auth strategies with unified interface:
- Better Auth - Modern, type-safe, self-hosted
- NextAuth.js - Flexible OAuth, social logins
- Clerk - Managed auth with great DX
- JWT - Service-to-service authentication
Track everything that matters in production:
- Token usage and cost tracking
- Request latency monitoring
- Error aggregation
- LLM response quality metrics
|
Build intelligent chatbots that understand your product docs and provide accurate answers with citations. |
Create internal knowledge bases that let employees query company documents naturally. |
|
Replace keyword search with AI-powered semantic search across your content. |
Build domain-specific AI assistants with memory and tool use. |
| Layer | Technology |
|---|---|
| Frontend | Next.js 15, React 19, Tailwind CSS |
| Backend | FastAPI / Hono / NestJS |
| Database | PostgreSQL (Neon/Supabase), SQLite (Turso) |
| Vector DB | Qdrant, Weaviate, pgvector |
| ORM | Drizzle / Prisma / SQLAlchemy |
| Auth | Better Auth, NextAuth, Clerk |
| AI | OpenAI, Anthropic, Google Gemini, Ollama |
| Infrastructure | Docker, Kubernetes, Vercel |
| Section | Description |
|---|---|
| Quick Start | Get running in 5 minutes |
| Architecture | System design and patterns |
| LLM Providers | Configure AI providers |
| Vector Databases | Vector storage options |
| RAG Pipeline | Document ingestion and retrieval |
| Deployment | Production deployment guides |
| Security | Security best practices |
my-ai-app/
├── app/ # Next.js App Router
│ ├── (auth)/ # Auth pages
│ ├── (dashboard)/ # Protected pages
│ └── api/ # API routes
├── components/ # React components
│ ├── chat/ # Chat UI components
│ └── ui/ # shadcn/ui components
├── lib/
│ ├── ai/ # LLM client abstraction
│ ├── auth/ # Auth configuration
│ ├── db/ # Database schema & client
│ └── search/ # Vector search client
└── types/ # TypeScript types
AI Stack is built with security as a first-class concern:
- ✅ Authentication - Multiple battle-tested auth providers
- ✅ Authorization - Role-based access control ready
- ✅ Data Encryption - TLS in transit, encryption at rest
- ✅ API Security - Rate limiting, CORS, input validation
- ✅ Secrets Management - Environment-based configuration
- ✅ Audit Logging - Track all sensitive operations
Read our Security Documentation for details.
We welcome contributions! See our Contributing Guide for details.
# Clone the repo
git clone https://github.com/princepal9120/ai-stack.git
# Install dependencies
pnpm install
# Run development
pnpm devMIT © AI Stack Team
Built with ❤️ for the AI developer community
Website · Documentation · GitHub · Twitter