This is a monorepo for Fullstack Monorepo Starter project containing both frontend and backend applications, along with shared packages.
fullstack-monorepo-starter/
├── apps/
│ ├── web/ # Next.js frontend application
│ └── backend/ # NestJS backend application
│
├── packages/
│ ├── ui/ # Shared UI components
│ ├── database/ # Database schema and utilities
│ ├── config/ # Shared configuration
│ ├── eslint-config/ # ESLint configuration
│ └── typescript-config/ # TypeScript configuration
- Node.js (v18 or higher)
- PNPM package manager
- PostgreSQL database
- Install dependencies:
pnpm install
- Set up environment variables:
cp apps/backend/.env.example apps/backend/.env
- Generate Prisma client (required before starting the application):
pnpm prisma:generate
- Run database migrations:
pnpm db:migrate:dev
- Start all applications in development mode:
pnpm dev
This will start:
- Frontend at http://localhost:3000
- Backend at http://localhost:3001
- API documentation at http://localhost:3001/api/docs
The web application is built with Next.js and uses shadcn/ui components. View Web Application Documentation
The backend service is built with NestJS and uses Prisma as the ORM. View Backend Documentation
This project uses PNPM workspaces. To add dependencies:
- Add a dependency to a specific app:
pnpm add <package> --filter <app-name>
- Add a shared dependency to the root:
pnpm add -w <package>
- Add a development dependency:
pnpm add -Dw <package>
- Start all services:
pnpm dev
- Run tests across all packages:
pnpm test
- Build all packages:
pnpm build
- Lint all packages:
pnpm lint
- Follow the Web Application Guide for adding new pages and components
- Use shadcn components from the shared UI package
- Follow the established styling patterns with Tailwind CSS
- Follow the Backend Guide for adding new modules and endpoints
- Use Prisma for database operations
- Document new endpoints with Swagger decorators
-
Code Style
- Follow TypeScript best practices
- Use ESLint and Prettier configurations
- Write meaningful commit messages
-
Testing
- Write unit tests for new features
- Ensure E2E tests pass before merging
- Maintain good test coverage
-
Documentation
- Update README files when adding new features
- Document API endpoints with Swagger
- Keep component documentation up to date
Common issues and solutions can be found in the respective application READMEs:
- Create a new branch for your feature
- Make your changes
- Run tests and linting
- Submit a pull request
- Ensure CI checks pass
For any questions, concerns, or bug reports, please feel free to contact:
- Email: [email protected]
This project is MIT licensed.