How ryuga/university-hub works
Purpose and Entry Points
A Django website for Christ College’s Computer Science department, combining a public departmental site with an authenticated student/administrator dashboard. Runtime entry points are manage.py for management/development, core/wsgi.py for Gunicorn, and core/asgi.py for ASGI deployments. Root request routing begins at core/urls.py.
Django Composition and Routing
Project configuration, host/subdomain handling, and process integration are centralized in core/settings.py, core/hosts.py, and core/celery.py. Requests are separated into two app boundaries:
• Public content and visitor authentication: core/apps/web/urls.py, core/apps/web/views.py.
• Dashboard, registrations, schedules, profiles, and payments: core/apps/dashboard/urls.py, core/apps/dashboard/views.py.
Public Website Domain
The web app owns department-facing content such as courses, events, faculty, gallery, alumni, policies, and login/registration pages. Its persistent content models live in core/apps/web/models.py; HTML is server-rendered from core/apps/web/templates/web/, including its base layout at core/apps/web/templates/web/layouts/base.html. Markdown rendering is a localized template-tag extension in core/apps/web/templatetags/markdown_extras.py.
Dashboard and Student Lifecycle
The dashboard app is the operational domain for student data and registration workflows. Models and schema evolution are represented by core/apps/dashboard/models.py and core/apps/dashboard/migrations/. Views render dashboard pages including programs, registration details, schedules, user profile, and payment status from core/apps/dashboard/templates/dashboard/. Django admin is customized through core/apps/dashboard/admin.py, including administrative registration-data templates.
Payments, Authentication, and Protected Data
Payment interactions are encapsulated outside views in utils/payment_handler.py and Paytm checksum support in utils/paytm_checksum.py; dashboard payment templates form the browser-facing status/transaction boundary. Google OAuth client integration is isolated in utils/google_oauth2.py. Environment-provided credentials cover Paytm and Google OAuth, while encryption helpers (utils/hashing.py) support protected identifiers/data. These integrations should remain behind utility/service boundaries rather than being duplicated in request handlers.
Background Processing and Data Layer
Celery is configured at the project level in core/celery.py, with dashboard-specific asynchronous work in core/apps/dashboard/tasks.py. Django ORM models in both apps are the application-to-database boundary; the database connection is supplied through DATABASE_URL. Migrations under each app establish the deployable schema history.
Delivery and Infrastructure
The application targets Python 3.8+ with Poetry dependency management (pyproject.toml, poetry.toml). It can run under Gunicorn behind NGINX via core/wsgi.py, or deploy to Dokku using Procfile, MicroProcfile, and dokku-setup.yml. GitHub Actions production and microservice pipelines are defined in .github/workflows/production.yml and .github/workflows/microservice.yml. Static assets are collected/served from assets/, while source static content is in static/.
Main entry points: dashboard/views.py Dashboard views · models.py Student lifecycle models · urls.py Root routing · web/views.py Public content views
Components 20
Django project
- Runtime entry points · Management, WSGI, and ASGI process entry points.
manage.py - Root routing
core/urls.py - Project settings · Configures hosts, credentials, database, and installed services.
core/settings.py - Host routing
core/hosts.py
Public website
- Public routes
core/apps/web/urls.py - Public content views · Department content and visitor authentication pages.
core/apps/web/views.py - Public content models
core/apps/web/models.py - Public templates · Server-rendered public pages and base layout.
core/apps/web/templates/web - Markdown tags
core/apps/web/templatetags/markdown_extras.py
Student dashboard
- Dashboard routes
core/apps/dashboard/urls.py - Dashboard views · Registration, schedules, profiles, and payment status.
core/apps/dashboard/views.py - Student lifecycle models
core/apps/dashboard/models.py - Dashboard templates
core/apps/dashboard/templates/dashboard - Registration admin
core/apps/dashboard/admin.py - Schema migrations · Deployable dashboard schema history.
core/apps/dashboard/migrations
Integrations & workers
- Payment service · Encapsulates Paytm transactions and checksum support.
utils/payment_handler.py - Google OAuth client
utils/google_oauth2.py - Celery worker · Project Celery configuration and dashboard asynchronous work.
core/celery.py - Application database · Django ORM persistence boundary.
Delivery
- Deployment pipeline · WSGI serving and Dokku/GitHub Actions deployment.
Procfile
Connections 21
- Runtime entry points → Project settings: loads
- Runtime entry points → Root routing: serves requests via
- Project settings → Host routing: configures
- Host routing → Root routing: selects host routes
- Root routing → Public routes: public requests
- Root routing → Dashboard routes: authenticated requests
- Public routes → Public content views: dispatches
- Public content views → Public content models: reads and writes
- Public content views → Public templates: renders
- Markdown tags → Public templates: extends rendering
- Dashboard routes → Dashboard views: dispatches
- Dashboard views → Student lifecycle models: reads and writes
- Dashboard views → Dashboard templates: renders
- Dashboard views → Payment service: initiates payments
- Dashboard views → Google OAuth client: uses sign-in client
- Registration admin → Student lifecycle models: manages
- Schema migrations → Student lifecycle models: evolves schema
- Public content models → Application database: persists via ORM
- Student lifecycle models → Application database: persists via ORM
- Celery worker → Student lifecycle models: runs async work for
- Deployment pipeline → Runtime entry points: runs WSGI process