Skip to content

Instantly share code, notes, and snippets.

@jmcdice
Last active December 31, 2025 18:39
Show Gist options
  • Select an option

  • Save jmcdice/a0dbfb6009362b1b4e938241df7e2274 to your computer and use it in GitHub Desktop.

Select an option

Save jmcdice/a0dbfb6009362b1b4e938241df7e2274 to your computer and use it in GitHub Desktop.
Mai-Tai Site Map v2 - Workspace Edition (simplified architecture)

Mai-Tai Site Map (v2 - Workspace Edition)

A simplified, workspace-centric architecture. No more channels - one workspace = one chat.

Page Structure

mai-tai.dev/
│
├── /                           # Landing page (public)
│   └── Hero, features, CTA → Login/Register
│
├── /login                      # Login page (public)
│   └── Email/password form
│
├── /register                   # Registration + Onboarding (public)
│   └── Create account → Onboarding flow → MCP setup
│
└── [Authenticated Routes]      # Requires login
    │
    ├── /dashboard              # Main dashboard
    │   ├── Quick stats (workspaces, messages, agents)
    │   ├── Recent activity feed
    │   ├── Workspace cards (clickable → chat)
    │   └── Quick actions (new workspace)
    │
    ├── /workspaces/[id]        # Workspace chat (main view)
    │   ├── Header: Workspace name + user avatars + settings button
    │   ├── Message list with real-time updates
    │   ├── Message input with send button
    │   ├── Agent status indicator
    │   │
    │   └── [Settings Modal]        # Gear icon in header
    │       ├── General tab
    │       │   └── Rename Workspace (text input)
    │       ├── API Keys tab
    │       │   ├── Create API Key button
    │       │   └── List of keys (with delete)
    │       ├── Notifications tab
    │       │   └── Sound notifications toggle
    │       ├── Agent Personality tab
    │       │   └── Dude Mode toggle
    │       └── Workspace Status tab
    │           └── Archive Workspace toggle
    │
    ├── /settings               # User settings
    │   ├── Profile tab (name, email, avatar)
    │   ├── Password tab (change password)
    │   ├── Preferences tab (timezone, etc.)
    │   └── Shortcuts tab (keyboard shortcuts)
    │
    ├── /admin                  # Admin panel (admin only)
    │   ├── User management
    │   ├── System stats
    │   └── Feature flags
    │
    └── /help                   # Help & Docs
        └── Documentation, guides

Navigation

Desktop Sidebar

Dashboard
Workspaces
  ├── My Workspace      → /workspaces/[id]
  └── Another Workspace → /workspaces/[id]
Settings
Help & Docs
Admin (if admin)

Mobile Navigation

  • Hamburger menu: Same items as desktop sidebar
  • "Workspaces" button (bottom bar): Popup with workspace list
  • Bottom-safe area: For message input on chat view

Onboarding Flow (Unchanged)

The existing onboarding flow remains perfect:

/register
  ↓
Step 1: Create Account (email/password)
  ↓
Step 2: "My Workspace" auto-created
  ↓
Step 3: MCP Configuration
  - Select AI tool (Claude Code, Augment, Gemini, etc.)
  - Copy API key
  - Copy setup commands
  ↓
Step 4: Start mai-tai mode instruction
  ↓
Redirect to /workspaces/[id]

User Flows

New User

/ → /register → Onboarding → /workspaces/[id] (chat)

Returning User

/login → /dashboard → Click workspace → /workspaces/[id] (chat)

Create New Workspace

/dashboard → "New Workspace" button → /workspaces/[new-id]

Database Schema

-- Users
users (
  id UUID PRIMARY KEY,
  email VARCHAR UNIQUE NOT NULL,
  name VARCHAR,
  avatar_url VARCHAR,
  password_hash VARCHAR NOT NULL,
  is_admin BOOLEAN DEFAULT FALSE,
  timezone VARCHAR DEFAULT 'UTC',
  shortcuts JSONB DEFAULT '{}',
  created_at TIMESTAMP DEFAULT NOW()
)

-- Workspaces (was: projects + channels combined)
workspaces (
  id UUID PRIMARY KEY,
  name VARCHAR NOT NULL DEFAULT 'My Workspace',
  owner_id UUID REFERENCES users(id),
  created_at TIMESTAMP DEFAULT NOW()
)

-- Messages (directly on workspace, no channel layer)
messages (
  id UUID PRIMARY KEY,
  workspace_id UUID REFERENCES workspaces(id),
  user_id UUID REFERENCES users(id),  -- NULL for agent messages
  agent_name VARCHAR,                  -- For AI messages
  content TEXT NOT NULL,
  created_at TIMESTAMP DEFAULT NOW()
)

-- API Keys (for MCP server auth)
api_keys (
  id UUID PRIMARY KEY,
  workspace_id UUID REFERENCES workspaces(id),
  key_hash VARCHAR NOT NULL,
  created_at TIMESTAMP DEFAULT NOW()
)

What's Removed

Removed Replacement
/projects page Workspace cards on dashboard
/projects/[id]/channels/[channelId] /workspaces/[id]
channels table Gone - messages link to workspace
Channel selector in UI Gone
"#general" in chat header Just workspace name
Multi-user invite button Gone (for now)

Page Status

Page Status Notes
/ ✅ Keep Landing page
/login ✅ Keep Auth
/register ✅ Keep Onboarding flow unchanged
/dashboard 🔄 Update Workspace cards
/workspaces/[id] 🆕 New Chat view
/settings 🔄 Update Workspace rename
/admin ✅ Keep Admin panel
/help ✅ Keep Docs
/projects ❌ Remove Hidden
/projects/[id]/channels/[id] ❌ Remove Replaced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment