How raodotsh/todo-cicd-agile works
Project type and purpose
• This is a monolithic, server-rendered, full-stack web application built on Django (Model-View-Template paradigm).
• It provides a simple “todo” list API and UI, stores tasks in a relational database, and includes Docker and Kubernetes deployment artifacts.
File structure
• Top level:
• manage.py (Django CLI entry)
• Dockerfile, docker-compose.yml, .dockerignore, .gitignore
• db.sqlite3 (local development database)
• volume/ (bind-mount volume for persistent storage)
• k8s/ (Kubernetes manifests for both the app and a MySQL DB)
• Django project directory: todoApp/
• settings.py, urls.py, wsgi.py, views.py
• Django app directory: todos/
• models.py, views.py, urls.py, admin.py, migrations/
• templates/ (server-rendered HTML)
• tests.py
• staticfiles/ (collected CSS & other assets)
README for additional insights
• Confirms use of SQLite for local development
• Instructions for migrations, running the built-in dev server
Main components
a. Client & UI Layer
• Web browser (desktop/mobile) requesting pages under /todos
• HTTP(S) via Ingress or port mapping
b. Web Application Layer
• Django process (Gunicorn or Django dev server)
• WSGI interface (wsgi.py)
• URL routing (todoApp/urls.py → todos/urls.py)
• Views & Templates (todos/views.py + HTML in templates/)
• Static file handler (WhiteNoise or NGINX if added) serving staticfiles/
c. Data Layer
• Local SQLite (db.sqlite3) or
• MySQL pod (k8s/MYSQL-DB manifests: Deployment + Service)
• Persistent volume for database data (volume/store_data/db.sqlite3 or K8s PVC)
d. Containerization & Orchestration
• Docker container for Django app (Dockerfile)
• docker-compose service definitions for app & volume mount
• Kubernetes resources:
• Pod + Deployment for app (k8s/deployment.yaml + pod.yaml)
• Service to expose app (k8s/service.yaml)
• ConfigMap for app settings (if any)
• Secret for database credentials (k8s/MYSQL-DB/secret.yml)
Interactions & data flow
• Browser → Ingress/LoadBalancer → Service → Django Pod
• Django → ORM → Database Pod or local .sqlite file via volume mount
• Django → reads static assets from staticfiles/ directory or separate CDN/Service
• ConfigMap/Secret injected into Pod as environment variables for DB connection
Architectural patterns & principles
• MVC/MVT: Models (todos/models.py), Views (todos/views.py), Templates (todos/templates/)
• Twelve-factor app: stateless containers, config via environment, backing services (DB) as attached resources
• Container-first design: Docker + Compose for dev, Kubernetes for production