# satyam999999/fusion architecture

> Architecture diagram of the GitHub repository satyam999999/fusion, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/satyam999999/fusion
- Repository: https://github.com/satyam999999/fusion

## Overview

1. **System shape: a Django monolith with many domain apps**
   - The repository is centered on `FusionIIIT/Fusion`, a Django project that hosts a large set of institute ERP modules under `FusionIIIT/applications/*`.
   - Each module is packaged as its own Django app with its own `models.py`, `views.py`, `urls.py`, templates, static assets, and sometimes `forms.py`, `api/`, `tasks.py`, or helper modules.

2. **Core project entry points and runtime**
   - `manage.py` is the local entrypoint.
   - `FusionIIIT/Fusion/settings/{common,development,production}.py` controls environment-specific configuration.
   - `FusionIIIT/Fusion/urls.py` is the main URL router; `wsgi.py` is the deployment entrypoint.
   - `FusionIIIT/Fusion/routing.py` indicates an async/realtime layer, likely for channel-based messaging/notifications in addition to normal HTTP.

3. **Primary request flow**
   - Browser or API client hits the Django URLconf.
   - Requests are routed into a specific app’s `views.py` or `api/views.py`.
   - Views coordinate permissions, forms, model queries/updates, and template rendering.
   - Data is persisted in Django models backed by PostgreSQL migrations under each app’s `migrations/` directory.
   - Responses are mostly server-rendered HTML pages, with some JSON API endpoints for selected modules.

4. **Module boundaries are mostly domain-based**
   - The repository is organized around institute functions rather than technical layers.
   - Major domains include academic procedures/information, EIS/HR, finance/accounts, hostel, mess, health center, placement, gymkhana, complaint handling, file tracking, office/registrar workflows, research/procedures, scholarships, visitor hostel, recruitment, curriculum, and others.
   - Several apps are broad workflow engines rather than CRUD-only modules, especially `academic_procedures`, `office_module`, `filetracking`, `leave`, `central_mess`, and `estate_module`.

5. **Shared foundation and cross-cutting services**
   - `applications/globals` is a shared subsystem used across the project for common models, context processing, adapters, APIs, and utility functions.
   - `helpers/decorators.py` likely holds shared authorization or view guards.
   - `notification/` is a separate app for cross-module notifications, and the README describes a `notify.send(...)` pattern used by module code.
   - Templates under `templates/account` and `templates/socialaccount` suggest third-party authentication flows and account lifecycle pages.

6. **REST/API surfaces exist only in some modules**
   - Several apps expose an `api/` subpackage with serializers, URL routes, and API views: for example `academic_information`, `academic_procedures`, `complaint_system`, `eis`, `globals`, `gymkhana`, `health_center`, `leave`, and `research_procedures`.
   - This creates a split architecture: most UI is server-rendered, while a subset of module data is also available through JSON endpoints.

7. **Background processing and asynchronous work**
   - Celery is integrated via `FusionIIIT/Fusion/celery.py`.
   - Apps such as `leave` and `central_mess` have `tasks.py`, and `central_mess` includes Celery beat schedule artifacts, indicating periodic/background jobs.
   - This separates long-running workflows, scheduled actions, and notification-like work from request/response web handling.

8. **Client-side behavior is mostly module-scoped static assets**
   - Each app owns its own static bundle under `applications/<module>/static/...`.
   - There is extensive use of Semantic UI / Bootstrap assets, plus module-specific JavaScript for interactions like forms, calendars, approval flows, tables, ratings, and modals.
   - The frontend is not a single SPA; instead, behavior is spread across page templates and per-module JS.

9. **Templates are the main presentation layer**
   - The `templates/` tree is very large and mirrors the module structure: `academic_procedures`, `officeModule`, `complaintModule`, `placementModule`, `vhModule`, `hostelmanagement`, `financeAndAccountsModule`, etc.
   - This indicates a traditional server-rendered architecture with many role-specific pages and workflow screens rather than a centralized frontend application.

