# zaidjamshed/atlas-core architecture

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

- Interactive diagram: https://gitdiagram.com/zaidjamshed/atlas-core
- Repository: https://github.com/zaidjamshed/atlas-core

## Overview

ATLAS Core is presented as a manufacturing operating system for leather, textile, equestrian, and sewn-product businesses. Its visible user workflow is a web app served alongside an API: users reach login or the dashboard, while API requests are routed to authentication or material management. The backend also contains substantial inventory, purchasing, production, finished-goods, and sales services. The README gives no detailed workflow, and several domain services were not excerpted; those capabilities are represented without inventing their internal call sequence.

Main entry points: [`server/db/prisma.ts`](https://github.com/zaidjamshed/atlas-core/blob/main/server/db/prisma.ts) (Prisma client), [`src/App.tsx`](https://github.com/zaidjamshed/atlas-core/blob/main/src/App.tsx) (App routing), [`server/services/auth.service.ts`](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/auth.service.ts) (Authentication), [`server/services/sequence.service.ts`](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/sequence.service.ts) (Sequence service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["App routing<br/>[App.tsx]"]
  node_login["Login page<br/>[Login.tsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_layout["Main layout<br/>[MainLayout.tsx]"]
  node_sidebar["Sidebar<br/>[Sidebar.tsx]"]
end

subgraph group_api["API and identity"]
  node_server["HTTP server<br/>[server.ts]"]
  node_api_routes["API routes<br/>[api.routes.ts]"]
  node_auth_routes["Auth routes<br/>[auth.routes.ts]"]
  node_auth_controller["Auth controller<br/>[auth.controller.ts]"]
  node_auth_service["Authentication<br/>[auth.service.ts]"]
  node_material_routes["Material routes<br/>[material.routes.ts]"]
  node_material_controller["Material controller"]
end

subgraph group_operations["Manufacturing operations"]
  node_material_service["Material management"]
  node_inventory["Inventory"]
  node_purchasing["Purchase receipts"]
  node_material_issues["Material issues"]
  node_issue_posting["Issue posting"]
  node_material_returns["Material returns"]
  node_return_posting["Return posting"]
  node_production["Production planning"]
  node_production_cost["Production costing"]
  node_finished_goods["Finished goods"]
  node_sales["Sales orders"]
  node_snapshot["Inventory snapshots"]
  node_valuation["Inventory valuation"]
  node_consumption_cost["Consumption costing"]
end

subgraph group_data["Persistence and platform"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
  node_database[("Database")]
  node_user_repo["User repository<br/>[user.repository.ts]"]
  node_role_repo["Role repository<br/>[role.repository.ts]"]
  node_audit_repo["Audit repository"]
  node_doc_number["Document numbers"]
  node_sequence["Sequence service"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_layout
node_app -->|"routes to"| node_dashboard
node_layout -->|"renders"| node_sidebar
node_server -->|"mounts"| node_api_routes
node_api_routes -->|"routes to"| node_auth_routes
node_api_routes -->|"routes to"| node_material_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_controller -->|"calls"| node_auth_service
node_material_routes -->|"dispatches"| node_material_controller
node_material_controller -->|"calls"| node_material_service
node_auth_service -->|"queries"| node_user_repo
node_auth_service -->|"creates role"| node_role_repo
node_auth_service -->|"records login"| node_audit_repo
node_user_repo -->|"uses"| node_prisma
node_role_repo -->|"uses"| node_prisma
node_audit_repo -->|"uses"| node_prisma
node_prisma -->|"queries"| node_database
node_material_service -->|"uses"| node_prisma
node_material_service -->|"uses IDs"| node_sequence
node_purchasing -->|"updates"| node_inventory
node_purchasing -->|"updates"| node_snapshot
node_inventory -->|"uses"| node_doc_number
node_snapshot -->|"uses"| node_valuation
node_issue_posting -->|"reads"| node_snapshot
node_issue_posting -->|"uses"| node_consumption_cost
node_issue_posting -->|"uses"| node_doc_number
node_return_posting -->|"reads"| node_snapshot
node_return_posting -->|"uses"| node_prisma
node_server -->|"initializes"| node_sequence
node_sequence -->|"uses"| node_prisma
node_sequence -->|"uses"| node_doc_number

click node_app "https://github.com/zaidjamshed/atlas-core/blob/main/src/App.tsx"
click node_login "https://github.com/zaidjamshed/atlas-core/blob/main/src/pages/Login.tsx"
click node_dashboard "https://github.com/zaidjamshed/atlas-core/blob/main/src/pages/Dashboard.tsx"
click node_layout "https://github.com/zaidjamshed/atlas-core/blob/main/src/components/layout/MainLayout.tsx"
click node_sidebar "https://github.com/zaidjamshed/atlas-core/blob/main/src/components/layout/Sidebar.tsx"
click node_server "https://github.com/zaidjamshed/atlas-core/blob/main/server/server.ts"
click node_api_routes "https://github.com/zaidjamshed/atlas-core/blob/main/server/routes/api.routes.ts"
click node_auth_routes "https://github.com/zaidjamshed/atlas-core/blob/main/server/routes/auth.routes.ts"
click node_auth_controller "https://github.com/zaidjamshed/atlas-core/blob/main/server/controllers/auth.controller.ts"
click node_auth_service "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/auth.service.ts"
click node_material_routes "https://github.com/zaidjamshed/atlas-core/blob/main/server/routes/v1/material.routes.ts"
click node_material_controller "https://github.com/zaidjamshed/atlas-core/blob/main/server/controllers/material.controller.ts"
click node_material_service "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/material.service.ts"
click node_inventory "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/inventory.service.ts"
click node_purchasing "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/purchaseReceipt.service.ts"
click node_material_issues "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/materialIssue.service.ts"
click node_issue_posting "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/materialIssuePosting.service.ts"
click node_material_returns "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/materialReturn.service.ts"
click node_return_posting "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/materialReturnPosting.service.ts"
click node_production "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/productionOrder.service.ts"
click node_production_cost "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/productionCost.service.ts"
click node_finished_goods "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/finishedGoodsInventory.service.ts"
click node_sales "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/salesOrder.service.ts"
click node_prisma "https://github.com/zaidjamshed/atlas-core/blob/main/server/db/prisma.ts"
click node_user_repo "https://github.com/zaidjamshed/atlas-core/blob/main/server/repositories/user.repository.ts"
click node_role_repo "https://github.com/zaidjamshed/atlas-core/blob/main/server/repositories/role.repository.ts"
click node_audit_repo "https://github.com/zaidjamshed/atlas-core/blob/main/server/repositories/audit.repository.ts"
click node_doc_number "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/documentNumber.service.ts"
click node_sequence "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/sequence.service.ts"
click node_snapshot "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/inventorySnapshot.service.ts"
click node_valuation "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/inventoryValuation.service.ts"
click node_consumption_cost "https://github.com/zaidjamshed/atlas-core/blob/main/server/services/inventoryConsumptionCost.service.ts"

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_app,node_login,node_dashboard,node_layout,node_sidebar,node_user toneBlue
class node_server,node_api_routes,node_auth_routes,node_auth_controller,node_auth_service,node_material_routes,node_material_controller toneAmber
class node_material_service,node_inventory,node_purchasing,node_material_issues,node_issue_posting,node_material_returns,node_return_posting,node_production,node_production_cost,node_finished_goods,node_sales,node_snapshot,node_valuation,node_consumption_cost toneMint
class node_prisma,node_database,node_user_repo,node_role_repo,node_audit_repo,node_doc_number,node_sequence toneRose
```

## Components

### Web application

- [App routing](https://github.com/zaidjamshed/atlas-core/blob/main/src/App.tsx): `src/App.tsx`
- [Login page](https://github.com/zaidjamshed/atlas-core/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`
- [Dashboard](https://github.com/zaidjamshed/atlas-core/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Main layout](https://github.com/zaidjamshed/atlas-core/blob/main/src/components/layout/MainLayout.tsx): `src/components/layout/MainLayout.tsx`
- [Sidebar](https://github.com/zaidjamshed/atlas-core/blob/main/src/components/layout/Sidebar.tsx): `src/components/layout/Sidebar.tsx`

### API and identity

- [HTTP server](https://github.com/zaidjamshed/atlas-core/blob/main/server/server.ts): `server/server.ts`
- [API routes](https://github.com/zaidjamshed/atlas-core/blob/main/server/routes/api.routes.ts): `server/routes/api.routes.ts`
- [Auth routes](https://github.com/zaidjamshed/atlas-core/blob/main/server/routes/auth.routes.ts): `server/routes/auth.routes.ts`
- [Auth controller](https://github.com/zaidjamshed/atlas-core/blob/main/server/controllers/auth.controller.ts): `server/controllers/auth.controller.ts`
- [Authentication](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/auth.service.ts): `server/services/auth.service.ts`
- [Material routes](https://github.com/zaidjamshed/atlas-core/blob/main/server/routes/v1/material.routes.ts): `server/routes/v1/material.routes.ts`
- [Material controller](https://github.com/zaidjamshed/atlas-core/blob/main/server/controllers/material.controller.ts): `server/controllers/material.controller.ts`

### Manufacturing operations

- [Material management](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/material.service.ts): `server/services/material.service.ts`
- [Inventory](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/inventory.service.ts): `server/services/inventory.service.ts`
- [Purchase receipts](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/purchaseReceipt.service.ts): `server/services/purchaseReceipt.service.ts`
- [Material issues](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/materialIssue.service.ts): `server/services/materialIssue.service.ts`
- [Issue posting](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/materialIssuePosting.service.ts): `server/services/materialIssuePosting.service.ts`
- [Material returns](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/materialReturn.service.ts): `server/services/materialReturn.service.ts`
- [Return posting](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/materialReturnPosting.service.ts): `server/services/materialReturnPosting.service.ts`
- [Production planning](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/productionOrder.service.ts): `server/services/productionOrder.service.ts`
- [Production costing](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/productionCost.service.ts): `server/services/productionCost.service.ts`
- [Finished goods](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/finishedGoodsInventory.service.ts): `server/services/finishedGoodsInventory.service.ts`
- [Sales orders](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/salesOrder.service.ts): `server/services/salesOrder.service.ts`
- [Inventory snapshots](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/inventorySnapshot.service.ts): `server/services/inventorySnapshot.service.ts`
- [Inventory valuation](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/inventoryValuation.service.ts): `server/services/inventoryValuation.service.ts`
- [Consumption costing](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/inventoryConsumptionCost.service.ts): `server/services/inventoryConsumptionCost.service.ts`

### Persistence and platform

- [Prisma client](https://github.com/zaidjamshed/atlas-core/blob/main/server/db/prisma.ts): `server/db/prisma.ts`
- **Database**
- [User repository](https://github.com/zaidjamshed/atlas-core/blob/main/server/repositories/user.repository.ts): `server/repositories/user.repository.ts`
- [Role repository](https://github.com/zaidjamshed/atlas-core/blob/main/server/repositories/role.repository.ts): `server/repositories/role.repository.ts`
- [Audit repository](https://github.com/zaidjamshed/atlas-core/blob/main/server/repositories/audit.repository.ts): `server/repositories/audit.repository.ts`
- [Document numbers](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/documentNumber.service.ts): `server/services/documentNumber.service.ts`
- [Sequence service](https://github.com/zaidjamshed/atlas-core/blob/main/server/services/sequence.service.ts): `server/services/sequence.service.ts`

### Other components

- **User**

## Connections

- User → App routing: uses (evidence: `src/App.tsx`)
- App routing → Login page: routes to (evidence: `src/App.tsx`)
- App routing → Main layout: routes to (evidence: `src/App.tsx`)
- App routing → Dashboard: routes to (evidence: `src/App.tsx`)
- Main layout → Sidebar: renders (evidence: `src/components/layout/MainLayout.tsx`)
- HTTP server → API routes: mounts (evidence: `server/server.ts`)
- API routes → Auth routes: routes to (evidence: `server/routes/api.routes.ts`)
- API routes → Material routes: routes to (evidence: `server/routes/api.routes.ts`)
- Auth routes → Auth controller: dispatches (evidence: `server/routes/auth.routes.ts`)
- Auth controller → Authentication: calls (evidence: `server/controllers/auth.controller.ts`)
- Material routes → Material controller: dispatches (evidence: `server/routes/v1/material.routes.ts`)
- Material controller → Material management: calls (evidence: `server/controllers/material.controller.ts`)
- Authentication → User repository: queries (evidence: `server/services/auth.service.ts`)
- Authentication → Role repository: creates role (evidence: `server/services/auth.service.ts`)
- Authentication → Audit repository: records login (evidence: `server/services/auth.service.ts`)
- User repository → Prisma client: uses (evidence: `server/repositories/user.repository.ts`)
- Role repository → Prisma client: uses (evidence: `server/repositories/role.repository.ts`)
- Audit repository → Prisma client: uses (evidence: `server/repositories/audit.repository.ts`)
- Prisma client → Database: queries (evidence: `server/db/prisma.ts`)
- Material management → Prisma client: uses (evidence: `server/services/material.service.ts`)
- Material management → Sequence service: uses IDs (evidence: `server/services/material.service.ts`)
- Purchase receipts → Inventory: updates (evidence: `server/services/purchaseReceipt.service.ts`)
- Purchase receipts → Inventory snapshots: updates (evidence: `server/services/purchaseReceipt.service.ts`)
- Inventory → Document numbers: uses (evidence: `server/services/inventory.service.ts`)
- Inventory snapshots → Inventory valuation: uses (evidence: `server/services/inventorySnapshot.service.ts`)
- Issue posting → Inventory snapshots: reads (evidence: `server/services/materialIssuePosting.service.ts`)
- Issue posting → Consumption costing: uses (evidence: `server/services/materialIssuePosting.service.ts`)
- Issue posting → Document numbers: uses (evidence: `server/services/materialIssuePosting.service.ts`)
- Return posting → Inventory snapshots: reads (evidence: `server/services/materialReturnPosting.service.ts`)
- Return posting → Prisma client: uses
- HTTP server → Sequence service: initializes (evidence: `server/server.ts`)
- Sequence service → Prisma client: uses (evidence: `server/services/sequence.service.ts`)
- Sequence service → Document numbers: uses (evidence: `server/services/sequence.service.ts`)
