How saikiran14-void/job-application-tracker works
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.
Components 12
Django Runtime
- manage.py · Runs migrations and local server commands.
manage.py - WSGI adapter
job_tracker/wsgi.py - ASGI adapter
job_tracker/asgi.py - Project settings · Loads environment-managed OpenAI configuration.
job_tracker/settings.py - Project URL dispatch
job_tracker/urls.py
Applications API
- Applications routes · Defines CRUD, summary, and follow-up endpoints.
applications/urls.py - Application views · Handles CRUD, status summaries, and email generation.
applications/views.py - Application serializer · Validates input and renders application JSON.
applications/serializers.py
Persistence
- Job application model · Stores company, role, status, timestamp, and notes.
applications/models.py - Initial schema migration
applications/migrations/0001_initial.py - SQLite database
db.sqlite3
Other components
- OpenAI API · Generates follow-up email drafts from stored application context.
Connections 14
- 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