Skip to content

deepakdevp/mission-control

Repository files navigation

Mission Control - AI Agent Dashboard

A comprehensive dashboard for managing and monitoring AI agent activities, tasks, and resources.

Features

βœ… Completed

Core Infrastructure

  • βœ… File-based data storage (JSON files in clawd/ directory)
  • βœ… Full CRUD API routes for all resources
  • βœ… Real-time file watching with bidirectional sync
  • βœ… Server-Sent Events (SSE) for live updates
  • βœ… TypeScript throughout with Zod validation
  • βœ… Responsive design with Tailwind CSS v4
  • βœ… Error boundaries for graceful error handling

Pages

Tasks (/tasks)

  • βœ… Drag-and-drop kanban board (@dnd-kit)
  • βœ… 4 columns: To Do, In Progress, Done, Blocked
  • βœ… Create, edit, and delete tasks
  • βœ… Filter by project, priority, tags
  • βœ… Search functionality
  • βœ… Real-time updates via SSE
  • βœ… React Hook Form integration

Approvals (/approvals)

  • βœ… List all approval requests
  • βœ… Filter by status (pending, approved, denied)
  • βœ… Approve/deny modal with notes
  • βœ… Context and metadata display
  • βœ… Real-time notifications
  • βœ… Status badges and icons

Calendar (/calendar)

  • βœ… Week/month calendar view (react-big-calendar)
  • βœ… Create, edit, delete events
  • βœ… Today's agenda sidebar
  • βœ… Upcoming events list
  • βœ… Click to select time slots
  • βœ… All-day event support

Projects (/projects)

  • βœ… Project list with progress bars
  • βœ… Create/edit project modal
  • βœ… Show nested tasks
  • βœ… Status badges (planning, active, paused, completed)
  • βœ… Task completion tracking
  • βœ… Date range support

Memory (/memory)

  • βœ… List memory entries from database
  • βœ… Fuzzy search with Fuse.js
  • βœ… Timeline view (sorted by date)
  • βœ… Markdown preview with react-markdown
  • βœ… Edit modal with markdown editor
  • βœ… Category filtering (personal, work, learning, idea, note)
  • βœ… Tag management

Documents (/docs)

  • βœ… Tree navigation showing folder structure
  • βœ… Create/edit/delete documents
  • βœ… Markdown editor with live preview
  • βœ… Search functionality
  • βœ… Path-based organization
  • βœ… Tag system

People (/people)

  • βœ… Contact list with cards
  • βœ… Create/edit contact modal
  • βœ… Tags with colors
  • βœ… Social links (LinkedIn, Twitter, GitHub)
  • βœ… Notes section
  • βœ… Email and phone support
  • βœ… Search by name, email, tags

Cron Jobs (/cron)

  • βœ… List cron jobs in table
  • βœ… Create/edit job modal
  • βœ… Enable/disable toggle
  • βœ… Manual trigger button
  • βœ… Show last run, next run, status
  • βœ… Logs viewer
  • βœ… Cron expression support

Global Features

  • βœ… Command Palette (Cmd+K / Ctrl+K)
    • Fuzzy search across all resources
    • Quick navigation shortcuts
    • Quick action triggers
  • βœ… Toast notifications (sonner)
  • βœ… Loading states everywhere
  • βœ… Empty states with helpful messages
  • βœ… Consistent styling across all pages
  • βœ… Keyboard shortcuts (Cmd+K for command palette)

Tech Stack

  • Framework: Next.js 16.1.6 (App Router with Turbopack)
  • Language: TypeScript 5
  • Styling: Tailwind CSS v4
  • Validation: Zod
  • Drag & Drop: @dnd-kit
  • Forms: React Hook Form
  • Calendar: react-big-calendar with date-fns
  • Markdown: react-markdown with remark-gfm
  • Search: Fuse.js
  • Notifications: sonner
  • File Watching: chokidar
  • Command Palette: cmdk