10. **Data persistence and document storage**
   - The app uses PostgreSQL as the database, with schema changes managed through app-local Django migrations.
   - Uploaded/generated files are stored under `FusionIIIT/media`, which contains PDFs, documents, images, and module-specific folders for issues, feeds, gymkhana, and other workflows.
   - Many modules appear to generate documents/PDFs as part of business processes, especially academic, finance, and office workflows.

11. **Important workflow-heavy subsystems**
   - `academic_procedures` handles course registration, grades, thesis, leave, results, attendance, and other institute academic processes.
   - `office_module` is a major coordination layer for director/registrar/deans/HOD workflows and document movement.
   - `filetracking` models inward/outward/archive/forward flows.
   - `leave`, `complaint_system`, `hostel_management`, `mess`, `health_center`, and `visitor_hostel` each encode institutional operational workflows with state transitions and approvals.

12. **Administrative and operational tooling**
   - Standard Django admin is enabled via per-app `admin.py`.
   - Docker support is provided through `Dockerfile`, `docker-compose.yml`, and `docker-entrypoint.sh`.
   - `scripts/` includes helper utilities for cloning, syncing, and DB execution.
   - `Test/Fusion Automation Testing` is a separate Java-based automation suite using Selenium/TestNG/Cucumber, which is operationally outside the Django runtime but important for validation.

13. **How to think about the architecture diagram**
   - Draw a central Django web/API core, with many domain apps hanging off it.
   - Put shared services beneath/around it: authentication/account pages, globals/context, notifications, Celery, PostgreSQL, media storage, and static asset delivery.
   - Show a split between synchronous HTTP request handling and asynchronous background jobs.
   - Show a smaller API surface only for modules that expose `api/` packages, while most modules are HTML/template-driven.

