Exodia Project Workflow
A comprehensive development workflow for building Exodia, a modern AI-powered tool for designing and automating call-for-projects responses with RAG (Retrieval-Augmented Generation) capabilities.
Project Overview
Exodia transforms call-for-projects management into a seamless, fast, and collaborative process with:
Centralized information and document managementAutomated document generation and trackingAI-powered document vectorization and search (RAG)Role-based collaboration and securityModern design inspired by Google Notebook and ChatGPT Canvas**Tech Stack**: Next.js, Supabase (PostgreSQL + Auth), TypeScript, pnpm, Tailwind CSS, shadcn/ui
Development Workflow
Phase 1: Planning (REQUIRED Before Coding)
1. **Enter Plan Mode** - Always start in plan mode to create a detailed implementation plan
2. **Write the Plan** - Save to `.claude/tasks/TASK_NAME.md` using checkboxes and headings
3. **Include in Plan**:
- Detailed implementation steps
- Reasoning behind architectural decisions
- Tasks broken down into small units
- Research on required packages/external knowledge (use Task tool)
- Think MVP - don't over-plan
4. **Request Review** - Ask for approval before implementing. Do NOT continue until approved
5. **Update Plan During Work** - Append detailed descriptions of changes for handover to other engineers
Phase 2: Test-Driven Development (TDD)
**Three Laws of TDD** (STRICTLY ENFORCED):
1. You shall not write code until you have written a failing test
2. You shall only write one new failing unit test at a time
3. You shall not write more code than is necessary to make the failing test pass
**TDD Cycle**:
1. Write a test that fails (code doesn't exist yet)
2. Write just enough code to make the test pass
3. Optimize the code without altering behavior
4. Repeat
**Testing Commands**:
```bash
pnpm test:coverage # Run tests with coverage report
pnpm test:ui # Run tests with UI
```
Phase 3: Implementation
**Before Committing**:
```bash
pnpm lint # Check linting
pnpm typecheck # Run TypeScript checks
```
**Documentation Requirements**:
Add documentation to `.claude/docs/` (max 250 lines per file)Update `CLAUDE.md` in EnglishKeep documentation in sync with code changesUse checkboxes to track implementation status in interface.mdCore Features by Epic
1. Project Management
**Organizations CRUD** - Create, read, update, delete organizations**Member Management** - Invite, manage roles and permissions (see `.claude/docs/invitation-system.md`)**Projects CRUD** - Create, organize, and manage call-for-projects**Project Onboarding** - Guided setup for new projects (see `.claude/docs/user-management.md`)2. Document Automation & RAG
**Document Upload** - Drag-and-drop interface for PDF, DOCX, TXT (see `.claude/docs/document-processing.md`)**Document Vectorization** - Automatic processing and embedding conversion (see `.claude/docs/document-processing.md`)**Semantic Search** - Keyword and semantic search across document base (see `.claude/docs/rag-system.md`)**Document Lifecycle** - Secure deletion and management (see `.claude/docs/document-processing.md`)**Automated Generation** - AI-powered custom response creation (see `.claude/docs/project-generation.md`)3. Collaboration & Access Control
**Role-Based Access** - Granular permissions (admin, member) (see `.claude/docs/user-management.md`)**Project Data Isolation** - Complete isolation between projects (see `.claude/docs/database.md`)**Shared Document Management** - Fine-grained sharing and permissions (see `.claude/docs/collaboration.md`)**Audit Logs** - Complete traceability of user actions (see `.claude/docs/user-management.md`)4. Notifications & Tracking
**Task Assignment Alerts** - Real-time notifications (see `.claude/docs/collaboration.md`)**Project Status Updates** - Progress and state change tracking**Deadline Reminders** - Automatic alerts for deadlines**Activity Feed** - Chronological timeline of all project activities5. Security & Compliance
**Authentication** - Magic Link email via Supabase Auth (see `.claude/docs/auth.md`)**Access Control Enforcement** - RLS-based permissions (see `.claude/docs/database.md`)**Data Encryption** - Protection in transit and at rest (see `.claude/docs/database.md`)Architecture & Key Files
**Environment Management**:
Uses `@t3-oss/env-nextjs` for type-safe env vars with Zod validationSee `.claude/docs/environment.md` for configuration**UI Design System**:
shadcn/ui components in `src/components/ui/` (13 components)Tailwind config in `tailwind.config.js`Theme definitions in `src/app/globals.css`Track implementation status in `.claude/docs/interface.md` (⚠️ HIGH UPDATE FREQUENCY)**Database**:
Hosted on Supabase (PostgreSQL)Schema defined in `.claude/docs/database.md`Use Supabase MCP (`.mcp.json`) to check status and logsKeep `.claude/docs/database.md` synced with schema changes**Deployment**:
Automatic deployment to Vercel on main branchUse Vercel CLI to check status and logsContributing Workflow
1. Create feature branch from `main`
2. Write failing tests first (TDD)
3. Implement minimum code to pass tests
4. Run `pnpm lint` and `pnpm typecheck` before commits
5. Add/update documentation (max 250 lines per file in `.claude/docs/`)
6. Update `CLAUDE.md` in English if workflow changes
Important Constraints
**NO CODE WITHOUT FAILING TEST** - TDD is mandatory**PLAN MODE FIRST** - Never start coding without an approved plan**MVP MINDSET** - Don't over-engineer or over-plan**DOCUMENTATION SYNC** - Keep `.claude/docs/` in sync with code, especially `interface.md` during UI work**WEEKLY UI REVIEWS** - Required during active UI development to track design tokens and component statusKey Documentation Files
All documentation lives in `.claude/docs/`:
`architecture.md` - System architecture and tech stack`user-management.md` - User, org, and member management`rag-system.md` - Document vectorization and semantic search`document-processing.md` - Upload, processing, deletion`collaboration.md` - Notifications, activity, sharing`auth.md` - Authentication and security`database.md` - Schema, RLS, encryption`invitation-system.md` - Member invitation flow`project-generation.md` - AI-powered document generation`environment.md` - Environment variable setup`interface.md` - UI design system and component status