# saikiran14-void/job-application-tracker architecture

> Architecture diagram of the GitHub repository saikiran14-void/job-application-tracker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saikiran14-void/job-application-tracker
- Repository: https://github.com/saikiran14-void/job-application-tracker

## Overview

#### Purpose and Runtime

A Django REST API for recording job applications, querying their progress, aggregating status counts, and generating AI-assisted follow-up email drafts. It runs through Django’s development/production server interfaces: `manage.py`, `job_tracker/wsgi.py`, and `job_tracker/asgi.py`.

#### Project Composition and Routing

The `job_tracker` project owns Django configuration and top-level URL dispatch. Requests under the API namespace are delegated into the applications domain:
- `job_tracker/settings.py`
- `job_tracker/urls.py`
- `applications/urls.py`

This is a server-rendered Python backend/API project, not a separate frontend application.

#### Application Domain and Persistence

The central persisted entity is a job application, defined in `applications/models.py`. It carries company, role, workflow status, application timestamp, and notes. Django migrations establish its relational schema:
- `applications/models.py`
- `applications/migrations/0001_initial.py`

The repository includes `db.sqlite3`, indicating SQLite is the current local database. Django ORM is the persistence boundary; API code should interact with application records through the model/queryset layer rather than database-specific SQL.

#### API Serialization and CRUD Control Flow

HTTP requests reach application views, which validate/shape model data through DRF serializers and perform CRUD operations. The primary resource endpoint supports create, list (including status filtering), retrieve, update, and delete:
- `applications/urls.py`
- `applications/views.py`
- `applications/serializers.py`

The expected flow is request → URL routing → DRF view → serializer validation/representation → Django ORM → SQLite → JSON response.

#### Reporting Stage

A summary endpoint aggregates application records into counts grouped by status. This is a read-only reporting path distinct from individual-resource CRUD, but it remains within the applications view layer and uses the same persisted model:
- `applications/views.py`
- `applications/models.py`
- `applications/urls.py`

Its output is status/count records, including zero-count statuses as described by the public API contract.

#### AI Follow-up Generation Boundary

A dedicated per-application POST endpoint generates a professional follow-up email draft. It first needs the stored application context, then calls OpenAI through the Python OpenAI dependency; the generated text or service failure is returned as JSON:
- `applications/views.py`
- `applications/urls.py`
- `job_tracker/settings.py`

This is the principal external-service boundary. OpenAI credentials are expected to be environment-managed, with `python-decouple` available for configuration loading. Failures such as invalid credentials are surfaced at the API boundary rather than changing application persistence.

#### Operational Entry Points

`manage.py` is the administrative entry point for migrations, tests, and local serving. Django deployment adapters expose the same project under synchronous WSGI or asynchronous ASGI hosting:
- `manage.py`
- `job_tracker/wsgi.py`
- `job_tracker/asgi.py`

Core infrastructure dependencies are Django, Django REST Framework, django-filter for query filtering, SQLite locally, and OpenAI for optional email generation.

