A backend microservice responsible for managing flights, airports, cities, and airplanes in a flight booking system. The service follows a scalable layered architecture using Controllers, Services, Repositories, and Models to provide clean and maintainable code.
- Flight CRUD Operations
- Airport Management
- City Management
- Airplane Management
- Flight Search APIs
- Database Migrations & Seeders
- Layered Architecture
- MySQL Database Integration
- Sequelize ORM
- Input Validation Middleware
- Centralized Error Handling
- Node.js
- Express.js
- MySQL
- Sequelize ORM
- Sequelize CLI
- dotenv
Client
|
v
Routes
|
v
Controllers
|
v
Services
|
v
Repositories
|
v
MySQL Database
The project follows a layered architecture to separate business logic from database operations, making the application easier to scale and maintain.
- Create Flight
- Update Flight
- Delete Flight
- Get Flight Details
- Search Flights
- Create Airport
- Update Airport
- Delete Airport
- Get Airport Details
- Create City
- Update City
- Delete City
- Get City Details
- Manage Airplane Information
- id
- name
- createdAt
- updatedAt
- id
- name
- code
- cityId
- id
- modelNumber
- capacity
- id
- flightNumber
- airplaneId
- departureAirportId
- arrivalAirportId
- departureTime
- arrivalTime
- price
- totalSeats
Clone the repository:
git clone <repository-url>Install dependencies:
npm installConfigure environment variables:
PORT=3000
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=password
DB_NAME=flight_search_dbRun migrations:
npx sequelize-cli db:migrateRun seeders:
npx sequelize-cli db:seed:allStart server:
npm startsrc/
│
├── controllers/
├── services/
├── repository/
├── models/
├── routes/
├── middleware/
├── config/
├── migrations/
├── seeders/
└── utils/
- REST API Development
- Layered Architecture
- Repository Pattern
- Service Layer Pattern
- Database Relationships
- CRUD Operations
- Database Migrations
- Database Seeding
- Express Middleware
- Backend Microservices
- Advanced Flight Filtering
- Pagination
- Sorting
- Flight Availability Tracking
- Seat Booking Integration
- Redis Caching
- API Documentation using Swagger
- Docker Support
Developed as a backend microservice for flight management and search operations within a microservices-based flight booking system.