# iamvishveshs/online-admission-system architecture

> Architecture diagram of the GitHub repository iamvishveshs/online-admission-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iamvishveshs/online-admission-system
- Repository: https://github.com/iamvishveshs/online-admission-system

## Overview

1. **Overall shape**
   - This is a classic **PHP/MySQL monolith** for an online admissions workflow.
   - There is no separate service layer or frontend framework; the architecture is mostly **page-driven PHP scripts** plus shared includes and static assets.

2. **Two primary user boundaries**
   - The repo is split into a **public/student-facing area** at the root and an **admin console** under `admin-panel/`.
   - The student side handles registration, login, application submission, preferences, fees, receipts, admit cards, and result lookup.
   - The admin side handles applicant review, marks entry, roll number generation, settings, and result publication.

3. **Core admissions workflow**
   - The main flow appears to be: **user registration → login → application submission → test/preferences submission → fee payment → receipt/admit card generation → admin review → marks entry → result display**.
   - Files like `applicationPAT.php`, `pat-data-submission.php`, `testPreferences.php`, `getPreference.php`, `admitCard.php`, `Result.php`, `PrintReceipt.php`, and `downloadReceipt.php` represent the major stages of that workflow.

4. **Database as the central state store**
   - `database/onlineadmissionsystem.sql` is the schema/data seed for the system.
   - `db.php`, `dba.php`, and `databaseQueries.php` indicate the app talks to MySQL directly via shared connection/query helpers.
   - Nearly every business action likely persists to or reads from the same relational database, making it the main integration point of the system.

5. **Authentication and user lifecycle**
   - Student auth is exposed via `user-register.php`, `user-login.php`, and `logout.php`.
   - Admin authentication is likely handled through the root `login.php` and the admin panel session/logout pages.
   - The repository suggests role separation, but the implementation is still file-based rather than using a dedicated auth framework.

6. **Admin console responsibilities**
   - The `admin-panel/` directory contains the operational backend:
     - applicant lists and details
     - pending/registered applicant views
     - fees details
     - marks submission and editing
     - roll number generation/deletion
     - result page management
     - settings/configuration
   - This console is a separate UI boundary but still backed by the same database and shared PHP session state.

7. **Payment subsystem**
   - `razorpay/` is a vendored Razorpay integration, including SDK code, checkout pages, verification, and examples/tests.
   - The payment flow is isolated from the main admission pages and uses its own `config.php`, `pay.php`, `verify.php`, `success.php`, and `error.php`.
   - There is also a separate `razorpay/db.php`, which suggests the payment module reads/writes the same admissions database but keeps its own configuration boundary.

8. **Document and media storage**
   - Uploaded or generated admission artifacts are stored in repository-backed folders such as `PAT-documents/`, with subfolders for `certificate` and `picture`.
   - Other asset folders like `assets/`, `images/`, `background/`, and `admin-panel/img/` support the UI and downloads.
   - This indicates a file-based document workflow alongside the database, rather than object storage or a separate document service.

9. **Resulting outputs and printable artifacts**
   - The system produces user-facing artifacts such as **receipts, admit cards, and results**.
   - `PrintReceipt.php`, `downloadReceipt.php`, and `admitCard.php` imply printable/generated pages, probably assembled from database data plus uploaded files.
   - `Result.php` and admin pages like `resultpage.php` show that published results are a distinct final step in the process.

10. **Communication and utility endpoints**
   - Supporting pages like `contact.php`, `about.php`, `send-message.php`, and `check.php` provide auxiliary user interactions.
   - `scripts.php`, `timer.php`, and `getPreference.php` indicate small AJAX-style or utility endpoints used to populate the UI and support time-sensitive actions.

11. **Presentation layer structure**
   - The UI is built with plain HTML/CSS/JS, jQuery, and Bootstrap-style admin templates.
   - Public styling lives in files like `style.css`, `form.css`, and `pat.css`; admin styling is in `admin-panel/css/sb-admin-2.css` and related assets.
   - Shared page fragments such as `navbar.php`, `footer.php`, `admin-panel/sidebar.php`, `admin-panel/topbar.php`, and `head-files.php` suggest server-rendered composition rather than a frontend SPA.

