How masterflux/bookstore-devops-project works
Frontend service
• Located in the "frontend/bookstorefe" directory.
• Built using Next.js.
• Exposes API endpoints (for login, catalog, cart) that proxy or interface directly with the backend services.
• Configured via environment variables (URL, CATALOG_URL, CART_URL) to point to the backend endpoints.
• Dockerized using its own Dockerfile and Kubernetes manifests.
Backend services
a. Catalog Service:
• Found in "backend/catalogservice".
• Built with Express.js under Node.js.
• Serves the catalog-related functionality (likely listing books or handling catalog API calls).
• Has its own Dockerfile and configurations (port 3001 by default).
b. Cart and User Service:
• Located in "backend/cartservice".
• Developed using NestJS, indicating the adoption of an MVC-like pattern and potential for modular component organization (e.g., separating cart and user functionality).
• Manages cart operations and user authentication, as indicated by distinct directories ("cart" and "user").
• Dockerized and exposed on port 3002 by default.
Additionally, there are deployment artifacts such as Docker-Compose scripts, GitHub Actions workflows (.github/workflows), and multiple Kubernetes manifest files in the "k8s-manifests" directory. These indicate that the system leverages container orchestration and CI/CD pipelines to manage builds and deployments.
• Frontend (Next.js based bookstore UI)
• Catalog Service (Express.js based backend)
• Cart & User Service (NestJS based backend)
Out the interactions
• Optionally, include any internal communications within the Cart & User Service (e.g., between controllers, services, and database access, if applicable) to show the internal flow.
Deployment and containerization aspects
• A representation of the Kubernetes cluster where the different services are deployed as pods/services (frontend, catalog-service, cart-service).
• Optionally, show the CI/CD pipeline (GitHub Actions) that pushes updated Docker images to the deployment environment.
• You may also mention the discovery of these components through environment configurations specified in the Frontend’s .env file and in the Kubernetes manifests.
Details related to architectural design
• Microservices pattern and separation of concerns (the frontend is decoupled from backend logic, and backend services are further segregated based on functionality).
• Use of industry standards like Docker and Kubernetes for deployment, as well as code quality setups (linting and formatting configuration files are present in the cart service).