Systems

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

PieceStatus
Next.js client appLive ops — monorepo app ziteox-client
Sign-in via Ziteox AccountIn progress — handoff routes wired; client split / cut-over in progress
HostingVercel (root Directory ziteox-client; local .vercel project name ziteox-client)
DomainDefault https://client.ziteox.com in shared auth sites / handoff registry
Local login fallbackStill 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:

AreaPaths / 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_SECRET names in .env.example).
  • Start: portal: ziteox-client/src/app/auth/start/route.ts; helpers in portal: ziteox-client/src/lib/auth-handoff.ts (handoff cookie zx_client_handoff; org cookie helpers re-exported).
  • Middleware / route protection for dashboard; permission checks via /api/check-permission and 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

FactSource
Vercel root ziteox-clientportal: README.md
Default origin https://client.ziteox.comportal: packages/auth/src/sites.ts, core.apps registration
Production DNS live confirmation(unverified) beyond code defaults / docs

Interfaces

KindWhat
Appziteox-client
Domain (default)client.ziteox.com
Auth entry/auth/start, /auth/handoff
Shared packages@ziteox/auth, @ziteox/supabase-routing, @ziteox/storage, @ziteox/dns, …

Sources

  • portal: ziteox-client/README.md
  • portal: ziteox-client/src/app/dashboard/
  • portal: ziteox-client/src/components/dashboard-header.tsx, dashboard-shell.tsx
  • portal: ziteox-client/src/app/auth/start/route.ts
  • portal: ziteox-client/.env.example
  • portal: packages/auth/src/sites.ts, roles/registry.ts, handoff/registry.ts
  • portal: ziteox-admin/supabase/migrations/20261029220000_app_role_registry.sql
  • portal: ziteox-admin/supabase/migrations/20261031200000_app_site_registration.sql
  • portal: README.md