# aljonjaymatas-code/law-office-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/aljonjaymatas-code/law-office-management-system
- Repository: https://github.com/aljonjaymatas-code/law-office-management-system

## Overview

LOMS is a law-office operations platform with separate client, staff, and attorney/admin portals. A client can sign in, view matters and documents, and request an appointment; staff manage intake and operational records, while attorneys/admins review appointments and log time. The README also describes broader workflow, conflict-checking, calendar, and integration capabilities that are not established by the sampled implementation, so they are not shown as implemented flows. Edges reflect shown imports, database access, or documented behavior; unsampled relationships are omitted.

Main entry points: [`Admin/index.php`](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Admin/index.php) (Attorney dashboard), [`Client/_bootstrap.php`](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Client/_bootstrap.php) (Client access), [`Client/index.php`](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Client/index.php) (Client portal), [`config/db.php`](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/config/db.php) (SQL connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client portal"]
  node_client_auth["Client access<br/>[_bootstrap.php]"]
  node_client_portal["Client portal<br/>[index.php]"]
  node_client_ui["Portal interface<br/>[portal-shell.php]"]
end

subgraph group_staff["Staff operations"]
  node_staff_auth["Staff access<br/>[_bootstrap.php]"]
  node_staff_clients["Client intake<br/>[clients.php]"]
  node_staff_cases["Case management<br/>[cases.php]"]
  node_staff_appointments["Appointments<br/>[appointments.php]"]
  node_staff_documents["Documents<br/>[documents.php]"]
  node_staff_templates["Template library<br/>[templates.php]"]
  node_staff_search["Unified search<br/>[search.php]"]
  node_staff_time["Time entries<br/>[time_entries.php]"]
end

subgraph group_admin["Attorney administration"]
  node_admin_dashboard["Attorney dashboard<br/>[index.php]"]
  node_admin_auth["Role mapping<br/>[_auth.php]"]
  node_admin_ui["Admin interface<br/>[admin-app.jsx]"]
end

subgraph group_shared["Shared infrastructure"]
  node_db_config["SQL connection<br/>[db.php]"]
end

node_client_actor(("Client"))
node_staff_actor(("Staff"))
node_lawyer_actor(("Attorney / admin"))
node_sql_server[("SQL Server")]

node_client_actor -->|"signs in"| node_client_auth
node_client_auth -->|"authorizes"| node_client_portal
node_client_portal -->|"renders"| node_client_ui
node_staff_actor -->|"manages intake"| node_staff_clients
node_staff_actor -->|"manages matters"| node_staff_cases
node_staff_actor -->|"manages appointments"| node_staff_appointments
node_staff_actor -->|"manages documents"| node_staff_documents
node_staff_actor -->|"manages templates"| node_staff_templates
node_staff_actor -->|"searches records"| node_staff_search
node_staff_actor -->|"logs time"| node_staff_time
node_lawyer_actor -->|"reviews operations"| node_admin_dashboard
node_admin_dashboard -->|"maps roles"| node_admin_auth
node_admin_dashboard -->|"renders interface"| node_admin_ui
node_client_auth -->|"loads connection"| node_db_config
node_staff_auth -->|"loads connection"| node_db_config
node_db_config -->|"connects to"| node_sql_server
node_staff_clients -->|"reads and writes"| node_sql_server
node_staff_search -->|"queries records"| node_sql_server
node_client_portal -->|"loads portal data"| node_sql_server
node_admin_dashboard -->|"reads and writes"| node_sql_server

click node_client_auth "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Client/_bootstrap.php"
click node_client_portal "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Client/index.php"
click node_client_ui "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Client/portal-shell.php"
click node_staff_auth "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/_bootstrap.php"
click node_staff_clients "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/clients.php"
click node_staff_cases "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/cases.php"
click node_staff_appointments "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/appointments.php"
click node_staff_documents "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/documents.php"
click node_staff_templates "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/templates.php"
click node_staff_search "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/search.php"
click node_staff_time "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/time_entries.php"
click node_admin_dashboard "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Admin/index.php"
click node_admin_auth "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Admin/_auth.php"
click node_admin_ui "https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Admin/js/admin-app.jsx"
click node_db_config "https://github.com/aljonjaymatas-code/law-office-management-system/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_client_auth,node_client_portal,node_client_ui,node_client_actor toneBlue
class node_staff_auth,node_staff_clients,node_staff_cases,node_staff_appointments,node_staff_documents,node_staff_templates,node_staff_search,node_staff_time,node_sql_server toneAmber
class node_admin_dashboard,node_admin_auth,node_admin_ui toneMint
class node_db_config toneRose
class node_staff_actor,node_lawyer_actor toneIndigo
```

## Components

### Client portal

- [Client access](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Client/_bootstrap.php): `Client/_bootstrap.php`
- [Client portal](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Client/index.php): `Client/index.php`
- [Portal interface](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Client/portal-shell.php): `Client/portal-shell.php`

### Staff operations

- [Staff access](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/_bootstrap.php): `Staff/_bootstrap.php`
- [Client intake](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/clients.php): `Staff/clients.php`
- [Case management](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/cases.php): `Staff/cases.php`
- [Appointments](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/appointments.php): `Staff/appointments.php`
- [Documents](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/documents.php): `Staff/documents.php`
- [Template library](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/templates.php): `Staff/templates.php`
- [Unified search](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/search.php): `Staff/search.php`
- [Time entries](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Staff/time_entries.php): `Staff/time_entries.php`

### Attorney administration

- [Attorney dashboard](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Admin/index.php): `Admin/index.php`
- [Role mapping](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Admin/_auth.php): `Admin/_auth.php`
- [Admin interface](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/Admin/js/admin-app.jsx): `Admin/js/admin-app.jsx`

### Shared infrastructure

- [SQL connection](https://github.com/aljonjaymatas-code/law-office-management-system/blob/main/config/db.php): `config/db.php`

### Other components

- **Client**
- **Staff**
- **Attorney / admin**
- **SQL Server**

## Connections

- Client → Client access: signs in
- Client access → Client portal: authorizes (evidence: `Client/index.php`)
- Client portal → Portal interface: renders (evidence: `Client/index.php`)
- Staff → Client intake: manages intake (evidence: `Staff/clients.php`)
- Staff → Case management: manages matters (evidence: `Staff/cases.php`)
- Staff → Appointments: manages appointments (evidence: `Staff/appointments.php`)
- Staff → Documents: manages documents (evidence: `Staff/documents.php`)
- Staff → Template library: manages templates (evidence: `Staff/templates.php`)
- Staff → Unified search: searches records (evidence: `Staff/search.php`)
- Staff → Time entries: logs time (evidence: `Staff/time_entries.php`)
- Attorney / admin → Attorney dashboard: reviews operations (evidence: `Admin/index.php`)
- Attorney dashboard → Role mapping: maps roles (evidence: `Admin/_auth.php`)
- Attorney dashboard → Admin interface: renders interface (evidence: `Admin/index.php`)
- Client access → SQL connection: loads connection (evidence: `Client/_bootstrap.php`)
- Staff access → SQL connection: loads connection (evidence: `Staff/_bootstrap.php`)
- SQL connection → SQL Server: connects to (evidence: `config/db.php`)
- Client intake → SQL Server: reads and writes (evidence: `Staff/clients.php`)
- Unified search → SQL Server: queries records (evidence: `Staff/search.php`)
- Client portal → SQL Server: loads portal data (evidence: `Client/index.php`)
- Attorney dashboard → SQL Server: reads and writes (evidence: `Admin/index.php`)