Directory Structure

mission-control/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (dashboard)/          # Dashboard routes
β”‚   β”‚   β”œβ”€β”€ tasks/
β”‚   β”‚   β”œβ”€β”€ approvals/
β”‚   β”‚   β”œβ”€β”€ calendar/
β”‚   β”‚   β”œβ”€β”€ projects/
β”‚   β”‚   β”œβ”€β”€ memory/
β”‚   β”‚   β”œβ”€β”€ docs/
β”‚   β”‚   β”œβ”€β”€ people/
β”‚   β”‚   └── cron/
β”‚   β”œβ”€β”€ api/                   # API routes
β”‚   β”‚   β”œβ”€β”€ tasks/
β”‚   β”‚   β”œβ”€β”€ approvals/
β”‚   β”‚   β”œβ”€β”€ calendar/
β”‚   β”‚   β”œβ”€β”€ projects/
β”‚   β”‚   β”œβ”€β”€ memory/
β”‚   β”‚   β”œβ”€β”€ documents/
β”‚   β”‚   β”œβ”€β”€ people/
β”‚   β”‚   β”œβ”€β”€ cron/
β”‚   β”‚   └── events/            # SSE endpoint
β”‚   └── globals.css
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ dashboard/             # Dashboard-specific components
β”‚   β”œβ”€β”€ layout/                # Layout components
β”‚   └── ui/                    # Reusable UI components
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ use-sse.ts            # SSE hook
β”‚   β”œβ”€β”€ use-tasks.ts          # Tasks data hook
β”‚   └── use-auto-refresh.ts   # Auto-refresh hook
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ fs/                    # File system utilities
β”‚   β”‚   β”œβ”€β”€ reader.ts
β”‚   β”‚   β”œβ”€β”€ writer.ts
β”‚   β”‚   └── watcher.ts
β”‚   β”œβ”€β”€ models/                # Zod schemas
β”‚   β”‚   β”œβ”€β”€ task.ts
β”‚   β”‚   β”œβ”€β”€ approval.ts
β”‚   β”‚   β”œβ”€β”€ event.ts
β”‚   β”‚   β”œβ”€β”€ project.ts
β”‚   β”‚   β”œβ”€β”€ memory.ts
β”‚   β”‚   β”œβ”€β”€ document.ts
β”‚   β”‚   β”œβ”€β”€ person.ts
β”‚   β”‚   └── cron.ts
β”‚   β”œβ”€β”€ sync/                  # File sync service
β”‚   β”‚   └── file-sync.ts
β”‚   └── utils.ts
└── clawd/                     # Data storage
    β”œβ”€β”€ tasks/
    β”œβ”€β”€ approvals/
    β”œβ”€β”€ calendar/
    β”œβ”€β”€ projects/
    β”œβ”€β”€ memory/
    β”œβ”€β”€ docs/
    β”œβ”€β”€ people/
    └── cron/

Getting Started

Prerequisites

  • Node.js 20+ (v25.6.1 recommended)
  • npm or yarn

Installation

# Install dependencies
npm install

# Run development server
npm run dev

# Build for production
npm run build

# Start production server
npm start

Development

Open http://localhost:3000 to view the dashboard.

The app will automatically redirect from / to /tasks.

File Storage

