How raunakmali08/task-manager works
1. Project shape
- This is a small single-service Flask application packaged for Docker and wired into a Jenkins CI/CD pipeline.
- The architecture is intentionally simple: one Python app, one SQLite database, one HTML template, and a pipeline that builds/tests/deploys the container.
2. Primary runtime component
- app.py is the core application boundary.
- It serves both the browser UI and the REST API, so there is no separate frontend service or microservice split.
3. User-facing interface
- templates/index.html is the only UI template.
- The browser hits GET / for the page, and that page likely uses the API endpoints to manage tasks dynamically.
4. API boundary
- The app exposes CRUD-style endpoints under /api/tasks.
- The API is the main data contract between the browser and the server:
- list tasks
- create task
- update task
- delete task
5. Data storage
- Persistence is handled by SQLite via tasks.db.
- This is a local file-backed database, so the app has a lightweight state layer rather than a separate database server.
- The README notes the DB is auto-created, which suggests the app initializes storage on startup if needed.
6. Application flow
- Browser requests the landing page from Flask.
- Client-side interactions go to the JSON API.
- The Flask app reads/writes task data in SQLite and returns responses to the browser.
- There is no evidence of message queues, background workers, or external APIs.
7. Containerization boundary
- Dockerfile defines the runtime packaging for the app.
- The app is expected to run inside a container, which isolates dependencies and makes the deployment step reproducible.
- Port 5000 is the service port used in deployment according to the README.
8. CI/CD control plane
- Jenkinsfile defines the automation pipeline.
- The pipeline is the key DevOps subsystem in this repo and is the main reason the project exists.
9. Pipeline stages and flow
- Source changes in GitHub trigger Jenkins.
- Jenkins pulls the repo, builds the Docker image, runs tests, then deploys by replacing the running container.
- The deployment model is “stop old container, start new container,” so the release boundary is the Docker container, not the app process itself.
10. Testing boundary
- tests/test_app.py contains the Pytest suite.
- Tests are executed in the pipeline before deployment, acting as the quality gate between build and release.
- The README says there are four tests, which suggests coverage is focused on core task CRUD behavior and app routes.
11. Operational dependencies
- Jenkins is run in Docker in the described setup, and it needs access to the Docker socket to build/run app containers.
- GitHub is the source-of-truth repository and pipeline trigger source.
- WSL2/Ubuntu is the local environment described in the README, but it is not part of the application architecture itself.
12. What to draw as the main diagram
- A browser/client on one side.
- A single Flask monolith in the middle.
- SQLite tasks.db as the persistence layer beneath it.
- Jenkins/GitHub/Docker as the delivery pipeline around it.
- The key architectural idea is that the repo is as much about automated build-test-deploy flow as it is about the task manager application.
Main entry points: app.py Flask app · Jenkinsfile Deploy stage · Dockerfile Image build · test_app.py Test gate
Components 16
Application runtime
Flask task manager and its local persistence
- Flask app · Single-service task manager boundary
app.py - Landing page · Serves the browser entry page
app.py - Task API · CRUD endpoints under /api/tasks
app.py - Task store · App-side database access and task CRUD logic
app.py - tasks.db · Local file-backed task data
tasks.db - index.html · Single HTML UI template
templates/index.html
Delivery pipeline
Container build, test, and deploy automation
- Dockerfile · Builds the application image
Dockerfile - Jenkinsfile · Defines build, test, and deploy stages
Jenkinsfile - Pytest · Validates app routes and task behavior
tests/test_app.py - Image build · Packages the Flask app into a Docker image
Dockerfile - Test gate · Runs automated tests before release
tests/test_app.py - Deploy stage · Replaces the running container with the new release
Jenkinsfile
External systems
Clients and services outside the repository
- Browser · User-facing client that loads the page and calls the API
- GitHub · Repository source and pipeline trigger
- Jenkins · Executes the build-test-deploy pipeline
- Docker runtime · Builds and runs the application container
Connections 16
- Browser → Landing page: GET / · Loads the single-page UI
- Browser → Task API: CRUD JSON · Client-side task operations
- Landing page → index.html: renders · Flask serves the HTML template
- Flask app → Landing page: hosts · Application boundary includes the landing page route
- Flask app → Task API: hosts · Application boundary includes task API endpoints
- Task API → Task store: uses · API handlers read and write tasks through the storage layer
- Task store → tasks.db: persists · SQLite file stores task records
- Dockerfile → Image build: defines · Container image packaging for the app
- Jenkinsfile → Jenkins: runs on · Jenkins executes the pipeline definition
- Jenkins → GitHub: pulls source · Pipeline starts from repository changes
- Jenkins → Image build: builds · Creates the app container image
- Jenkins → Test gate: executes · Runs the Pytest suite before release
- Pytest → Test gate: provides · Test suite acts as the quality gate
- Jenkins → Deploy stage: executes · Controls release and replacement of the running container
- Deploy stage → Docker runtime: starts container · Deployment runs the new image in Docker
- Docker runtime → Flask app: runs · Container hosts the Flask service on port 5000