# imdrkenzo/oasis architecture

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

- Interactive diagram: https://gitdiagram.com/imdrkenzo/oasis
- Repository: https://github.com/imdrkenzo/oasis

## Overview

OASIS manages office IT assets from inventory and accountability through deployment, return/transfer, and historical audit. Users work through the Next.js app, whose API client sends requests to NestJS controllers; controllers enforce access and delegate domain operations to services. The README also documents session security, notifications, role-based access, and file integration. The sampled source confirms several controller-to-service calls and session handling; wiring inside unsampled services is shown only where supported by the documented Prisma/PostgreSQL stack, and uncertain details are omitted.

Main entry points: [`client/src/lib/api-client.ts`](https://github.com/imdrkenzo/oasis/blob/main/client/src/lib/api-client.ts) (API client), [`server/src/common/prisma.service.ts`](https://github.com/imdrkenzo/oasis/blob/main/server/src/common/prisma.service.ts) (Prisma database access), [`client/src/app/(app)/layout.tsx`](https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(app)/layout.tsx) (OASIS interface), [`server/src/deployments/deployments.controller.ts`](https://github.com/imdrkenzo/oasis/blob/main/server/src/deployments/deployments.controller.ts) (Deployment endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_webapp["OASIS interface<br/>[layout.tsx]"]
  node_api["API client<br/>[api-client.ts]"]
  node_loginui["Login page<br/>[page.tsx]"]
  node_inventoryui["Inventory and dashboard<br/>[page.tsx]"]
  node_deployui["Deployment history<br/>[page.tsx]"]
  node_reportsui["Reports and alerts<br/>[page.tsx]"]
end

subgraph group_identity["Identity and access"]
  node_authctrl["Authentication endpoints<br/>[auth.controller.ts]"]
  node_authsvc["Session and login service<br/>[auth.service.ts]"]
  node_usersctrl["User management endpoints"]
  node_userssvc["User service<br/>[users.service.ts]"]
end

subgraph group_assets["Asset operations"]
  node_itemsctrl["Inventory endpoints"]
  node_itemssvc["Inventory service<br/>[items.service.ts]"]
  node_deployctrl["Deployment endpoints"]
  node_deploysvc["Deployment service"]
  node_peoplectrl["Accountability records"]
  node_classctrl["Asset classifications"]
end

subgraph group_governance["Governance and support"]
  node_auditctrl["Audit log endpoints"]
  node_auditsvc["Audit service<br/>[audit.service.ts]"]
  node_notifctrl["Notification endpoints"]
  node_notifs["Notification service"]
  node_photosctrl["Photo upload endpoints"]
end

subgraph group_infrastructure["Persistence and files"]
  node_prisma["Prisma database access<br/>[prisma.service.ts]"]
  node_postgres[("PostgreSQL")]
  node_uploads["Local upload files"]
end

node_staff(("Office users"))

node_staff -->|"uses"| node_webapp
node_webapp -->|"opens login"| node_loginui
node_webapp -->|"opens inventory"| node_inventoryui
node_webapp -->|"opens deployments"| node_deployui
node_webapp -->|"opens reports"| node_reportsui
node_loginui -->|"sends auth requests"| node_api
node_inventoryui -->|"requests inventory"| node_api
node_deployui -->|"requests deployment data"| node_api
node_reportsui -->|"requests summaries"| node_api
node_api -->|"calls auth routes"| node_authctrl
node_api -->|"calls inventory routes"| node_itemsctrl
node_api -->|"calls deployment routes"| node_deployctrl
node_api -->|"calls audit routes"| node_auditctrl
node_api -->|"calls notification routes"| node_notifctrl
node_api -->|"calls photo routes"| node_photosctrl
node_authctrl -->|"delegates login and sessions"| node_authsvc
node_authsvc -->|"looks up user"| node_userssvc
node_authctrl -->|"loads user data"| node_userssvc
node_usersctrl -->|"delegates user operations"| node_userssvc
node_itemsctrl -->|"delegates item operations"| node_itemssvc
node_deployctrl -->|"delegates deployment operations"| node_deploysvc
node_deployctrl -->|"records deployment creation"| node_auditsvc
node_usersctrl -->|"records user changes"| node_auditsvc
node_auditctrl -->|"queries audit records"| node_auditsvc
node_notifctrl -->|"delegates notification actions"| node_notifs
node_photosctrl -->|"stores uploaded images"| node_uploads
node_authsvc -->|"reads and writes sessions"| node_prisma
node_usersctrl -->|"checks roles and user data"| node_prisma
node_itemsctrl -->|"checks access"| node_prisma
node_deployctrl -->|"checks access"| node_prisma
node_photosctrl -->|"checks access"| node_prisma
node_auditctrl -->|"checks access"| node_prisma
node_prisma -->|"persists application data"| node_postgres

click node_webapp "https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(app)/layout.tsx"
click node_api "https://github.com/imdrkenzo/oasis/blob/main/client/src/lib/api-client.ts"
click node_loginui "https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(auth)/login/page.tsx"
click node_inventoryui "https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(app)/inventory/page.tsx"
click node_deployui "https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(app)/deployment-history/page.tsx"
click node_reportsui "https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(app)/reports/page.tsx"
click node_authctrl "https://github.com/imdrkenzo/oasis/blob/main/server/src/auth/auth.controller.ts"
click node_authsvc "https://github.com/imdrkenzo/oasis/blob/main/server/src/auth/auth.service.ts"
click node_usersctrl "https://github.com/imdrkenzo/oasis/blob/main/server/src/users/users.controller.ts"
click node_userssvc "https://github.com/imdrkenzo/oasis/blob/main/server/src/users/users.service.ts"
click node_itemsctrl "https://github.com/imdrkenzo/oasis/blob/main/server/src/items/items.controller.ts"
click node_itemssvc "https://github.com/imdrkenzo/oasis/blob/main/server/src/items/items.service.ts"
click node_deployctrl "https://github.com/imdrkenzo/oasis/blob/main/server/src/deployments/deployments.controller.ts"
click node_deploysvc "https://github.com/imdrkenzo/oasis/blob/main/server/src/deployments/deployments.service.ts"
click node_peoplectrl "https://github.com/imdrkenzo/oasis/blob/main/server/src/accountable-persons/accountable-persons.controller.ts"
click node_classctrl "https://github.com/imdrkenzo/oasis/blob/main/server/src/classifications/classifications.controller.ts"
click node_auditctrl "https://github.com/imdrkenzo/oasis/blob/main/server/src/audit/audit-logs.controller.ts"
click node_auditsvc "https://github.com/imdrkenzo/oasis/blob/main/server/src/audit/audit.service.ts"
click node_notifctrl "https://github.com/imdrkenzo/oasis/blob/main/server/src/notifications/notifications.controller.ts"
click node_notifs "https://github.com/imdrkenzo/oasis/blob/main/server/src/notifications/notifications.service.ts"
click node_photosctrl "https://github.com/imdrkenzo/oasis/blob/main/server/src/photos/photos.controller.ts"
click node_prisma "https://github.com/imdrkenzo/oasis/blob/main/server/src/common/prisma.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_webapp,node_api,node_loginui,node_inventoryui,node_deployui,node_reportsui,node_staff toneBlue
class node_authctrl,node_authsvc,node_usersctrl,node_userssvc toneAmber
class node_itemsctrl,node_itemssvc,node_deployctrl,node_deploysvc,node_peoplectrl,node_classctrl toneMint
class node_auditctrl,node_auditsvc,node_notifctrl,node_notifs,node_photosctrl toneRose
class node_prisma,node_postgres,node_uploads toneIndigo
```

## Components

### Web application

- [OASIS interface](https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(app)/layout.tsx): `client/src/app/(app)/layout.tsx`
- [API client](https://github.com/imdrkenzo/oasis/blob/main/client/src/lib/api-client.ts): `client/src/lib/api-client.ts`
- [Login page](https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(auth)/login/page.tsx): `client/src/app/(auth)/login/page.tsx`
- [Inventory and dashboard](https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(app)/inventory/page.tsx): `client/src/app/(app)/inventory/page.tsx`
- [Deployment history](https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(app)/deployment-history/page.tsx): `client/src/app/(app)/deployment-history/page.tsx`
- [Reports and alerts](https://github.com/imdrkenzo/oasis/blob/main/client/src/app/(app)/reports/page.tsx): `client/src/app/(app)/reports/page.tsx`

### Identity and access

- [Authentication endpoints](https://github.com/imdrkenzo/oasis/blob/main/server/src/auth/auth.controller.ts): `server/src/auth/auth.controller.ts`
- [Session and login service](https://github.com/imdrkenzo/oasis/blob/main/server/src/auth/auth.service.ts): `server/src/auth/auth.service.ts`
- [User management endpoints](https://github.com/imdrkenzo/oasis/blob/main/server/src/users/users.controller.ts): `server/src/users/users.controller.ts`
- [User service](https://github.com/imdrkenzo/oasis/blob/main/server/src/users/users.service.ts): `server/src/users/users.service.ts`

### Asset operations

- [Inventory endpoints](https://github.com/imdrkenzo/oasis/blob/main/server/src/items/items.controller.ts): `server/src/items/items.controller.ts`
- [Inventory service](https://github.com/imdrkenzo/oasis/blob/main/server/src/items/items.service.ts): `server/src/items/items.service.ts`
- [Deployment endpoints](https://github.com/imdrkenzo/oasis/blob/main/server/src/deployments/deployments.controller.ts): `server/src/deployments/deployments.controller.ts`
- [Deployment service](https://github.com/imdrkenzo/oasis/blob/main/server/src/deployments/deployments.service.ts): `server/src/deployments/deployments.service.ts`
- [Accountability records](https://github.com/imdrkenzo/oasis/blob/main/server/src/accountable-persons/accountable-persons.controller.ts): `server/src/accountable-persons/accountable-persons.controller.ts`
- [Asset classifications](https://github.com/imdrkenzo/oasis/blob/main/server/src/classifications/classifications.controller.ts): `server/src/classifications/classifications.controller.ts`

### Governance and support

- [Audit log endpoints](https://github.com/imdrkenzo/oasis/blob/main/server/src/audit/audit-logs.controller.ts): `server/src/audit/audit-logs.controller.ts`
- [Audit service](https://github.com/imdrkenzo/oasis/blob/main/server/src/audit/audit.service.ts): `server/src/audit/audit.service.ts`
- [Notification endpoints](https://github.com/imdrkenzo/oasis/blob/main/server/src/notifications/notifications.controller.ts): `server/src/notifications/notifications.controller.ts`
- [Notification service](https://github.com/imdrkenzo/oasis/blob/main/server/src/notifications/notifications.service.ts): `server/src/notifications/notifications.service.ts`
- [Photo upload endpoints](https://github.com/imdrkenzo/oasis/blob/main/server/src/photos/photos.controller.ts): `server/src/photos/photos.controller.ts`

### Persistence and files

- [Prisma database access](https://github.com/imdrkenzo/oasis/blob/main/server/src/common/prisma.service.ts): `server/src/common/prisma.service.ts`
- **PostgreSQL**
- **Local upload files**

### Other components

- **Office users**

## Connections

- Office users → OASIS interface: uses
- OASIS interface → Login page: opens login
- OASIS interface → Inventory and dashboard: opens inventory
- OASIS interface → Deployment history: opens deployments
- OASIS interface → Reports and alerts: opens reports
- Login page → API client: sends auth requests
- Inventory and dashboard → API client: requests inventory
- Deployment history → API client: requests deployment data
- Reports and alerts → API client: requests summaries
- API client → Authentication endpoints: calls auth routes
- API client → Inventory endpoints: calls inventory routes
- API client → Deployment endpoints: calls deployment routes
- API client → Audit log endpoints: calls audit routes
- API client → Notification endpoints: calls notification routes
- API client → Photo upload endpoints: calls photo routes
- Authentication endpoints → Session and login service: delegates login and sessions
- Session and login service → User service: looks up user
- Authentication endpoints → User service: loads user data
- User management endpoints → User service: delegates user operations
- Inventory endpoints → Inventory service: delegates item operations
- Deployment endpoints → Deployment service: delegates deployment operations
- Deployment endpoints → Audit service: records deployment creation
- User management endpoints → Audit service: records user changes
- Audit log endpoints → Audit service: queries audit records
- Notification endpoints → Notification service: delegates notification actions
- Photo upload endpoints → Local upload files: stores uploaded images
- Session and login service → Prisma database access: reads and writes sessions
- User management endpoints → Prisma database access: checks roles and user data
- Inventory endpoints → Prisma database access: checks access
- Deployment endpoints → Prisma database access: checks access
- Photo upload endpoints → Prisma database access: checks access
- Audit log endpoints → Prisma database access: checks access
- Prisma database access → PostgreSQL: persists application data
