How satyam999999/fusion works
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: urls.py URL router · globals Globals · academic_procedures Academic work · office_module Office workflows
Components 25
Django Core
Project entrypoints, routing, settings, and async integration.
- manage.py · Local Django command entrypoint.
FusionIIIT/manage.py - Settings · Environment-specific Django configuration split into common, development, and production.
FusionIIIT/Fusion/settings/common.py - URL router · Main URL configuration that dispatches requests into apps.
FusionIIIT/Fusion/urls.py - WSGI · Production web entrypoint for Django deployments.
FusionIIIT/Fusion/wsgi.py - Async routing · Realtime/channel routing layer for notifications or websocket-style flows.
FusionIIIT/Fusion/routing.py - Celery · Asynchronous task runner and scheduling integration.
FusionIIIT/Fusion/celery.py
Shared Platform
Cross-cutting apps and utilities used across domains.
- Globals · Shared models, context processors, API helpers, adapters, and common utilities.
FusionIIIT/applications/globals - Notifications · Cross-module notification handling and notification records.
FusionIIIT/notification - Helpers · Repository-wide decorators and guard logic.
FusionIIIT/helpers/decorators.py
Domain Apps
Major institute workflow modules exposed through Django apps.
- Academic work · Central academic procedures engine for registration, grades, leave, results, and related processes.
FusionIIIT/applications/academic_procedures - Office workflows · Director/registrar/dean coordination and document movement workflows.
FusionIIIT/applications/office_module - File tracking · Inward, outward, archive, and forwarding flows for documents.
FusionIIIT/applications/filetracking - HR & finance · Establishment, HR, and finance/accounting operations.
- Student services · Hostel, mess, health center, visitor hostel, leave, complaints, and counselling workflows.
- Academic info · Academic information and senate-style information pages plus API surface.
FusionIIIT/applications/academic_information - Research & curriculum · Research procedures, programme curriculum, and related academic structure management.
- Gymkhana & placement · Student activity, clubs, elections, and placement workflows.
- Content & CMS · Feeds, online CMS, library, and scholarship content flows.
- Estate & mess · Estate management plus central mess operations and automation.
Data & Assets
Persistence, uploads, templates, and static presentation assets.
- PostgreSQL · Relational persistence behind Django models and migrations.
- Media store · Uploaded and generated files such as PDFs, images, and documents.
FusionIIIT/media - Templates · Server-rendered HTML views organized by module.
FusionIIIT/templates - Static assets · Module-scoped CSS, JavaScript, and bundled UI assets.
FusionIIIT/applications/globals/static
Ops & QA
Deployment helpers and external automation tooling.
- Docker · Container build and runtime scripts for local or production deployment.
Dockerfile - Automation QA · Separate Java/Selenium automation project used for validation.
Test/Fusion Automation Testing
Connections 48
- 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.