The React + Vite + TypeScript application for FreClean customers, staff, and administrators. This repository is a client of the FreClean Core API; it does not own the database, payment verification, authentication, authorization, or business rules.
This repository is the FreClean customer/staff/admin client. It depends on the canonical FreClean Core API for authentication, authorization, payment verification, business rules, and production data. The UI must never bypass the Core API or treat client-side role checks as a security boundary.
The login endpoint must return { accessToken, user: { id, roles } } using the
server-issued roles only for navigation and UI gating. Supported roles are
CUSTOMER, STAFF, MANAGER, ADMIN, and OWNER.
Copy .env.example to .env and set VITE_API_URL to the approved Core API
base URL. Only public client configuration belongs in this file. Never put
secrets, private keys, credentials, or payment provider keys in Vite
environment variables.
npm install
cp .env.example .env
npm run lint
npm test
npm run buildnpm run build produces the static site in dist/. Deployment must publish
that directory behind the approved FreClean hosting and API configuration; no
deployment target is configured in this repository.
This checkout contains only freclean-app. The canonical backend/API,
marketing website, organization-level reusable workflows, shared API contract,
database migrations, payment verification, audit logging, and deployment
infrastructure remain in their designated repositories and must be reviewed
there before the overall FreClean platform can be considered production-ready.
- The app fails fast if
VITE_API_URLis missing or invalid. - User roles are normalized on login and used to route the session to the appropriate dashboard.
- Session data is persisted client-side for convenience, but the Core API is the only authority for authentication and permission enforcement.
npm install
cp .env.example .env
npm run dev