Client portal
Customer-facing portal (ziteox-client) — projects, domains, hosting, and org access for clients.
Client portal
Purpose
The client portal (ziteox-client, npm name ziteox-portal in the platform README) is the customer-facing app. Clients sign in (increasingly via Ziteox Account), pick an organization, and work with projects, domains, hosting, documents, tickets, and related delivery surfaces. Staff use the admin portal.
Current state
| Piece | Status |
|---|---|
| Next.js client app | Live ops — monorepo app ziteox-client |
| Sign-in via Ziteox Account | In progress — handoff routes wired; client split / cut-over in progress |
| Hosting | Vercel (root Directory ziteox-client; local .vercel project name ziteox-client) |
| Domain | Default https://client.ziteox.com in shared auth sites / handoff registry |
| Local login fallback | Still present historically; Account flag / handoff path is the shared direction |
Who uses it
People with client app memberships on an organization: organization_owner, contact_person, member (core.app_roles / @ziteox/auth registry). Handoff registration for client id client: require_staff = false, require_second_factor = false. Staff with a client role may also access (per auth plan notes); there is no staff-only block on client like admin.
Main features (from routes + dashboard)
Under portal: ziteox-client/src/app/dashboard/ and related APIs:
| Area | Paths / notes |
|---|---|
| Home | /dashboard — org-scoped project / domain / hosting summaries |
| Organizations | /dashboard/organizations/…, request-access |
| Projects | /dashboard/projects, /dashboard/projects/[projectId] — overview, analytics, usage, documents, technical (GitHub/README/source patterns in README) |
| Domains | /dashboard/domains (+ search, DNS, detail) |
| Hosting / infrastructure | /dashboard/hosting, /dashboard/hosting/infrastructure |
| Documents | /dashboard/documents |
| Tickets | /dashboard/tickets (flag CLIENT_PORTAL_TICKETS_COMING_SOON may gate UX) |
| Analytics | /dashboard/analytics |
| Profile / changelog | /dashboard/profile, /dashboard/changelog |
| Proposals / prototypes | /proposals/[slug], /prototypes/[slug] (public/client-facing) |
| Auth | /auth/start, /auth/handoff, /auth/signout, /sign-in |
Org switcher prefixes: projects, domains, hosting, tickets, documents (portal: ziteox-client/src/components/dashboard-header.tsx). Preferred org can come from Account handoff cookie (zx_client_org noted in dashboard shell).
Auth
- Shared Supabase Auth; Account handoff when enabled (
AUTH_APP_URL,CLIENT_APP_URL,ZITEOX_SITE_SECRETnames in.env.example). - Start:
portal: ziteox-client/src/app/auth/start/route.ts; helpers inportal: ziteox-client/src/lib/auth-handoff.ts(handoff cookiezx_client_handoff; org cookie helpers re-exported). - Middleware / route protection for dashboard; permission checks via
/api/check-permissionand role helpers. - Client AAL2 is not required for handoff site registration (unlike admin).
Data
Same Supabase project and schema map as admin (@ziteox/supabase-routing). Client primarily reads org-/project-scoped rows under RLS; writes include profile, some domain/DNS, public assets, org invites accept, etc.
Typical client-facing tables (non-exhaustive): projects.projects, projects.domains, projects.project_members, core.organizations / organization_members, billing/hosting entitlement views, tickets/support as implemented, entity documents.
Supabase CLI / migrations: portal: ziteox-client/supabase/ (canonical sync folder per monorepo README).
Hosting / domain
| Fact | Source |
|---|---|
Vercel root ziteox-client | portal: README.md |
Default origin https://client.ziteox.com | portal: packages/auth/src/sites.ts, core.apps registration |
| Production DNS live confirmation | (unverified) beyond code defaults / docs |
Interfaces
| Kind | What |
|---|---|
| App | ziteox-client |
| Domain (default) | client.ziteox.com |
| Auth entry | /auth/start, /auth/handoff |
| Shared packages | @ziteox/auth, @ziteox/supabase-routing, @ziteox/storage, @ziteox/dns, … |
Related
Sources
portal: ziteox-client/README.mdportal: ziteox-client/src/app/dashboard/portal: ziteox-client/src/components/dashboard-header.tsx,dashboard-shell.tsxportal: ziteox-client/src/app/auth/start/route.tsportal: ziteox-client/.env.exampleportal: packages/auth/src/sites.ts,roles/registry.ts,handoff/registry.tsportal: ziteox-admin/supabase/migrations/20261029220000_app_role_registry.sqlportal: ziteox-admin/supabase/migrations/20261031200000_app_site_registration.sqlportal: README.md