How abhi-dr/angaarxw3grads-portal works
1. What this repository is
- A single Django monolith for an education/training platform. It serves multiple user roles—public visitor, student, instructor, and administrator—from the same codebase and database.
2. Core application shell
- The angaar_hai package is the platform layer: settings.py, urls.py, wsgi.py, asgi.py, plus middleware.py, custom_decorators.py, mail_utility.py, tasks.py, and celery.py.
- This is where request routing, auth/session setup, async task wiring, and process entrypoints are centralized.
3. Identity and authentication boundary
- accounts owns the custom user/auth stack: custom user model migration rewiring, login/registration views, OAuth integration, auth backend/adapters, middleware, signals, and validation/management commands.
- It is the system boundary for sign-in, account lifecycle, and Google OAuth configuration.
4. Public/home-facing layer
- home contains the public site, landing pages, campaign/event pages, and registration flows such as Flames/Flare.
- It also holds campaign-specific models, resources, and view logic, so this app acts as the public entry point before a user becomes a student or participant.
5. Student portal
- student is the largest role app and acts as the learner-facing workspace.
- It covers dashboards, profiles, certificates, payments, batch/course participation, hackathons, JOVAC learning pages, MCQ interaction, doubt solving, notifications, and related APIs.
- It includes its own serializers, permissions, and API routes, so a lot of the student UI is server-rendered but backed by JSON endpoints for dynamic pages.
6. Instructor portal
- instructor mirrors a subset of the student/administrator capability set, focused on managing batches, sheets, events, and JOVAC content from the instructor side.
- It also exposes APIs with serializers and permission checks, implying a separate role boundary rather than one shared admin UI.
7. Administrator console
- administration is the operational back office for staff. It includes batch management, alumni, articles, events, JOVAC management, MCQ/problem tooling, sheet APIs, WhatsApp-related views, and email/helper functions.
- The presence of consumers.py and routing.py suggests real-time/channel-based features in addition to standard HTTP views.
8. Practice/execution subsystem
- practice is the coding-practice engine: problem sheets, MCQ questions, submissions, test cases, execution-related views, and async utilities.
- This is the part of the system that likely interacts with background execution or sandboxing workflows rather than simple CRUD screens.
9. JOVAC content flow
- JOVAC content is a cross-cutting subsystem spanning student, instructor, administration, and practice.
- The README shows it uses ordered CourseSheet items and mixed item types such as tutorials, assignments, MCQs, and coding tasks.
- Navigation, submission, and page rendering all depend on preserving sheet context through query parameters and API responses, so the learning path is treated as a deterministic sequence rather than independent pages.
10. API structure
- Each major role has its own API namespace under student/api, instructor/api, and administration/api.
- These APIs are organized with serializers, permission classes, and view modules, which cleanly separate JSON/data concerns from the HTML template layer.
- There is also an older student/api.py, which looks like legacy API surface kept alongside the newer package layout.
11. Data model and schema evolution
- The repository relies heavily on migrations across apps, including custom-user rewiring and later cleanup migrations.
- That indicates the database schema has evolved over time around a shared core identity model, plus app-specific entities for courses, sheets, registrations, certificates, batches, and campaign objects.
12. Async, realtime, and integration points
- Celery is present for background jobs, and ASGI is configured, so the runtime supports async processing beyond standard request/response.
- Integrations visible in the tree include email delivery, Google OAuth, WhatsApp-related flows, payment utilities, image uploads, and certificate generation.
- These are not isolated services in this repo, but external dependencies that materially affect the system’s architecture.
13. Presentation layer
- The app is predominantly server-rendered with Django templates under templates/, organized by role and feature.
- demo_static/ contains the bundled frontend assets: Bootstrap, jQuery, ApexCharts, TinyMCE, media files, and feature-specific CSS/JS.
- This points to a traditional Django template architecture with some richer client-side behavior on top, not a separate SPA frontend.
14. How requests typically flow
- A request enters Django through the root URL config, is routed to the relevant app, authenticated/authorized by the role-specific logic, and then either rendered as HTML or served as JSON.
- Content-heavy paths such as JOVAC, sheets, MCQs, and submissions often combine server-rendered pages with API calls and background work, while admin/instructor/student views remain tightly coupled to the shared database.
Main entry points: urls.py Root URLs · views.py Student · models.py Accounts · settings.py Settings
Components 21
Platform
Project shell, routing, and runtime wiring
- manage.py · Django command entrypoint
manage.py - Settings · Project configuration and app wiring
angaar_hai/settings.py - Root URLs · Top-level request routing
angaar_hai/urls.py - ASGI/WSGI · Process interfaces for web and async runtime
angaar_hai/asgi.py - Celery · Background task integration
angaar_hai/celery.py
Identity
Authentication and account lifecycle
- Accounts · Custom user model, login, OAuth, and account lifecycle
accounts/models.py - Auth views · Registration, login, and account flows
accounts/views.py - OAuth stack · Adapters, backend, and Google OAuth settings
accounts/google_oauth_settings.py
Role apps
Public, student, instructor, and admin application boundaries
- Home · Landing pages and public registrations
home/views.py - Student · Learner portal for dashboards, batches, certificates, payments, and submissions
student/views.py - Student API · Student-facing serializers, permissions, and endpoints
student/api/views/dashboard_api.py - Instructor · Instructor workspace for batches, sheets, events, and JOVAC
instructor/views.py - Instructor API · Instructor endpoints with role permissions
instructor/api/views/batch_api.py - Admin · Operational console for staff workflows and real-time features
administration/views.py - Admin API · Administrative batch, event, JOVAC, and sheet endpoints
administration/api/views/batch_api.py
Learning engine
Shared practice, sheets, and JOVAC content flows
- Practice · Problem sheets, MCQ submissions, and execution utilities
practice/views.py - JOVAC learner · Student-side ordered learning path and submissions
student/jovac_views.py - JOVAC admin · Instructor and admin content authoring for JOVAC
administration/jovac_views.py - Sheet flow · Shared sheet, batch, and MCQ navigation logic
student/batch_views.py
Presentation
Server-rendered templates and bundled frontend assets
- Templates · Role-based Django templates for rendered pages
templates/student/base.html - Static assets · Bundled CSS, JS, media, and editor/chart dependencies
demo_static/js/dashboard/libs/bootstrap/dist/js/bootstrap.js
Connections 30
- manage.py → Settings: loads · Command entrypoint uses project settings
- Settings → Root URLs: routes · Settings connect the root URL configuration
- Root URLs → Auth views: auth · Root routing sends sign-in and account requests to accounts
- Root URLs → Home: public · Public site routes land in home
- Root URLs → Student: student · Learner routes enter the student app
- Root URLs → Instructor: instructor · Instructor routes enter the instructor app
- Root URLs → Admin: admin · Staff routes enter the administrative console
- Root URLs → Practice: practice · Practice routes reach the execution subsystem
- Settings → Accounts: user model · Platform settings depend on the custom account model
- Accounts → OAuth stack: oauth · Account boundary includes Google OAuth and backend adapters
- Student → Student API: api · Student UI is backed by JSON endpoints
- Instructor → Instructor API: api · Instructor UI is backed by JSON endpoints
- Admin → Admin API: api · Staff console exposes structured APIs
- Student → Sheet flow: study · Learner batch and sheet pages share the course flow
- Instructor → Sheet flow: manage · Instructor tools manage the same sheet and batch structures
- Admin → JOVAC admin: author · Admin console manages JOVAC content
- Student → JOVAC learner: learn · Student portal renders the ordered learning path
- Practice → JOVAC learner: submit · Coding and MCQ practice feed JOVAC submissions
- Practice → JOVAC admin: curate · Practice content is curated from instructor/admin tooling
- Home → Templates: render · Public pages are server-rendered from templates
- Student → Templates: render · Student views render role-specific templates
- Instructor → Templates: render · Instructor views render role-specific templates
- Admin → Templates: render · Admin console renders from templates
- Practice → Static assets: ui assets · Practice pages rely on bundled frontend assets
- Settings → Celery: tasks · Project settings wire async job processing
- Settings → ASGI/WSGI: serve · Project settings configure web and async entrypoints
- Student → Accounts: authz · Student portal depends on shared account identity
- Instructor → Accounts: authz · Instructor portal depends on shared account identity
- Admin → Accounts: authz · Admin console depends on shared account identity
- Home → Accounts: register · Public registration flows hand off into account creation