How jimmyochoa/flight-system works
Main Components
• Docker Compose Orchestration – Represent the docker-compose.yml file orchestrating multiple containers.
• Microservices – Highlight four primary microservices:
• Auth Microservice (handles user login and JWT generation)
• Flights Microservice (manages flight details)
• Reservations Microservice (handles flight booking and reservation logic)
• Users Microservice (deals with user management functionality)
• Database (MongoDB) – A centralized (or containerized) database that each microservice interacts with.
• External Tools – Indicate integration with Postman (for API testing) and explain that Docker and Node.js are key technologies.
Relationships and Interactions
• The Auth Microservice provides authentication tokens (JWT) consumed by the other services.
• The Flights and Reservations microservices might communicate indirectly through API calls for integrated functionalities.
• Users data may be referenced/imported within the Reservations and Auth services.
• Microservice to the central MongoDB container to denote database interactions.
Architectural Patterns & Design Principles
• Microservices-based Architecture – Emphasize the separation of concerns where each service is independently deployed via Docker.
• Containerization – Each microservice has its own Dockerfile, and they are built and networked using Docker Compose.
• RESTful API – All services expose endpoints to communicate with each other, with Axios being used as an HTTP client.
• Security via JWT – The use of JSON Web Tokens for secure authentication across services.
Relevant Technologies and Frameworks
• Node.js – The runtime powering each microservice.
• MongoDB – The NoSQL database accessed by each service.
• Docker (and Docker Compose) – To define, build, and run the containerized services.
• JWT – For secure authentication.
• Axios – For handling inter-service communication.
Recommended Elements
• Annotations: Briefly note key technologies (like Node.js, MongoDB, Docker) inside or adjacent to the respective components.
• Then detail each microservice as its own container, linking them to the MongoDB instance.
• Interactions between the services (e.g., which services require authentication via the Auth Microservice and how they interact with the database).