# setups-works/untitled-project-landing architecture

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

- Interactive diagram: https://gitdiagram.com/setups-works/untitled-project-landing
- Repository: https://github.com/setups-works/untitled-project-landing

## Overview

This is a self-hostable personal-workspace product: users sign in, work with notes, tasks, journal entries and chat, and access search and insights; administrators manage users and operations. The graph preserves those product areas and the supporting auth, data, file, AI and realtime layers. README descriptions establish the feature scope; sampled route and client files show some API boundaries. Several feature implementations and infrastructure connections were not sampled, so their links are limited to documented relationships.

Main entry points: [`src/app/api/v1/db/route.ts`](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/db/route.ts) (Database API), [`src/app/dashboard/journal/page.tsx`](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/journal/page.tsx) (Journal), [`src/app/dashboard/notes/page.tsx`](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/notes/page.tsx) (Notes), [`src/app/api/v1/storage/remove/route.ts`](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/storage/remove/route.ts) (File API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Workspace experience"]
  node_journal["Journal<br/>[page.tsx]"]
  node_notes["Notes<br/>[page.tsx]"]
  node_tasks["To-do<br/>[page.tsx]"]
  node_chat["Chat<br/>[ChatApp.tsx]"]
  node_search["Universal search<br/>[page.tsx]"]
  node_insights["Personality insights<br/>[InsightsCard.tsx]"]
  node_dashboard["Home dashboard<br/>[page.tsx]"]
end

subgraph group_identity["Accounts and admin"]
  node_authui["Sign-in experience<br/>[AuthForm.tsx]"]
  node_admin["Admin panel<br/>[page.tsx]"]
  node_authapi["Authentication API<br/>[route.ts]"]
  node_auth["Auth service<br/>[auth.ts]"]
end

subgraph group_services["Application services"]
  node_dbapi["Database API<br/>[route.ts]"]
  node_storageapi["File API<br/>[route.ts]"]
  node_aiapi["AI chat API<br/>[route.ts]"]
  node_aiturn["AI chat service<br/>[chat.ts]"]
  node_realtimeapi["Realtime stream<br/>[route.ts]"]
end

subgraph group_data["Data and infrastructure"]
  node_dbexec["Query execution<br/>[execute.ts]"]
  node_database[("PostgreSQL")]
  node_storage["Object storage<br/>[storage.ts]"]
  node_realtime["Realtime publisher<br/>[realtime.ts]"]
end

subgraph group_public["Public site"]
  node_marketing["Marketing site<br/>[page.tsx]"]
end

node_person(("Workspace user"))
node_visitor(("Site visitor"))

node_person -->|"signs in"| node_authui
node_authui -->|"authenticates"| node_authapi
node_authapi -->|"delegates to"| node_auth
node_person -->|"records entries"| node_journal
node_person -->|"edits notes"| node_notes
node_person -->|"manages tasks"| node_tasks
node_person -->|"uses chat"| node_chat
node_person -->|"searches workspace"| node_search
node_person -->|"views home"| node_dashboard
node_dashboard -->|"shows insights"| node_insights
node_person -->|"administers"| node_admin
node_journal -.->|"uses data API"| node_dbapi
node_notes -.->|"uses data API"| node_dbapi
node_tasks -.->|"uses data API"| node_dbapi
node_chat -.->|"requests replies"| node_aiapi
node_aiapi -->|"invokes"| node_aiturn
node_dbapi -->|"executes query"| node_dbexec
node_dbexec -.->|"queries"| node_database
node_notes -.->|"uses attachments"| node_storageapi
node_journal -.->|"uses attachments"| node_storageapi
node_storageapi -->|"deletes objects"| node_storage
node_person -.->|"opens stream"| node_realtimeapi
node_realtimeapi -->|"subscribes"| node_realtime
node_visitor -->|"explores product"| node_marketing

click node_journal "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/journal/page.tsx"
click node_notes "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/notes/page.tsx"
click node_tasks "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/todo/page.tsx"
click node_chat "https://github.com/setups-works/untitled-project-landing/blob/main/src/components/app/chat/ChatApp.tsx"
click node_search "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/universal-search/page.tsx"
click node_insights "https://github.com/setups-works/untitled-project-landing/blob/main/src/components/app/InsightsCard.tsx"
click node_dashboard "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/page.tsx"
click node_authui "https://github.com/setups-works/untitled-project-landing/blob/main/src/components/auth/AuthForm.tsx"
click node_admin "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/admin/page.tsx"
click node_authapi "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/auth/%5B...all%5D/route.ts"
click node_auth "https://github.com/setups-works/untitled-project-landing/blob/main/src/server/auth.ts"
click node_dbapi "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/db/route.ts"
click node_storageapi "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/storage/remove/route.ts"
click node_aiapi "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/ai/chat/route.ts"
click node_aiturn "https://github.com/setups-works/untitled-project-landing/blob/main/src/server/services/ai/chat.ts"
click node_realtimeapi "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/realtime/route.ts"
click node_dbexec "https://github.com/setups-works/untitled-project-landing/blob/main/src/server/db/execute.ts"
click node_storage "https://github.com/setups-works/untitled-project-landing/blob/main/src/server/storage.ts"
click node_realtime "https://github.com/setups-works/untitled-project-landing/blob/main/src/server/realtime.ts"
click node_marketing "https://github.com/setups-works/untitled-project-landing/blob/main/src/app/page.tsx"

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_journal,node_notes,node_tasks,node_chat,node_search,node_insights,node_dashboard,node_person toneBlue
class node_authui,node_admin,node_authapi,node_auth toneAmber
class node_dbapi,node_storageapi,node_aiapi,node_aiturn,node_realtimeapi toneMint
class node_dbexec,node_database,node_storage,node_realtime toneRose
class node_marketing,node_visitor toneIndigo
```

## Components

### Workspace experience

- [Journal](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/journal/page.tsx): `src/app/dashboard/journal/page.tsx`
- [Notes](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/notes/page.tsx): `src/app/dashboard/notes/page.tsx`
- [To-do](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/todo/page.tsx): `src/app/dashboard/todo/page.tsx`
- [Chat](https://github.com/setups-works/untitled-project-landing/blob/main/src/components/app/chat/ChatApp.tsx): `src/components/app/chat/ChatApp.tsx`
- [Universal search](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/universal-search/page.tsx): `src/app/universal-search/page.tsx`
- [Personality insights](https://github.com/setups-works/untitled-project-landing/blob/main/src/components/app/InsightsCard.tsx): `src/components/app/InsightsCard.tsx`
- [Home dashboard](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`

### Accounts and admin

- [Sign-in experience](https://github.com/setups-works/untitled-project-landing/blob/main/src/components/auth/AuthForm.tsx): `src/components/auth/AuthForm.tsx`
- [Admin panel](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/admin/page.tsx): `src/app/admin/page.tsx`
- [Authentication API](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/auth/%5B...all%5D/route.ts): `src/app/api/auth/[...all]/route.ts`
- [Auth service](https://github.com/setups-works/untitled-project-landing/blob/main/src/server/auth.ts): `src/server/auth.ts`

### Application services

- [Database API](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/db/route.ts): `src/app/api/v1/db/route.ts`
- [File API](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/storage/remove/route.ts): `src/app/api/v1/storage/remove/route.ts`
- [AI chat API](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/ai/chat/route.ts): `src/app/api/v1/ai/chat/route.ts`
- [AI chat service](https://github.com/setups-works/untitled-project-landing/blob/main/src/server/services/ai/chat.ts): `src/server/services/ai/chat.ts`
- [Realtime stream](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/api/v1/realtime/route.ts): `src/app/api/v1/realtime/route.ts`

### Data and infrastructure

- [Query execution](https://github.com/setups-works/untitled-project-landing/blob/main/src/server/db/execute.ts): `src/server/db/execute.ts`
- **PostgreSQL**
- [Object storage](https://github.com/setups-works/untitled-project-landing/blob/main/src/server/storage.ts): `src/server/storage.ts`
- [Realtime publisher](https://github.com/setups-works/untitled-project-landing/blob/main/src/server/realtime.ts): `src/server/realtime.ts`

### Public site

- [Marketing site](https://github.com/setups-works/untitled-project-landing/blob/main/src/app/page.tsx): `src/app/page.tsx`

### Other components

- **Workspace user**
- **Site visitor**

## Connections

- Workspace user → Sign-in experience: signs in (evidence: `README.md`)
- Sign-in experience → Authentication API: authenticates
- Authentication API → Auth service: delegates to (evidence: `src/app/api/auth/[...all]/route.ts`)
- Workspace user → Journal: records entries (evidence: `README.md`)
- Workspace user → Notes: edits notes (evidence: `README.md`)
- Workspace user → To-do: manages tasks (evidence: `README.md`)
- Workspace user → Chat: uses chat (evidence: `README.md`)
- Workspace user → Universal search: searches workspace (evidence: `README.md`)
- Workspace user → Home dashboard: views home (evidence: `README.md`)
- Home dashboard → Personality insights: shows insights (evidence: `README.md`)
- Workspace user → Admin panel: administers (evidence: `README.md`)
- Journal → Database API: uses data API
- Notes → Database API: uses data API
- To-do → Database API: uses data API
- Chat → AI chat API: requests replies
- AI chat API → AI chat service: invokes (evidence: `src/app/api/v1/ai/chat/route.ts`)
- Database API → Query execution: executes query (evidence: `src/app/api/v1/db/route.ts`)
- Query execution → PostgreSQL: queries
- Notes → File API: uses attachments
- Journal → File API: uses attachments
- File API → Object storage: deletes objects (evidence: `src/app/api/v1/storage/remove/route.ts`)
- Workspace user → Realtime stream: opens stream
- Realtime stream → Realtime publisher: subscribes (evidence: `src/app/api/v1/realtime/route.ts`)
- Site visitor → Marketing site: explores product (evidence: `README.md`)
