# rohan-namahropes/namah_trace architecture

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

- Interactive diagram: https://gitdiagram.com/rohan-namahropes/namah_trace
- Repository: https://github.com/rohan-namahropes/namah_trace

## Overview

Namah Trace is a browser workspace for tracking production batches through configurable workflow stages. Users sign in, review or create batches, then record stage status, measurements, notes, and evidence; the application persists records through Supabase. The sampled React entry point also exposes batch reporting and download controls, but their implementation is incomplete in the excerpts. The README provides no additional product detail, and the schema was not sampled, so database contents and unsampled feature wiring are shown conservatively.

Main entry points: [`src/main.jsx`](https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx) (Workspace interface), [`src/lib/api.js`](https://github.com/rohan-namahropes/namah_trace/blob/main/src/lib/api.js) (Batch API), [`src/lib/supabase.js`](https://github.com/rohan-namahropes/namah_trace/blob/main/src/lib/supabase.js) (Supabase client), [`supabase/schema.sql`](https://github.com/rohan-namahropes/namah_trace/blob/main/supabase/schema.sql) (Database schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace UI"]
  node_app["Workspace interface<br/>[main.jsx]"]
  node_auth["Sign-in and session<br/>[main.jsx]"]
  node_overview["Batch overview<br/>[main.jsx]"]
end

subgraph group_workflow["Batch Workflow"]
  node_batch_detail["Batch detail<br/>[main.jsx]"]
  node_batch_creation["Batch creation<br/>[main.jsx]"]
  node_stage_record["Stage record<br/>[main.jsx]"]
  node_reporting["Report controls<br/>[main.jsx]"]
end

subgraph group_backend["Persistence"]
  node_api["Batch API<br/>[api.js]"]
  node_client["Supabase client<br/>[supabase.js]"]
  node_schema["Database schema<br/>[schema.sql]"]
end

node_user(("Workspace user"))
node_supabase[("Supabase services")]

node_user -->|"uses"| node_app
node_app -->|"signs in"| node_auth
node_auth -->|"authenticates"| node_client
node_app -->|"shows batches"| node_overview
node_app -->|"creates batch"| node_batch_creation
node_app -->|"opens batch"| node_batch_detail
node_app -->|"saves stage"| node_stage_record
node_app -->|"offers reports"| node_reporting
node_app -->|"loads batches"| node_api
node_app -->|"creates batch"| node_api
node_app -->|"saves stage"| node_api
node_api -->|"queries and writes"| node_client
node_client -->|"connects"| node_supabase
node_schema -.->|"defines schema"| node_supabase

click node_app "https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx"
click node_auth "https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx"
click node_overview "https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx"
click node_batch_detail "https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx"
click node_batch_creation "https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx"
click node_stage_record "https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx"
click node_reporting "https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx"
click node_api "https://github.com/rohan-namahropes/namah_trace/blob/main/src/lib/api.js"
click node_client "https://github.com/rohan-namahropes/namah_trace/blob/main/src/lib/supabase.js"
click node_schema "https://github.com/rohan-namahropes/namah_trace/blob/main/supabase/schema.sql"

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_auth,node_overview,node_user toneBlue
class node_batch_detail,node_batch_creation,node_stage_record,node_reporting,node_supabase toneAmber
class node_api,node_client,node_schema toneMint
```

## Components

### Workspace UI

- [Workspace interface](https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx): `src/main.jsx`
- [Sign-in and session](https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx): `src/main.jsx`
- [Batch overview](https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx): `src/main.jsx`

### Batch Workflow

- [Batch detail](https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx): `src/main.jsx`
- [Batch creation](https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx): `src/main.jsx`
- [Stage record](https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx): `src/main.jsx`
- [Report controls](https://github.com/rohan-namahropes/namah_trace/blob/main/src/main.jsx): `src/main.jsx`

### Persistence

- [Batch API](https://github.com/rohan-namahropes/namah_trace/blob/main/src/lib/api.js): `src/lib/api.js`
- [Supabase client](https://github.com/rohan-namahropes/namah_trace/blob/main/src/lib/supabase.js): `src/lib/supabase.js`
- [Database schema](https://github.com/rohan-namahropes/namah_trace/blob/main/supabase/schema.sql): `supabase/schema.sql`

### Other components

- **Workspace user**
- **Supabase services**

## Connections

- Workspace user → Workspace interface: uses
- Workspace interface → Sign-in and session: signs in
- Sign-in and session → Supabase client: authenticates
- Workspace interface → Batch overview: shows batches
- Workspace interface → Batch creation: creates batch
- Workspace interface → Batch detail: opens batch
- Workspace interface → Stage record: saves stage
- Workspace interface → Report controls: offers reports
- Workspace interface → Batch API: loads batches
- Workspace interface → Batch API: creates batch
- Workspace interface → Batch API: saves stage
- Batch API → Supabase client: queries and writes
- Supabase client → Supabase services: connects
- Database schema → Supabase services: defines schema
