How arjunmnn/twsthreetierappchallenge works
What this project is (type + purpose)
This is a three-tier web application intended as a Kubernetes-on-AWS EKS deployment challenge:
• Frontend: React SPA (in frontend/)
• Backend: Node.js/Express API (in backend/)
• Database: MongoDB (deployed via Kubernetes manifests in k8s_manifests/mongo/)
• Platform/Deployment: Dockerized services deployed to AWS EKS, exposed via AWS Load Balancer Controller (see k8s_manifests/full_stack_lb.yaml and README steps)
• CI/CD hint: A Jenkinsfile exists at repo root, implying a pipeline that likely builds/pushes images and/or applies manifests.
Frontend (React)
Key files:
• frontend/src/App.js, frontend/src/Tasks.js
• frontend/src/services/taskServices.js → strongly implies the frontend calls backend “tasks” endpoints
• Dockerized via frontend/Dockerfile
Backend (Node/Express + Mongo)
Key files:
• backend/index.js (likely Express server entry)
• backend/routes/tasks.js (REST endpoints)
• backend/models/task.js (Mongo model/schema)
• backend/db.js (Mongo connection)
• Dockerized via backend/Dockerfile
Kubernetes manifests (EKS deployment)
Key files:
• k8s_manifests/frontend-deployment.yaml, frontend-service.yaml
• k8s_manifests/backend-deployment.yaml, backend-service.yaml
• k8s_manifests/mongo/deploy.yaml, service.yaml, secrets.yaml
• k8s_manifests/full_stack_lb.yaml → ingress/load balancer resource to expose full stack
• README explicitly deploys AWS Load Balancer Controller (ALB/NLB integration)
• Deployments → Pods
• Services (ClusterIP/LoadBalancer) for internal routing
• Ingress (or equivalent) fronted by AWS ALB provisioned by the controller
• Mongo Secret feeding Mongo deployment via env vars
Jenkinsfile
• Source → Jenkins pipeline → Docker build → push to registry (ECR/DockerHub) → kubectl apply / GitOps
React Frontend (SPA)
• “serves static assets; calls backend API”
Node.js/Express Backend API
• “tasks routes; task model; connects to Mongo”
(Optional but recommended) External/Platform services
• Browser → Frontend: HTTP GET / (static content)
• Frontend → Backend: HTTP/JSON (e.g., /api/tasks)
• Backend → MongoDB: MongoDB wire protocol (read/write tasks)
• frontend/src/services/taskServices.js (frontend→backend)
• backend/routes/tasks.js (API endpoints)
• backend/db.js + backend/models/task.js (backend→mongo)
Purpose: show how the above containers run on EKS and how traffic enters the cluster.
As separate nodes/areas:
• AWS Account / Region
• EKS Cluster
• Namespace: workshop (README uses this)
• Frontend Deployment → Frontend Pods
• Frontend Service
• Backend Deployment → Backend Pods
• Backend Service
• Mongo Deployment/StatefulSet (as defined) → Mongo Pod(s)
• Mongo Service
• Mongo Secret (k8s_manifests/mongo/secrets.yaml)
• kube-system namespace
• AWS Load Balancer Controller (deployed via Helm per README)
At the edge:
• AWS ALB (provisioned by controller)
created/managed from full_stack_lb.yaml (likely Ingress)
• Internet / Users
• Internet → ALB: HTTPS/HTTP
• ALB → (K8s) Ingress target → Frontend Service: HTTP
• Frontend Pod → Backend Service: HTTP
• Backend Pod → Mongo Service: TCP 27017
• Mongo Pod reads credentials from Secret
Key accuracy details to include explicitly (since they’re central to this challenge repo):
• Ingress (or ALB-backed entry resource) as the link between ALB and K8s services.
• Services as stable endpoints in front of ephemeral pods.
• Secrets feeding Mongo (and possibly backend, depending on manifests).
Purpose: show how changes become running pods on EKS.
Include:
• Git repo (this repo)
• Jenkins
• stages: test (optional), build Docker images, push images, deploy manifests
• Container Registry (ECR or DockerHub; choose what you actually use)
• EKS API Server (deployment action)
• Kubernetes Deployments rolling out new pods
• Git push/PR → Jenkins
• Jenkins → Docker build (frontend/backend)
• Jenkins → Registry push
• Jenkins → kubectl apply / Helm / manifest update → EKS cluster
Main components to enumerate (don’t merge them—separate them)
• React UI (code) vs Frontend container image vs Frontend pod(s)
• Express API (code) vs Backend container image vs Backend pod(s)
• MongoDB process vs Mongo pod vs Mongo service
• Ingress resource vs AWS ALB vs AWS Load Balancer Controller
• Kubernetes namespace boundary (workshop)
• Secrets/config (Mongo secrets; any ConfigMaps if present later)
• CI/CD (Jenkins) and registry
This matches your instruction “simply separating the project into as many components as possible is best.”
Relationships / interactions to capture
• “HTTP GET static assets”
• “HTTP JSON REST: create/read/update/delete tasks”
• “MongoDB TCP 27017”
• “K8s Service routing (kube-proxy/IPVS)”
• “Controller provisions ALB via AWS APIs”
Architectural patterns to call out
• Three-tier architecture (presentation → API → data)
• Stateless frontend/backend behind Services (scale horizontally)
• Kubernetes declarative deployments via manifests
• Externalized configuration/secrets for Mongo credentials
• Cloud-native ingress using AWS Load Balancer Controller
Technologies to label on components
• Frontend: React
• Backend: Node.js + Express (implied by routing structure)
• DB: MongoDB + (likely Mongoose via models/task.js)
• Containers: Docker
• Orchestration: Kubernetes on AWS EKS
• Ingress/LB: AWS Load Balancer Controller + ALB
• CI/CD: Jenkins
Labels
• Name (e.g., “backend-service”)
• Type (Deployment/Service/Pod/Secret/Ingress)
• Tech (Node.js, React, MongoDB)
• Direction
• Protocol/port (HTTP 80/443, Mongo 27017)
• Intent (“List tasks”, “Create task”)
Boundaries (important for EKS)
• AWS Account/Region
• EKS Cluster
• Namespace: workshop
• Namespace: kube-system (LB controller)
This makes the “where does it run” question unambiguous.
Deliver these artifacts:
C4 Container view: Browser → React → Node API → Mongo
2. EKS Deployment view: ALB → Ingress → Services → Pods → Mongo (+ Secrets, namespaces, controller)
CI/CD view: Git → Jenkins → Registry → EKS rollout
Together they’ll be detailed, accurate, and directly traceable to the repo structure and README deployment flow.