Internal business dashboard for FreClean staff: bookings, customers, cleaning teams, staff, services, products, inventory, orders, payments, Web3 transactions, entrepreneurs, reviews, reports, analytics, treasury overview, and audit logs — all gated by role.
Part of the FreClean ecosystem. Talks to freclean-api over HTTP; no data is hardcoded.
In development. Every page fetches live from freclean-api — there is no mock/fake dataset baked into the UI. With no API running, pages correctly show "Could not load data" or empty states rather than invented numbers.
React 18 + TypeScript + Vite, Tailwind CSS, React Router, lucide-react. No state-management library — resource data is fetched per page via a small useResourceList hook.
npm install
cp .env.example .env # set VITE_API_URL to your freclean-api instance
npm run dev # http://localhost:5173npm run lint
npm run typecheck
npm run buildYou'll need freclean-api running (see that repo's README) and at least one staff user registered with a non-customer role — self-registration only allows customer/entrepreneur, so create the first staff account directly via POST /api/users using a founder-seeded token, or promote a user with PATCH /api/users/:id.
| Role | Sees |
|---|---|
| Founder | Everything |
| Management | Everything except Treasury is Founder/Finance only |
| Finance | Payments, Web3 Transactions, Reports, Analytics, Treasury |
| Operations | Bookings, Teams, Staff, Services, Inventory, Orders, Reports, Analytics |
| Product Management | Products, Inventory |
| Cleaning Staff | Bookings, Teams |
| Support | Customers, Bookings, Orders, Entrepreneurs, Reviews |
Full mapping: src/lib/roles.ts — kept in sync with the permission tables in freclean-api's src/core/roles.ts.
src/pages/resourceRoutes.tsis a single config array describing every generic list page (columns, endpoint, title). Adding a new resource page is a config entry, not a new component — seesrc/pages/ResourcePage.tsx.src/components/StatusBadge.tsxgives every status value (booking, payment, product lifecycle) a consistent color across the whole dashboard.- Auth token is kept in
sessionStorageonly (cleared on tab close) — seesrc/lib/auth.tsx.
- Add create/edit forms per resource (currently read-only tables)
- Connect Treasury page to a real ledger once
freclean-dataexists - Add pagination and search to
DataTable - Add role-based route tests
Not provided.