Spala
Example

Client Portal Backend Example

A public example of the backend contract Spala can help create for a client portal: users, cases, messages, documents, invoices, auth, API docs, and frontend handoff.

What this example proves

This page is not source code and does not expose private Spala implementation details. It shows the kind of backend contract an agent or frontend builder should expect after a Spala project is generated, reviewed, documented, and published.

Best for: agencies, law firms, consultants, service businesses.

Suggested backend contract

Tablesusers, clients, cases, case_messages, document_metadata, invoices, audit_events
EndpointsPOST /api/signup
POST /api/login
GET /api/me
GET /api/cases
POST /api/cases
GET /api/cases/{id}/messages
POST /api/cases/{id}/messages
POST /api/documents
GET /api/invoices
AuthUser auth with roles for owner, staff, and client. Case and message access should be scoped by handoff and role.
Frontend handoffFrontend receives base API URL, OpenAPI/Markdown docs, auth routes, token handling, CORS origin, upload route, and publish state.

How to test this in Spala

  1. Create a low-risk project in the hosted dashboard.
  2. Ask AI Copilot to generate this backend with auth, validation, API docs, and frontend handoff details.
  3. Review generated tables, endpoints, functions, and docs.
  4. Test protected and public routes in API Playground.
  5. Publish only after validation and review.

Machine-readable example files: handoff.json and openapi.json.