A NestJS-based fleet management system that helps organizations track and manage their vehicle fleet. The system provides comprehensive vehicle tracking, maintenance scheduling, and incident reporting capabilities.
- Vehicle management and tracking
- Maintenance scheduling and history
- Incident reporting and tracking
- RESTful API with Swagger documentation
- PostgreSQL database integration
- Docker containerization
- Comprehensive test coverage (Unit, E2E, and Postman tests)
- NestJS (Node.js framework)
- TypeScript
- PostgreSQL
- TypeORM
- Docker
- Swagger/OpenAPI
- Jest (Testing)
- Node.js (v14 or higher)
- Docker and Docker Compose
- PostgreSQL (if running locally)
- Clone the repository
- Create a
.env
file with the following configuration:
POSTGRES_HOST=postgres
POSTGRES_USER=le_user
POSTGRES_PASSWORD=le_pwd
POSTGRES_DB=le_db
PG_DATA=/var/lib/postgresql/data
NODE_ENV=development
- Start the development environment:
sudo docker-compose build && docker-compose up
The application will be available at http://localhost:3000
npm run test
npm run test:cov
sudo docker-compose -f docker-compose-e2e.yml build && docker-compose -f docker-compose-e2e.yml up
- Install Newman:
npm install -g newman
- Run the Postman collection:
newman run -e ./test/postman/FLEET_DEV.postman_environment.json ./test/postman/fleetomatic.postman_collection.json
Swagger documentation is available at /doc
endpoint when the application is running.
Generate code documentation using Compodoc:
npx @compodoc/compodoc -p tsconfig.json -s
src/
├── vehiculos/ # Vehicle management module
│ ├── novedades/ # Incident reporting module
│ ├── vehiculo.entity.ts
│ ├── vehiculo.dto.ts
│ └── ...
├── app.module.ts # Main application module
├── main.ts # Application entry point
└── ...
UNLICENSED - All rights reserved
Raúl Jiménez [email protected]
sudo docker-compose build && docker-compose up
Necesita el archivo .env
configurado con la conexión a la base de datos:
POSTGRES_HOST=postgres
POSTGRES_USER=le_user
POSTGRES_PASSWORD=le_pwd
POSTGRES_DB=le_db
PG_DATA=/var/lib/postgresql/data
NODE_ENV=development
npm run test
npm run test:cov
sudo docker-compose -f docker-compose-e2e.yml build && docker-compose -f docker-compose-e2e.yml up
npm install -g newman
newman run -e ./test/postman/FLEET_DEV.postman_environment.json ./test/postman/fleetomatic.postman_collection.json
newman
Swagger is available in /doc
Compodocs can be generated with this command:
npx @compodoc/compodoc -p tsconfig.json -s