# ilix-studio/content-specific-system architecture

> Architecture diagram of the GitHub repository ilix-studio/content-specific-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ilix-studio/content-specific-system
- Repository: https://github.com/ilix-studio/content-specific-system

## Overview

This is an Express API for institute accounts, course management, question banks, and payment-backed passkey issuance. The principal flow is an institute authenticating, managing courses, creating or retrieving question sets, then checking out and saving paid passkeys. Routes and controller-to-model/provider links below are grounded in sampled files; the tree also shows student-auth, nano-ID, and order-completion modules, but their wiring and behavior were not sampled, so they are not expanded.

Main entry points: [`server/index.js`](https://github.com/ilix-studio/content-specific-system/blob/master/server/index.js) (Express app), [`server/controllers/newPaymentController.js`](https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/newPaymentController.js) (Checkout and passkeys), [`server/routes/authR/instituteAuthRoutes.js`](https://github.com/ilix-studio/content-specific-system/blob/master/server/routes/authR/instituteAuthRoutes.js) (Institute routes), [`server/controllers/aboutCourseController/courseControllers.js`](https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/aboutCourseController/courseControllers.js) (Course management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_server["Express app<br/>[index.js]"]
  node_database[("MongoDB connection<br/>[dbConnection.js]")]
end

subgraph group_accounts["Institute accounts"]
  node_institute_routes["Institute routes"]
  node_institute_controller["Institute auth"]
  node_institute_store[("Institute records")]
end

subgraph group_learning["Courses and exams"]
  node_course_controller["Course management"]
  node_course_store[("Course records<br/>[courseModel.js]")]
  node_general_routes["General-question routes<br/>[generalQRoutes.js]"]
  node_general_controller["General questions"]
  node_general_store[("General question sets<br/>[generalQModel.js]")]
  node_mock_routes["Mock-question routes<br/>[mockQRoutes.js]"]
  node_mock_controller["Mock questions"]
  node_mock_store[("Mock question sets<br/>[mockQModel.js]")]
end

subgraph group_commerce["Payments and passkeys"]
  node_payment_routes["Payment routes"]
  node_payment_controller["Checkout and passkeys"]
  node_payment_store[("Payment records<br/>[newPaymentmodel.js]")]
  node_passkey_store[("Passkey records<br/>[nanoIdModel.js]")]
end

node_institute(("Institute"))
node_razorpay["Razorpay"]

node_institute -->|"sends requests"| node_server
node_server -->|"mounts routes"| node_institute_routes
node_server -->|"mounts routes"| node_general_routes
node_server -->|"mounts routes"| node_mock_routes
node_server -->|"mounts routes"| node_payment_routes
node_institute_routes -->|"dispatches"| node_institute_controller
node_institute_controller -->|"reads and writes"| node_institute_store
node_institute_routes -->|"dispatches"| node_course_controller
node_course_controller -->|"reads"| node_institute_store
node_course_controller -->|"reads and writes"| node_course_store
node_general_routes -->|"dispatches"| node_general_controller
node_general_controller -->|"reads and writes"| node_general_store
node_mock_routes -->|"dispatches"| node_mock_controller
node_mock_controller -->|"reads and writes"| node_mock_store
node_payment_routes -->|"dispatches"| node_payment_controller
node_payment_controller -->|"creates orders"| node_razorpay
node_payment_controller -->|"creates and reads"| node_payment_store
node_payment_controller -->|"creates and reads"| node_passkey_store
node_server -->|"connects"| node_database

click node_server "https://github.com/ilix-studio/content-specific-system/blob/master/server/index.js"
click node_institute_routes "https://github.com/ilix-studio/content-specific-system/blob/master/server/routes/authR/instituteAuthRoutes.js"
click node_institute_controller "https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/instituteAuthController.js"
click node_institute_store "https://github.com/ilix-studio/content-specific-system/blob/master/server/models/auth/instituteAuthModel.js"
click node_course_controller "https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/aboutCourseController/courseControllers.js"
click node_course_store "https://github.com/ilix-studio/content-specific-system/blob/master/server/models/transaction/courseModel.js"
click node_general_routes "https://github.com/ilix-studio/content-specific-system/blob/master/server/routes/mcqRoutes/generalQRoutes.js"
click node_general_controller "https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/mcqControllers/generalQuestionController.js"
click node_general_store "https://github.com/ilix-studio/content-specific-system/blob/master/server/models/mcqModels/generalQModel.js"
click node_mock_routes "https://github.com/ilix-studio/content-specific-system/blob/master/server/routes/mcqRoutes/mockQRoutes.js"
click node_mock_controller "https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/mcqControllers/mockQuestionController.js"
click node_mock_store "https://github.com/ilix-studio/content-specific-system/blob/master/server/models/mcqModels/mockQModel.js"
click node_payment_routes "https://github.com/ilix-studio/content-specific-system/blob/master/server/routes/payment/newPaymentRoutes.js"
click node_payment_controller "https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/newPaymentController.js"
click node_payment_store "https://github.com/ilix-studio/content-specific-system/blob/master/server/models/transaction/newPaymentmodel.js"
click node_passkey_store "https://github.com/ilix-studio/content-specific-system/blob/master/server/models/transaction/nanoIdModel.js"
click node_database "https://github.com/ilix-studio/content-specific-system/blob/master/server/utils/dbConnection.js"

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_server,node_database toneBlue
class node_institute_routes,node_institute_controller,node_institute_store toneAmber
class node_course_controller,node_course_store,node_general_routes,node_general_controller,node_general_store,node_mock_routes,node_mock_controller,node_mock_store toneMint
class node_payment_routes,node_payment_controller,node_payment_store,node_passkey_store toneRose
class node_institute,node_razorpay toneIndigo
```

## Components

### API runtime

- [Express app](https://github.com/ilix-studio/content-specific-system/blob/master/server/index.js): `server/index.js`
- [MongoDB connection](https://github.com/ilix-studio/content-specific-system/blob/master/server/utils/dbConnection.js): `server/utils/dbConnection.js`

### Institute accounts

- [Institute routes](https://github.com/ilix-studio/content-specific-system/blob/master/server/routes/authR/instituteAuthRoutes.js): `server/routes/authR/instituteAuthRoutes.js`
- [Institute auth](https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/instituteAuthController.js): `server/controllers/instituteAuthController.js`
- [Institute records](https://github.com/ilix-studio/content-specific-system/blob/master/server/models/auth/instituteAuthModel.js): `server/models/auth/instituteAuthModel.js`

### Courses and exams

- [Course management](https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/aboutCourseController/courseControllers.js): `server/controllers/aboutCourseController/courseControllers.js`
- [Course records](https://github.com/ilix-studio/content-specific-system/blob/master/server/models/transaction/courseModel.js): `server/models/transaction/courseModel.js`
- [General-question routes](https://github.com/ilix-studio/content-specific-system/blob/master/server/routes/mcqRoutes/generalQRoutes.js): `server/routes/mcqRoutes/generalQRoutes.js`
- [General questions](https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/mcqControllers/generalQuestionController.js): `server/controllers/mcqControllers/generalQuestionController.js`
- [General question sets](https://github.com/ilix-studio/content-specific-system/blob/master/server/models/mcqModels/generalQModel.js): `server/models/mcqModels/generalQModel.js`
- [Mock-question routes](https://github.com/ilix-studio/content-specific-system/blob/master/server/routes/mcqRoutes/mockQRoutes.js): `server/routes/mcqRoutes/mockQRoutes.js`
- [Mock questions](https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/mcqControllers/mockQuestionController.js): `server/controllers/mcqControllers/mockQuestionController.js`
- [Mock question sets](https://github.com/ilix-studio/content-specific-system/blob/master/server/models/mcqModels/mockQModel.js): `server/models/mcqModels/mockQModel.js`

### Payments and passkeys

- [Payment routes](https://github.com/ilix-studio/content-specific-system/blob/master/server/routes/payment/newPaymentRoutes.js): `server/routes/payment/newPaymentRoutes.js`
- [Checkout and passkeys](https://github.com/ilix-studio/content-specific-system/blob/master/server/controllers/newPaymentController.js): `server/controllers/newPaymentController.js`
- [Payment records](https://github.com/ilix-studio/content-specific-system/blob/master/server/models/transaction/newPaymentmodel.js): `server/models/transaction/newPaymentmodel.js`
- [Passkey records](https://github.com/ilix-studio/content-specific-system/blob/master/server/models/transaction/nanoIdModel.js): `server/models/transaction/nanoIdModel.js`

### Other components

- **Institute**
- **Razorpay**

## Connections

- Institute → Express app: sends requests
- Express app → Institute routes: mounts routes
- Express app → General-question routes: mounts routes
- Express app → Mock-question routes: mounts routes
- Express app → Payment routes: mounts routes
- Institute routes → Institute auth: dispatches
- Institute auth → Institute records: reads and writes
- Institute routes → Course management: dispatches
- Course management → Institute records: reads
- Course management → Course records: reads and writes
- General-question routes → General questions: dispatches
- General questions → General question sets: reads and writes
- Mock-question routes → Mock questions: dispatches
- Mock questions → Mock question sets: reads and writes
- Payment routes → Checkout and passkeys: dispatches
- Checkout and passkeys → Razorpay: creates orders
- Checkout and passkeys → Payment records: creates and reads
- Checkout and passkeys → Passkey records: creates and reads
- Express app → MongoDB connection: connects