Main entry points: [`FusionIIIT/Fusion/urls.py`](https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/urls.py) (URL router), [`FusionIIIT/applications/globals`](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/globals) (Globals), [`FusionIIIT/applications/academic_procedures`](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/academic_procedures) (Academic work), [`FusionIIIT/applications/office_module`](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/office_module) (Office workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Django Core"]
  node_manage_py["manage.py<br/>entrypoint<br/>[manage.py]"]
  node_django_settings["Settings<br/>config<br/>[common.py]"]
  node_project_urls["URL router<br/>routing<br/>[urls.py]"]
  node_wsgi_entry["WSGI<br/>deployment<br/>[wsgi.py]"]
  node_async_routing["Async routing<br/>channels<br/>[routing.py]"]
  node_celery_app["Celery<br/>background jobs<br/>[celery.py]"]
end

subgraph group_shared["Shared Platform"]
  node_globals_app["Globals<br/>shared app"]
  node_notifications_app["Notifications<br/>shared app"]
  node_helpers["Helpers<br/>shared utils<br/>[decorators.py]"]
end

subgraph group_domain["Domain Apps"]
  node_academic_proc["Academic work<br/>workflow app"]
  node_office_module["Office workflows<br/>workflow app"]
  node_filetracking["File tracking<br/>workflow app"]
  node_hr_finance["HR & finance<br/>domain bundle"]
  node_student_services["Student services<br/>domain bundle"]
  node_academic_info["Academic info<br/>domain app"]
  node_research_and_curriculum["Research & curriculum<br/>domain bundle"]
  node_gymkhana_place["Gymkhana & placement<br/>domain bundle"]
  node_content_mgmt["Content & CMS<br/>domain bundle"]
  node_estate_mess["Estate & mess<br/>domain bundle"]
end

subgraph group_data["Data & Assets"]
  node_db_models[("PostgreSQL<br/>database")]
  node_media_store["Media store<br/>file storage"]
  node_templates["Templates<br/>presentation"]
  node_static_assets["Static assets<br/>frontend assets"]
end

subgraph group_ops["Ops & QA"]
  node_docker_ops["Docker<br/>deployment"]
  node_automation_suite["Automation QA<br/>external test suite"]
end

node_manage_py -->|"loads"| node_django_settings
node_manage_py -->|"boots"| node_project_urls
node_project_urls -->|"routes"| node_academic_proc
node_project_urls -->|"routes"| node_office_module
node_project_urls -->|"routes"| node_filetracking
node_project_urls -->|"routes"| node_academic_info
node_project_urls -->|"routes"| node_research_and_curriculum
node_project_urls -->|"routes"| node_gymkhana_place
node_project_urls -->|"routes"| node_content_mgmt
node_project_urls -->|"routes"| node_student_services
node_project_urls -->|"routes"| node_hr_finance
node_project_urls -->|"routes"| node_estate_mess
node_wsgi_entry -->|"uses"| node_django_settings
node_async_routing -->|"delivers"| node_notifications_app
node_celery_app -->|"runs tasks for"| node_academic_proc
node_celery_app -->|"runs tasks for"| node_student_services
node_academic_proc -->|"shares"| node_globals_app
node_office_module -->|"shares"| node_globals_app
node_filetracking -->|"shares"| node_globals_app
node_academic_info -->|"shares"| node_globals_app
node_research_and_curriculum -->|"shares"| node_globals_app
node_gymkhana_place -->|"shares"| node_globals_app
node_student_services -->|"shares"| node_globals_app
node_content_mgmt -->|"shares"| node_globals_app
node_hr_finance -->|"shares"| node_globals_app
node_estate_mess -->|"shares"| node_globals_app
node_academic_proc -->|"notifies"| node_notifications_app
node_student_services -->|"notifies"| node_notifications_app
node_content_mgmt -->|"notifies"| node_notifications_app
node_academic_proc -->|"persists"| node_db_models
node_office_module -->|"persists"| node_db_models
node_filetracking -->|"persists"| node_db_models
node_student_services -->|"persists"| node_db_models
node_hr_finance -->|"persists"| node_db_models
node_research_and_curriculum -->|"persists"| node_db_models
node_content_mgmt -->|"persists"| node_db_models
node_student_services -->|"stores files"| node_media_store
node_academic_proc -->|"stores files"| node_media_store
node_office_module -->|"stores files"| node_media_store
node_content_mgmt -->|"stores files"| node_media_store
node_academic_proc -->|"renders"| node_templates
node_office_module -->|"renders"| node_templates
node_student_services -->|"renders"| node_templates
node_content_mgmt -->|"renders"| node_templates
node_academic_proc -->|"uses"| node_static_assets
node_student_services -->|"uses"| node_static_assets
node_content_mgmt -->|"uses"| node_static_assets
node_docker_ops -->|"executes"| node_manage_py

click node_manage_py "https://github.com/satyam999999/fusion/blob/main/FusionIIIT/manage.py"
click node_django_settings "https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/settings/common.py"
click node_project_urls "https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/urls.py"
click node_wsgi_entry "https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/wsgi.py"
click node_async_routing "https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/routing.py"
click node_celery_app "https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/celery.py"
click node_globals_app "https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/globals"
click node_notifications_app "https://github.com/satyam999999/fusion/tree/main/FusionIIIT/notification"
click node_helpers "https://github.com/satyam999999/fusion/blob/main/FusionIIIT/helpers/decorators.py"
click node_academic_proc "https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/academic_procedures"
click node_office_module "https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/office_module"
click node_filetracking "https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/filetracking"
click node_academic_info "https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/academic_information"
click node_media_store "https://github.com/satyam999999/fusion/tree/main/FusionIIIT/media"
click node_templates "https://github.com/satyam999999/fusion/tree/main/FusionIIIT/templates"
click node_static_assets "https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/globals/static"
click node_docker_ops "https://github.com/satyam999999/fusion/tree/main/Dockerfile"
click node_automation_suite "https://github.com/satyam999999/fusion/tree/main/Test/Fusion Automation Testing"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_manage_py,node_django_settings,node_project_urls,node_wsgi_entry,node_async_routing,node_celery_app toneBlue
class node_globals_app,node_notifications_app,node_helpers toneAmber
class node_academic_proc,node_office_module,node_filetracking,node_hr_finance,node_student_services,node_academic_info,node_research_and_curriculum,node_gymkhana_place,node_content_mgmt,node_estate_mess toneMint
class node_db_models,node_media_store,node_templates,node_static_assets toneRose
class node_docker_ops,node_automation_suite toneIndigo
```

## Components

### Django Core

Project entrypoints, routing, settings, and async integration.

- [manage.py](https://github.com/satyam999999/fusion/blob/main/FusionIIIT/manage.py): entrypoint · Local Django command entrypoint. · `FusionIIIT/manage.py`
- [Settings](https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/settings/common.py): config · Environment-specific Django configuration split into common, development, and production. · `FusionIIIT/Fusion/settings/common.py`
- [URL router](https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/urls.py): routing · Main URL configuration that dispatches requests into apps. · `FusionIIIT/Fusion/urls.py`
- [WSGI](https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/wsgi.py): deployment · Production web entrypoint for Django deployments. · `FusionIIIT/Fusion/wsgi.py`
- [Async routing](https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/routing.py): channels · Realtime/channel routing layer for notifications or websocket-style flows. · `FusionIIIT/Fusion/routing.py`
- [Celery](https://github.com/satyam999999/fusion/blob/main/FusionIIIT/Fusion/celery.py): background jobs · Asynchronous task runner and scheduling integration. · `FusionIIIT/Fusion/celery.py`

### Shared Platform

Cross-cutting apps and utilities used across domains.

- [Globals](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/globals): shared app · Shared models, context processors, API helpers, adapters, and common utilities. · `FusionIIIT/applications/globals`
- [Notifications](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/notification): shared app · Cross-module notification handling and notification records. · `FusionIIIT/notification`
- [Helpers](https://github.com/satyam999999/fusion/blob/main/FusionIIIT/helpers/decorators.py): shared utils · Repository-wide decorators and guard logic. · `FusionIIIT/helpers/decorators.py`

### Domain Apps

Major institute workflow modules exposed through Django apps.

- [Academic work](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/academic_procedures): workflow app · Central academic procedures engine for registration, grades, leave, results, and related processes. · `FusionIIIT/applications/academic_procedures`
- [Office workflows](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/office_module): workflow app · Director/registrar/dean coordination and document movement workflows. · `FusionIIIT/applications/office_module`
- [File tracking](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/filetracking): workflow app · Inward, outward, archive, and forwarding flows for documents. · `FusionIIIT/applications/filetracking`
- **HR & finance**: domain bundle · Establishment, HR, and finance/accounting operations.
- **Student services**: domain bundle · Hostel, mess, health center, visitor hostel, leave, complaints, and counselling workflows.
- [Academic info](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/academic_information): domain app · Academic information and senate-style information pages plus API surface. · `FusionIIIT/applications/academic_information`
- **Research & curriculum**: domain bundle · Research procedures, programme curriculum, and related academic structure management.
- **Gymkhana & placement**: domain bundle · Student activity, clubs, elections, and placement workflows.
- **Content & CMS**: domain bundle · Feeds, online CMS, library, and scholarship content flows.
- **Estate & mess**: domain bundle · Estate management plus central mess operations and automation.

### Data & Assets

Persistence, uploads, templates, and static presentation assets.

- **PostgreSQL**: database · Relational persistence behind Django models and migrations.
- [Media store](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/media): file storage · Uploaded and generated files such as PDFs, images, and documents. · `FusionIIIT/media`
- [Templates](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/templates): presentation · Server-rendered HTML views organized by module. · `FusionIIIT/templates`
- [Static assets](https://github.com/satyam999999/fusion/tree/main/FusionIIIT/applications/globals/static): frontend assets · Module-scoped CSS, JavaScript, and bundled UI assets. · `FusionIIIT/applications/globals/static`

### Ops & QA

Deployment helpers and external automation tooling.

- [Docker](https://github.com/satyam999999/fusion/tree/main/Dockerfile): deployment · Container build and runtime scripts for local or production deployment. · `Dockerfile`
- [Automation QA](https://github.com/satyam999999/fusion/tree/HEAD/Test/Fusion%20Automation%20Testing): external test suite · Separate Java/Selenium automation project used for validation. · `Test/Fusion Automation Testing`

## Connections

- manage.py → Settings: loads · Starts Django with environment settings.
- manage.py → URL router: boots · Initializes the web application and URL dispatch.
- URL router → Academic work: routes · Main request routing into major domain apps.
- URL router → Office workflows: routes · Main request routing into major domain apps.
- URL router → File tracking: routes · Main request routing into major domain apps.
- URL router → Academic info: routes · Main request routing into major domain apps.
- URL router → Research & curriculum: routes · Main request routing into major domain apps.
- URL router → Gymkhana & placement: routes · Main request routing into major domain apps.
- URL router → Content & CMS: routes · Main request routing into major domain apps.
- URL router → Student services: routes · Main request routing into major domain apps.
- URL router → HR & finance: routes · Main request routing into major domain apps.
- URL router → Estate & mess: routes · Main request routing into major domain apps.
- WSGI → Settings: uses · Deployment entrypoint uses the same settings configuration.
- Async routing → Notifications: delivers · Realtime layer supports cross-module notifications.
- Celery → Academic work: runs tasks for · Background jobs support workflow-heavy modules.
- Celery → Student services: runs tasks for · Background jobs support workflow-heavy modules.
- Academic work → Globals: shares · Uses shared models, context, and API utilities.
- Office workflows → Globals: shares · Uses shared models, context, and API utilities.
- File tracking → Globals: shares · Uses shared models, context, and API utilities.
- Academic info → Globals: shares · Uses shared models, context, and API utilities.
- Research & curriculum → Globals: shares · Uses shared models, context, and API utilities.
- Gymkhana & placement → Globals: shares · Uses shared models, context, and API utilities.
- Student services → Globals: shares · Uses shared models, context, and API utilities.
- Content & CMS → Globals: shares · Uses shared models, context, and API utilities.
- HR & finance → Globals: shares · Uses shared models, context, and API utilities.
- Estate & mess → Globals: shares · Uses shared models, context, and API utilities.
- Academic work → Notifications: notifies · Workflow events emit notifications.
- Student services → Notifications: notifies · Workflow events emit notifications.
- Content & CMS → Notifications: notifies · Workflow events emit notifications.
- Academic work → PostgreSQL: persists · App-local migrations and Django models store core records.
- Office workflows → PostgreSQL: persists · App-local migrations and Django models store core records.
- File tracking → PostgreSQL: persists · App-local migrations and Django models store core records.
- Student services → PostgreSQL: persists · App-local migrations and Django models store core records.
- HR & finance → PostgreSQL: persists · App-local migrations and Django models store core records.
- Research & curriculum → PostgreSQL: persists · App-local migrations and Django models store core records.
- Content & CMS → PostgreSQL: persists · App-local migrations and Django models store core records.
- Student services → Media store: stores files · Generates and stores uploads and document artifacts.
- Academic work → Media store: stores files · Generates and stores uploads and document artifacts.
- Office workflows → Media store: stores files · Generates and stores uploads and document artifacts.
- Content & CMS → Media store: stores files · Generates and stores uploads and document artifacts.
- Academic work → Templates: renders · Primarily server-rendered module pages.
- Office workflows → Templates: renders · Primarily server-rendered module pages.
- Student services → Templates: renders · Primarily server-rendered module pages.
- Content & CMS → Templates: renders · Primarily server-rendered module pages.
- Academic work → Static assets: uses · Module-specific JavaScript and CSS assets.
- Student services → Static assets: uses · Module-specific JavaScript and CSS assets.
- Content & CMS → Static assets: uses · Module-specific JavaScript and CSS assets.
- Docker → manage.py: executes · Container runtime launches the Django app.
