# xvolv/worklyn architecture

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

## Overview

Worklyn is a multi-tenant collaboration platform. Users sign in, create or join a workspace, and work within its tenant boundary to manage projects, tasks, members, and collaboration; dashboards summarize workspace activity. The graph preserves the documented product branches and sampled authentication, workspace creation, project, and task behavior. Many route and page implementations were not sampled, so their detailed call paths are omitted rather than inferred.

Main entry points: [`lib/auth.ts`](https://github.com/xvolv/worklyn/blob/main/lib/auth.ts) (Auth service), [`lib/prisma.ts`](https://github.com/xvolv/worklyn/blob/main/lib/prisma.ts) (PostgreSQL data), [`app/api/workspace/route.ts`](https://github.com/xvolv/worklyn/blob/main/app/api/workspace/route.ts) (Create workspace), [`components/dashboard/ProjectsIndexClient.tsx`](https://github.com/xvolv/worklyn/blob/main/components/dashboard/ProjectsIndexClient.tsx) (Project directory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and identity"]
  node_home["Landing page<br/>[page.tsx]"]
  node_signin["Sign-in<br/>[SigninCard.tsx]"]
  node_signup["Sign-up<br/>[SignupCard.tsx]"]
  node_authclient["Browser auth<br/>[auth-client.ts]"]
  node_authserver["Auth service<br/>[auth.ts]"]
end

subgraph group_workspace["Workspace management"]
  node_workspacecreate["Create workspace<br/>[route.ts]"]
  node_workspacehome["Workspace selection<br/>[WorkspacesHome.tsx]"]
  node_workspacecontext["Workspace context"]
  node_workspaceapi["Workspace APIs"]
end

subgraph group_work["Project and task work"]
  node_projects["Project directory"]
  node_projectcreate["Project creation"]
  node_aiplanner["AI project planner"]
  node_tasks["Task management"]
  node_dashboard["Workspace dashboard"]
  node_projectapi["Project APIs"]
  node_taskapi["Task APIs"]
end

subgraph group_collaboration["Team collaboration"]
  node_members["Members and invites"]
  node_chat["Chat and comments<br/>[TaskComments.tsx]"]
end

subgraph group_platform["Application services"]
  node_database[("PostgreSQL data<br/>[prisma.ts]")]
  node_cloudinary["Cloudinary images<br/>[cloudinary.ts]"]
end

node_visitor(("User"))

node_visitor -->|"visits"| node_home
node_home -->|"renders"| node_signup
node_visitor -.->|"authenticates"| node_signin
node_visitor -.->|"creates workspace"| node_workspacecreate
node_workspacecreate -->|"checks session"| node_authserver
node_workspacecreate -->|"creates workspace"| node_database
node_workspacecreate -->|"uploads cover"| node_cloudinary
node_authserver -->|"uses adapter"| node_database
node_signin -->|"uses auth actions"| node_authclient
node_signup -->|"uses auth actions"| node_authclient
node_visitor -.->|"selects workspace"| node_workspacehome
node_visitor -.->|"manages team"| node_members
node_visitor -.->|"manages projects"| node_projects
node_visitor -.->|"tracks tasks"| node_tasks
node_visitor -.->|"collaborates"| node_chat
node_visitor -.->|"reviews activity"| node_dashboard
node_projects -->|"opens modal"| node_projectcreate
node_projects -->|"opens planner"| node_aiplanner
node_projects -->|"deletes project"| node_projectapi
node_tasks -->|"opens comments"| node_chat
node_workspaceapi -->|"checks sessions"| node_authserver
node_workspaceapi -->|"reads and writes"| node_database
node_workspaceapi -->|"uploads images"| node_cloudinary
node_projectapi -->|"checks sessions"| node_authserver
node_projectapi -->|"reads and writes"| node_database
node_taskapi -->|"checks sessions"| node_authserver
node_taskapi -->|"reads and writes"| node_database

click node_home "https://github.com/xvolv/worklyn/blob/main/app/page.tsx"
click node_signin "https://github.com/xvolv/worklyn/blob/main/components/auth/SigninCard.tsx"
click node_signup "https://github.com/xvolv/worklyn/blob/main/components/auth/SignupCard.tsx"
click node_authclient "https://github.com/xvolv/worklyn/blob/main/lib/auth/auth-client.ts"
click node_authserver "https://github.com/xvolv/worklyn/blob/main/lib/auth.ts"
click node_workspacecreate "https://github.com/xvolv/worklyn/blob/main/app/api/workspace/route.ts"
click node_workspacehome "https://github.com/xvolv/worklyn/blob/main/components/dashboard/WorkspacesHome.tsx"
click node_workspacecontext "https://github.com/xvolv/worklyn/blob/main/components/layout/WorkspaceContext.tsx"
click node_members "https://github.com/xvolv/worklyn/blob/main/components/members/MembersPageClient.tsx"
click node_chat "https://github.com/xvolv/worklyn/blob/main/components/chat/TaskComments.tsx"
click node_projects "https://github.com/xvolv/worklyn/blob/main/components/dashboard/ProjectsIndexClient.tsx"
click node_projectcreate "https://github.com/xvolv/worklyn/blob/main/components/dashboard/CreateProjectModal.tsx"
click node_aiplanner "https://github.com/xvolv/worklyn/blob/main/components/dashboard/AIProjectPlannerModal.tsx"
click node_tasks "https://github.com/xvolv/worklyn/blob/main/components/tasks/TasksPageClient.tsx"
click node_dashboard "https://github.com/xvolv/worklyn/blob/main/components/dashboard/DashboardClient.tsx"
click node_workspaceapi "https://github.com/xvolv/worklyn/tree/main/app/api/workspace"
click node_projectapi "https://github.com/xvolv/worklyn/tree/main/app/api/dashboard/projects"
click node_taskapi "https://github.com/xvolv/worklyn/tree/main/app/api/dashboard/tasks"
click node_database "https://github.com/xvolv/worklyn/blob/main/lib/prisma.ts"
click node_cloudinary "https://github.com/xvolv/worklyn/blob/main/lib/cloudinary.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_home,node_signin,node_signup,node_authclient,node_authserver,node_visitor toneBlue
class node_workspacecreate,node_workspacehome,node_workspacecontext,node_workspaceapi toneAmber
class node_projects,node_projectcreate,node_aiplanner,node_tasks,node_dashboard,node_projectapi,node_taskapi toneMint
class node_members,node_chat toneRose
class node_database,node_cloudinary toneIndigo
```

## Components

### Entry and identity

- [Landing page](https://github.com/xvolv/worklyn/blob/main/app/page.tsx): `app/page.tsx`
- [Sign-in](https://github.com/xvolv/worklyn/blob/main/components/auth/SigninCard.tsx): `components/auth/SigninCard.tsx`
- [Sign-up](https://github.com/xvolv/worklyn/blob/main/components/auth/SignupCard.tsx): `components/auth/SignupCard.tsx`
- [Browser auth](https://github.com/xvolv/worklyn/blob/main/lib/auth/auth-client.ts): `lib/auth/auth-client.ts`
- [Auth service](https://github.com/xvolv/worklyn/blob/main/lib/auth.ts): `lib/auth.ts`

### Workspace management

- [Create workspace](https://github.com/xvolv/worklyn/blob/main/app/api/workspace/route.ts): `app/api/workspace/route.ts`
- [Workspace selection](https://github.com/xvolv/worklyn/blob/main/components/dashboard/WorkspacesHome.tsx): `components/dashboard/WorkspacesHome.tsx`
- [Workspace context](https://github.com/xvolv/worklyn/blob/main/components/layout/WorkspaceContext.tsx): `components/layout/WorkspaceContext.tsx`
- [Workspace APIs](https://github.com/xvolv/worklyn/tree/main/app/api/workspace): `app/api/workspace`

### Project and task work

- [Project directory](https://github.com/xvolv/worklyn/blob/main/components/dashboard/ProjectsIndexClient.tsx): `components/dashboard/ProjectsIndexClient.tsx`
- [Project creation](https://github.com/xvolv/worklyn/blob/main/components/dashboard/CreateProjectModal.tsx): `components/dashboard/CreateProjectModal.tsx`
- [AI project planner](https://github.com/xvolv/worklyn/blob/main/components/dashboard/AIProjectPlannerModal.tsx): `components/dashboard/AIProjectPlannerModal.tsx`
- [Task management](https://github.com/xvolv/worklyn/blob/main/components/tasks/TasksPageClient.tsx): `components/tasks/TasksPageClient.tsx`
- [Workspace dashboard](https://github.com/xvolv/worklyn/blob/main/components/dashboard/DashboardClient.tsx): `components/dashboard/DashboardClient.tsx`
- [Project APIs](https://github.com/xvolv/worklyn/tree/main/app/api/dashboard/projects): `app/api/dashboard/projects`
- [Task APIs](https://github.com/xvolv/worklyn/tree/main/app/api/dashboard/tasks): `app/api/dashboard/tasks`

### Team collaboration

- [Members and invites](https://github.com/xvolv/worklyn/blob/main/components/members/MembersPageClient.tsx): `components/members/MembersPageClient.tsx`
- [Chat and comments](https://github.com/xvolv/worklyn/blob/main/components/chat/TaskComments.tsx): `components/chat/TaskComments.tsx`

### Application services

- [PostgreSQL data](https://github.com/xvolv/worklyn/blob/main/lib/prisma.ts): `lib/prisma.ts`
- [Cloudinary images](https://github.com/xvolv/worklyn/blob/main/lib/cloudinary.ts): `lib/cloudinary.ts`

### Other components

- **User**

## Connections

- User → Landing page: visits (evidence: `app/page.tsx`)
- Landing page → Sign-up: renders (evidence: `app/page.tsx`)
- User → Sign-in: authenticates (evidence: `README.md`)
- User → Create workspace: creates workspace (evidence: `README.md`)
- Create workspace → Auth service: checks session (evidence: `app/api/workspace/route.ts`)
- Create workspace → PostgreSQL data: creates workspace (evidence: `app/api/workspace/route.ts`)
- Create workspace → Cloudinary images: uploads cover (evidence: `app/api/workspace/route.ts`)
- Auth service → PostgreSQL data: uses adapter (evidence: `lib/auth.ts`)
- Sign-in → Browser auth: uses auth actions (evidence: `components/auth/SigninCard.tsx`)
- Sign-up → Browser auth: uses auth actions (evidence: `components/auth/SignupCard.tsx`)
- User → Workspace selection: selects workspace (evidence: `README.md`)
- User → Members and invites: manages team (evidence: `README.md`)
- User → Project directory: manages projects (evidence: `README.md`)
- User → Task management: tracks tasks (evidence: `README.md`)
- User → Chat and comments: collaborates (evidence: `README.md`)
- User → Workspace dashboard: reviews activity (evidence: `README.md`)
- Project directory → Project creation: opens modal (evidence: `components/dashboard/ProjectsIndexClient.tsx`)
- Project directory → AI project planner: opens planner (evidence: `components/dashboard/ProjectsIndexClient.tsx`)
- Project directory → Project APIs: deletes project (evidence: `components/dashboard/ProjectsIndexClient.tsx`)
- Task management → Chat and comments: opens comments (evidence: `components/tasks/TasksPageClient.tsx`)
- Workspace APIs → Auth service: checks sessions (evidence: `app/api/workspace/route.ts`)
- Workspace APIs → PostgreSQL data: reads and writes (evidence: `app/api/workspace/route.ts`)
- Workspace APIs → Cloudinary images: uploads images (evidence: `app/api/workspace/route.ts`)
- Project APIs → Auth service: checks sessions (evidence: `app/api/dashboard/projects/route.ts`)
- Project APIs → PostgreSQL data: reads and writes (evidence: `app/api/dashboard/projects/route.ts`)
- Task APIs → Auth service: checks sessions (evidence: `app/api/dashboard/tasks/route.ts`)
- Task APIs → PostgreSQL data: reads and writes (evidence: `app/api/dashboard/tasks/route.ts`)
