# yashbajpai888/onssdb architecture

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

- Interactive diagram: https://gitdiagram.com/yashbajpai888/onssdb
- Repository: https://github.com/yashbajpai888/onssdb

## Overview

The repository’s documented product is an Online Notes Sharing System: visitors browse shared notes or register, then signed-in users manage notes and account details. Its PHP pages use PDO connections to MySQL and store note attachments in user folders. A separate 3DES application is also present, but its detailed runtime wiring is not established by the available excerpts; its links are therefore omitted. The graph covers the documented notes and account capabilities; unsampled page internals are not inferred.

Main entry points: [`onss/user/includes/dbconnection.php`](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/includes/dbconnection.php) (User DB config), [`onss/notes.php`](https://github.com/yashbajpai888/onssdb/blob/main/onss/notes.php) (Browse notes), [`onss/user/add-notes.php`](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/add-notes.php) (Add notes), [`onss/user/edit-notes.php`](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/edit-notes.php) (Edit notes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public notes site"]
  node_home["Landing page<br/>[index.php]"]
  node_publicnav["Public navigation<br/>[header.php]"]
  node_catalog["Browse notes<br/>[notes.php]"]
end

subgraph group_identity["Accounts and access"]
  node_register["Sign up<br/>[signup.php]"]
  node_signin["Sign in<br/>[signin.php]"]
  node_profile["User profile<br/>[profile.php]"]
end

subgraph group_notes["Notes workspace"]
  node_dashboard["User dashboard<br/>[dashboard.php]"]
  node_addnotes["Add notes<br/>[add-notes.php]"]
  node_managenotes["Manage notes<br/>[manage-notes.php]"]
  node_editnotes["Edit notes<br/>[edit-notes.php]"]
  node_attachments[("Note attachments")]
end

subgraph group_storage["Persistence"]
  node_publicdb["Public DB config<br/>[dbconnection.php]"]
  node_userdb["User DB config<br/>[dbconnection.php]"]
  node_mysql[("MySQL database")]
  node_schema["ONSS schema<br/>[onssdb.sql]"]
end

subgraph group_crypto["3DES utility"]
  node_cryptoapp["3DES web app<br/>[app.py]"]
  node_cryptoutils["Crypto utilities<br/>[crypto_utils.py]"]
  node_scheduler["Scheduler<br/>[scheduler.py]"]
end

node_visitor(("Visitor"))
node_member(("Registered user"))

node_visitor -->|"visits"| node_home
node_home -->|"includes"| node_publicnav
node_publicnav -->|"links to"| node_catalog
node_visitor -->|"browses"| node_catalog
node_catalog -->|"queries notes"| node_userdb
node_publicdb -->|"connects"| node_mysql
node_userdb -->|"connects"| node_mysql
node_schema -->|"defines schema"| node_mysql
node_visitor -->|"registers"| node_register
node_visitor -->|"logs in"| node_signin
node_member -.->|"opens"| node_dashboard
node_register -->|"uses connection"| node_userdb
node_signin -->|"uses connection"| node_userdb
node_profile -->|"reads and updates"| node_userdb
node_dashboard -->|"uses connection"| node_userdb
node_addnotes -->|"inserts notes"| node_userdb
node_addnotes -.->|"uploads files"| node_attachments
node_managenotes -->|"uses connection"| node_userdb
node_editnotes -->|"reads and updates"| node_userdb
node_editnotes -->|"links files"| node_attachments
node_cryptoapp -.->|"delegates crypto"| node_cryptoutils

click node_home "https://github.com/yashbajpai888/onssdb/blob/main/onss/index.php"
click node_publicnav "https://github.com/yashbajpai888/onssdb/blob/main/onss/includes/header.php"
click node_catalog "https://github.com/yashbajpai888/onssdb/blob/main/onss/notes.php"
click node_register "https://github.com/yashbajpai888/onssdb/blob/main/onss/user/signup.php"
click node_signin "https://github.com/yashbajpai888/onssdb/blob/main/onss/user/signin.php"
click node_profile "https://github.com/yashbajpai888/onssdb/blob/main/onss/user/profile.php"
click node_dashboard "https://github.com/yashbajpai888/onssdb/blob/main/onss/user/dashboard.php"
click node_addnotes "https://github.com/yashbajpai888/onssdb/blob/main/onss/user/add-notes.php"
click node_managenotes "https://github.com/yashbajpai888/onssdb/blob/main/onss/user/manage-notes.php"
click node_editnotes "https://github.com/yashbajpai888/onssdb/blob/main/onss/user/edit-notes.php"
click node_attachments "https://github.com/yashbajpai888/onssdb/tree/main/onss/user"
click node_publicdb "https://github.com/yashbajpai888/onssdb/blob/main/onss/includes/dbconnection.php"
click node_userdb "https://github.com/yashbajpai888/onssdb/blob/main/onss/user/includes/dbconnection.php"
click node_schema "https://github.com/yashbajpai888/onssdb/blob/main/SQL%20Files/onssdb.sql"
click node_cryptoapp "https://github.com/yashbajpai888/onssdb/blob/main/3DES/app.py"
click node_cryptoutils "https://github.com/yashbajpai888/onssdb/blob/main/3DES/crypto_utils.py"
click node_scheduler "https://github.com/yashbajpai888/onssdb/blob/main/3DES/scheduler.py"

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_home,node_publicnav,node_catalog,node_member toneBlue
class node_register,node_signin,node_profile toneAmber
class node_dashboard,node_addnotes,node_managenotes,node_editnotes,node_attachments toneMint
class node_publicdb,node_userdb,node_mysql,node_schema toneRose
class node_cryptoapp,node_cryptoutils,node_scheduler,node_visitor toneIndigo
```

## Components

### Public notes site

- [Landing page](https://github.com/yashbajpai888/onssdb/blob/main/onss/index.php): `onss/index.php`
- [Public navigation](https://github.com/yashbajpai888/onssdb/blob/main/onss/includes/header.php): `onss/includes/header.php`
- [Browse notes](https://github.com/yashbajpai888/onssdb/blob/main/onss/notes.php): `onss/notes.php`

### Accounts and access

- [Sign up](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/signup.php): `onss/user/signup.php`
- [Sign in](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/signin.php): `onss/user/signin.php`
- [User profile](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/profile.php): `onss/user/profile.php`

### Notes workspace

- [User dashboard](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/dashboard.php): `onss/user/dashboard.php`
- [Add notes](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/add-notes.php): `onss/user/add-notes.php`
- [Manage notes](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/manage-notes.php): `onss/user/manage-notes.php`
- [Edit notes](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/edit-notes.php): `onss/user/edit-notes.php`
- [Note attachments](https://github.com/yashbajpai888/onssdb/tree/main/onss/user): `onss/user`

### Persistence

- [Public DB config](https://github.com/yashbajpai888/onssdb/blob/main/onss/includes/dbconnection.php): `onss/includes/dbconnection.php`
- [User DB config](https://github.com/yashbajpai888/onssdb/blob/main/onss/user/includes/dbconnection.php): `onss/user/includes/dbconnection.php`
- **MySQL database**
- [ONSS schema](https://github.com/yashbajpai888/onssdb/blob/main/SQL%20Files/onssdb.sql): `SQL Files/onssdb.sql`

### 3DES utility

- [3DES web app](https://github.com/yashbajpai888/onssdb/blob/main/3DES/app.py): `3DES/app.py`
- [Crypto utilities](https://github.com/yashbajpai888/onssdb/blob/main/3DES/crypto_utils.py): `3DES/crypto_utils.py`
- [Scheduler](https://github.com/yashbajpai888/onssdb/blob/main/3DES/scheduler.py): `3DES/scheduler.py`

### Other components

- **Visitor**
- **Registered user**

## Connections

- Visitor → Landing page: visits (evidence: `onss/index.php`)
- Landing page → Public navigation: includes (evidence: `onss/index.php`)
- Public navigation → Browse notes: links to (evidence: `onss/includes/header.php`)
- Visitor → Browse notes: browses
- Browse notes → User DB config: queries notes (evidence: `onss/notes.php`)
- Public DB config → MySQL database: connects (evidence: `onss/includes/dbconnection.php`)
- User DB config → MySQL database: connects (evidence: `onss/user/includes/dbconnection.php`)
- ONSS schema → MySQL database: defines schema (evidence: `Readme.txt`)
- Visitor → Sign up: registers
- Visitor → Sign in: logs in
- Registered user → User dashboard: opens
- Sign up → User DB config: uses connection (evidence: `onss/user/signup.php`)
- Sign in → User DB config: uses connection (evidence: `onss/user/signin.php`)
- User profile → User DB config: reads and updates (evidence: `onss/user/profile.php`)
- User dashboard → User DB config: uses connection (evidence: `onss/user/dashboard.php`)
- Add notes → User DB config: inserts notes (evidence: `onss/user/add-notes.php`)
- Add notes → Note attachments: uploads files (evidence: `onss/user/add-notes.php`)
- Manage notes → User DB config: uses connection (evidence: `onss/user/manage-notes.php`)
- Edit notes → User DB config: reads and updates (evidence: `onss/user/edit-notes.php`)
- Edit notes → Note attachments: links files (evidence: `onss/user/edit-notes.php`)
- 3DES web app → Crypto utilities: delegates crypto
