How ashraf1600/cox-s-bazar-student-forum-cuet works
1. Repository shape
- This is a single Django monolith with one business app, core, plus the project package csf_cuet.
- manage.py is the entry point; csf_cuet/settings.py, urls.py, wsgi.py, and asgi.py define runtime wiring.
2. Main runtime boundary
- The app follows the standard Django request path: browser/client → project URL router → core.views → core.models / forms → HTML templates.
- core/urls.py likely contains all feature routes, while csf_cuet/urls.py mounts the app and Django admin.
3. Primary business app: core
- All domain logic lives in core, including models, forms, views, admin registration, and app-specific templates/static assets.
- This suggests a tightly coupled but straightforward architecture: one codebase, one database, one web UI.
4. Domain subsystems
- The README and templates indicate several feature areas:
- User/profile management: registration, login, profile edit/update, profile photos, approval workflow.
- Community content: posts, likes/comments, inbox/messages, member profiles.
- Announcements: public/community announcements and homepage highlights.
- Events: event listing and event detail pages.
- Committee and directory: committee member pages, designation/department-based organization, member directory.
- These are likely represented as separate Django models inside core.models and rendered through dedicated views/templates.
5. Admin and moderation boundary
- Django Admin is a major operational surface for content moderation and approval.
- core/admin.py plus the populated staticfiles/jazzmin directory indicate a customized admin experience using Jazzmin.
- Admin appears to be the control plane for user approvals, announcements, events, and structural content such as departments/designations.
6. Data model and persistence
- Persistent storage is Django ORM-backed.
- Development uses db.sqlite3; migrations in core/migrations show the schema evolved over time, including user fields, departments, announcements, and post/message changes.
- media/ stores uploaded user and content images; static files are separated under core/static and compiled into staticfiles/.
7. Template-driven presentation
- Rendering is server-side with Django templates under core/templates/core.
- Pages include homepage, about, dashboard, login/register, profile views/edits, announcements, events, committee, directory, inbox, and message detail.
- core/static/core/css/style.css and js/main.js provide app-specific styling and client-side behavior.
8. Authentication and authorization
- The project uses Django’s authentication system with a custom user model.
- Access is role-sensitive: public pages, authenticated member features, and admin-only moderation/management paths are distinct concerns.
- The “admin approval system” implies a post-registration gating step before full access.
9. Operational/deployment layer
- requirements.txt, runtime.txt, and build.sh indicate deployment on a managed Python hosting platform, consistent with Render.
- staticfiles/ is the collected static output used in production; media/ is the upload destination.
- csf_cuet/asgi.py and wsgi.py show the app can be served under standard Django web servers.
10. Architecture summary for a diagram
- Draw one central Django web application with core as the only feature app.
- Connect it to:
- a browser/UI layer served by Django templates,
- a database via the ORM,
- a media storage area for uploads,
- a static assets pipeline for CSS/JS/images,
- and the Django admin as the moderation/administration interface.
- The key architectural theme is a server-rendered community portal with admin-managed content and member profiles, not a distributed service system.
Main entry points: views.py Views · settings.py Settings · models.py Models · urls.py Project URLs
Components 21
Django runtime
Project wiring and entry points
- manage.py · Django command entry point
manage.py - Settings · Project configuration and installed apps
csf_cuet/settings.py - Project URLs · Top-level URL routing and mounts
csf_cuet/urls.py - WSGI · WSGI application hook
csf_cuet/wsgi.py - ASGI · ASGI application hook
csf_cuet/asgi.py
Core app
Primary business app and domain logic
Server UI
Templates and front-end assets
- Base template · Shared layout for server-rendered pages
core/templates/core/base.html - Homepage · Landing and highlights page
core/templates/core/homepage.html - Dashboard · Authenticated member dashboard
core/templates/core/dashboard.html - Profiles · Profile view and edit pages
core/templates/core/view_profile.html - Community · Announcements, events, committee, directory, inbox pages
core/templates/core/announcements.html - Style CSS · App-specific styles
core/static/core/css/style.css - Main JS · App-specific client behavior
core/static/core/js/main.js - Static build · Collected production static output for the app
staticfiles/core/css/style.css
Data layer
Database and uploaded media
Connections 22
- manage.py → Settings: loads · Bootstraps Django with project settings
- Settings → Project URLs: routes · Configures the project URL dispatcher
- Settings → WSGI: serves · Exposes WSGI application entry
- Settings → ASGI: serves · Exposes ASGI application entry
- Project URLs → Core URLs: mounts · Includes app-specific routes
- Project URLs → Admin: exposes · Mounts Django admin interface
- Core URLs → Views: dispatches · Maps feature paths to handlers
- Views → Forms: validates · Processes user input and profile workflows
- Views → Models: reads/writes · Uses ORM domain objects
- Forms → Models: binds · Validates model-backed forms
- Admin → Models: manages · Registers content and moderation models
- Views → Base template: renders · Shared page shell
- Views → Homepage: renders · Public landing page
- Views → Dashboard: renders · Member dashboard
- Views → Profiles: renders · Profile pages
- Views → Community: renders · Community feature pages
- Base template → Style CSS: includes · Loads app styles
- Base template → Main JS: includes · Loads app behavior
- Views → Media: uploads · Handles user and content images
- Models → SQLite DB: persists · Stores domain state in SQLite
- Settings → Static build: collects · Production static asset output
- Admin → Jazzmin: themes · Uses customized admin styling