# grashjs/cmms architecture

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

- Interactive diagram: https://gitdiagram.com/grashjs/cmms
- Repository: https://github.com/grashjs/cmms

## Overview

Atlas CMMS is a self-hosted computerized maintenance management system for web and mobile. Staff and requesters use the clients to manage service requests, work orders, assets, inventory, and maintenance; managers configure roles and workflows and review analytics. The API is the central application boundary, with persistence and external integrations supporting it. The README documents the product’s major capabilities; sampled source and the SOURCE INDEX support only selected internal links, so other documented relationships are marked unverified rather than asserted as direct calls.

Main entry points: [`api/src/main/java/com/grash/ApiApplication.java`](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/ApiApplication.java) (Spring API), [`api/src/main/java/com/grash/service/WorkOrderService.java`](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/service/WorkOrderService.java) (Work orders), [`mobile/screens/workOrders/TasksScreen.tsx`](https://github.com/grashjs/cmms/blob/main/mobile/screens/workOrders/TasksScreen.tsx) (Tasks and checklists), [`api/src/main/java/com/grash/controller/RequestController.java`](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/RequestController.java) (Service requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User clients"]
  node_web["Web application<br/>[App.tsx]"]
  node_mobile["Mobile application<br/>[App.tsx]"]
  node_mobile_nav["Mobile navigation<br/>[index.tsx]"]
  node_mobile_auth["Mobile authentication<br/>[AuthContext.tsx]"]
end

subgraph group_maintenance["Maintenance operations"]
  node_requests["Service requests"]
  node_workorders["Work orders"]
  node_workorder_api["Work-order endpoints"]
  node_tasks["Tasks and checklists<br/>[TasksScreen.tsx]"]
  node_task_types["Task domain types<br/>[tasks.ts]"]
  node_assets_inventory["Assets and inventory"]
  node_locations["Locations"]
end

subgraph group_management["Administration and insights"]
  node_users["User domain<br/>[User.java]"]
  node_user_service["User services<br/>[UserService.java]"]
  node_analytics["Analytics and reports"]
  node_workflow["Workflow automation"]
  node_custom_fields["Custom fields"]
end

subgraph group_platform["API platform"]
  node_api["Spring API"]
  node_security["Authentication security"]
  node_storage["File storage abstraction"]
  node_storage_factory["Storage selection"]
  node_database[("Application database")]
  node_email["Email service"]
  node_paddle["Paddle billing"]
end

node_staff(("Staff and requesters"))

node_staff -->|"uses"| node_web
node_staff -->|"uses"| node_mobile
node_web -.->|"calls API"| node_api
node_mobile -->|"starts navigation"| node_mobile_nav
node_mobile_nav -.->|"checks session"| node_mobile_auth
node_mobile_auth -->|"requests account data"| node_api
node_api -.->|"authenticates users"| node_security
node_api -.->|"routes requests"| node_requests
node_api -.->|"routes work orders"| node_workorder_api
node_workorder_api -.->|"delegates work"| node_workorders
node_staff -->|"submits requests"| node_requests
node_requests -.->|"becomes work orders"| node_workorders
node_staff -->|"creates and tracks"| node_workorders
node_workorders -.->|"includes tasks"| node_tasks
node_tasks -->|"uses task types"| node_task_types
node_tasks -.->|"updates tasks"| node_workorder_api
node_staff -->|"manages equipment"| node_assets_inventory
node_staff -->|"manages locations"| node_locations
node_staff -->|"views reports"| node_analytics
node_staff -->|"configures automation"| node_workflow
node_staff -.->|"configures fields"| node_custom_fields
node_api -.->|"persists records"| node_database
node_api -->|"selects storage"| node_storage_factory
node_storage_factory -->|"provides service"| node_storage
node_user_service -.->|"manages users"| node_users
node_staff -.->|"receives notifications"| node_email
node_staff -.->|"manages billing"| node_paddle

click node_web "https://github.com/grashjs/cmms/blob/main/frontend/src/App.tsx"
click node_mobile "https://github.com/grashjs/cmms/blob/main/mobile/App.tsx"
click node_mobile_nav "https://github.com/grashjs/cmms/blob/main/mobile/navigation/index.tsx"
click node_mobile_auth "https://github.com/grashjs/cmms/blob/main/mobile/contexts/AuthContext.tsx"
click node_requests "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/RequestController.java"
click node_workorders "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/service/WorkOrderService.java"
click node_workorder_api "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/WorkOrderController.java"
click node_tasks "https://github.com/grashjs/cmms/blob/main/mobile/screens/workOrders/TasksScreen.tsx"
click node_task_types "https://github.com/grashjs/cmms/blob/main/mobile/models/tasks.ts"
click node_assets_inventory "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/AssetController.java"
click node_locations "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/LocationController.java"
click node_users "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/model/User.java"
click node_user_service "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/service/UserService.java"
click node_analytics "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/analytics/WOAnalyticsController.java"
click node_workflow "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/WorkflowController.java"
click node_custom_fields "https://github.com/grashjs/cmms/blob/main/frontend/src/content/own/components/CustomFields/CustomFieldsManager.tsx"
click node_api "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/ApiApplication.java"
click node_security "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/security/CustomUserDetailsService.java"
click node_storage "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/service/StorageService.java"
click node_storage_factory "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/factory/StorageServiceFactory.java"
click node_paddle "https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/PaddleController.java"

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_web,node_mobile,node_mobile_nav,node_mobile_auth toneBlue
class node_requests,node_workorders,node_workorder_api,node_tasks,node_task_types,node_assets_inventory,node_locations toneAmber
class node_users,node_user_service,node_analytics,node_workflow,node_custom_fields,node_staff toneMint
class node_api,node_security,node_storage,node_storage_factory,node_database,node_email,node_paddle toneRose
```

## Components

### User clients

- [Web application](https://github.com/grashjs/cmms/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Mobile application](https://github.com/grashjs/cmms/blob/main/mobile/App.tsx): `mobile/App.tsx`
- [Mobile navigation](https://github.com/grashjs/cmms/blob/main/mobile/navigation/index.tsx): `mobile/navigation/index.tsx`
- [Mobile authentication](https://github.com/grashjs/cmms/blob/main/mobile/contexts/AuthContext.tsx): `mobile/contexts/AuthContext.tsx`

### Maintenance operations

- [Service requests](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/RequestController.java): `api/src/main/java/com/grash/controller/RequestController.java`
- [Work orders](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/service/WorkOrderService.java): `api/src/main/java/com/grash/service/WorkOrderService.java`
- [Work-order endpoints](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/WorkOrderController.java): `api/src/main/java/com/grash/controller/WorkOrderController.java`
- [Tasks and checklists](https://github.com/grashjs/cmms/blob/main/mobile/screens/workOrders/TasksScreen.tsx): `mobile/screens/workOrders/TasksScreen.tsx`
- [Task domain types](https://github.com/grashjs/cmms/blob/main/mobile/models/tasks.ts): `mobile/models/tasks.ts`
- [Assets and inventory](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/AssetController.java): `api/src/main/java/com/grash/controller/AssetController.java`
- [Locations](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/LocationController.java): `api/src/main/java/com/grash/controller/LocationController.java`

### Administration and insights

- [User domain](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/model/User.java): `api/src/main/java/com/grash/model/User.java`
- [User services](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/service/UserService.java): `api/src/main/java/com/grash/service/UserService.java`
- [Analytics and reports](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/analytics/WOAnalyticsController.java): `api/src/main/java/com/grash/controller/analytics/WOAnalyticsController.java`
- [Workflow automation](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/WorkflowController.java): `api/src/main/java/com/grash/controller/WorkflowController.java`
- [Custom fields](https://github.com/grashjs/cmms/blob/main/frontend/src/content/own/components/CustomFields/CustomFieldsManager.tsx): `frontend/src/content/own/components/CustomFields/CustomFieldsManager.tsx`

### API platform

- [Spring API](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/ApiApplication.java): `api/src/main/java/com/grash/ApiApplication.java`
- [Authentication security](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/security/CustomUserDetailsService.java): `api/src/main/java/com/grash/security/CustomUserDetailsService.java`
- [File storage abstraction](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/service/StorageService.java): `api/src/main/java/com/grash/service/StorageService.java`
- [Storage selection](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/factory/StorageServiceFactory.java): `api/src/main/java/com/grash/factory/StorageServiceFactory.java`
- **Application database**
- **Email service**
- [Paddle billing](https://github.com/grashjs/cmms/blob/main/api/src/main/java/com/grash/controller/PaddleController.java): `api/src/main/java/com/grash/controller/PaddleController.java`

### Other components

- **Staff and requesters**

## Connections

- Staff and requesters → Web application: uses
- Staff and requesters → Mobile application: uses
- Web application → Spring API: calls API
- Mobile application → Mobile navigation: starts navigation (evidence: `mobile/App.tsx`)
- Mobile navigation → Mobile authentication: checks session
- Mobile authentication → Spring API: requests account data (evidence: `mobile/contexts/AuthContext.tsx`)
- Spring API → Authentication security: authenticates users
- Spring API → Service requests: routes requests
- Spring API → Work-order endpoints: routes work orders
- Work-order endpoints → Work orders: delegates work
- Staff and requesters → Service requests: submits requests
- Service requests → Work orders: becomes work orders
- Staff and requesters → Work orders: creates and tracks
- Work orders → Tasks and checklists: includes tasks
- Tasks and checklists → Task domain types: uses task types (evidence: `mobile/screens/workOrders/TasksScreen.tsx`)
- Tasks and checklists → Work-order endpoints: updates tasks
- Staff and requesters → Assets and inventory: manages equipment
- Staff and requesters → Locations: manages locations
- Staff and requesters → Analytics and reports: views reports
- Staff and requesters → Workflow automation: configures automation
- Staff and requesters → Custom fields: configures fields
- Spring API → Application database: persists records
- Spring API → Storage selection: selects storage (evidence: `api/src/main/java/com/grash/factory/StorageServiceFactory.java`)
- Storage selection → File storage abstraction: provides service (evidence: `api/src/main/java/com/grash/factory/StorageServiceFactory.java`)
- User services → User domain: manages users (evidence: `api/src/main/java/com/grash/service/UserService.java`)
- Staff and requesters → Email service: receives notifications
- Staff and requesters → Paddle billing: manages billing
