# Flow Master Ground-Up UI Redesign

**Branch:** `feature/ui-ux-revamp`  
**Date:** 2026-08-06  
**Status:** Awaiting spec review  
**Supersedes:** token-only pass in `2026-08-06-ui-ux-revamp-design.md` (palette + shell direction)

## Goal

Make Flow Master feel like a **new product**: new shell layout, navigation, spacing, hierarchy, and components — not a recolor of the old admin panel. Preserve all business logic, APIs, auth, and workflows.

## Decisions locked

| Decision | Choice |
|----------|--------|
| Layout model | **A — Inset canvas** (Linear / Navattic) |
| Primary | **Ink black** `#0A0A0A` (light) / soft white inverted (dark) |
| Neutral | Warm stone surfaces + text scale |
| Accent | Optional slate-blue for focus ring only; UI otherwise ink + stone (effectively **2 colors** + neutrals) |
| Font | Plus Jakarta Sans |

## Why the previous pass failed

- Same left-sidebar + flat main column structure
- Same page compositions (7 KPI tiles, same headers)
- Color swap without spatial redesign → still “old app”

## Color system (max 3 roles)

1. **Primary (Ink):** CTAs, active nav, key metrics, brand mark  
2. **Neutral (Stone):** `--background`, `--muted`, `--border`, `--foreground` steps  
3. **Accent (optional):** focus/ring only — `222 47% 40%` — never decorative rainbows  

Status badges: ink/stone weight + opacity (e.g. muted pill, solid ink for “active”). No purple/orange/green decorative KPI icons.

Light + dark modes both required.

## Architecture — App shell

### Frame

```
┌─────────────────────────────────────────────────────────┐
│  bg-muted (outer frame, ~12–16px padding on desktop)     │
│  ┌──────────┬─────────────────────────────────────────┐ │
│  │ Sidebar  │  Inset canvas (bg-card, rounded-2xl)     │ │
│  │ (stone)  │  ┌───────────────────────────────────┐  │ │
│  │          │  │ Toolbar: crumbs | title | actions │  │ │
│  │ Workspace│  ├───────────────────────────────────┤  │ │
│  │ Org      │  │ Page content (generous padding)   │  │ │
│  │ Account  │  │                                   │  │ │
│  └──────────┴───────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
```

- Outer: `bg-muted`, full viewport  
- Inner: flex row; sidebar + **floating rounded content panel** with subtle border  
- No full-bleed white sidebar against white content (that was the old look)

### Sidebar

- Width ~240px; collapsible to icon rail (~64px)  
- Groups: **Workspace** (Dashboard, Users, Projects, Analytics), **Organisation** (Departments, Designations — role-gated as today), **Account** (Settings + user block)  
- Active: ink fill or ink text on stone pill — monochrome  
- Brand: mark + “Flow Master”  
- Keep existing hrefs and `canAccessHR` logic

### Content toolbar

- Left: breadcrumb trail + page title (derived from route)  
- Right: theme toggle + user menu  
- Replaces empty header that only held avatar

### Page composition patterns

**Home / role dashboards**

- Greeting (“Good evening, {name}”) + short subtitle  
- **One metric strip**: 4 large numbers in a single bordered row (not 7 colored cards)  
- Below: 2-column layout — distribution + recent activity  
- Secondary project metrics as a quiet second strip or table, not rainbow cards

**List pages (Users, Departments, Designations, Projects)**

- Sticky page header: title + primary ink CTA  
- Filter chip / search row (Mercury/Navattic)  
- Borderless table: hairline row dividers, avatar+meta primary column  
- Remove gradient stat cards where they add noise; optional compact count line under title

**User detail**

- Quiet segmented control (ink active)  
- Prefer content-first; key facts as a compact meta strip under title (not rainbow tabs)

**Login / landing**

- Split: ink brand panel + form on stone/card  
- Same credentials + role redirect logic

## Typography & spacing

- Titles: `text-2xl`/`text-3xl` semibold, `tracking-tight`  
- Body: `text-sm`; meta: `text-xs text-muted-foreground`  
- Section rhythm: `space-y-8` / `gap-8`  
- Content padding inside canvas: `p-6`–`p-8`  
- Prefer separation by whitespace over nested cards

## Components to rebuild (UI only)

| Unit | Change |
|------|--------|
| `dashboard-layout.tsx` | Inset frame + canvas + toolbar |
| `sidebar.tsx` | Grouped nav, ink active, fits frame |
| `theme-toggle.tsx` | Keep; restyle to ink/stone |
| `globals.css` + `tailwind.config.ts` | Ink + stone tokens; drop teal primary |
| `kpi-cards.tsx` / `project-kpi-cards.tsx` | Metric strip layout |
| `dashboard/page.tsx` + role pages | Greeting + new composition |
| `users/page.tsx` (+ org/project lists) | Toolbar + borderless table chrome |
| `auth/login/page.tsx`, `app/page.tsx` | Ink brand panels |
| Shared buttons/cards | Default to ink primary |

## Non-goals

- No API, Prisma, middleware, scoring, or form validation changes  
- No new product features (command palette can be visual-only placeholder later — not required)  
- No route renames  

## Success criteria

- Someone familiar with the old app recognizes a **different product structure** at first glance  
- Palette reads as ink + stone only (plus optional focus accent)  
- Light and dark both coherent  
- All existing flows still work  
- Diff stays in layout/CSS/components; logic untouched  

## References

- Linear inset / issues: https://mobbin.com/screens/9ec39891-cdbb-4d57-b0c6-de43f82c5f4e  
- Linear project: https://mobbin.com/screens/212fda35-366e-4dc0-a1d1-3b679659d6ab  
- Navattic visitors: https://mobbin.com/screens/a99e7d4b-d709-4f0c-94b8-8ff2eb174f65  
- Cloudflare home: https://mobbin.com/screens/26e17ee1-b1cf-4c16-8fdf-d385b5045c2f  
- Bonsai metrics: https://mobbin.com/screens/34d0f00d-1ca1-4c73-b388-14b96f0b88a9  

## Rollout

Continue on `feature/ui-ux-revamp`. Implement shell first (visible win), then home, login, then list pages.