All data is stored as JSON files in the clawd/ directory:

  • clawd/tasks/*.json - Task files
  • clawd/approvals/*.json - Approval requests
  • clawd/calendar/*.json - Calendar events
  • clawd/projects/*.json - Project data
  • clawd/memory/*.json - Memory entries
  • clawd/docs/*.json - Documents
  • clawd/people/*.json - Contact information
  • clawd/cron/*.json - Cron job definitions

Files are watched in real-time and changes trigger SSE updates to connected clients.

Key Features Explained

Real-time Updates

The application uses Server-Sent Events (SSE) to push updates to clients when files change:

  1. File watcher monitors the clawd/ directory
  2. Changes are emitted through EventEmitter
  3. SSE endpoint (/api/events) streams events to clients
  4. Client hooks (useSSE, useAutoRefresh) listen and update UI

Command Palette

Press Cmd+K (Mac) or Ctrl+K (Windows/Linux) to open the command palette:

  • Navigate to any page
  • Trigger quick actions
  • Fuzzy search across resources

Drag & Drop Tasks

Tasks can be dragged between columns to change status:

  • Drag from "To Do" to "In Progress"
  • Drop in "Done" when complete
  • Move to "Blocked" if stuck

Markdown Support

Memory entries and documents support full Markdown:

  • Headers, lists, tables
  • Code blocks with syntax highlighting
  • Blockquotes
  • Links and images
  • GitHub Flavored Markdown (GFM)

API Routes

All routes support standard REST operations:

Tasks

  • GET /api/tasks - List all tasks
  • POST /api/tasks - Create task
  • PUT /api/tasks/[id] - Update task
  • DELETE /api/tasks/[id] - Delete task

Approvals

  • GET /api/approvals - List all approvals
  • POST /api/approvals - Create approval
  • PUT /api/approvals/[id] - Update approval
  • DELETE /api/approvals/[id] - Delete approval

Calendar

  • GET /api/calendar - List all events
  • POST /api/calendar - Create event
  • PUT /api/calendar/[id] - Update event
  • DELETE /api/calendar/[id] - Delete event

Projects

  • GET /api/projects - List all projects
  • POST /api/projects - Create project
  • PUT /api/projects/[id] - Update project
  • DELETE /api/projects/[id] - Delete project

Memory

  • GET /api/memory - List all memories
  • POST /api/memory - Create memory
  • PUT /api/memory/[id] - Update memory
  • DELETE /api/memory/[id] - Delete memory

Documents

  • GET /api/documents - List all documents
  • POST /api/documents - Create document
  • PUT /api/documents/[id] - Update document
  • DELETE /api/documents/[id] - Delete document

People

  • GET /api/people - List all contacts
  • POST /api/people - Create contact
  • PUT /api/people/[id] - Update contact
  • DELETE /api/people/[id] - Delete contact

Cron

  • GET /api/cron - List all cron jobs
  • POST /api/cron - Create cron job
  • PUT /api/cron/[id] - Update cron job
  • DELETE /api/cron/[id] - Delete cron job

Events (SSE)

  • GET /api/events - Subscribe to real-time updates

Customization

Theme

The app supports light and dark modes automatically based on system preferences. Colors can be customized in app/globals.css using the @theme directive.

Models

Data schemas are defined using Zod in lib/models/. To add a new field:

  1. Update the schema in the model file
  2. TypeScript types are automatically inferred
  3. API validation will enforce the new schema

Pages

To add a new page:

  1. Create a new route in app/(dashboard)/[page-name]/page.tsx
  2. Add API routes in app/api/[resource]/
  3. Create models in lib/models/
  4. Add to sidebar in components/layout/sidebar.tsx
  5. Add to command palette in components/command-palette.tsx

Production Deployment

Build

npm run build

Environment Variables

No environment variables required for basic functionality. The app uses local file storage by default.

Vercel Deployment

npm i -g vercel
vercel

Docker (Optional)

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
RUN npm run build
CMD ["npm", "start"]

Performance

  • Build time: ~2 seconds (with Turbopack)
  • Cold start: <100ms
  • Hot reload: <50ms
  • SSE latency: <10ms
  • File watch debounce: 300ms

Browser Support

  • Chrome/Edge: Latest 2 versions
  • Firefox: Latest 2 versions
  • Safari: Latest 2 versions

License

MIT

Contributing

This is a personal AI agent dashboard. Feel free to fork and customize for your own use.

Support

For issues or questions, check the code comments or review the implementation in each component.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors