Trip Planner is a simple project designed to help users find the best trip from an origin to a destination.
In addition, users (after registration) can save and manage their trips (view, delete).
The current implementation supports managing multiple providers for searching trips.
Currently, only one provider is implemented, but the system is designed to be easily extendable, allowing for the addition of an unlimited number of providers.
- NestJS: A framework for building efficient, reliable, and scalable server-side applications.
- Mongoose: MongoDB object modeling designed to work in an asynchronous environment.
- Passport: Middleware for authentication.
- Jest: Testing framework.
- Swagger: API documentation.
- JWT: JSON Web Token for secure authentication.
- Docker: Containerization platform to simplify deployment.
- NodeJS 22.x
- MongoDB 6.x
$ pnpm installpnpm installed, you can install it by running:
$ npm install -g pnpmYou can run a MongoDB instance using Docker Compose:
$ docker-compose up -dAn instance of MongoDB will be available at mongodb://localhost:27017/trip-planner.
Create a .env copy of the .env.example file and fill in the necessary values.
$ cp .env.example .envBIZAWAY_* variables with the correct values for the connection to the BizAway API.
Run the seed script to populate the database with the supported airports:
$ pnpm run seed# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run start:prod# unit tests
$ pnpm run test
# test coverage
$ pnpm run test:covI have tested only the crucial parts of the application, such as the authentication and the trip search because of my limited time.
The API documentation is available at http://localhost:3000/api.
The project is divided into the following folders:
- common: Contains shared modules and utilities.
- core: Contains the core modules of the application.
- airports: Contains the airports module.
- auth: Contains the authentication module.
- trips: Contains the trips module.
- users: Contains the users module.
- seeds: Contains seed data for the database.