How rajappan47/jobportal_backend works
Purpose and runtime
This is a Django-based applicant tracking system (ATS) backend. It organizes recruitment data around accounts, companies, jobs, candidates, and job applications, with an AI-oriented service layer. The project can run through Django’s development/management entry point at manage.py, or deploy through WSGI/ASGI via ats_backend/wsgi.py and ats_backend/asgi.py.
Project composition and routing
ats_backend is the composition root: settings and top-level URL routing are in ats_backend/settings.py and ats_backend/urls.py. Feature apps expose their own route modules—such as accounts/urls.py, jobs/urls.py, and applications/urls.py—which are expected to be mounted by the root URL configuration. This keeps HTTP API ownership aligned with business domains.
Identity and account boundary
The accounts app owns user/account persistence, API serialization, and request handlers:
• accounts/models.py
• accounts/serializers.py
• accounts/views.py
Its migrations include a custom-user-related evolution (accounts/migrations/0002_alter_user_options_alter_user_managers_and_more.py), indicating that identity is a foundational cross-domain dependency. Other domain records should reference this account model rather than introducing independent user identity.
Recruitment domain model
Company and job data are separated into dedicated bounded areas:
• Company lifecycle/API: companies/models.py, companies/serializers.py, companies/views.py
• Job lifecycle/API: jobs/models.py, jobs/serializers.py, jobs/views.py
Job schema evolution includes deadline, type, and location fields (jobs/migrations/0002_job_deadline.py, jobs/migrations/0003_job_job_type_job_location.py), making a job posting the likely central entity for recruiting workflows.
Candidate and application workflow
Candidate profile data is managed independently from applications:
• candidates/models.py
• candidates/serializers.py
• candidates/views.py
Applications form the association between candidates and jobs, with their own persistence and API boundary:
• applications/models.py
• applications/serializers.py
• applications/views.py
The application migration applications/migrations/0002_alter_application_unique_together.py indicates an explicit uniqueness constraint, likely protecting against duplicate candidate/job submissions. The core flow is therefore: account/profile and company setup → job creation → candidate profile/resume → application submission and tracking.
AI integration boundary
AI functionality is isolated from core CRUD apps:
• ai_engine/services.py
• ai_engine/views.py
Views provide the HTTP-facing integration point, while services should contain provider calls, document analysis, scoring, or matching logic. This separation is important: AI processing can consume candidate resumes and job/application data without embedding external-service concerns into domain models or serializers.
Persistence and file storage
Django migrations define the relational schema across all business apps, while the checked-in development database is db.sqlite3. Resume and application documents are stored as media files under:
• media/resumes
• media/applications
This creates a material boundary between relational metadata in application/candidate models and file-backed resume artifacts. Production deployment should account for durable media storage and database replacement/management, as SQLite and local media paths are development-oriented infrastructure.
Components 19
Django Runtime
- Management Entry
manage.py - WSGI Entry
ats_backend/wsgi.py - ASGI Entry
ats_backend/asgi.py - Root URL Router
ats_backend/urls.py
Recruitment Domains
- Account Routes
accounts/urls.py - Accounts API · Owns the custom account model, serializers, and handlers.
accounts/views.py - Account Models
accounts/models.py - Companies API · Owns company lifecycle and API operations.
companies/views.py - Job Routes
jobs/urls.py - Jobs API · Manages job postings, deadlines, types, and locations.
jobs/views.py - Candidates API · Manages candidate profiles and resume metadata.
candidates/views.py - Application Routes
applications/urls.py - Applications API · Associates candidates with jobs and tracks submissions.
applications/views.py - Application Models · Enforces candidate/job submission uniqueness.
applications/models.py
AI Boundary
- AI API
ai_engine/views.py - AI Services · Contains provider calls, analysis, scoring, and matching logic.
ai_engine/services.py
Persistence & Files
- Development Database · Django migrations define its relational schema.
db.sqlite3 - Resume Files
media/resumes - Application Files
media/applications
Connections 25
- Management Entry → Root URL Router: runs Django
- WSGI Entry → Root URL Router: serves HTTP
- ASGI Entry → Root URL Router: serves async HTTP
- Root URL Router → Account Routes: mounts
- Root URL Router → Job Routes: mounts
- Root URL Router → Application Routes: mounts
- Account Routes → Accounts API: dispatches
- Job Routes → Jobs API: dispatches
- Application Routes → Applications API: dispatches
- Accounts API → Account Models: persists identity
- Accounts API → Development Database: stores records
- Companies API → Development Database: stores companies
- Jobs API → Development Database: stores postings
- Candidates API → Development Database: stores profiles
- Applications API → Application Models: uses
- Application Models → Development Database: stores submissions
- Candidates API → Resume Files: references resumes
- Applications API → Application Files: references documents
- Applications API → Jobs API: submits to
- Applications API → Candidates API: submitted by
- Jobs API → Companies API: belongs to company
- AI API → AI Services: delegates analysis
- AI Services → Candidates API: reads resume data
- AI Services → Jobs API: matches requirements
- AI Services → Applications API: scores applications