# thebishalghosh/fees architecture

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

- Interactive diagram: https://gitdiagram.com/thebishalghosh/fees
- Repository: https://github.com/thebishalghosh/fees

## Overview

FeesPortal is a multi-tenant institution administration and parent portal for admissions, academics, attendance, fees, and payments. An admin maintains institutional and student records; parents access linked-child information and fee services, with payment processing and receipts handled by dedicated services. The map preserves README-documented examination, attendance, branding, and admission-PDF capabilities. Some routes and services are unsampled, so edges are limited to indexed references or explicit README statements; unsampled components are not assumed to call one another.

Main entry points: [`services/academic-management-service.php`](https://github.com/thebishalghosh/fees/blob/main/services/academic-management-service.php) (Academic management), [`services/audit-service.php`](https://github.com/thebishalghosh/fees/blob/main/services/audit-service.php) (Audit logging), [`includes/page-placeholder.php`](https://github.com/thebishalghosh/fees/blob/main/includes/page-placeholder.php) (Shared page rendering), [`admin/staff/index.php`](https://github.com/thebishalghosh/fees/blob/main/admin/staff/index.php) (Admin staff route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shared runtime"]
  node_runtime["Runtime setup<br/>[init.php]"]
  node_auth["Authentication and permissions<br/>[auth.php]"]
  node_shared["Request helpers<br/>[functions.php]"]
  node_placeholder["Shared page rendering"]
  node_otp["OTP service<br/>[otp-service.php]"]
  node_appconfig["Application configuration<br/>[app.php]"]
end

subgraph group_administration["Institution administration"]
  node_adminui["Admin operations"]
  node_staff["Staff management"]
  node_roles["Role management"]
  node_admissions["Admission workflow"]
  node_students["Student management"]
  node_audit["Audit logging<br/>[audit-service.php]"]
  node_adminroute["Admin staff route<br/>[index.php]"]
  node_admissionroute["Admin admissions route<br/>[index.php]"]
  node_studentroute["Admin students route<br/>[index.php]"]
end

subgraph group_academics["Academic operations"]
  node_academicsvc["Academic management"]
  node_attendance["Attendance reporting"]
  node_examinations["Examination results"]
  node_timetable["Timetable management"]
end

subgraph group_family["Parent and student services"]
  node_parentportal["Parent portal services"]
  node_parentmgmt["Parent management"]
  node_pdf["Admission form PDFs"]
  node_branding["Institution branding"]
  node_parentfeesroute["Parent fees route<br/>[index.php]"]
end

subgraph group_finance["Fees and payments"]
  node_fees["Fee assignment"]
  node_payments["Payment service"]
  node_verification["Payment verification"]
  node_receipts["Receipt service"]
  node_notifications["Notifications"]
  node_webhook["Payment webhook<br/>[webhook.php]"]
end

node_admin(("Institution admin"))
node_parent(("Parent"))
node_razorpay{{"Razorpay"}}
node_database[("Application database")]

node_adminroute -->|"calls"| node_adminui
node_adminroute -->|"calls"| node_staff
node_adminroute -->|"uses"| node_roles
node_admissionroute -->|"uses"| node_admissions
node_studentroute -->|"uses"| node_students
node_parentfeesroute -->|"uses"| node_parentportal
node_parent -->|"views fees"| node_parentfeesroute
node_admin -->|"manages admissions"| node_admissionroute
node_admin -->|"manages academics"| node_academicsvc
node_parentportal -->|"uses"| node_notifications
node_parentportal -->|"uses"| node_otp
node_parentmgmt -->|"uses"| node_otp
node_academicsvc -->|"records actions"| node_audit
node_fees -->|"uses"| node_academicsvc
node_fees -->|"records actions"| node_audit
node_timetable -->|"uses"| node_academicsvc
node_timetable -->|"records actions"| node_audit
node_admissions -->|"records actions"| node_audit
node_admissions -.->|"generates PDFs"| node_pdf
node_parent -->|"downloads forms"| node_pdf
node_admin -->|"uploads logo"| node_branding
node_parent -->|"views logo"| node_branding
node_parent -->|"views published results"| node_examinations
node_admin -->|"publishes results"| node_examinations
node_admin -->|"reviews reports"| node_attendance
node_webhook -->|"uses"| node_payments
node_webhook -->|"uses"| node_verification
node_verification -->|"calls"| node_payments
node_verification -->|"creates receipts"| node_receipts
node_payments -.->|"gateway integration"| node_razorpay
node_runtime -->|"loads config"| node_appconfig
node_runtime -.->|"configures access"| node_database
node_placeholder -->|"loads runtime"| node_runtime
node_placeholder -->|"loads helpers"| node_shared
node_placeholder -->|"checks access"| node_auth

click node_runtime "https://github.com/thebishalghosh/fees/blob/main/includes/init.php"
click node_auth "https://github.com/thebishalghosh/fees/blob/main/includes/auth.php"
click node_shared "https://github.com/thebishalghosh/fees/blob/main/includes/functions.php"
click node_placeholder "https://github.com/thebishalghosh/fees/blob/main/includes/page-placeholder.php"
click node_adminui "https://github.com/thebishalghosh/fees/blob/main/services/admin-panel-service.php"
click node_staff "https://github.com/thebishalghosh/fees/blob/main/services/staff-management-service.php"
click node_roles "https://github.com/thebishalghosh/fees/blob/main/services/role-management-service.php"
click node_admissions "https://github.com/thebishalghosh/fees/blob/main/services/admission-workflow-service.php"
click node_students "https://github.com/thebishalghosh/fees/blob/main/services/student-management-service.php"
click node_academicsvc "https://github.com/thebishalghosh/fees/blob/main/services/academic-management-service.php"
click node_attendance "https://github.com/thebishalghosh/fees/blob/main/services/attendance-reporting-service.php"
click node_examinations "https://github.com/thebishalghosh/fees/blob/main/services/examination-results-service.php"
click node_timetable "https://github.com/thebishalghosh/fees/blob/main/services/timetable-management-service.php"
click node_parentportal "https://github.com/thebishalghosh/fees/blob/main/services/parent-portal-service.php"
click node_parentmgmt "https://github.com/thebishalghosh/fees/blob/main/services/parent-management-service.php"
click node_pdf "https://github.com/thebishalghosh/fees/blob/main/services/admission-form-pdf-service.php"
click node_branding "https://github.com/thebishalghosh/fees/blob/main/services/institution-branding-service.php"
click node_fees "https://github.com/thebishalghosh/fees/blob/main/services/fee-assignment-service.php"
click node_payments "https://github.com/thebishalghosh/fees/blob/main/services/payment-service.php"
click node_verification "https://github.com/thebishalghosh/fees/blob/main/services/payment-verification-service.php"
click node_receipts "https://github.com/thebishalghosh/fees/blob/main/services/receipt-service.php"
click node_notifications "https://github.com/thebishalghosh/fees/blob/main/services/notification-service.php"
click node_otp "https://github.com/thebishalghosh/fees/blob/main/services/otp-service.php"
click node_audit "https://github.com/thebishalghosh/fees/blob/main/services/audit-service.php"
click node_adminroute "https://github.com/thebishalghosh/fees/blob/main/admin/staff/index.php"
click node_admissionroute "https://github.com/thebishalghosh/fees/blob/main/admin/admissions/index.php"
click node_studentroute "https://github.com/thebishalghosh/fees/blob/main/admin/students/index.php"
click node_parentfeesroute "https://github.com/thebishalghosh/fees/blob/main/parent/fees/index.php"
click node_webhook "https://github.com/thebishalghosh/fees/blob/main/integrations/payment-gateway/webhook.php"
click node_appconfig "https://github.com/thebishalghosh/fees/blob/main/config/app.php"

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_runtime,node_auth,node_shared,node_placeholder,node_otp,node_appconfig toneBlue
class node_adminui,node_staff,node_roles,node_admissions,node_students,node_audit,node_adminroute,node_admissionroute,node_studentroute,node_database toneAmber
class node_academicsvc,node_attendance,node_examinations,node_timetable toneMint
class node_parentportal,node_parentmgmt,node_pdf,node_branding,node_parentfeesroute toneRose
class node_fees,node_payments,node_verification,node_receipts,node_notifications,node_webhook,node_admin,node_parent,node_razorpay toneIndigo
```

## Components

### Access and shared runtime

- [Runtime setup](https://github.com/thebishalghosh/fees/blob/main/includes/init.php): `includes/init.php`
- [Authentication and permissions](https://github.com/thebishalghosh/fees/blob/main/includes/auth.php): `includes/auth.php`
- [Request helpers](https://github.com/thebishalghosh/fees/blob/main/includes/functions.php): `includes/functions.php`
- [Shared page rendering](https://github.com/thebishalghosh/fees/blob/main/includes/page-placeholder.php): `includes/page-placeholder.php`
- [OTP service](https://github.com/thebishalghosh/fees/blob/main/services/otp-service.php): `services/otp-service.php`
- [Application configuration](https://github.com/thebishalghosh/fees/blob/main/config/app.php): `config/app.php`

### Institution administration

- [Admin operations](https://github.com/thebishalghosh/fees/blob/main/services/admin-panel-service.php): `services/admin-panel-service.php`
- [Staff management](https://github.com/thebishalghosh/fees/blob/main/services/staff-management-service.php): `services/staff-management-service.php`
- [Role management](https://github.com/thebishalghosh/fees/blob/main/services/role-management-service.php): `services/role-management-service.php`
- [Admission workflow](https://github.com/thebishalghosh/fees/blob/main/services/admission-workflow-service.php): `services/admission-workflow-service.php`
- [Student management](https://github.com/thebishalghosh/fees/blob/main/services/student-management-service.php): `services/student-management-service.php`
- [Audit logging](https://github.com/thebishalghosh/fees/blob/main/services/audit-service.php): `services/audit-service.php`
- [Admin staff route](https://github.com/thebishalghosh/fees/blob/main/admin/staff/index.php): `admin/staff/index.php`
- [Admin admissions route](https://github.com/thebishalghosh/fees/blob/main/admin/admissions/index.php): `admin/admissions/index.php`
- [Admin students route](https://github.com/thebishalghosh/fees/blob/main/admin/students/index.php): `admin/students/index.php`

### Academic operations

- [Academic management](https://github.com/thebishalghosh/fees/blob/main/services/academic-management-service.php): `services/academic-management-service.php`
- [Attendance reporting](https://github.com/thebishalghosh/fees/blob/main/services/attendance-reporting-service.php): `services/attendance-reporting-service.php`
- [Examination results](https://github.com/thebishalghosh/fees/blob/main/services/examination-results-service.php): `services/examination-results-service.php`
- [Timetable management](https://github.com/thebishalghosh/fees/blob/main/services/timetable-management-service.php): `services/timetable-management-service.php`

### Parent and student services

- [Parent portal services](https://github.com/thebishalghosh/fees/blob/main/services/parent-portal-service.php): `services/parent-portal-service.php`
- [Parent management](https://github.com/thebishalghosh/fees/blob/main/services/parent-management-service.php): `services/parent-management-service.php`
- [Admission form PDFs](https://github.com/thebishalghosh/fees/blob/main/services/admission-form-pdf-service.php): `services/admission-form-pdf-service.php`
- [Institution branding](https://github.com/thebishalghosh/fees/blob/main/services/institution-branding-service.php): `services/institution-branding-service.php`
- [Parent fees route](https://github.com/thebishalghosh/fees/blob/main/parent/fees/index.php): `parent/fees/index.php`

### Fees and payments

- [Fee assignment](https://github.com/thebishalghosh/fees/blob/main/services/fee-assignment-service.php): `services/fee-assignment-service.php`
- [Payment service](https://github.com/thebishalghosh/fees/blob/main/services/payment-service.php): `services/payment-service.php`
- [Payment verification](https://github.com/thebishalghosh/fees/blob/main/services/payment-verification-service.php): `services/payment-verification-service.php`
- [Receipt service](https://github.com/thebishalghosh/fees/blob/main/services/receipt-service.php): `services/receipt-service.php`
- [Notifications](https://github.com/thebishalghosh/fees/blob/main/services/notification-service.php): `services/notification-service.php`
- [Payment webhook](https://github.com/thebishalghosh/fees/blob/main/integrations/payment-gateway/webhook.php): `integrations/payment-gateway/webhook.php`

### Other components

- **Institution admin**
- **Parent**
- **Razorpay**
- **Application database**

## Connections

- Admin staff route → Admin operations: calls (evidence: `admin/staff/index.php`)
- Admin staff route → Staff management: calls (evidence: `admin/staff/index.php`)
- Admin staff route → Role management: uses (evidence: `admin/staff/index.php`)
- Admin admissions route → Admission workflow: uses (evidence: `admin/admissions/index.php`)
- Admin students route → Student management: uses (evidence: `admin/students/index.php`)
- Parent fees route → Parent portal services: uses (evidence: `parent/fees/index.php`)
- Parent → Parent fees route: views fees (evidence: `README.md`)
- Institution admin → Admin admissions route: manages admissions (evidence: `README.md`)
- Institution admin → Academic management: manages academics (evidence: `README.md`)
- Parent portal services → Notifications: uses (evidence: `services/parent-portal-service.php`)
- Parent portal services → OTP service: uses (evidence: `services/parent-portal-service.php`)
- Parent management → OTP service: uses (evidence: `services/parent-management-service.php`)
- Academic management → Audit logging: records actions (evidence: `services/academic-management-service.php`)
- Fee assignment → Academic management: uses (evidence: `services/fee-assignment-service.php`)
- Fee assignment → Audit logging: records actions (evidence: `services/fee-assignment-service.php`)
- Timetable management → Academic management: uses (evidence: `services/timetable-management-service.php`)
- Timetable management → Audit logging: records actions (evidence: `services/timetable-management-service.php`)
- Admission workflow → Audit logging: records actions (evidence: `services/admission-workflow-service.php`)
- Admission workflow → Admission form PDFs: generates PDFs (evidence: `README.md`)
- Parent → Admission form PDFs: downloads forms (evidence: `README.md`)
- Institution admin → Institution branding: uploads logo (evidence: `README.md`)
- Parent → Institution branding: views logo (evidence: `README.md`)
- Parent → Examination results: views published results (evidence: `README.md`)
- Institution admin → Examination results: publishes results (evidence: `README.md`)
- Institution admin → Attendance reporting: reviews reports (evidence: `README.md`)
- Payment webhook → Payment service: uses (evidence: `integrations/payment-gateway/webhook.php`)
- Payment webhook → Payment verification: uses (evidence: `integrations/payment-gateway/webhook.php`)
- Payment verification → Payment service: calls (evidence: `services/payment-verification-service.php`)
- Payment verification → Receipt service: creates receipts (evidence: `services/payment-verification-service.php`)
- Payment service → Razorpay: gateway integration (evidence: `services/payment-service.php`)
- Runtime setup → Application configuration: loads config (evidence: `includes/init.php`)
- Runtime setup → Application database: configures access
- Shared page rendering → Runtime setup: loads runtime (evidence: `includes/page-placeholder.php`)
- Shared page rendering → Request helpers: loads helpers (evidence: `includes/page-placeholder.php`)
- Shared page rendering → Authentication and permissions: checks access (evidence: `includes/page-placeholder.php`)
