How maaz-afzal/clarix works
This is a multi-workspace project and task-management application. Users sign in, enter or create a workspace, then manage projects and tasks through dashboard, board, list, analytics, search, and collaboration features. Server-rendered pages and API routes invoke authorization, domain actions, and data-access modules; MongoDB-backed models hold the application state. AI-assisted descriptions and project summaries, file attachments, notifications, and membership administration are distinct capabilities. The map follows the shown route-to-service calls and indexed imports; several feature paths are present in the tree but their internal wiring was not sampled.
Main entry points: auth.ts Authentication · ai AI endpoints · workspace.ts Workspace data access · db.ts MongoDB connection
Components 33
Web experience
- Workspace views
src/app/(main)/[workspaceSlug] - Dashboard page
src/app/(main)/[workspaceSlug]/dashboard/page.tsx - Dashboard widgets
src/components/dashboard - Project and task views
src/app/(main)/[workspaceSlug]/projects - Search interface
src/components/search - Sign-in pages
src/app/(auth) - Workspace setup
src/components/onboarding/workspace-form.tsx - Notifications view
src/app/(main)/[workspaceSlug]/notifications/page.tsx
Workspace and task operations
- Workspace actions
src/actions/workspace.ts - Task actions
src/actions/task.ts - Project actions
src/actions/project.ts - Member actions
src/actions/members.ts - AI endpoints
src/app/api/ai - Search endpoint
src/app/api/search/route.ts - Attachment endpoint
src/app/api/upload/route.ts
Application services
- Authentication
src/lib/auth.ts - Access control
src/lib/authorization.ts - Workspace data access
src/lib/dal/workspace.ts - Dashboard data access
src/lib/dal/dashboard.ts - Search data access
src/lib/dal/search.ts - AI prompts
src/lib/ai-prompts.ts - AI client
src/lib/ai.ts - File storage client
src/lib/cloudinary.ts
Persistence
- MongoDB connection
src/lib/db.ts - Workspace models
src/models/Workspace.ts - Task model
src/models/Task.ts - Project model
src/models/Project.ts - User model
src/models/User.ts - Activity model
src/models/Activity.ts - Attachment model
src/models/Attachment.ts
External integrations
- Gemini AI
- Cloudinary
Other components
- User
Connections 36
- User → Sign-in pages: signs in
- User → Workspace views: uses
- Workspace views → Dashboard page: opens
- Dashboard page → Dashboard data access: loads data
src/app/(main)/[workspaceSlug]/dashboard/page.tsx - Dashboard page → Dashboard widgets: renders
src/app/(main)/[workspaceSlug]/dashboard/page.tsx - Dashboard page → Access control: checks access
src/app/(main)/[workspaceSlug]/dashboard/page.tsx - Workspace setup → Workspace actions: submits
src/components/onboarding/workspace-form.tsx - Workspace actions → MongoDB connection: persists
- Project and task views → Task actions: manages tasks
- Project and task views → Project actions: manages projects
- Member actions → Workspace models: manages membership
- Search interface → Search endpoint: queries
- Search endpoint → Authentication: authenticates
src/app/api/search/route.ts - Search endpoint → Workspace data access: checks membership
src/app/api/search/route.ts - Search endpoint → Search data access: searches
src/app/api/search/route.ts - Search data access → MongoDB connection: connects
src/lib/dal/search.ts - Search data access → Task model: queries
src/lib/dal/search.ts - Search data access → Project model: queries
src/lib/dal/search.ts - AI endpoints → Authentication: authenticates
src/app/api/ai/description/route.ts - AI endpoints → Workspace data access: checks membership
src/app/api/ai/description/route.ts - AI endpoints → AI prompts: builds prompts
src/app/api/ai/description/route.ts - AI endpoints → AI client: streams generation
src/app/api/ai/description/route.ts - AI endpoints → Gemini AI: uses model
src/app/api/ai/description/route.ts - Attachment endpoint → Authentication: authenticates
src/app/api/upload/route.ts - Attachment endpoint → File storage client: uploads file
src/app/api/upload/route.ts - File storage client → Cloudinary: stores file
- Attachment endpoint → Attachment model: creates record
src/app/api/upload/route.ts - Attachment endpoint → Task model: checks task
src/app/api/upload/route.ts - Authentication → MongoDB connection: connects
src/lib/auth.ts - Authentication → User model: loads user
src/lib/auth.ts - Access control → Authentication: gets session
src/lib/authorization.ts - Access control → Workspace data access: checks membership
src/lib/authorization.ts - Access control → Task model: checks task
src/lib/authorization.ts - Workspace data access → MongoDB connection: connects
src/lib/dal/workspace.ts - Workspace data access → Workspace models: queries
src/lib/dal/workspace.ts - Dashboard data access → MongoDB connection: connects
src/lib/dal/dashboard.ts