# bettercallareeb1/meridian-studio architecture

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

- Interactive diagram: https://gitdiagram.com/bettercallareeb1/meridian-studio
- Repository: https://github.com/bettercallareeb1/meridian-studio

## Overview

Meridian Studio OS is a browser-based creative-studio planning workspace. Users sign in, then view studio KPIs and manage projects, deliverables/tasks, team members, resource bookings, and optional project files through authenticated CRUD APIs. The server hydrates related records into workspace data backed by PostgreSQL; optional uploads use S3-compatible object storage. The graph reflects documented capabilities and indexed imports/calls, but several UI and API implementations were not excerpted, so uncertain internal links are omitted.

Main entry points: [`src/components/WorkspaceProvider.tsx`](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/WorkspaceProvider.tsx) (Workspace state), [`src/lib/studio-data.ts`](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/studio-data.ts) (Workspace hydration), [`src/db/index.ts`](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/db/index.ts) (Studio database), [`src/app/api/projects/route.ts`](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/projects/route.ts) (Projects API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Studio experience"]
  node_authpage["Login view<br/>[AuthView.tsx]"]
  node_overview["Overview dashboard<br/>[OverviewClient.tsx]"]
  node_projectsui["Projects view<br/>[ProjectsClient.tsx]"]
  node_tasksui["Tasks view<br/>[TasksClient.tsx]"]
  node_scheduleui["Resource schedule<br/>[ScheduleClient.tsx]"]
  node_teamui["Team view<br/>[TeamClient.tsx]"]
  node_filesui["Project files"]
  node_workspaceprovider["Workspace state"]
end

subgraph group_identity["Identity and sessions"]
  node_loginroute["Login and registration<br/>[route.ts]"]
  node_sessionauth["Session authentication<br/>[auth.ts]"]
  node_authguard["API session guard<br/>[api-auth.ts]"]
end

subgraph group_api["Workspace API"]
  node_projectsapi["Projects API<br/>[route.ts]"]
  node_tasksapi["Tasks API<br/>[route.ts]"]
  node_bookingsapi["Bookings API<br/>[route.ts]"]
  node_teamapi["Team API<br/>[route.ts]"]
  node_workspaceapi["Workspace API<br/>[route.ts]"]
  node_filesapi["Project file API<br/>[route.ts]"]
end

subgraph group_domain["Workspace data"]
  node_hydration["Workspace hydration<br/>[studio-data.ts]"]
  node_types["Studio data types<br/>[studio-types.ts]"]
end

subgraph group_persistence["Persistence and files"]
  node_database[("Studio database<br/>[index.ts]")]
  node_schema["Workspace schema<br/>[schema.ts]"]
  node_seed["Demo workspace seed<br/>[seed.ts]"]
  node_objectstorage[("S3-compatible storage")]
  node_storagehelper["Object storage helper<br/>[storage.ts]"]
end

node_user(("Studio user"))

node_user -->|"signs in"| node_authpage
node_authpage -.->|"authenticates"| node_loginroute
node_loginroute -->|"creates session"| node_sessionauth
node_sessionauth -->|"reads and writes"| node_database
node_user -->|"plans studio work"| node_overview
node_overview -->|"uses workspace state"| node_workspaceprovider
node_projectsui -->|"uses workspace state"| node_workspaceprovider
node_tasksui -->|"uses workspace state"| node_workspaceprovider
node_scheduleui -->|"uses workspace state"| node_workspaceprovider
node_teamui -->|"uses workspace state"| node_workspaceprovider
node_workspaceprovider -->|"fetches workspace"| node_workspaceapi
node_workspaceprovider -->|"sends project changes"| node_projectsapi
node_workspaceprovider -->|"sends task changes"| node_tasksapi
node_workspaceprovider -->|"sends booking changes"| node_bookingsapi
node_workspaceprovider -.->|"sends team changes"| node_teamapi
node_filesui -.->|"manages uploads"| node_filesapi
node_workspaceapi -->|"checks session"| node_authguard
node_projectsapi -->|"checks session"| node_authguard
node_tasksapi -->|"checks session"| node_authguard
node_projectsapi -->|"loads workspace data"| node_hydration
node_tasksapi -->|"loads workspace data"| node_hydration
node_bookingsapi -->|"loads workspace data"| node_hydration
node_teamapi -->|"loads workspace data"| node_hydration
node_workspaceapi -->|"returns workspace data"| node_hydration
node_hydration -->|"queries records"| node_database
node_hydration -->|"ensures demo seed"| node_seed
node_seed -->|"inserts demo records"| node_database
node_database -->|"configures ORM"| node_schema
node_filesapi -->|"uploads and deletes objects"| node_storagehelper
node_storagehelper -->|"stores file objects"| node_objectstorage

click node_authpage "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/AuthView.tsx"
click node_overview "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/OverviewClient.tsx"
click node_projectsui "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/ProjectsClient.tsx"
click node_tasksui "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/TasksClient.tsx"
click node_scheduleui "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/ScheduleClient.tsx"
click node_teamui "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/TeamClient.tsx"
click node_filesui "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/ProjectFilesSection.tsx"
click node_workspaceprovider "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/WorkspaceProvider.tsx"
click node_loginroute "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/auth/login/route.ts"
click node_sessionauth "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/auth.ts"
click node_authguard "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/api-auth.ts"
click node_projectsapi "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/projects/route.ts"
click node_tasksapi "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/tasks/route.ts"
click node_bookingsapi "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/bookings/route.ts"
click node_teamapi "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/team/route.ts"
click node_workspaceapi "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/workspace/route.ts"
click node_filesapi "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/projects/%5Bid%5D/files/route.ts"
click node_hydration "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/studio-data.ts"
click node_types "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/studio-types.ts"
click node_database "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/db/index.ts"
click node_schema "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/db/schema.ts"
click node_seed "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/db/seed.ts"
click node_storagehelper "https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/storage.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_authpage,node_overview,node_projectsui,node_tasksui,node_scheduleui,node_teamui,node_filesui,node_workspaceprovider,node_user toneBlue
class node_loginroute,node_sessionauth,node_authguard toneAmber
class node_projectsapi,node_tasksapi,node_bookingsapi,node_teamapi,node_workspaceapi,node_filesapi toneMint
class node_hydration,node_types toneRose
class node_database,node_schema,node_seed,node_objectstorage,node_storagehelper toneIndigo
```

## Components

### Studio experience

- [Login view](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/AuthView.tsx): `src/components/AuthView.tsx`
- [Overview dashboard](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/OverviewClient.tsx): `src/components/OverviewClient.tsx`
- [Projects view](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/ProjectsClient.tsx): `src/components/ProjectsClient.tsx`
- [Tasks view](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/TasksClient.tsx): `src/components/TasksClient.tsx`
- [Resource schedule](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/ScheduleClient.tsx): `src/components/ScheduleClient.tsx`
- [Team view](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/TeamClient.tsx): `src/components/TeamClient.tsx`
- [Project files](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/ProjectFilesSection.tsx): `src/components/ProjectFilesSection.tsx`
- [Workspace state](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/components/WorkspaceProvider.tsx): `src/components/WorkspaceProvider.tsx`

### Identity and sessions

- [Login and registration](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/auth/login/route.ts): `src/app/api/auth/login/route.ts`
- [Session authentication](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [API session guard](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/api-auth.ts): `src/lib/api-auth.ts`

### Workspace API

- [Projects API](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/projects/route.ts): `src/app/api/projects/route.ts`
- [Tasks API](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/tasks/route.ts): `src/app/api/tasks/route.ts`
- [Bookings API](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/bookings/route.ts): `src/app/api/bookings/route.ts`
- [Team API](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/team/route.ts): `src/app/api/team/route.ts`
- [Workspace API](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/workspace/route.ts): `src/app/api/workspace/route.ts`
- [Project file API](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/app/api/projects/%5Bid%5D/files/route.ts): `src/app/api/projects/[id]/files/route.ts`

### Workspace data

- [Workspace hydration](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/studio-data.ts): `src/lib/studio-data.ts`
- [Studio data types](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/studio-types.ts): `src/lib/studio-types.ts`

### Persistence and files

- [Studio database](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/db/index.ts): `src/db/index.ts`
- [Workspace schema](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/db/schema.ts): `src/db/schema.ts`
- [Demo workspace seed](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/db/seed.ts): `src/db/seed.ts`
- **S3-compatible storage**
- [Object storage helper](https://github.com/bettercallareeb1/meridian-studio/blob/main/src/lib/storage.ts): `src/lib/storage.ts`

### Other components

- **Studio user**

## Connections

- Studio user → Login view: signs in
- Login view → Login and registration: authenticates
- Login and registration → Session authentication: creates session (evidence: `src/app/api/auth/login/route.ts`)
- Session authentication → Studio database: reads and writes (evidence: `src/lib/auth.ts`)
- Studio user → Overview dashboard: plans studio work (evidence: `README.md`)
- Overview dashboard → Workspace state: uses workspace state (evidence: `src/components/OverviewClient.tsx`)
- Projects view → Workspace state: uses workspace state (evidence: `src/components/ProjectsClient.tsx`)
- Tasks view → Workspace state: uses workspace state (evidence: `src/components/TasksClient.tsx`)
- Resource schedule → Workspace state: uses workspace state (evidence: `src/components/ScheduleClient.tsx`)
- Team view → Workspace state: uses workspace state (evidence: `src/components/TeamClient.tsx`)
- Workspace state → Workspace API: fetches workspace (evidence: `src/components/WorkspaceProvider.tsx`)
- Workspace state → Projects API: sends project changes (evidence: `src/components/WorkspaceProvider.tsx`)
- Workspace state → Tasks API: sends task changes (evidence: `src/components/WorkspaceProvider.tsx`)
- Workspace state → Bookings API: sends booking changes (evidence: `src/components/WorkspaceProvider.tsx`)
- Workspace state → Team API: sends team changes
- Project files → Project file API: manages uploads
- Workspace API → API session guard: checks session (evidence: `src/app/api/workspace/route.ts`)
- Projects API → API session guard: checks session (evidence: `src/app/api/projects/route.ts`)
- Tasks API → API session guard: checks session (evidence: `src/app/api/tasks/route.ts`)
- Projects API → Workspace hydration: loads workspace data (evidence: `src/app/api/projects/route.ts`)
- Tasks API → Workspace hydration: loads workspace data (evidence: `src/app/api/tasks/route.ts`)
- Bookings API → Workspace hydration: loads workspace data (evidence: `src/app/api/bookings/route.ts`)
- Team API → Workspace hydration: loads workspace data (evidence: `src/app/api/team/route.ts`)
- Workspace API → Workspace hydration: returns workspace data (evidence: `src/app/api/workspace/route.ts`)
- Workspace hydration → Studio database: queries records (evidence: `src/lib/studio-data.ts`)
- Workspace hydration → Demo workspace seed: ensures demo seed (evidence: `src/lib/studio-data.ts`)
- Demo workspace seed → Studio database: inserts demo records (evidence: `src/db/seed.ts`)
- Studio database → Workspace schema: configures ORM (evidence: `src/db/index.ts`)
- Project file API → Object storage helper: uploads and deletes objects (evidence: `src/app/api/projects/[id]/files/route.ts`)
- Object storage helper → S3-compatible storage: stores file objects (evidence: `src/lib/storage.ts`)
