A modern, full stack application starter template built with NestJS, React, TypeScript, and SQLite/PostgreSQL.
- Framework: NestJS (Node.js + TypeScript)
- Authentication: JWT with Passport.js
- Database:
- Development: SQLite
- Production: PostgreSQL
- ORM: Knex.js
- API Documentation: Swagger/OpenAPI
- Testing: Jest + Supertest
- Framework: React (Create React App) with TypeScript
- UI Components: Shadcn UI
- Styling: Tailwind CSS
- Build Tool: Craco (Create React App Configuration Override)
- Node.js (v16 or higher)
- pnpm (preferred package manager)
- PostgreSQL (for production)
- Clone the repository:
git clone <repository-url>
cd fullstack-starter-
For Development (Recommended): Open 2 terminals and run:
Terminal 1 - Backend with database:
./buildAndDev.sh
Terminal 2 - Frontend with hot reload:
./frontendDev.sh
This approach provides:
- Backend hot reload (automatically restarts when you change backend code)
- Frontend hot reload (instantly reflects frontend changes)
- PostgreSQL database running in Docker
- Separate terminal outputs for easier debugging
-
For Production: Start the full application:
./start.sh
The application will be available at:
- Frontend: http://localhost:3000 (development) or http://localhost:3000 (production)
- Backend API: http://localhost:3000/api
- Swagger Documentation: http://localhost:3000/api/docs
- All new features should be organized in modules under
backend/src/modules/ - Follow the existing module structure:
modules/feature-name/ ├── controllers/ ├── services/ ├── dto/ ├── entities/ └── feature-name.module.ts - Use TypeScript DTOs for request/response validation
- Add Swagger documentation for all new endpoints
- Write e2e tests for new features
- Components should be placed in
frontend/src/components/ - Use Tailwind CSS for styling
- Follow the existing component structure and styling patterns
- Utilize Shadcn UI components when possible
- Migrations are automatically run on application startup
- Create new migrations in
backend/src/migrations/ - Use timestamp-prefixed names:
YYYYMMDDHHMMSS_description.ts - Ensure migrations are compatible with both SQLite and PostgreSQL
cd backend
# Run e2e tests
pnpm run test:e2e
# Run test coverage
pnpm run test:covcd frontend
pnpm run testThe project includes several utility scripts in the root directory:
./buildAndDev.sh- Start backend with database and hot reload (for development)./frontendDev.sh- Start frontend with hot reload (for development)./start.sh- Start the application./stop.sh- Stop the application./restart.sh- Restart the application./build.sh- Build both frontend and backend./test.sh- Run all tests./buildAndRestart.sh- Build and restart the application./testAndRestart.sh- Run tests and restart if successful
This project is licensed under the MIT License.