Routing & APIs
All page routes and API endpoints. Full list in docs/reference/PROJECT_REFERENCE_FOR_AI.md.
Page routes
| Route | Description |
|---|---|
/ | Landing (RFS Hub) |
/sales, /support, /estimate | Chatbots |
/estimate/view/[id] | View/print estimate |
/portal, /portal/ticket/[id] | Customer portal |
/(auth)/login | Hub login |
/hub, /hub/tickets, /hub/knowledge, etc. | Hub dashboard & management |
/hub/tickets, /hub/tickets/kb-entry, /hub/tickets/new | Tickets + technician KB entry (scoped by role) |
/tech/*, /hub/tech/* | Permanent redirects → /hub/tickets* (next.config.ts) |
/help | Help & Documentation |
Auth APIs
- POST
/api/auth/login,/api/auth/logout— Hub auth (Supabase) - POST
/api/portal/auth,/api/portal/validate— Portal token - Technician KB (
/api/tech/config,/api/tech/submit) — Require Supabase session; identity viagetTechUser()/technicians_list. Tickets use/api/ticketswith hub ticket access rules.
Estimate & chat APIs
- POST
/api/estimate/chat, GET/POST/api/estimate/session, GET/api/estimate/messages, GET/api/estimate/config - POST
/api/estimate/generate,/api/estimate/estimate-preview, GET/api/estimate/pdf/[id] - POST
/api/sales/chat, POST/api/support— Sales & support chatbots
Tickets & portal
- GET/POST
/api/tickets, GET/PATCH/api/tickets/[id], notes - GET
/api/portal/tickets,/api/portal/tickets/[id], POST reply - POST
/api/tech/submit(KB entry), GET/api/tech/config
Hub APIs
- Customers:
/api/hub/customers,/api/hub/customers/[id], properties - Knowledge:
/api/hub/knowledge, queue, approve, reject, enrich - Estimate config: categories, products, rules, flow/steps, flow/transitions, selectors, notes, kb
- QBO:
/api/hub/qbo/status, connect, callback, disconnect, items, sync, push - Email:
/api/hub/email/stats, logs, conversations, callbacks, knowledge-base, settings - Other:
/api/hub/config,/api/hub/dashboard/stats,/api/hub/sidebar/badges
All hub APIs require Supabase session. Public chat/estimate APIs are rate-limited. Full tables in docs/reference/PROJECT_REFERENCE_FOR_AI.md.