# vin0414/e-pcos architecture

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

- Interactive diagram: https://gitdiagram.com/vin0414/e-pcos
- Repository: https://github.com/vin0414/e-pcos

## Overview

e-PCOS is a PCOS-awareness and online-survey web application. Visitors register or sign in, use customer features such as appointments and surveys, and receive rendered pages or responses; administrators manage users, content, surveys, appointments, and reports. The graph distinguishes those domain areas and includes CodeIgniter’s request-routing runtime as an internal layer. The README documents email notifications, a chatbot, and backup/restore, but sampled source only confirms the restore route; implementation details for those features are therefore not inferred.

Main entry points: [`app/Config/Routes.php`](https://github.com/vin0414/e-pcos/blob/main/app/Config/Routes.php) (Application routes), [`app/Controllers/ManageController.php`](https://github.com/vin0414/e-pcos/blob/main/app/Controllers/ManageController.php) (Admin management), [`app/Controllers/Customer.php`](https://github.com/vin0414/e-pcos/blob/main/app/Controllers/Customer.php) (Customer actions), [`app/Models`](https://github.com/vin0414/e-pcos/tree/main/app/Models) (Application data models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry"]
  node_routes["Application routes<br/>[Routes.php]"]
  node_home["Public and account flows<br/>[Home.php]"]
  node_public_views["Public pages"]
  node_email["Email notifications<br/>[Email.php]"]
end

subgraph group_customer["Customer services"]
  node_customer_ctrl["Customer actions<br/>[Customer.php]"]
  node_customer_views["Customer pages"]
  node_appointments["Appointment scheduling<br/>[Customer.php]"]
  node_survey["Poll survey<br/>[surveyModel.php]"]
  node_chatbot["Chatbot capability"]
end

subgraph group_admin["Administration"]
  node_admin_ctrl["Admin management"]
  node_admin_views["Admin pages"]
  node_blog["Blog management<br/>[blogModel.php]"]
  node_reports["Reports<br/>[Report.php]"]
  node_account_data[("Application data models")]
  node_backup_restore["Backup and restore<br/>[RestoreDB.php]"]
end

subgraph group_runtime["CodeIgniter runtime"]
  node_front_controller["HTTP front controller<br/>[index.php]"]
  node_framework["Request runtime<br/>[CodeIgniter.php]"]
  node_router["Router<br/>[Router.php]"]
end

node_visitor(("Visitor"))

node_visitor -->|"sends requests"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_customer_ctrl
node_routes -->|"routes to"| node_admin_ctrl
node_routes -->|"routes to"| node_reports
node_routes -->|"routes to"| node_backup_restore
node_home -.->|"renders"| node_public_views
node_customer_ctrl -.->|"renders"| node_customer_views
node_customer_ctrl -.->|"handles scheduling"| node_appointments
node_customer_ctrl -.->|"handles survey"| node_survey
node_admin_ctrl -.->|"renders"| node_admin_views
node_admin_ctrl -->|"updates"| node_blog
node_admin_ctrl -->|"updates"| node_survey
node_admin_ctrl -->|"writes logs"| node_account_data
node_admin_ctrl -.->|"manages data"| node_account_data
node_reports -.->|"queries"| node_account_data
node_backup_restore -.->|"restores data"| node_account_data
node_visitor -.->|"uses"| node_chatbot
node_home -.->|"sends notifications"| node_email
node_visitor -.->|"opens site"| node_front_controller
node_front_controller -->|"starts"| node_framework
node_framework -->|"dispatches through"| node_router
node_router -.->|"matches routes"| node_routes

click node_routes "https://github.com/vin0414/e-pcos/blob/main/app/Config/Routes.php"
click node_home "https://github.com/vin0414/e-pcos/blob/main/app/Controllers/Home.php"
click node_public_views "https://github.com/vin0414/e-pcos/tree/main/app/Views"
click node_customer_ctrl "https://github.com/vin0414/e-pcos/blob/main/app/Controllers/Customer.php"
click node_customer_views "https://github.com/vin0414/e-pcos/tree/main/app/Views/customer"
click node_appointments "https://github.com/vin0414/e-pcos/blob/main/app/Controllers/Customer.php"
click node_survey "https://github.com/vin0414/e-pcos/blob/main/app/Models/surveyModel.php"
click node_admin_ctrl "https://github.com/vin0414/e-pcos/blob/main/app/Controllers/ManageController.php"
click node_admin_views "https://github.com/vin0414/e-pcos/tree/main/app/Views/admin"
click node_blog "https://github.com/vin0414/e-pcos/blob/main/app/Models/blogModel.php"
click node_reports "https://github.com/vin0414/e-pcos/blob/main/app/Controllers/Report.php"
click node_account_data "https://github.com/vin0414/e-pcos/tree/main/app/Models"
click node_backup_restore "https://github.com/vin0414/e-pcos/blob/main/app/Controllers/RestoreDB.php"
click node_chatbot "https://github.com/vin0414/e-pcos/tree/main/app/Views"
click node_email "https://github.com/vin0414/e-pcos/blob/main/app/Config/Email.php"
click node_front_controller "https://github.com/vin0414/e-pcos/blob/main/public/index.php"
click node_framework "https://github.com/vin0414/e-pcos/blob/main/system/CodeIgniter.php"
click node_router "https://github.com/vin0414/e-pcos/blob/main/system/Router/Router.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_routes,node_home,node_public_views,node_email toneBlue
class node_customer_ctrl,node_customer_views,node_appointments,node_survey,node_chatbot toneAmber
class node_admin_ctrl,node_admin_views,node_blog,node_reports,node_account_data,node_backup_restore toneMint
class node_front_controller,node_framework,node_router toneRose
class node_visitor toneIndigo
```

## Components

### Web entry

- [Application routes](https://github.com/vin0414/e-pcos/blob/main/app/Config/Routes.php): `app/Config/Routes.php`
- [Public and account flows](https://github.com/vin0414/e-pcos/blob/main/app/Controllers/Home.php): `app/Controllers/Home.php`
- [Public pages](https://github.com/vin0414/e-pcos/tree/main/app/Views): `app/Views`
- [Email notifications](https://github.com/vin0414/e-pcos/blob/main/app/Config/Email.php): `app/Config/Email.php`

### Customer services

- [Customer actions](https://github.com/vin0414/e-pcos/blob/main/app/Controllers/Customer.php): `app/Controllers/Customer.php`
- [Customer pages](https://github.com/vin0414/e-pcos/tree/main/app/Views/customer): `app/Views/customer`
- [Appointment scheduling](https://github.com/vin0414/e-pcos/blob/main/app/Controllers/Customer.php): `app/Controllers/Customer.php`
- [Poll survey](https://github.com/vin0414/e-pcos/blob/main/app/Models/surveyModel.php): `app/Models/surveyModel.php`
- [Chatbot capability](https://github.com/vin0414/e-pcos/tree/main/app/Views): `app/Views`

### Administration

- [Admin management](https://github.com/vin0414/e-pcos/blob/main/app/Controllers/ManageController.php): `app/Controllers/ManageController.php`
- [Admin pages](https://github.com/vin0414/e-pcos/tree/main/app/Views/admin): `app/Views/admin`
- [Blog management](https://github.com/vin0414/e-pcos/blob/main/app/Models/blogModel.php): `app/Models/blogModel.php`
- [Reports](https://github.com/vin0414/e-pcos/blob/main/app/Controllers/Report.php): `app/Controllers/Report.php`
- [Application data models](https://github.com/vin0414/e-pcos/tree/main/app/Models): `app/Models`
- [Backup and restore](https://github.com/vin0414/e-pcos/blob/main/app/Controllers/RestoreDB.php): `app/Controllers/RestoreDB.php`

### CodeIgniter runtime

- [HTTP front controller](https://github.com/vin0414/e-pcos/blob/main/public/index.php): `public/index.php`
- [Request runtime](https://github.com/vin0414/e-pcos/blob/main/system/CodeIgniter.php): `system/CodeIgniter.php`
- [Router](https://github.com/vin0414/e-pcos/blob/main/system/Router/Router.php): `system/Router/Router.php`

### Other components

- **Visitor**

## Connections

- Visitor → Application routes: sends requests (evidence: `app/Config/Routes.php`)
- Application routes → Public and account flows: routes to (evidence: `app/Config/Routes.php`)
- Application routes → Customer actions: routes to (evidence: `app/Config/Routes.php`)
- Application routes → Admin management: routes to (evidence: `app/Config/Routes.php`)
- Application routes → Reports: routes to (evidence: `app/Config/Routes.php`)
- Application routes → Backup and restore: routes to (evidence: `app/Config/Routes.php`)
- Public and account flows → Public pages: renders
- Customer actions → Customer pages: renders
- Customer actions → Appointment scheduling: handles scheduling
- Customer actions → Poll survey: handles survey
- Admin management → Admin pages: renders
- Admin management → Blog management: updates (evidence: `app/Controllers/ManageController.php`)
- Admin management → Poll survey: updates (evidence: `app/Controllers/ManageController.php`)
- Admin management → Application data models: writes logs (evidence: `app/Controllers/ManageController.php`)
- Admin management → Application data models: manages data
- Reports → Application data models: queries
- Backup and restore → Application data models: restores data
- Visitor → Chatbot capability: uses
- Public and account flows → Email notifications: sends notifications
- Visitor → HTTP front controller: opens site
- HTTP front controller → Request runtime: starts (evidence: `public/index.php`)
- Request runtime → Router: dispatches through (evidence: `system/CodeIgniter.php`)
- Router → Application routes: matches routes
