# feynman82/one-house architecture

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

- Interactive diagram: https://gitdiagram.com/feynman82/one-house
- Repository: https://github.com/feynman82/one-house

## Overview

One House combines a public student-care website and interactive campus tour with a separate care platform for staff workflows and messaging. The public journey leads from site content and the campus experience to visit booking or concierge questions; the care workflow handles inbound WhatsApp messages, scheduled Brain processing, and staff review of replies or stories. The sampled code establishes key API, task, and tour calls; several website booking and care subsystems are represented from the file tree and README, so their internal links are omitted where evidence is unavailable.

Main entry points: [`website/src/engine/main.js`](https://github.com/feynman82/one-house/blob/main/website/src/engine/main.js) (Tour Bootstrap), [`care-platform/apps/web/lib/tasks.ts`](https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/lib/tasks.ts) (Task Workflows), [`website/v3/src/main.js`](https://github.com/feynman82/one-house/blob/main/website/v3/src/main.js) (V3 Tour Bootstrap), [`care-platform/apps/web/app/api/webhooks/whatsapp/route.ts`](https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/app/api/webhooks/whatsapp/route.ts) (WhatsApp Webhook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Website"]
  node_site["Website Pages<br/>[page.tsx]"]
  node_tourboot["Tour Bootstrap<br/>[main.js]"]
  node_tourmodel["Campus Model<br/>[model.js]"]
  node_tourfurn["Campus Furnishing<br/>[furniture.js]"]
  node_tourrun["Scroll Tour<br/>[tour.js]"]
  node_explore["Explore Mode<br/>[explore.js]"]
  node_v3boot["V3 Tour Bootstrap<br/>[main.js]"]
  node_v3model["V3 Campus Model<br/>[model.js]"]
  node_v3furn["V3 Furnishing<br/>[furniture.js]"]
  node_v3tour["V3 Scroll Tour<br/>[tour.js]"]
end

subgraph group_booking["Booking and Concierge"]
  node_bookingui["Booking Experience<br/>[page.tsx]"]
  node_bookingapi["Booking API<br/>[route.ts]"]
  node_bookingstore[("Booking Store<br/>[db.js]")]
  node_concierge["Concierge Answers<br/>[answer.js]"]
end

subgraph group_care["Care Operations"]
  node_staff["Staff Console<br/>[page.tsx]"]
  node_taskapi["Task Actions API<br/>[route.ts]"]
  node_tasklogic["Task Workflows<br/>[tasks.ts]"]
  node_settingsapi["Settings API<br/>[route.ts]"]
  node_settings["Care Settings<br/>[settings.ts]"]
  node_webhook["WhatsApp Webhook<br/>[route.ts]"]
end

subgraph group_brain["Brain Runtime"]
  node_brainapi["Brain HTTP API<br/>[server.ts]"]
  node_tick["Brain Tick<br/>[tick.ts]"]
  node_deps["Brain Dependencies<br/>[deps.ts]"]
  node_outbox["Outbox Sender<br/>[outbox-sender.ts]"]
end

subgraph group_data["Persistence and Channels"]
  node_channels["WhatsApp Channel<br/>[webhook.ts]"]
  node_queue[("Message Queues<br/>[queues.ts]")]
  node_dbclient[("Database Client<br/>[client.ts]")]
  node_orchestratorstore[("Brain Store")]
end

node_visitor(("Visitor"))

node_visitor -.->|"opens"| node_site
node_site -.->|"starts booking"| node_bookingui
node_bookingui -.->|"requests slots"| node_bookingapi
node_bookingapi -.->|"reads and writes"| node_bookingstore
node_site -.->|"asks questions"| node_concierge
node_tourboot -->|"starts model"| node_tourmodel
node_tourboot -->|"starts tour"| node_tourrun
node_tourboot -->|"starts explore"| node_explore
node_tourboot -->|"configures model"| node_tourfurn
node_v3boot -->|"starts model"| node_v3model
node_v3boot -->|"starts tour"| node_v3tour
node_v3boot -->|"configures model"| node_v3furn
node_staff -.->|"submits actions"| node_taskapi
node_taskapi -->|"runs action"| node_tasklogic
node_settingsapi -->|"changes setting"| node_settings
node_webhook -->|"parses webhook"| node_channels
node_webhook -->|"enqueues inbound"| node_queue
node_webhook -->|"nudges Brain"| node_brainapi
node_brainapi -->|"runs tick"| node_tick
node_tick -->|"uses sender"| node_outbox
node_tasklogic -->|"enqueues outbound"| node_queue
node_tasklogic -->|"updates story"| node_orchestratorstore
node_tasklogic -->|"opens transactions"| node_dbclient
node_brainapi -->|"receives dependencies"| node_deps

click node_site "https://github.com/feynman82/one-house/blob/main/website/src/app/page.tsx"
click node_tourboot "https://github.com/feynman82/one-house/blob/main/website/src/engine/main.js"
click node_tourmodel "https://github.com/feynman82/one-house/blob/main/website/src/engine/model.js"
click node_tourfurn "https://github.com/feynman82/one-house/blob/main/website/src/engine/furniture.js"
click node_tourrun "https://github.com/feynman82/one-house/blob/main/website/src/engine/tour.js"
click node_explore "https://github.com/feynman82/one-house/blob/main/website/src/engine/explore.js"
click node_v3boot "https://github.com/feynman82/one-house/blob/main/website/v3/src/main.js"
click node_v3model "https://github.com/feynman82/one-house/blob/main/website/v3/src/model.js"
click node_v3furn "https://github.com/feynman82/one-house/blob/main/website/v3/src/furniture.js"
click node_v3tour "https://github.com/feynman82/one-house/blob/main/website/v3/src/tour.js"
click node_bookingui "https://github.com/feynman82/one-house/blob/main/website/src/app/book/page.tsx"
click node_bookingapi "https://github.com/feynman82/one-house/blob/main/website/src/app/api/booking/slots/route.ts"
click node_bookingstore "https://github.com/feynman82/one-house/blob/main/website/src/lib/booking/db.js"
click node_concierge "https://github.com/feynman82/one-house/blob/main/website/src/lib/concierge/answer.js"
click node_staff "https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/app/(admin)/admin/tasks/page.tsx"
click node_taskapi "https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/app/api/tasks/route.ts"
click node_tasklogic "https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/lib/tasks.ts"
click node_settingsapi "https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/app/api/settings/route.ts"
click node_settings "https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/lib/settings.ts"
click node_webhook "https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/app/api/webhooks/whatsapp/route.ts"
click node_brainapi "https://github.com/feynman82/one-house/blob/main/care-platform/services/brain/src/server.ts"
click node_tick "https://github.com/feynman82/one-house/blob/main/care-platform/services/brain/src/tick.ts"
click node_deps "https://github.com/feynman82/one-house/blob/main/care-platform/services/brain/src/deps.ts"
click node_outbox "https://github.com/feynman82/one-house/blob/main/care-platform/services/brain/src/outbox-sender.ts"
click node_channels "https://github.com/feynman82/one-house/blob/main/care-platform/packages/channels/src/whatsapp/webhook.ts"
click node_queue "https://github.com/feynman82/one-house/blob/main/care-platform/packages/db/src/queues.ts"
click node_dbclient "https://github.com/feynman82/one-house/blob/main/care-platform/packages/db/src/client.ts"
click node_orchestratorstore "https://github.com/feynman82/one-house/blob/main/care-platform/packages/db/src/orchestrator-store.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_site,node_tourboot,node_tourmodel,node_tourfurn,node_tourrun,node_explore,node_v3boot,node_v3model,node_v3furn,node_v3tour toneBlue
class node_bookingui,node_bookingapi,node_bookingstore,node_concierge toneAmber
class node_staff,node_taskapi,node_tasklogic,node_settingsapi,node_settings,node_webhook toneMint
class node_brainapi,node_tick,node_deps,node_outbox toneRose
class node_channels,node_queue,node_dbclient,node_orchestratorstore,node_visitor toneIndigo
```

## Components

### Public Website

- [Website Pages](https://github.com/feynman82/one-house/blob/main/website/src/app/page.tsx): `website/src/app/page.tsx`
- [Tour Bootstrap](https://github.com/feynman82/one-house/blob/main/website/src/engine/main.js): `website/src/engine/main.js`
- [Campus Model](https://github.com/feynman82/one-house/blob/main/website/src/engine/model.js): `website/src/engine/model.js`
- [Campus Furnishing](https://github.com/feynman82/one-house/blob/main/website/src/engine/furniture.js): `website/src/engine/furniture.js`
- [Scroll Tour](https://github.com/feynman82/one-house/blob/main/website/src/engine/tour.js): `website/src/engine/tour.js`
- [Explore Mode](https://github.com/feynman82/one-house/blob/main/website/src/engine/explore.js): `website/src/engine/explore.js`
- [V3 Tour Bootstrap](https://github.com/feynman82/one-house/blob/main/website/v3/src/main.js): `website/v3/src/main.js`
- [V3 Campus Model](https://github.com/feynman82/one-house/blob/main/website/v3/src/model.js): `website/v3/src/model.js`
- [V3 Furnishing](https://github.com/feynman82/one-house/blob/main/website/v3/src/furniture.js): `website/v3/src/furniture.js`
- [V3 Scroll Tour](https://github.com/feynman82/one-house/blob/main/website/v3/src/tour.js): `website/v3/src/tour.js`

### Booking and Concierge

- [Booking Experience](https://github.com/feynman82/one-house/blob/main/website/src/app/book/page.tsx): `website/src/app/book/page.tsx`
- [Booking API](https://github.com/feynman82/one-house/blob/main/website/src/app/api/booking/slots/route.ts): `website/src/app/api/booking/slots/route.ts`
- [Booking Store](https://github.com/feynman82/one-house/blob/main/website/src/lib/booking/db.js): `website/src/lib/booking/db.js`
- [Concierge Answers](https://github.com/feynman82/one-house/blob/main/website/src/lib/concierge/answer.js): `website/src/lib/concierge/answer.js`

### Care Operations

- [Staff Console](https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/app/(admin)/admin/tasks/page.tsx): `care-platform/apps/web/app/(admin)/admin/tasks/page.tsx`
- [Task Actions API](https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/app/api/tasks/route.ts): `care-platform/apps/web/app/api/tasks/route.ts`
- [Task Workflows](https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/lib/tasks.ts): `care-platform/apps/web/lib/tasks.ts`
- [Settings API](https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/app/api/settings/route.ts): `care-platform/apps/web/app/api/settings/route.ts`
- [Care Settings](https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/lib/settings.ts): `care-platform/apps/web/lib/settings.ts`
- [WhatsApp Webhook](https://github.com/feynman82/one-house/blob/main/care-platform/apps/web/app/api/webhooks/whatsapp/route.ts): `care-platform/apps/web/app/api/webhooks/whatsapp/route.ts`

### Brain Runtime

- [Brain HTTP API](https://github.com/feynman82/one-house/blob/main/care-platform/services/brain/src/server.ts): `care-platform/services/brain/src/server.ts`
- [Brain Tick](https://github.com/feynman82/one-house/blob/main/care-platform/services/brain/src/tick.ts): `care-platform/services/brain/src/tick.ts`
- [Brain Dependencies](https://github.com/feynman82/one-house/blob/main/care-platform/services/brain/src/deps.ts): `care-platform/services/brain/src/deps.ts`
- [Outbox Sender](https://github.com/feynman82/one-house/blob/main/care-platform/services/brain/src/outbox-sender.ts): `care-platform/services/brain/src/outbox-sender.ts`

### Persistence and Channels

- [WhatsApp Channel](https://github.com/feynman82/one-house/blob/main/care-platform/packages/channels/src/whatsapp/webhook.ts): `care-platform/packages/channels/src/whatsapp/webhook.ts`
- [Message Queues](https://github.com/feynman82/one-house/blob/main/care-platform/packages/db/src/queues.ts): `care-platform/packages/db/src/queues.ts`
- [Database Client](https://github.com/feynman82/one-house/blob/main/care-platform/packages/db/src/client.ts): `care-platform/packages/db/src/client.ts`
- [Brain Store](https://github.com/feynman82/one-house/blob/main/care-platform/packages/db/src/orchestrator-store.ts): `care-platform/packages/db/src/orchestrator-store.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Website Pages: opens
- Website Pages → Booking Experience: starts booking
- Booking Experience → Booking API: requests slots
- Booking API → Booking Store: reads and writes
- Website Pages → Concierge Answers: asks questions
- Tour Bootstrap → Campus Model: starts model (evidence: `website/src/engine/main.js`)
- Tour Bootstrap → Scroll Tour: starts tour (evidence: `website/src/engine/main.js`)
- Tour Bootstrap → Explore Mode: starts explore (evidence: `website/src/engine/main.js`)
- Tour Bootstrap → Campus Furnishing: configures model (evidence: `website/src/engine/main.js`)
- V3 Tour Bootstrap → V3 Campus Model: starts model (evidence: `website/v3/src/main.js`)
- V3 Tour Bootstrap → V3 Scroll Tour: starts tour (evidence: `website/v3/src/main.js`)
- V3 Tour Bootstrap → V3 Furnishing: configures model (evidence: `website/v3/src/main.js`)
- Staff Console → Task Actions API: submits actions
- Task Actions API → Task Workflows: runs action (evidence: `care-platform/apps/web/app/api/tasks/route.ts`)
- Settings API → Care Settings: changes setting (evidence: `care-platform/apps/web/app/api/settings/route.ts`)
- WhatsApp Webhook → WhatsApp Channel: parses webhook (evidence: `care-platform/apps/web/app/api/webhooks/whatsapp/route.ts`)
- WhatsApp Webhook → Message Queues: enqueues inbound (evidence: `care-platform/apps/web/app/api/webhooks/whatsapp/route.ts`)
- WhatsApp Webhook → Brain HTTP API: nudges Brain (evidence: `care-platform/apps/web/app/api/webhooks/whatsapp/route.ts`)
- Brain HTTP API → Brain Tick: runs tick (evidence: `care-platform/services/brain/src/server.ts`)
- Brain Tick → Outbox Sender: uses sender (evidence: `care-platform/services/brain/src/tick.ts`)
- Task Workflows → Message Queues: enqueues outbound (evidence: `care-platform/apps/web/lib/tasks.ts`)
- Task Workflows → Brain Store: updates story (evidence: `care-platform/apps/web/lib/tasks.ts`)
- Task Workflows → Database Client: opens transactions (evidence: `care-platform/apps/web/lib/tasks.ts`)
- Brain HTTP API → Brain Dependencies: receives dependencies (evidence: `care-platform/services/brain/src/server.ts`)
