How william-eng/three-tier-kubernetes-app works
This is a small task manager whose principal workflow is to submit, list, and delete tasks in a React SPA; requests pass through the frontend’s Nginx proxy to FastAPI, which reads or mutates MySQL. The backend separates routing, endpoint logic, database sessions, models, and schemas. Kubernetes manifests document a second major capability: deploying the tiers with configuration, secrets, and persistent MySQL storage. The source excerpts support application-level calls; deployment relationships are based on the README. Monitoring configuration is not mapped because its behavior is not described in the supplied evidence.
Main entry points: items.py Items API · Home.jsx Task page · database.py DB engine · apiClient.js API client
Components 29
Frontend
- React entry
frontend/src/main.jsx - App
frontend/src/App.jsx - Task page
frontend/src/pages/Home.jsx - Task form
frontend/src/components/tasks/TaskForm.jsx - Task list
frontend/src/components/tasks/TaskList.jsx - Task card
frontend/src/components/tasks/TaskCard.jsx - Task state
frontend/src/hooks/useTasks.js - Task service
frontend/src/services/taskService.js - API client
frontend/src/services/apiClient.js - API config
frontend/src/constants/api.js - Nginx proxy
frontend/nginx.conf.template
Backend
- Items API
backend/app/api/v1/endpoints/items.py - API router
backend/app/api/v1/router.py - FastAPI app
backend/app/main.py - DB session
backend/app/dependencies.py - Task schema
backend/app/schemas/task.py
Data
- Task model
backend/app/models/task.py - DB engine
backend/app/core/database.py - MySQL
Kubernetes deployment
- Frontend workload
K8s/frontend/deployment.yml - Frontend service
K8s/frontend/service.yml - Backend workload
K8s/backend/deployment.yml - Backend service
K8s/backend/service.yml - Backend config
K8s/backend/ConfigMap.yml - MySQL StatefulSet
K8s/mysql/statefulset.yml - MySQL service
K8s/mysql/headless-service.yml - MySQL storage
K8s/mysql/pv.yml - MySQL secret
K8s/mysql/secret.yml
Other components
- Browser
Connections 29
- Browser → Frontend service: opens
README.md - Frontend service → Frontend workload: routes to
README.md - Frontend workload → Nginx proxy: serves
README.md - React entry → App: renders
frontend/src/main.jsx - App → Task page: renders
frontend/src/App.jsx - Task page → Task state: uses
frontend/src/pages/Home.jsx - Task page → Task form: renders
frontend/src/pages/Home.jsx - Task page → Task list: renders
frontend/src/pages/Home.jsx - Task list → Task card: renders
frontend/src/components/tasks/TaskList.jsx - Task state → Task service: calls
frontend/src/hooks/useTasks.js - Task service → API client: calls
frontend/src/services/taskService.js - API client → API config: reads
frontend/src/services/apiClient.js - API client → Nginx proxy: sends API requests
README.md - Nginx proxy → Backend service: proxies API
README.md - Backend service → Backend workload: routes to
README.md - FastAPI app → API router: registers
backend/app/main.py - API router → Items API: routes to
backend/app/api/v1/router.py - Items API → DB session: requests session
backend/app/api/v1/endpoints/items.py - DB session → DB engine: creates session from
backend/app/dependencies.py - Items API → Task model: queries and mutates
backend/app/api/v1/endpoints/items.py - Items API → Task schema: validates input with
backend/app/api/v1/endpoints/items.py - Task model → DB engine: uses base
backend/app/models/task.py - Items API → DB engine: creates tables with
backend/app/api/v1/endpoints/items.py - DB engine → MySQL: connects to
README.md - MySQL StatefulSet → MySQL service: exposed by
README.md - MySQL StatefulSet → MySQL storage: persists on
README.md - Backend config → Backend workload: configures
README.md - MySQL secret → Backend workload: provides credentials to
README.md - MySQL secret → MySQL StatefulSet: provides credentials to
README.md