# ahmed-arafat10/journaling-website architecture

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

- Interactive diagram: https://gitdiagram.com/ahmed-arafat10/journaling-website
- Repository: https://github.com/ahmed-arafat10/journaling-website

## Overview

Journaling Project is a PHP/MySQL web app for account-based daily journaling. Users sign up or log in, then add tasks, diary entries, and answers to predefined questions; they can review and manage today's entries or search past dates. The map preserves the separate authentication, daily-entry, question-management, history, and editing responsibilities. Source excerpts establish most calls and database operations; the SQL schema and some page behavior are unsampled, so their links are omitted where not directly evidenced.

Main entry points: [`ConfigDB.php`](https://github.com/ahmed-arafat10/journaling-website/blob/master/ConfigDB.php) (Authentication and date helpers), [`Login.php`](https://github.com/ahmed-arafat10/journaling-website/blob/master/Login.php) (Login), [`TodayList.php`](https://github.com/ahmed-arafat10/journaling-website/blob/master/TodayList.php) (Today's entries), [`History.php`](https://github.com/ahmed-arafat10/journaling-website/blob/master/History.php) (Date search and history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts"]
  node_signup["Sign up<br/>[SignUp.php]"]
  node_login["Login<br/>[Login.php]"]
  node_home["Home and session<br/>[index.php]"]
end

subgraph group_daily["Daily Journaling"]
  node_entry["Add daily entries<br/>[AddData.php]"]
  node_today["Today's entries<br/>[TodayList.php]"]
  node_questions["Add questions<br/>[AddQuestions.php]"]
end

subgraph group_history["History"]
  node_history["Date search and history<br/>[History.php]"]
  node_edit["Edit entries<br/>[EditData.php]"]
end

subgraph group_shared["Shared Services"]
  node_shared["Authentication and date helpers<br/>[ConfigDB.php]"]
  node_mysql[("MySQL database")]
end

node_visitor(("Visitor"))

node_visitor -->|"registers"| node_signup
node_visitor -->|"signs in"| node_login
node_signup -->|"connects via"| node_shared
node_login -->|"checks login"| node_shared
node_login -->|"redirects to"| node_home
node_home -->|"authenticates"| node_shared
node_visitor -->|"adds entries"| node_entry
node_entry -->|"gets date ID"| node_shared
node_visitor -->|"reviews today"| node_today
node_today -->|"authenticates"| node_shared
node_visitor -->|"adds questions"| node_questions
node_questions -->|"authenticates"| node_shared
node_visitor -->|"searches dates"| node_history
node_history -->|"authenticates"| node_shared
node_history -->|"links edits"| node_edit
node_today -->|"links edits"| node_edit
node_edit -->|"authenticates"| node_shared
node_shared -->|"connects"| node_mysql
node_signup -->|"writes account"| node_mysql
node_login -->|"queries account"| node_mysql
node_entry -->|"writes entries"| node_mysql
node_today -->|"reads and updates"| node_mysql
node_questions -->|"writes questions"| node_mysql
node_history -->|"searches entries"| node_mysql
node_edit -->|"reads and updates"| node_mysql

click node_signup "https://github.com/ahmed-arafat10/journaling-website/blob/master/SignUp.php"
click node_login "https://github.com/ahmed-arafat10/journaling-website/blob/master/Login.php"
click node_home "https://github.com/ahmed-arafat10/journaling-website/blob/master/index.php"
click node_entry "https://github.com/ahmed-arafat10/journaling-website/blob/master/AddData.php"
click node_today "https://github.com/ahmed-arafat10/journaling-website/blob/master/TodayList.php"
click node_questions "https://github.com/ahmed-arafat10/journaling-website/blob/master/AddQuestions.php"
click node_history "https://github.com/ahmed-arafat10/journaling-website/blob/master/History.php"
click node_edit "https://github.com/ahmed-arafat10/journaling-website/blob/master/EditData.php"
click node_shared "https://github.com/ahmed-arafat10/journaling-website/blob/master/ConfigDB.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_signup,node_login,node_home toneBlue
class node_entry,node_today,node_questions toneAmber
class node_history,node_edit toneMint
class node_shared,node_mysql toneRose
class node_visitor toneIndigo
```

## Components

### Accounts

- [Sign up](https://github.com/ahmed-arafat10/journaling-website/blob/master/SignUp.php): `SignUp.php`
- [Login](https://github.com/ahmed-arafat10/journaling-website/blob/master/Login.php): `Login.php`
- [Home and session](https://github.com/ahmed-arafat10/journaling-website/blob/master/index.php): `index.php`

### Daily Journaling

- [Add daily entries](https://github.com/ahmed-arafat10/journaling-website/blob/master/AddData.php): `AddData.php`
- [Today's entries](https://github.com/ahmed-arafat10/journaling-website/blob/master/TodayList.php): `TodayList.php`
- [Add questions](https://github.com/ahmed-arafat10/journaling-website/blob/master/AddQuestions.php): `AddQuestions.php`

### History

- [Date search and history](https://github.com/ahmed-arafat10/journaling-website/blob/master/History.php): `History.php`
- [Edit entries](https://github.com/ahmed-arafat10/journaling-website/blob/master/EditData.php): `EditData.php`

### Shared Services

- [Authentication and date helpers](https://github.com/ahmed-arafat10/journaling-website/blob/master/ConfigDB.php): `ConfigDB.php`
- **MySQL database**

### Other components

- **Visitor**

## Connections

- Visitor → Sign up: registers (evidence: `README.md`)
- Visitor → Login: signs in (evidence: `README.md`)
- Sign up → Authentication and date helpers: connects via (evidence: `SignUp.php`)
- Login → Authentication and date helpers: checks login (evidence: `Login.php`)
- Login → Home and session: redirects to (evidence: `Login.php`)
- Home and session → Authentication and date helpers: authenticates (evidence: `index.php`)
- Visitor → Add daily entries: adds entries (evidence: `README.md`)
- Add daily entries → Authentication and date helpers: gets date ID (evidence: `AddData.php`)
- Visitor → Today's entries: reviews today (evidence: `README.md`)
- Today's entries → Authentication and date helpers: authenticates (evidence: `TodayList.php`)
- Visitor → Add questions: adds questions (evidence: `README.md`)
- Add questions → Authentication and date helpers: authenticates (evidence: `AddQuestions.php`)
- Visitor → Date search and history: searches dates (evidence: `README.md`)
- Date search and history → Authentication and date helpers: authenticates (evidence: `History.php`)
- Date search and history → Edit entries: links edits (evidence: `History.php`)
- Today's entries → Edit entries: links edits (evidence: `TodayList.php`)
- Edit entries → Authentication and date helpers: authenticates (evidence: `EditData.php`)
- Authentication and date helpers → MySQL database: connects (evidence: `ConfigDB.php`)
- Sign up → MySQL database: writes account (evidence: `SignUp.php`)
- Login → MySQL database: queries account (evidence: `Login.php`)
- Add daily entries → MySQL database: writes entries (evidence: `AddData.php`)
- Today's entries → MySQL database: reads and updates (evidence: `TodayList.php`)
- Add questions → MySQL database: writes questions (evidence: `AddQuestions.php`)
- Date search and history → MySQL database: searches entries (evidence: `History.php`)
- Edit entries → MySQL database: reads and updates (evidence: `EditData.php`)
