How rounakraaj/nexspace works
NexSpace is a collaborative workspace app. Its main authenticated workflow is account access, workspace selection, then creating or opening a page or canvas; users edit, collaborate, and manage workspace content. The graph also captures invitations, comments, search, attachments, snapshots, and AI as distinct product capabilities. Evidence is limited to the supplied excerpts, SOURCE INDEX references, and README; unsampled routes and services are represented at their exact tree paths, without guessing their internal call paths.
Main entry points: document-editor.tsx Page editor · workspace-dashboard.tsx Workspace dashboard · documents Document APIs · prisma.ts PostgreSQL database
Components 21
Identity and access
- Sign-in and registration UI
app/login/auth-forms.tsx - Account registration
app/api/register/route.ts - Authentication
lib/auth.ts - Access control
lib/permissions.ts
Workspace management
- Workspace dashboard
app/dashboard/workspace-dashboard.tsx - Workspace APIs
app/api/workspaces - Members and invitations
app/api/workspaces - Search
app/api/search/route.ts
Documents and editing
- Document APIs
app/api/documents - Page editor
components/editor/document-editor.tsx - Canvas editor
components/editor/canvas-editor.tsx - AI copilot
app/api/documents/[documentId]/ai/route.ts - Comments and replies
app/api/documents/[documentId]/comments/route.ts - Attachments
app/api/documents/[documentId]/attachments/route.ts - Snapshots and restore
app/api/documents/[documentId]/snapshots
Live collaboration
- Page collaboration service
collaboration/server.ts - Canvas collaboration service
collaboration/canvas-server.ts
Data and integrations
- PostgreSQL database
lib/prisma.ts - Private object storage
lib/supabase-storage.ts - Redis services
lib/rate-limit.ts
Other components
- User
Connections 28
- User → Sign-in and registration UI: signs in
- User → Account registration: registers
- Sign-in and registration UI → Authentication: authenticates
- Account registration → PostgreSQL database: creates account and workspace
app/api/register/route.ts - Workspace dashboard → Workspace APIs: uses workspace APIs
- Workspace dashboard → Document APIs: uses document APIs
- User → Workspace dashboard: opens dashboard
- Workspace APIs → PostgreSQL database: reads and writes
app/api/workspaces/route.ts - Members and invitations → PostgreSQL database: manages memberships
app/api/workspaces/[workspaceId]/members/route.ts - Members and invitations → Redis services: limits requests
app/api/workspaces/[workspaceId]/members/route.ts - Workspace dashboard → Members and invitations: manages people
- Document APIs → PostgreSQL database: reads and writes documents
app/api/documents/route.ts - Document APIs → Access control: checks access
app/api/documents/[documentId]/route.ts - Workspace dashboard → Page editor: opens pages
- Workspace dashboard → Canvas editor: opens canvas
- Page editor → Document APIs: loads and saves
- Page editor → AI copilot: requests assistance
- Page editor → Comments and replies: uses comments
- Page editor → Attachments: uses attachments
- Page editor → Snapshots and restore: uses snapshots
- Workspace dashboard → Search: searches workspace
- Document APIs → Page collaboration service: sends page commands
app/api/documents/[documentId]/route.ts - Document APIs → Canvas collaboration service: sends canvas commands
app/api/documents/[documentId]/route.ts - Page editor → Page collaboration service: collaborates over WebSocket
- Canvas editor → Canvas collaboration service: syncs over WebSocket
- Page collaboration service → PostgreSQL database: persists collaboration state
collaboration/server.ts - Attachments → Private object storage: stores private files
app/api/documents/[documentId]/attachments/route.ts - Account registration → Redis services: limits attempts
app/api/register/route.ts