# fullfilm2021/secure-customer-file-manager architecture

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

- Interactive diagram: https://gitdiagram.com/fullfilm2021/secure-customer-file-manager
- Repository: https://github.com/fullfilm2021/secure-customer-file-manager

## Overview

Secure Customer File Manager is an administrator-operated customer directory and encrypted document repository. An administrator enters through the router, authenticates, then manages customer profiles and their files in the dashboard; uploads are validated and stored encrypted, while authenticated download/preview requests decrypt and stream them. The README also documents dashboard statistics, search/filtering, theme controls, and audit trails. Some frontend and AJAX wiring is documented but not shown in source excerpts, so those relationships cite the README; no unsampled implementation details are assumed.

Main entry points: [`ajax.php`](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/ajax.php) (File Management API), [`index.php`](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/index.php) (Entry Router), [`assets/js/app.js`](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/assets/js/app.js) (Dashboard Interactions), [`download.php`](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/download.php) (Authenticated File Delivery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Security"]
  node_router["Entry Router<br/>[index.php]"]
  node_login["Admin Login<br/>[login.php]"]
  node_security["Session and Security<br/>[config.php]"]
end

subgraph group_management["Customer Management"]
  node_dashboard["Admin Dashboard<br/>[admin.php]"]
  node_frontend["Dashboard Interactions<br/>[app.js]"]
  node_customer_api["Customer and Stats API<br/>[ajax.php]"]
  node_customer_records["Customer Records<br/>[ajax.php]"]
end

subgraph group_documents["Secure Documents"]
  node_file_api["File Management API<br/>[ajax.php]"]
  node_upload_validation["Upload Validation<br/>[ajax.php]"]
  node_encrypted_store[("Encrypted File Store")]
  node_delivery["Authenticated File Delivery<br/>[download.php]"]
end

subgraph group_operations["Audit and Data"]
  node_database[("MySQL Database")]
  node_audit_writer["Audit Logging<br/>[config.php]"]
  node_audit_view["Audit Log Viewer<br/>[view_logs.php]"]
end

node_admin_user(("Administrator"))

node_admin_user -->|"opens"| node_router
node_router -->|"checks session"| node_security
node_router -->|"redirects to"| node_login
node_router -->|"redirects to"| node_dashboard
node_login -->|"uses auth helpers"| node_security
node_admin_user -->|"manages records"| node_dashboard
node_dashboard -->|"uses interactions"| node_frontend
node_frontend -->|"requests AJAX"| node_customer_api
node_frontend -->|"requests file actions"| node_file_api
node_customer_api -->|"handles requests"| node_customer_records
node_customer_api -->|"queries records"| node_database
node_file_api -->|"validates uploads"| node_upload_validation
node_file_api -->|"queries metadata"| node_database
node_file_api -->|"stores uploads"| node_encrypted_store
node_admin_user -->|"requests preview"| node_delivery
node_delivery -->|"reads metadata"| node_database
node_delivery -->|"reads and decrypts"| node_encrypted_store
node_security -->|"initializes schema"| node_database
node_file_api -.->|"records activity"| node_audit_writer
node_admin_user -->|"reviews activity"| node_audit_view
node_audit_view -->|"reads audit logs"| node_database

click node_router "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/index.php"
click node_login "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/login.php"
click node_security "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/config.php"
click node_dashboard "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/admin.php"
click node_frontend "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/assets/js/app.js"
click node_customer_api "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/ajax.php"
click node_customer_records "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/ajax.php"
click node_file_api "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/ajax.php"
click node_upload_validation "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/ajax.php"
click node_delivery "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/download.php"
click node_audit_writer "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/config.php"
click node_audit_view "https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/view_logs.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_router,node_login,node_security toneBlue
class node_dashboard,node_frontend,node_customer_api,node_customer_records toneAmber
class node_file_api,node_upload_validation,node_encrypted_store,node_delivery toneMint
class node_database,node_audit_writer,node_audit_view toneRose
class node_admin_user toneIndigo
```

## Components

### Access and Security

- [Entry Router](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/index.php): `index.php`
- [Admin Login](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/login.php): `login.php`
- [Session and Security](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/config.php): `config.php`

### Customer Management

- [Admin Dashboard](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/admin.php): `admin.php`
- [Dashboard Interactions](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/assets/js/app.js): `assets/js/app.js`
- [Customer and Stats API](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/ajax.php): `ajax.php`
- [Customer Records](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/ajax.php): `ajax.php`

### Secure Documents

- [File Management API](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/ajax.php): `ajax.php`
- [Upload Validation](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/ajax.php): `ajax.php`
- **Encrypted File Store**
- [Authenticated File Delivery](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/download.php): `download.php`

### Audit and Data

- **MySQL Database**
- [Audit Logging](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/config.php): `config.php`
- [Audit Log Viewer](https://github.com/fullfilm2021/secure-customer-file-manager/blob/main/view_logs.php): `view_logs.php`

### Other components

- **Administrator**

## Connections

- Administrator → Entry Router: opens (evidence: `README.md`)
- Entry Router → Session and Security: checks session (evidence: `index.php`)
- Entry Router → Admin Login: redirects to (evidence: `index.php`)
- Entry Router → Admin Dashboard: redirects to (evidence: `index.php`)
- Admin Login → Session and Security: uses auth helpers (evidence: `login.php`)
- Administrator → Admin Dashboard: manages records (evidence: `README.md`)
- Admin Dashboard → Dashboard Interactions: uses interactions (evidence: `README.md`)
- Dashboard Interactions → Customer and Stats API: requests AJAX (evidence: `README.md`)
- Dashboard Interactions → File Management API: requests file actions (evidence: `README.md`)
- Customer and Stats API → Customer Records: handles requests (evidence: `ajax.php`)
- Customer and Stats API → MySQL Database: queries records (evidence: `ajax.php`)
- File Management API → Upload Validation: validates uploads (evidence: `ajax.php`)
- File Management API → MySQL Database: queries metadata (evidence: `ajax.php`)
- File Management API → Encrypted File Store: stores uploads (evidence: `README.md`)
- Administrator → Authenticated File Delivery: requests preview
- Authenticated File Delivery → MySQL Database: reads metadata (evidence: `download.php`)
- Authenticated File Delivery → Encrypted File Store: reads and decrypts (evidence: `download.php`)
- Session and Security → MySQL Database: initializes schema (evidence: `config.php`)
- File Management API → Audit Logging: records activity (evidence: `ajax.php`)
- Administrator → Audit Log Viewer: reviews activity (evidence: `README.md`)
- Audit Log Viewer → MySQL Database: reads audit logs (evidence: `view_logs.php`)