Main entry points: [`job_tracker/settings.py`](https://github.com/saikiran14-void/job-application-tracker/blob/main/job_tracker/settings.py) (Project settings), [`applications/views.py`](https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/views.py) (Application views), [`applications/models.py`](https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/models.py) (Job application model), [`manage.py`](https://github.com/saikiran14-void/job-application-tracker/blob/main/manage.py) (manage.py)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Django Runtime"]
  node_manage["manage.py<br/>admin entry point<br/>[manage.py]"]
  node_wsgi["WSGI adapter<br/>deployment entry point<br/>[wsgi.py]"]
  node_asgi["ASGI adapter<br/>deployment entry point<br/>[asgi.py]"]
  node_settings["Project settings<br/>Django configuration<br/>[settings.py]"]
  node_project_urls["Project URL dispatch<br/>URL router<br/>[urls.py]"]
end

subgraph group_api["Applications API"]
  node_app_urls["Applications routes<br/>API router<br/>[urls.py]"]
  node_views["Application views<br/>DRF views<br/>[views.py]"]
  node_serializers["Application serializer<br/>DRF serializer<br/>[serializers.py]"]
end

subgraph group_data["Persistence"]
  node_model["Job application model<br/>Django ORM model<br/>[models.py]"]
  node_migration["Initial schema migration<br/>Django migration<br/>[0001_initial.py]"]
  node_sqlite[("SQLite database<br/>local database<br/>[db.sqlite3]")]
end

node_openai{{"OpenAI API<br/>external AI service"}}

node_manage -->|"boots"| node_settings
node_wsgi -->|"loads"| node_settings
node_asgi -->|"loads"| node_settings
node_settings -->|"configures"| node_project_urls
node_project_urls -->|"delegates API routes"| node_app_urls
node_app_urls -->|"routes requests"| node_views
node_views -->|"validates and renders"| node_serializers
node_views -->|"CRUD and aggregation"| node_model
node_serializers -->|"maps records"| node_model
node_model -->|"ORM persistence"| node_sqlite
node_migration -->|"creates schema for"| node_model
node_manage -->|"applies"| node_migration
node_views -->|"generates follow-up draft"| node_openai
node_settings -.->|"supplies credentials"| node_openai

click node_manage "https://github.com/saikiran14-void/job-application-tracker/blob/main/manage.py"
click node_wsgi "https://github.com/saikiran14-void/job-application-tracker/blob/main/job_tracker/wsgi.py"
click node_asgi "https://github.com/saikiran14-void/job-application-tracker/blob/main/job_tracker/asgi.py"
click node_settings "https://github.com/saikiran14-void/job-application-tracker/blob/main/job_tracker/settings.py"
click node_project_urls "https://github.com/saikiran14-void/job-application-tracker/blob/main/job_tracker/urls.py"
click node_app_urls "https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/urls.py"
click node_views "https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/views.py"
click node_serializers "https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/serializers.py"
click node_model "https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/models.py"
click node_migration "https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/migrations/0001_initial.py"
click node_sqlite "https://github.com/saikiran14-void/job-application-tracker/blob/main/db.sqlite3"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_manage,node_wsgi,node_asgi,node_settings,node_project_urls toneBlue
class node_app_urls,node_views,node_serializers toneAmber
class node_model,node_migration,node_sqlite toneMint
class node_openai toneNeutral
```

## Components

### Django Runtime

- [manage.py](https://github.com/saikiran14-void/job-application-tracker/blob/main/manage.py): admin entry point · Runs migrations and local server commands. · `manage.py`
- [WSGI adapter](https://github.com/saikiran14-void/job-application-tracker/blob/main/job_tracker/wsgi.py): deployment entry point · `job_tracker/wsgi.py`
- [ASGI adapter](https://github.com/saikiran14-void/job-application-tracker/blob/main/job_tracker/asgi.py): deployment entry point · `job_tracker/asgi.py`
- [Project settings](https://github.com/saikiran14-void/job-application-tracker/blob/main/job_tracker/settings.py): Django configuration · Loads environment-managed OpenAI configuration. · `job_tracker/settings.py`
- [Project URL dispatch](https://github.com/saikiran14-void/job-application-tracker/blob/main/job_tracker/urls.py): URL router · `job_tracker/urls.py`

### Applications API

- [Applications routes](https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/urls.py): API router · Defines CRUD, summary, and follow-up endpoints. · `applications/urls.py`
- [Application views](https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/views.py): DRF views · Handles CRUD, status summaries, and email generation. · `applications/views.py`
- [Application serializer](https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/serializers.py): DRF serializer · Validates input and renders application JSON. · `applications/serializers.py`

### Persistence

- [Job application model](https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/models.py): Django ORM model · Stores company, role, status, timestamp, and notes. · `applications/models.py`
- [Initial schema migration](https://github.com/saikiran14-void/job-application-tracker/blob/main/applications/migrations/0001_initial.py): Django migration · `applications/migrations/0001_initial.py`
- [SQLite database](https://github.com/saikiran14-void/job-application-tracker/blob/main/db.sqlite3): local database · `db.sqlite3`

### Other components

- **OpenAI API**: external AI service · Generates follow-up email drafts from stored application context.

## Connections

- manage.py → Project settings: boots
- WSGI adapter → Project settings: loads
- ASGI adapter → Project settings: loads
- Project settings → Project URL dispatch: configures
- Project URL dispatch → Applications routes: delegates API routes
- Applications routes → Application views: routes requests
- Application views → Application serializer: validates and renders
- Application views → Job application model: CRUD and aggregation
- Application serializer → Job application model: maps records
- Job application model → SQLite database: ORM persistence
- Initial schema migration → Job application model: creates schema for
- manage.py → Initial schema migration: applies
- Application views → OpenAI API: generates follow-up draft
- Project settings → OpenAI API: supplies credentials
