Stop chatting, start doing.
Dispatch is an AI-native task coordination system for B2B teams. Instead of chat-based communication, team members tell the system what they need, and a central AI intelligently routes tasks to the best-qualified available person - or completes the task autonomously if possible.
- Messages are unclear between coworkers
- People get assigned tasks when they're already at capacity
- Passive-aggressive communication and workplace friction
- Time wasted on tasks that AI could handle
- Tell the AI what you need - Natural language task requests
- AI decides the best approach:
- AI Direct: Completes task immediately (writing, analysis, etc.)
- Human Assignment: Routes to best-matched team member based on skills & capacity
- Anonymous task assignment - No bias, just work
- Automatic reassignment - Tasks get reassigned before deadlines if not on track
- Smart notifications - Real-time updates on task progress
- Frontend: Next.js 15 + React + TypeScript + Tailwind CSS
- Backend: Next.js API Routes
- Database: Neon (Serverless Postgres) + Drizzle ORM
- AI: Anthropic Claude API (Sonnet 4.5)
bun installCreate .env.local:
cp .env.example .env.localEdit .env.local:
DATABASE_URL=your_neon_connection_string
ANTHROPIC_API_KEY=your_claude_api_key
NEXT_PUBLIC_APP_URL=http://localhost:3000Get your credentials:
- Neon: https://neon.tech (free tier, create new project)
- Claude API: https://console.anthropic.com (get API key)
bun run db:setupThis creates tables and seeds demo users:
- Sarah Chen (Engineer) - Default user
- Jordan Rivers (Data Analyst)
- Alex Park (PM)
bun run devdispatch/
├── app/
│ ├── api/ # API routes
│ │ ├── chat/ # AI coordinator endpoint
│ │ ├── tasks/ # Task CRUD
│ │ └── users/ # User management
│ ├── page.tsx # Home page (TODO: UI)
│ └── layout.tsx # Root layout
├── lib/
│ ├── db/
│ │ ├── schema.ts # Database schema
│ │ ├── client.ts # Neon connection
│ │ └── seed.ts # Demo data seeder
│ └── services/
│ ├── ai-coordinator.ts # Claude API integration
│ └── task-assignment.ts # Assignment algorithm
├── public/
│ └── logo.png # Dispatch logo
└── drizzle.config.ts # Drizzle ORM config
POST /api/chat- Send message to AI coordinator- Body:
{ message: string, userId: string } - Returns: Task assignment or AI direct result
- Body:
GET /api/tasks?userId={id}&view={my-tasks|sent|done}- Get tasksPOST /api/tasks/{id}/complete- Mark task complete- Body:
{ userId: string }
- Body:
GET /api/users- List all users
- id (text) - 'sarah', 'jordan', 'alex'
- name, email, role
- skills (array) - e.g., ['code', 'typescript', 'react']
- currentCapacity / maxCapacity - Task load management
- id (uuid)
- title, description, deadline, priority
- requiredSkills (array)
- status - 'pending' | 'assigned' | 'in_progress' | 'completed'
- requesterId / assigneeId - Anonymous until completion
- aiCompleted - Boolean for AI direct execution
- aiResult - Result text for AI-completed tasks
- progressPercentage - 0-100
- Task-scoped chat threads
- Links to tasks for conversation history
User types: "I need a summary of last week's metrics by Friday"
↓
AI Coordinator analyzes request
↓
Determines execution tier:
- ai_direct: AI completes immediately
- human: Assigns to best match
↓
Task Assignment Algorithm:
1. Find users with required skills
2. Filter by available capacity
3. Sort by: capacity DESC, skill match DESC
4. Assign to top match
↓
Task created & user notified
Uses Claude to:
- Parse natural language into structured task data
- Determine if task can be completed autonomously
- Extract title, description, deadline, priority, required skills
- Execute ai_direct tasks immediately
function findBestAssignee(task):
1. Get all users
2. Filter: currentCapacity < maxCapacity
3. Calculate skill match percentage
4. Filter: has ≥1 required skill
5. Sort by: available capacity DESC, skill match DESC
6. Return top match# Development
bun run dev # Start dev server
# Database
bun run db:push # Push schema to database
bun run db:seed # Seed demo data
bun run db:setup # Push + seed (fresh start)
bun run db:generate # Generate migration
# Build
bun run build # Production build
bun run start # Start production serverSarah Chen (Engineer)
- Skills: code, typescript, react, api-design, testing
- ID:
sarah
Jordan Rivers (Data Analyst)
- Skills: data, analysis, sql, spreadsheets, visualization, python
- ID:
jordan
Alex Park (PM)
- Skills: planning, writing, analysis, spreadsheets, user-research, roadmapping
- ID:
alex
- Build main UI (split view: task list + chat)
- Implement task cards with status indicators
- Add real-time updates with WebSocket
- Create task detail view with chat thread
- Add user switcher for demo
- Implement deadline conversation dialog
- Add progress tracking UI
Test the API directly:
# Get users
curl http://localhost:3000/api/users
# Create task via chat
curl -X POST http://localhost:3000/api/chat \
-H "Content-Type: application/json" \
-d '{
"message": "I need help analyzing Q4 metrics by Friday",
"userId": "sarah"
}'
# Get my tasks
curl "http://localhost:3000/api/tasks?userId=jordan&view=my-tasks"
# Complete task
curl -X POST http://localhost:3000/api/tasks/{task-id}/complete \
-H "Content-Type: application/json" \
-d '{"userId": "jordan"}'MIT