12. **Important architectural boundary for diagrams**
   - The key diagram should show **student-facing PHP pages**, **admin-panel PHP pages**, and **Razorpay payment module** all converging on the **MySQL database** and shared file storage for documents/media.
   - The application is fundamentally a **single deployable PHP web app with embedded payment SDK and file uploads**, not a microservice architecture.

Main entry points: [`db.php`](https://github.com/iamvishveshs/online-admission-system/blob/main/db.php) (DB Helpers), [`admin-panel/index.php`](https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/index.php) (Admin Home), [`applicationPAT.php`](https://github.com/iamvishveshs/online-admission-system/blob/main/applicationPAT.php) (Apply), [`testPreferences.php`](https://github.com/iamvishveshs/online-admission-system/blob/main/testPreferences.php) (Preferences)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_public["Student/Public"]
  node_n_index["Home<br/>public page<br/>[index.php]"]
  node_n_auth["Auth<br/>[user-register.php]"]
  node_n_apply["Apply<br/>application flow<br/>[applicationPAT.php]"]
  node_n_preferences["Preferences<br/>submission step"]
  node_n_receipts["Receipts<br/>printable output<br/>[PrintReceipt.php]"]
  node_n_admit_result["Admit & Result<br/>publication<br/>[admitCard.php]"]
  node_n_utility["Utilities<br/>support endpoints<br/>[send-message.php]"]
end

subgraph group_group_admin["Admin Console"]
  node_n_admin_home["Admin Home<br/>admin entry<br/>[index.php]"]
  node_n_admin_applicants["Applicants<br/>review queue"]
  node_n_admin_fees["Fees<br/>fee admin"]
  node_n_admin_marks["Marks<br/>[addMarks.php]"]
  node_n_admin_roll["Roll Numbers<br/>rollno admin<br/>[generateRollno.php]"]
  node_n_admin_results["Results<br/>result admin<br/>[resultpage.php]"]
  node_n_admin_settings["Settings<br/>configuration<br/>[setting.php]"]
end

subgraph group_group_payment["Payment Module"]
  node_n_pay_root["Razorpay<br/>payment module<br/>[index.php]"]
  node_n_pay_checkout["Checkout<br/>payment flow<br/>[pay.php]"]
  node_n_pay_verify["Verify<br/>payment verification<br/>[verify.php]"]
end

subgraph group_group_data["Data Layer"]
  node_n_db_schema[("Schema")]
  node_n_db_helpers["DB Helpers<br/>db access<br/>[db.php]"]
end

subgraph group_group_assets["Assets & Storage"]
  node_n_docs["Docs<br/>file storage"]
  node_n_static["Static Assets<br/>ui assets"]
end

node_n_index -->|"start"| node_n_auth
node_n_auth -->|"continue"| node_n_apply
node_n_apply -->|"submit"| node_n_preferences
node_n_preferences -->|"pay"| node_n_pay_checkout
node_n_pay_root -->|"launch"| node_n_pay_checkout
node_n_pay_checkout -->|"verify"| node_n_pay_verify
node_n_pay_verify -->|"confirm"| node_n_receipts
node_n_receipts -->|"store"| node_n_docs
node_n_apply -->|"read/write"| node_n_db_helpers
node_n_preferences -->|"read/write"| node_n_db_helpers
node_n_admit_result -->|"read"| node_n_db_helpers
node_n_admin_applicants -->|"review"| node_n_db_helpers
node_n_admin_fees -->|"audit"| node_n_db_helpers
node_n_admin_marks -->|"edit"| node_n_db_helpers
node_n_admin_roll -->|"assign"| node_n_db_helpers
node_n_admin_results -->|"publish"| node_n_db_helpers
node_n_admin_settings -->|"configure"| node_n_db_helpers
node_n_db_helpers -->|"schema"| node_n_db_schema
node_n_static -.->|"render"| node_n_index
node_n_static -.->|"render"| node_n_admin_home
node_n_docs -.->|"inputs"| node_n_admit_result
node_n_docs -.->|"inspect"| node_n_admin_applicants
node_n_admin_home -->|"navigate"| node_n_admin_applicants
node_n_admin_home -->|"navigate"| node_n_admin_fees
node_n_admin_home -->|"navigate"| node_n_admin_marks
node_n_admin_home -->|"navigate"| node_n_admin_roll
node_n_admin_home -->|"navigate"| node_n_admin_results
node_n_admin_home -->|"navigate"| node_n_admin_settings

click node_n_index "https://github.com/iamvishveshs/online-admission-system/blob/main/index.php"
click node_n_auth "https://github.com/iamvishveshs/online-admission-system/blob/main/user-register.php"
click node_n_apply "https://github.com/iamvishveshs/online-admission-system/blob/main/applicationPAT.php"
click node_n_preferences "https://github.com/iamvishveshs/online-admission-system/blob/main/testPreferences.php"
click node_n_receipts "https://github.com/iamvishveshs/online-admission-system/blob/main/PrintReceipt.php"
click node_n_admit_result "https://github.com/iamvishveshs/online-admission-system/blob/main/admitCard.php"
click node_n_utility "https://github.com/iamvishveshs/online-admission-system/blob/main/send-message.php"
click node_n_admin_home "https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/index.php"
click node_n_admin_applicants "https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/pendingApplicants.php"
click node_n_admin_fees "https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/ApplicantFeesDetails.php"
click node_n_admin_marks "https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/addMarks.php"
click node_n_admin_roll "https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/generateRollno.php"
click node_n_admin_results "https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/resultpage.php"
click node_n_admin_settings "https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/setting.php"
click node_n_pay_root "https://github.com/iamvishveshs/online-admission-system/blob/main/razorpay/index.php"
click node_n_pay_checkout "https://github.com/iamvishveshs/online-admission-system/blob/main/razorpay/pay.php"
click node_n_pay_verify "https://github.com/iamvishveshs/online-admission-system/blob/main/razorpay/verify.php"
click node_n_db_schema "https://github.com/iamvishveshs/online-admission-system/blob/main/database/onlineadmissionsystem.sql"
click node_n_db_helpers "https://github.com/iamvishveshs/online-admission-system/blob/main/db.php"
click node_n_docs "https://github.com/iamvishveshs/online-admission-system/tree/main/PAT-documents"
click node_n_static "https://github.com/iamvishveshs/online-admission-system/tree/main/assets"

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_n_index,node_n_auth,node_n_apply,node_n_preferences,node_n_receipts,node_n_admit_result,node_n_utility toneBlue
class node_n_admin_home,node_n_admin_applicants,node_n_admin_fees,node_n_admin_marks,node_n_admin_roll,node_n_admin_results,node_n_admin_settings toneAmber
class node_n_pay_root,node_n_pay_checkout,node_n_pay_verify toneMint
class node_n_db_schema,node_n_db_helpers toneRose
class node_n_docs,node_n_static toneIndigo
```

## Components

### Student/Public

Student-facing admission flow and public pages

- [Home](https://github.com/iamvishveshs/online-admission-system/blob/main/index.php): public page · Landing page and entry point for the admissions site · `index.php`
- [Auth](https://github.com/iamvishveshs/online-admission-system/blob/main/user-register.php): student auth · Registration, login, and logout for applicants · `user-register.php`
- [Apply](https://github.com/iamvishveshs/online-admission-system/blob/main/applicationPAT.php): application flow · Application submission and data capture pages · `applicationPAT.php`
- [Preferences](https://github.com/iamvishveshs/online-admission-system/blob/main/testPreferences.php): submission step · Test preferences and related submission endpoints · `testPreferences.php`
- [Receipts](https://github.com/iamvishveshs/online-admission-system/blob/main/PrintReceipt.php): printable output · Receipt generation and download for paid applications · `PrintReceipt.php`
- [Admit & Result](https://github.com/iamvishveshs/online-admission-system/blob/main/admitCard.php): publication · Admit card and result lookup pages for applicants · `admitCard.php`
- [Utilities](https://github.com/iamvishveshs/online-admission-system/blob/main/send-message.php): support endpoints · Contact, message, checking, scripts, and timing helpers · `send-message.php`

### Admin Console

Operational backend for reviewing and publishing admissions data

- [Admin Home](https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/index.php): admin entry · Admin console entry page and shared layout shell · `admin-panel/index.php`
- [Applicants](https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/pendingApplicants.php): review queue · Applicant lists, pending/registered views, and detail pages · `admin-panel/pendingApplicants.php`
- [Fees](https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/ApplicantFeesDetails.php): fee admin · Applicant fee details and payment review · `admin-panel/ApplicantFeesDetails.php`
- [Marks](https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/addMarks.php): marks admin · Marks entry, editing, and submission workflow · `admin-panel/addMarks.php`
- [Roll Numbers](https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/generateRollno.php): rollno admin · Roll number generation, listing, and deletion · `admin-panel/generateRollno.php`
- [Results](https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/resultpage.php): result admin · Result page management and publication controls · `admin-panel/resultpage.php`
- [Settings](https://github.com/iamvishveshs/online-admission-system/blob/main/admin-panel/setting.php): configuration · Admin configuration and system settings · `admin-panel/setting.php`

### Payment Module

Vendored Razorpay checkout and verification flow

- [Razorpay](https://github.com/iamvishveshs/online-admission-system/blob/main/razorpay/index.php): payment module · Vendored Razorpay integration entry point · `razorpay/index.php`
- [Checkout](https://github.com/iamvishveshs/online-admission-system/blob/main/razorpay/pay.php): payment flow · Payment initiation and checkout pages · `razorpay/pay.php`
- [Verify](https://github.com/iamvishveshs/online-admission-system/blob/main/razorpay/verify.php): payment verification · Payment verification and success/error handling · `razorpay/verify.php`

### Data Layer

Database schema and shared database access helpers

- [Schema](https://github.com/iamvishveshs/online-admission-system/blob/main/database/onlineadmissionsystem.sql): mysql schema · Database schema and seed data for the admissions system · `database/onlineadmissionsystem.sql`
- [DB Helpers](https://github.com/iamvishveshs/online-admission-system/blob/main/db.php): db access · Shared database connection and query helpers · `db.php`

### Assets & Storage

Static assets and uploaded/generated documents

- [Docs](https://github.com/iamvishveshs/online-admission-system/tree/main/PAT-documents): file storage · Uploaded certificates, pictures, and generated admission artifacts · `PAT-documents`
- [Static Assets](https://github.com/iamvishveshs/online-admission-system/tree/main/assets): ui assets · Shared CSS, JS, images, and page fragments for rendered pages · `assets`

## Connections

- Home → Auth: start · Applicants move from landing to account access
- Auth → Apply: continue · Authenticated students proceed to submit applications
- Apply → Preferences: submit · Application data feeds the preferences/test submission step
- Preferences → Checkout: pay · Fee payment is triggered after preference submission
- Razorpay → Checkout: launch · Razorpay module opens the checkout flow
- Checkout → Verify: verify · Successful checkout is verified before completion
- Verify → Receipts: confirm · Verified payments enable receipt generation/download
- Receipts → Docs: store · Receipts and related artifacts are produced from stored records
- Apply → DB Helpers: read/write · Application pages persist and load admissions data
- Preferences → DB Helpers: read/write · Preference submission is backed by shared database access
- Admit & Result → DB Helpers: read · Admit cards and results are assembled from database state
- Applicants → DB Helpers: review · Admin review pages query applicant records
- Fees → DB Helpers: audit · Fee administration reads payment and applicant data
- Marks → DB Helpers: edit · Marks entry and update pages persist exam outcomes
- Roll Numbers → DB Helpers: assign · Roll number operations depend on central database state
- Results → DB Helpers: publish · Result publication uses the shared relational backend
- Settings → DB Helpers: configure · Settings are stored in the same database layer
- DB Helpers → Schema: schema · Helpers operate on the admissions MySQL schema
- Static Assets → Home: render · Shared assets support the public UI
- Static Assets → Admin Home: render · Shared assets and templates support the admin UI
- Docs → Admit & Result: inputs · Uploaded files and generated artifacts support output pages
- Docs → Applicants: inspect · Admin review pages rely on stored applicant documents
- Admin Home → Applicants: navigate · Console navigation leads to applicant review
- Admin Home → Fees: navigate · Console navigation leads to fee review
- Admin Home → Marks: navigate · Console navigation leads to marks management
- Admin Home → Roll Numbers: navigate · Console navigation leads to roll number management
- Admin Home → Results: navigate · Console navigation leads to result publication
- Admin Home → Settings: navigate · Console navigation leads to configuration
