A modern, production-ready full-stack starter built with Turborepo, featuring Next.js, NestJS, and a comprehensive shadcn/ui component library.
- ποΈ Turborepo - High-performance build system for JavaScript/TypeScript monorepos
- β‘ Next.js 15 - React framework with App Router and Server Components
- π‘οΈ NestJS - Scalable Node.js backend framework with TypeScript
- π¨ shadcn/ui - Beautiful, accessible UI components built with Radix UI and Tailwind CSS
- π― TypeScript - Full type safety across the entire stack
- π¨ Tailwind CSS - Utility-first CSS framework
- π± Responsive Design - Mobile-first approach with dark/light mode support
- π§ Developer Experience - ESLint, Prettier, Husky, and Commitlint pre-configured
- π³ Docker Ready - Containerization support for easy deployment
- π CI/CD - GitHub Actions workflows included
This Turborepo includes the following packages and apps:
web- Next.js 15 frontend application with shadcn/ui componentsapi- NestJS backend API with Prisma ORMdocs- Documentation site built with Next.js
@repo/ui- Shared React component library with 40+ shadcn/ui components@repo/db- Shared database package with Prisma client and schema@repo/eslint-config- Shared ESLint configurations@repo/typescript-config- Shared TypeScript configurations
- TypeScript - Static type checking across all packages
- ESLint - Code linting with custom rules
- Prettier - Code formatting
- Husky - Git hooks for code quality
- Commitlint - Conventional commit message linting
- Tailwind CSS - Utility-first styling
- Prisma - Type-safe database ORM
- Docker - Containerization support
- Node.js 22+
- pnpm (recommended package manager)
- Git
-
Clone the repository
git clone <your-repo-url> cd turborepo-fullstack-starter
-
Install dependencies
pnpm install
-
Set up environment variables
# Copy environment files cp apps/api/.env.example apps/api/.env cp apps/web/.env.example apps/web/.env -
Set up the database (if using the API)
pnpm db:generate pnpm db:push
Start all applications:
pnpm devStart specific applications:
# Frontend only
pnpm dev --filter=web
# Backend only
pnpm dev --filter=api
# Documentation
pnpm dev --filter=docsAccess your applications:
- π§ API: http://localhost:3000
- π Web App: http://localhost:3001
- π Docs: http://localhost:3002
Build all packages:
pnpm buildBuild specific packages:
pnpm build --filter=web
pnpm build --filter=api
pnpm build --filter=docsThe @repo/ui package includes 40+ pre-built components from shadcn/ui:
- Card - Flexible content containers
- Separator - Visual dividers
- Aspect Ratio - Maintain aspect ratios
- Container - Responsive containers
- Button - Various button styles and sizes
- Input - Text inputs with validation
- Textarea - Multi-line text inputs
- Select - Dropdown selections
- Checkbox - Boolean inputs
- Radio Group - Single selection from options
- Switch - Toggle switches
- Slider - Range inputs
- Navigation Menu - Complex navigation structures
- Breadcrumb - Hierarchical navigation
- Pagination - Page navigation
- Menubar - Application menus
- Alert - Important messages
- Toast - Temporary notifications
- Progress - Loading indicators
- Skeleton - Loading placeholders
- Dialog - Modal dialogs
- Drawer - Slide-out panels
- Popover - Contextual overlays
- Tooltip - Helpful hints
- Sheet - Side panels
- Hover Card - Rich hover content
- Table - Data tables
- Badge - Status indicators
- Avatar - User representations
- Calendar - Date selection
- Chart - Data visualizations
# Development
pnpm dev # Start all apps in development
pnpm dev:web # Start web app only
pnpm dev:api # Start API only
# Building
pnpm build # Build all packages
pnpm build:web # Build web app only
pnpm build:api # Build API only
# Code Quality
pnpm lint # Lint all packages
pnpm lint:fix # Fix linting issues
pnpm format # Format code with Prettier
pnpm type-check # Run TypeScript checks
# Testing
pnpm test # Run all tests
pnpm test:watch # Run tests in watch mode
# Database (API)
pnpm db:generate # Generate Prisma client
pnpm db:push # Push schema to database
pnpm db:migrate # Run database migrations
pnpm db:studio # Open Prisma StudioBuild and run with Docker:
# Build Docker image
docker build -t turborepo-starter .
# Run container
docker run -p 3000:3000 turborepo-starterWeb App (apps/web/.env)
NEXT_PUBLIC_API_URL=http://localhost:3001API (apps/api/.env)
DATABASE_URL="postgresql://user:password@localhost:5432/mydb"
JWT_SECRET="your-jwt-secret"Database (packages/db/.env)
DATABASE_URL="postgresql://user:password@localhost:5432/mydb"- Theme: Modify
apps/web/src/app/globals.cssfor custom themes - Components: Add new components to
packages/ui/src/ - API Routes: Add endpoints in
apps/api/src/ - Database: Update schema in
packages/db/prisma/schema.prisma
- Connect your repository to Vercel
- Configure build settings:
- Build Command:
pnpm build --filter=web - Output Directory:
apps/web/.next
- Build Command:
- Set environment variables in Vercel dashboard
- Deploy π
# Build production image
docker build -t turborepo-starter .
# Run in production
docker run -p 3000:3000 -e NODE_ENV=production turborepo-starter- Connect your repository
- Set build command:
pnpm build --filter=api - Set start command:
pnpm start --filter=api - Configure environment variables
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feat/amazing-feature - Make your changes
- Run tests:
pnpm test - Commit:
git commit -m "feat: add amazing feature" - Push:
git push origin feat/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Turborepo - The build system that powers this monorepo
- shadcn/ui - Beautiful and accessible UI components
- Next.js - The React framework for production
- NestJS - A progressive Node.js framework
- Tailwind CSS - A utility-first CSS framework
- Prisma - Next-generation ORM for Node.js and TypeScript
β Star this repo β’ π Report Bug β’ β¨ Request Feature
Made with β€οΈ by @dzikrisyairozi