How aadi-sonwane/wanderlust-mega-project works
Main Components
a. Frontend Component:
• Located in the “frontend” directory with clear indications of React components, pages, assets, and configuration files.
• Represents the user interface of the travel blog.
• Communicates with the backend APIs.
b. Backend Component:
• Found in the “backend” directory, including API endpoints (in the “api”, “controllers”, “routes” folders) and services (such as Redis integration).
• Containerized via its Dockerfile.
c. Database & Caching:
• MongoDB (as the primary data store) and Redis (for caching) as inferred from the file structure and configuration scripts.
d. CI/CD Pipeline & Automation:
• Jenkins Master and Worker nodes with pipelines for CI (build and push Docker images) and CD (deploying versions via ArgoCD).
• Automation scripts in the “Automations” folder and GitOps configuration in the “GitOps” folder.
e. Infrastructure and Deployment:
• Kubernetes YAML configurations (in the “kubernetes” folder) for backend, frontend, MongoDB, persistent volumes, and Redis.
• Terraform scripts (in the “terraform” directory) for provisioning AWS resources.
f. Monitoring and Security:
• Prometheus and Grafana deployed via Helm charts (details provided in the README) for monitoring metrics.
• Tools like OWASP, SonarQube, and Trivy integrated in the pipeline for code quality and security scans.
Relationships and Interactions
• The Frontend communicates with the Backend via REST APIs.
• The Backend acts as an interface between user requests and the Database (MongoDB) while leveraging Redis for caching.
• The CI/CD pipeline (Jenkins jobs and automation scripts) triggers Docker builds and image pushes, which then update the deployed Kubernetes resources via ArgoCD.
• Infrastructure-as-code (Terraform & Kubernetes manifests) orchestrates deployment on AWS EKS.
• Monitoring and logging components (Prometheus & Grafana) observe the health and performance of the cluster and applications.
Architectural Patterns & Design Principles
• Separation of Concerns: Clearly separated frontend and backend layers.
• Containerization and Orchestration: Use of Docker, Kubernetes/EKS, and GitOps (ArgoCD) emphasizes microservice-like deployment.
• CI/CD with automated pipelines: Jenkins pipelines handling build, test, and deploy processes.
• Infrastructure as Code: Kubernetes YAML and Terraform scripts to manage and deploy infrastructure consistently.
• Security and Quality Assurance: Integration of security scanning (OWASP, Trivy) and code quality analysis (SonarQube).