# aljonjaymatas-code/law-office-management-system-ft.-mysql architecture

> Architecture diagram of the GitHub repository aljonjaymatas-code/law-office-management-system-ft.-mysql, 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/aljonjaymatas-code/law-office-management-system-ft.-mysql
- Repository: https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql

## Overview

LOMS is a PHP/MySQL law-office portal with separate client, staff, and admin experiences. Users sign in to their role-specific portal to manage matters, clients, documents, appointments, and time; clients can request appointments and document access, while staff and lawyers handle operational and review work. The README also describes broader docketing, conflict checking, document-generation, and integrations, but sampled source does not establish those implementations. Edges reflect only visible calls/data access or explicit documentation; unsampled feature connections are omitted.

Main entry points: [`Staff/_bootstrap.php`](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/_bootstrap.php) (Staff Session), [`Client/index.php`](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Client/index.php) (Client Portal), [`Staff/index.php`](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/index.php) (Staff Portal), [`Admin/index.php`](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Admin/index.php) (Admin Portal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portals["User Portals"]
  node_clients["Client Portal<br/>[index.php]"]
  node_client_ui["Client Interface<br/>[client-app.js]"]
  node_client_auth["Client Session<br/>[_bootstrap.php]"]
  node_staff["Staff Portal<br/>[index.php]"]
  node_staff_ui["Staff Layout<br/>[_layout.php]"]
  node_staff_auth["Staff Session<br/>[_bootstrap.php]"]
  node_admin["Admin Portal<br/>[index.php]"]
  node_admin_auth["Admin Roles<br/>[_auth.php]"]
end

subgraph group_practice["Practice Operations"]
  node_intake["Client Intake<br/>[clients.php]"]
  node_cases["Matter Management<br/>[cases.php]"]
  node_appointments["Scheduling<br/>[appointments.php]"]
  node_time["Timekeeping<br/>[time_entries.php]"]
  node_documents["Document Management<br/>[documents.php]"]
  node_document_requests["Access Requests"]
  node_search["Cross-Portal Search<br/>[search.php]"]
end

subgraph group_services["Shared Services"]
  node_notifications["Notification Service<br/>[notifications.php]"]
  node_notification_api["Notification API"]
  node_database_config["Database Connection<br/>[db.php]"]
end

subgraph group_data["Persistence"]
  node_mysql[("MySQL Database")]
end

node_person(("Client, Staff, Lawyer"))

node_person -->|"uses portal"| node_clients
node_person -->|"uses portal"| node_staff
node_person -->|"uses portal"| node_admin
node_clients -->|"resolves session"| node_client_auth
node_clients -->|"reads and writes"| node_mysql
node_clients -->|"creates alerts"| node_notifications
node_client_ui -.->|"renders portal"| node_clients
node_staff -->|"requires auth"| node_staff_auth
node_staff -->|"renders layout"| node_staff_ui
node_staff -->|"reads data"| node_mysql
node_staff_ui -->|"fetches alerts"| node_notification_api
node_staff_ui -->|"fetches suggestions"| node_search
node_intake -->|"checks access"| node_staff_auth
node_intake -->|"reads and writes"| node_mysql
node_cases -->|"checks access"| node_staff_auth
node_appointments -->|"checks access"| node_staff_auth
node_appointments -->|"creates alerts"| node_notifications
node_time -->|"checks access"| node_staff_auth
node_documents -->|"checks access"| node_staff_auth
node_document_requests -->|"checks access"| node_staff_auth
node_search -->|"checks access"| node_staff_auth
node_search -->|"queries records"| node_mysql
node_admin -->|"checks role"| node_admin_auth
node_admin -->|"reads and writes"| node_mysql
node_admin -->|"loads alerts"| node_notifications
node_database_config -->|"opens connection"| node_mysql
node_notification_api -->|"loads connection"| node_database_config
node_notification_api -->|"reads and updates"| node_mysql
node_notifications -->|"inserts alerts"| node_mysql

click node_clients "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Client/index.php"
click node_client_ui "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Client/js/client-app.js"
click node_client_auth "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Client/_bootstrap.php"
click node_staff "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/index.php"
click node_staff_ui "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/_layout.php"
click node_staff_auth "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/_bootstrap.php"
click node_admin "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Admin/index.php"
click node_admin_auth "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Admin/_auth.php"
click node_intake "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/clients.php"
click node_cases "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/cases.php"
click node_appointments "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/appointments.php"
click node_time "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/time_entries.php"
click node_documents "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/documents.php"
click node_document_requests "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/document-access-request.php"
click node_search "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/search.php"
click node_notifications "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/config/notifications.php"
click node_notification_api "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/notification-read.php"
click node_database_config "https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/config/db.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_clients,node_client_ui,node_client_auth,node_staff,node_staff_ui,node_staff_auth,node_admin,node_admin_auth,node_person toneBlue
class node_intake,node_cases,node_appointments,node_time,node_documents,node_document_requests,node_search toneAmber
class node_notifications,node_notification_api,node_database_config toneMint
class node_mysql toneRose
```

## Components

### User Portals

- [Client Portal](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Client/index.php): `Client/index.php`
- [Client Interface](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Client/js/client-app.js): `Client/js/client-app.js`
- [Client Session](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Client/_bootstrap.php): `Client/_bootstrap.php`
- [Staff Portal](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/index.php): `Staff/index.php`
- [Staff Layout](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/_layout.php): `Staff/_layout.php`
- [Staff Session](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/_bootstrap.php): `Staff/_bootstrap.php`
- [Admin Portal](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Admin/index.php): `Admin/index.php`
- [Admin Roles](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Admin/_auth.php): `Admin/_auth.php`

### Practice Operations

- [Client Intake](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/clients.php): `Staff/clients.php`
- [Matter Management](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/cases.php): `Staff/cases.php`
- [Scheduling](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/appointments.php): `Staff/appointments.php`
- [Timekeeping](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/time_entries.php): `Staff/time_entries.php`
- [Document Management](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/documents.php): `Staff/documents.php`
- [Access Requests](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/document-access-request.php): `Staff/document-access-request.php`
- [Cross-Portal Search](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/Staff/search.php): `Staff/search.php`

### Shared Services

- [Notification Service](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/config/notifications.php): `config/notifications.php`
- [Notification API](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/notification-read.php): `notification-read.php`
- [Database Connection](https://github.com/aljonjaymatas-code/law-office-management-system-ft.-mysql/blob/main/config/db.php): `config/db.php`

### Persistence

- **MySQL Database**

### Other components

- **Client, Staff, Lawyer**

## Connections

- Client, Staff, Lawyer → Client Portal: uses portal (evidence: `README.md`)
- Client, Staff, Lawyer → Staff Portal: uses portal (evidence: `README.md`)
- Client, Staff, Lawyer → Admin Portal: uses portal (evidence: `README.md`)
- Client Portal → Client Session: resolves session (evidence: `Client/index.php`)
- Client Portal → MySQL Database: reads and writes (evidence: `Client/index.php`)
- Client Portal → Notification Service: creates alerts (evidence: `Client/index.php`)
- Client Interface → Client Portal: renders portal
- Staff Portal → Staff Session: requires auth (evidence: `Staff/index.php`)
- Staff Portal → Staff Layout: renders layout (evidence: `Staff/index.php`)
- Staff Portal → MySQL Database: reads data (evidence: `Staff/index.php`)
- Staff Layout → Notification API: fetches alerts (evidence: `Staff/_layout.php`)
- Staff Layout → Cross-Portal Search: fetches suggestions (evidence: `Staff/_layout.php`)
- Client Intake → Staff Session: checks access (evidence: `Staff/clients.php`)
- Client Intake → MySQL Database: reads and writes (evidence: `Staff/clients.php`)
- Matter Management → Staff Session: checks access (evidence: `Staff/cases.php`)
- Scheduling → Staff Session: checks access (evidence: `Staff/appointments.php`)
- Scheduling → Notification Service: creates alerts (evidence: `Staff/appointments.php`)
- Timekeeping → Staff Session: checks access (evidence: `Staff/time_entries.php`)
- Document Management → Staff Session: checks access (evidence: `Staff/documents.php`)
- Access Requests → Staff Session: checks access (evidence: `Staff/document-access-request.php`)
- Cross-Portal Search → Staff Session: checks access (evidence: `Staff/search.php`)
- Cross-Portal Search → MySQL Database: queries records (evidence: `Staff/search.php`)
- Admin Portal → Admin Roles: checks role (evidence: `Admin/index.php`)
- Admin Portal → MySQL Database: reads and writes (evidence: `Admin/index.php`)
- Admin Portal → Notification Service: loads alerts (evidence: `Admin/index.php`)
- Database Connection → MySQL Database: opens connection (evidence: `config/db.php`)
- Notification API → Database Connection: loads connection (evidence: `notification-read.php`)
- Notification API → MySQL Database: reads and updates (evidence: `notification-read.php`)
- Notification Service → MySQL Database: inserts alerts (evidence: `config/notifications.php`)
