A modular, highly customizable framework for rapid MVP development built with Next.js, Zustand, PostgreSQL, Tailwind, ShadCN, Zod, and Drizzle ORM.
- Modular Architecture: Self-contained modules that can be plugged in or removed without conflicts
- Auto-Discovery: Automatic route and API loading from module configurations
- Type-Safe: Full TypeScript support with Zod validation
- Rapid Development: Pre-configured structure for fast feature development
- Framework: Next.js 16 (App Router)
- State Management: Zustand
- Database: PostgreSQL with Drizzle ORM
- Styling: Tailwind CSS
- UI Components: ShadCN
- Validation: Zod
- Icons: Lucide React
src/
├── app/ # Next.js App Router
│ ├── (auth)/ # Authentication routes
│ ├── (dashboard)/ # Protected dashboard routes
│ └── api/ # API routes
├── core/ # Core system
│ ├── components/ # Shared components
│ ├── hooks/ # Shared hooks
│ ├── lib/ # Utilities and core logic
│ ├── middleware/ # Middleware functions
│ ├── store/ # Core stores
│ ├── types/ # Shared types
│ └── config/ # Configuration
└── modules/ # Feature modules
├── notes/ # Notes module example
└── _template/ # Template for new modules
- Node.js 18+
- PostgreSQL database
-
Clone the repository
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env.local
Update
.env.localwith your database connection string. -
Run database migrations:
npm run db:generate npm run db:migrate
-
Start the development server:
npm run dev
- Copy the
_templatefolder insrc/modules/to create your new module - Update
module.config.jsonwith your module configuration - Define API endpoints in
api/endpoints.ts - Create handlers in
api/handlers/ - Add routes in
routes/ - Implement services, components, and stores as needed
Each module follows this structure:
module-name/
├── module.config.json # Module manifest
├── api/
│ ├── endpoints.ts # API definitions
│ └── handlers/ # API handlers
├── components/ # Module components
├── routes/ # Page components
├── services/ # Business logic
├── store/ # Zustand store
├── schemas/ # Database & validation schemas
├── types/ # Module types
└── index.ts # Module exports
- Login functionality
- Registration
- Protected routes
- Session management
- Sidebar navigation
- Top bar
- Content area
- Auto-loaded module navigation
- Create notes
- List notes
- View note details
- Update notes
- Delete notes
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run db:generate- Generate database migrationsnpm run db:migrate- Run database migrationsnpm run db:studio- Open Drizzle Studio
MIT