How jameel-raza/kdl-starter-kit works
Project Type and Purpose
• This is a full-stack SaaS boilerplate (“KDL Starter Kit”) consisting of:
• A modular backend (Node.js + Express + Prisma + PostgreSQL) exposing REST APIs
• A modern frontend (Next.js + TailwindCSS + Zustand) hosting both a public website and an admin dashboard
• Docker-based development environment, ready for AI-service integration (LangChain, Whisper, etc.)
• Intended use cases: CRM, CMS, invoicing, automation platform.
File Structure
• Top-level:
• backend/ – Express API server, Prisma ORM, migrations + seeders
• frontend/ – Next.js App Router, styled with TailwindCSS, global context + Zustand stores
• docker-compose.yml – defines containers for backend, database, (and later AI services)
• Backend follows an MVC-ish pattern:
• src/routes → route definitions
• src/controllers → business logic handlers
• src/middleware → cross-cutting concerns (e.g., upload)
• prisma/ → schema, migrations, seeders
• Frontend uses Next.js App Router:
• src/app → grouped by route, nested layouts (public vs admin)
• components/, ui/ → reusable elements
• context/, stores/, hooks/ → state management (Zustand, React Context)
Insights from the README
• Emphasis on modularity, JWT auth with roles/multi-tenant support, AI readiness
• Tech stack table clarifies layers and dependencies
• Docker-first setup with PostgreSQL, Prisma migrations, seeding, optional manual mode
• Optional directories (ai-services/, infra/, docs/) hint at future expansion
a. Main Components
• Developer Workstation (CLI, IDE)
• Docker Compose Orchestration
• Backend Container (Node.js + Express + Prisma)
• PostgreSQL Container
• Frontend Container (Next.js) or Local Next.js Dev Server
• Optional AI Services (LangChain, Whisper, Ollama components)
• External Services (Sentry, Vault, 3rd-party APIs)
b. Relationships & Data Flow
1. User (Browser) → Next.js (Frontend) → HTTP API → Express (Backend)
2. Express → Prisma Client → PostgreSQL → ORM results → Express → Frontend → Browser
3. Express ↔ AI Microservices (e.g., LangChain) for AI workflows
4. Docker Compose networks connect backend & database, expose ports 4000 (API), 5432 (DB), and 3000 (Frontend)
5. DevOps: CI/CD pipelines push containers to registries; optional Prisma Studio at port 5555
c. Architectural Patterns
• Layered: Presentation (Next.js) → Application (Express controllers) → Data Access (Prisma) → Database (PostgreSQL)
• Modular: feature-based controllers & routes, seeders per model
• App Router + nested layouts in frontend for public vs admin zones
• Stateless JWT authentication layer
d. Key Technologies to Highlight
• Next.js (App Router), TailwindCSS, React/Zustand
• Node.js, Express.js, Prisma ORM, PostgreSQL
• Docker & docker-compose, environment variables
• AI-ready stacks (LangChain, Whisper) – show as future microservice pods