# atharvmoon74-cyber/archhand architecture

> Architecture diagram of the GitHub repository atharvmoon74-cyber/archhand, 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/atharvmoon74-cyber/archhand
- Repository: https://github.com/atharvmoon74-cyber/archhand

## Overview

Archhand appears to be a browser-based house-planning and visualization product, with a Houseforge workspace and a supporting authentication/API stack. The visible entry flow mounts the React app, routes `/` to Home, and exposes precision status; the tree also identifies scene, plan, asset, and finish-measure components. Source excerpts do not show Home’s internal feature wiring, so those capabilities are represented without guessed call edges. Backend evidence covers tRPC routing, system notifications, user persistence, and Forge-backed storage.

Main entry points: [`server/routers.ts`](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/routers.ts) (Application Router), [`client/src/App.tsx`](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/App.tsx) (App Router), [`server/_core/context.ts`](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/context.ts) (Request Context), [`server/_core/oauth.ts`](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/oauth.ts) (OAuth Flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Application UI"]
  node_bootstrap["Client Bootstrap<br/>[main.tsx]"]
  node_app["App Router<br/>[App.tsx]"]
  node_home["Home Workspace<br/>[Home.tsx]"]
end

subgraph group_houseforge["Houseforge Workspace"]
  node_precision["Precision Status"]
  node_scene["House Scene<br/>[HouseScene.tsx]"]
  node_plan["Plan View<br/>[PlanView.tsx]"]
  node_assets["Asset Library<br/>[AssetLibrary.tsx]"]
  node_measure["Finish Measure"]
  node_houseboard["House Dashboard<br/>[HouseDashboard.tsx]"]
  node_house_logic["Houseforge Logic<br/>[houseforge.ts]"]
end

subgraph group_api["API and Identity"]
  node_api_router["Application Router<br/>[routers.ts]"]
  node_system_router["System Procedures<br/>[systemRouter.ts]"]
  node_trpc["tRPC Middleware<br/>[trpc.ts]"]
  node_context["Request Context<br/>[context.ts]"]
  node_oauth["OAuth Flow<br/>[oauth.ts]"]
end

subgraph group_platform["Persistence and Integrations"]
  node_database[("User Database<br/>[db.ts]")]
  node_schema["User Schema<br/>[schema.ts]"]
  node_notify["Owner Notifications<br/>[notification.ts]"]
  node_storage["Storage Helpers<br/>[storage.ts]"]
  node_storage_proxy["Storage Proxy<br/>[storageProxy.ts]"]
end

node_visitor(("User"))
node_forge{{"Forge Storage Service"}}

node_visitor -.->|"opens app"| node_bootstrap
node_bootstrap -->|"mounts"| node_app
node_app -->|"routes &#96;/&#96;"| node_home
node_app -->|"renders"| node_precision
node_api_router -->|"registers"| node_system_router
node_api_router -->|"builds routes"| node_trpc
node_api_router -.->|"uses cookies"| node_oauth
node_system_router -->|"calls"| node_notify
node_trpc -->|"creates context"| node_context
node_context -->|"references"| node_schema
node_context -.->|"uses SDK"| node_oauth
node_oauth -->|"loads users"| node_database
node_database -->|"queries"| node_schema
node_storage -->|"requests URLs"| node_forge
node_storage_proxy -->|"requests signed URL"| node_forge

click node_bootstrap "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/main.tsx"
click node_app "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/App.tsx"
click node_home "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/pages/Home.tsx"
click node_precision "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/LivePrecisionStatus.tsx"
click node_scene "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/HouseScene.tsx"
click node_plan "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/PlanView.tsx"
click node_assets "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/AssetLibrary.tsx"
click node_measure "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/FinishMeasurePanel.tsx"
click node_houseboard "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/HouseDashboard.tsx"
click node_house_logic "https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/lib/houseforge.ts"
click node_api_router "https://github.com/atharvmoon74-cyber/archhand/blob/main/server/routers.ts"
click node_system_router "https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/systemRouter.ts"
click node_trpc "https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/trpc.ts"
click node_context "https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/context.ts"
click node_oauth "https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/oauth.ts"
click node_database "https://github.com/atharvmoon74-cyber/archhand/blob/main/server/db.ts"
click node_schema "https://github.com/atharvmoon74-cyber/archhand/blob/main/drizzle/schema.ts"
click node_notify "https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/notification.ts"
click node_storage "https://github.com/atharvmoon74-cyber/archhand/blob/main/server/storage.ts"
click node_storage_proxy "https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/storageProxy.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_bootstrap,node_app,node_home,node_visitor toneBlue
class node_precision,node_scene,node_plan,node_assets,node_measure,node_houseboard,node_house_logic,node_forge toneAmber
class node_api_router,node_system_router,node_trpc,node_context,node_oauth toneMint
class node_database,node_schema,node_notify,node_storage,node_storage_proxy toneRose
```

## Components

### Application UI

- [Client Bootstrap](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/main.tsx): `client/src/main.tsx`
- [App Router](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Home Workspace](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/pages/Home.tsx): `client/src/pages/Home.tsx`

### Houseforge Workspace

- [Precision Status](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/LivePrecisionStatus.tsx): `client/src/components/houseforge/LivePrecisionStatus.tsx`
- [House Scene](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/HouseScene.tsx): `client/src/components/houseforge/HouseScene.tsx`
- [Plan View](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/PlanView.tsx): `client/src/components/houseforge/PlanView.tsx`
- [Asset Library](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/AssetLibrary.tsx): `client/src/components/houseforge/AssetLibrary.tsx`
- [Finish Measure](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/FinishMeasurePanel.tsx): `client/src/components/houseforge/FinishMeasurePanel.tsx`
- [House Dashboard](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/components/houseforge/HouseDashboard.tsx): `client/src/components/houseforge/HouseDashboard.tsx`
- [Houseforge Logic](https://github.com/atharvmoon74-cyber/archhand/blob/main/client/src/lib/houseforge.ts): `client/src/lib/houseforge.ts`

### API and Identity

- [Application Router](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/routers.ts): `server/routers.ts`
- [System Procedures](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/systemRouter.ts): `server/_core/systemRouter.ts`
- [tRPC Middleware](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/trpc.ts): `server/_core/trpc.ts`
- [Request Context](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/context.ts): `server/_core/context.ts`
- [OAuth Flow](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/oauth.ts): `server/_core/oauth.ts`

### Persistence and Integrations

- [User Database](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/db.ts): `server/db.ts`
- [User Schema](https://github.com/atharvmoon74-cyber/archhand/blob/main/drizzle/schema.ts): `drizzle/schema.ts`
- [Owner Notifications](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/notification.ts): `server/_core/notification.ts`
- [Storage Helpers](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/storage.ts): `server/storage.ts`
- [Storage Proxy](https://github.com/atharvmoon74-cyber/archhand/blob/main/server/_core/storageProxy.ts): `server/_core/storageProxy.ts`

### Other components

- **User**
- **Forge Storage Service**

## Connections

- User → Client Bootstrap: opens app
- Client Bootstrap → App Router: mounts (evidence: `client/src/main.tsx`)
- App Router → Home Workspace: routes `/` (evidence: `client/src/App.tsx`)
- App Router → Precision Status: renders (evidence: `client/src/App.tsx`)
- Application Router → System Procedures: registers (evidence: `server/routers.ts`)
- Application Router → tRPC Middleware: builds routes (evidence: `server/routers.ts`)
- Application Router → OAuth Flow: uses cookies
- System Procedures → Owner Notifications: calls (evidence: `server/_core/systemRouter.ts`)
- tRPC Middleware → Request Context: creates context (evidence: `server/_core/trpc.ts`)
- Request Context → User Schema: references (evidence: `server/_core/context.ts`)
- Request Context → OAuth Flow: uses SDK
- OAuth Flow → User Database: loads users (evidence: `server/_core/oauth.ts`)
- User Database → User Schema: queries (evidence: `server/db.ts`)
- Storage Helpers → Forge Storage Service: requests URLs (evidence: `server/storage.ts`)
- Storage Proxy → Forge Storage Service: requests signed URL (evidence: `server/_core/storageProxy.ts`)
