Dashboard Setup
This guide walks you through setting up the Mentu dashboard from scratch — cloning the repo, configuring Supabase, and deploying to Vercel.
Prerequisites
Section titled “Prerequisites”1. Clone the Repository
Section titled “1. Clone the Repository”git clone https://github.com/mentu-ai/mentu-webcd mentu-web2. Install Dependencies
Section titled “2. Install Dependencies”npm install3. Environment Variables
Section titled “3. Environment Variables”Create a .env.local file in the project root:
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.coNEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIs...| Variable | Description |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Your Supabase project URL (found in Project Settings > API) |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Your Supabase anonymous/public key (found in Project Settings > API) |
4. Supabase Schema
Section titled “4. Supabase Schema”The dashboard requires three core tables in your Supabase project. Apply the following schema (or run the provided migration):
operations table
Section titled “operations table”The append-only ledger. Every Mentu operation is stored here.
create table operations ( id text primary key, op text not null, ts timestamptz not null default now(), actor text not null, workspace text not null, payload jsonb not null default '{}'::jsonb, created_at timestamptz not null default now());
create index idx_operations_workspace on operations(workspace);create index idx_operations_op on operations(op);create index idx_operations_ts on operations(ts desc);workspaces table
Section titled “workspaces table”Workspace registry for multi-tenant isolation.
create table workspaces ( id uuid primary key default gen_random_uuid(), name text not null, slug text unique not null, created_at timestamptz not null default now(), settings jsonb not null default '{}'::jsonb);workspace_members table
Section titled “workspace_members table”Maps users to workspaces with role-based access.
create table workspace_members ( id uuid primary key default gen_random_uuid(), workspace_id uuid references workspaces(id) on delete cascade, user_id uuid references auth.users(id) on delete cascade, role text not null default 'member', created_at timestamptz not null default now(), unique(workspace_id, user_id));Enable Realtime
Section titled “Enable Realtime”For live updates, enable Supabase Realtime on the operations table:
alter publication supabase_realtime add table operations;5. Run Locally
Section titled “5. Run Locally”npm run devThe dashboard will be available at http://localhost:3000.
6. Deploy to Vercel
Section titled “6. Deploy to Vercel”Via CLI
Section titled “Via CLI”npx vercel --prodWhen prompted, set the environment variables (NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY) in the Vercel dashboard under Project Settings > Environment Variables.
Via Dashboard
Section titled “Via Dashboard”- Import the repository in the Vercel Dashboard
- Set the environment variables in the project settings
- Deploy
7. Custom Domain Setup
Section titled “7. Custom Domain Setup”- Go to your Vercel project Settings > Domains
- Add your custom domain (e.g.,
app.mentu.dev) - Configure DNS:
- CNAME record pointing to
cname.vercel-dns.com - Or an A record pointing to Vercel’s IP (
76.76.21.21)
- CNAME record pointing to
- Wait for DNS propagation and SSL certificate provisioning (usually under 5 minutes)
Verify
Section titled “Verify”After deployment, visit your dashboard URL. You should see the login screen. Sign in with your Supabase credentials and verify that:
- You can access your workspace
- Operations appear in the Ledger view
- Commitments and memories are populated (if any exist)