A full-stack application with Nuxt 3 frontend and NestJS backend in a monorepo setup.
- Docker
- Node.js >20.x
- npm (version compatible with Node 20+)
- Make (optional, but recommended for command shortcuts)
-
Clone the repository
-
Copy environment files:
cp packages/backend/.env.example packages/backend/.env cp packages/frontend/.env.example packages/frontend/.env
-
Update the environment variables in both
.envfiles as needed -
run
npm install
make setup # Install dependencies and build Docker images
make start # Start all services in Docker containers
make create-db # Create and initialize databaseOption 1: Docker Containers (Production-like)
Warning
The version of nuxt/image package used in this project has some problems while running in containers or production build, for development it is advisable to use Local Development approach
Run the following commands to start the env in the containers:
make start-api-dev
make start-fe-dev- Access application at
http://localhost:8000 - API available at
http://localhost:3000
Option 2: Local Development
npm run backend:start:dev # Start NestJS in dev mode
npm run frontend:start:dev # Start Nuxt 3 in dev mode- Frontend:
http://localhost:8000 - Backend:
http://localhost:3000
When running the backend in development mode, Swagger UI is automatically available at:
http://localhost:3000/docs
Warning
The docs page could render blank, if that's the case copy the json from http://localhost:3000/docs-json and paste it in https://editor.swagger.io/ to view the documentation
This interactive documentation provides:
- All available API endpoints
- Request/response schemas
- Direct testing capabilities for endpoints
Note: Swagger is only enabled in development mode. To access it:
- Ensure you're running the backend with
npm run backend:start:dev - Open the Swagger UI in your browser at the provided URL
You can find the Architecture Decision Records (ADR) for this project in the /docs/adr directory. These documents provide insights into the architectural decisions made throughout the project.
npm run backend:test
npm run frontend:testmake create-db # Ensure clean database
npm run backend:test:e2e # Run end-to-end tests.
├── packages
│ ├── backend #NestJs Application
│ │ ├── apps
│ │ │ └── api #EntryPoint Backend
│ │ ├── libs
│ │ │ ├── core #Main module containing configs, loggers and database module
│ │ │ └── tour #Module containing the booking logic
│ │ │ ├── test #Backend Tests
│ │ ├── migrations #Migrations
│ │ ├── mikro-orm.config.ts #Config useful for mikro-orm CLI
│ │ ├── seeders #Seeders, also used for the env of e2e test
│ ├── frontend # Nuxt 3 Application
│ │ ├── components #Components
│ │ │ └── george #Basic components like buttons or inputs
│ │ ├── composables
│ │ ├── layouts
│ │ ├── pages
│ │ ├── stores
│ │ └── utils
│ └── shared # Shared directory for types of api callsmake setup # Install dependencies and build containers
make start # Start all services
make create-db # Initialize database# Frontend
npm run frontend:start:dev
npm run frontend:build
npm run frontend:start:prod
# Backend
npm run backend:start:dev
npm run backend:build
npm run backend:start:prod
# Testing
npm run backend:test
npm run frontend:test
npm run backend:test:e2e- Port Conflicts: Ensure Docker containers are stopped before running local dev servers
- Database Issues: Run
make create-dbto reset the database - Docker Cleanup: Use
make cleanif encountering container issues
MIT - See the LICENSE file for details
Note: For production deployment, ensure to build both applications and configure proper environment variables