Kai Dashboard

Guide

← Back to dashboard

How this dashboard works

One page that gathers every project you have put online, so you can reach them without remembering each URL. It also reads a few live numbers straight from Supabase. This guide covers getting in, reading the page, and changing it.

Getting in

The passphrase

The dashboard is private. Opening it on a new device or browser asks for a passphrase once, then remembers you for 30 days.

The passphrase is stored in your single .env file on the Desktop, under the name KAI_DASHBOARD_PASSWORD. To look it up:

notepad "C:\Users\TODAK ACADEMY\Desktop\Kai Brain\.env\.env"

Scroll to the bottom of the file. It is the only place the value is kept, apart from the Cloudflare project itself.

Signing out

There is a Sign out link at the bottom of the dashboard. Use it if you unlocked the page on a device you do not control. It clears that device only — your other devices stay signed in.

Why this lock is real The check runs on Cloudflare's servers before any file is sent, so the passphrase never reaches the browser and cannot be read from view-source. It also protects config.js, not just the front page — which matters, because that file carries the Supabase key.

Reading the page

Live data

Each card counts rows in one Supabase table. The number is fetched fresh every time the page loads, and again every five minutes.

When a card cannot show a number, it says why instead of showing a zero:

What it saysWhat it means
No rows visible The table exists, but Row Level Security hides its rows from the public key the dashboard uses. This is normal and is how it should be — it is not an error, and it does not mean the table is empty.
Table not found The table name in config.js does not match anything in the database. Usually a typo or a renamed table.
Network unreachable Your device could not reach Supabase. Check your connection.

Project cards

Each card links to one of your live sites, plus its admin page where there is one. The small dot is a reachability check:

Green does not mean healthy A browser cannot read the status code of a site that does not send CORS headers, so the dot only proves the host replied — not that the page loaded correctly. A site serving an error page still shows green. That is why the label says reachable rather than online.

Distrol is deliberately not listed. It runs on this laptop rather than on a public host, so the dot would always be red from anywhere else.

Changing it

Adding a project

Everything you would want to change lives in one file: Desktop\Kai Brain\Kai Dashboard\config.js. Copy one block inside the projects list and edit it:

{
  name: "New Project",
  desc: "One line about what it does.",
  url:  "https://example.netlify.app",
  admin:"https://example.netlify.app/admin.html",   // optional
  tag:  "live"
}

Save the file, then ask Claude to redeploy. Nothing else needs touching — index.html and app.js stay as they are.

Adding a live-data card

Same file, in the stats list:

{ label: "Orders", table: "orders", accent: "cyan",
  href: "https://example.netlify.app" }

accent accepts violet, amber or cyan. The table must be readable by the public Supabase key, otherwise the card will correctly report No rows visible.

Changing the passphrase

Edit KAI_DASHBOARD_PASSWORD in .env, then ask Claude to push it to Cloudflare and redeploy. Devices already signed in stay signed in, because the session is signed with a separate secret. To force every device to log in again, ask for the session secret to be rotated too.

Where things live

ThingWhere
The siteCloudflare Pages, project khai-dashboard
Addresskhai-dashboard.pages.dev
Source filesDesktop\Kai Brain\Kai Dashboard\
The lockfunctions/_middleware.js
SecretsDesktop\Kai Brain\.env\.env — the only one
Old addresskai-dashboard-khai.netlify.app — now redirects here
Full notes~/.claude/knowledge/projects/kai-dashboard/

If something looks wrong

It asks for the passphrase again

The 30 days ran out, you signed out, or the browser cleared its cookies — private windows always ask. Just enter it again.

Every card says the same error

That points at the connection rather than at any one table. Check that you are online, then reload.

The page loads but looks unstyled

A stale cached file. Reload while holding Shift.

A project card is red but the site is fine

Open the link. If the site loads, the check was blocked rather than the site being down — some networks and ad blockers refuse these background requests. The dot is a hint, not a monitor.