Features & BFF API

Pages, routes and backend calls

Last verified 8 August 2026 · source-backed

Portal is a backend-for-frontend. React pages call local API routes; those routes normalize input, require the signed session and invoke Mivama Core. Frappe details and service credentials never enter browser bundles.

Customer areas

AreaPurposeCore records
DashboardSummary, onboarding and active servicesCustomer, Subscription, Hosting Service
HostingWordPress access, migration, Studio and lifecycleHosting Service, Hosting Migration
SubscriptionsPlans, checkout, plan change and customer portalStripe Subscription, Subscription Plan
BillingInvoice list and PDF metadataSales Invoice, Stripe Invoice
TicketsHelpdesk conversations and attachmentsHD Ticket, Communication
RequestsStructured service requestsMivama Service Request
ProjectsProjects, tasks and commentsProject, Task, Comment
ProfileCompany, language, theme and mail preferencesUser, Contact, Customer
LegalPublished documents and acceptancesLegal Document, Legal Acceptance

BFF pattern

Each route returns a Portal-shaped response instead of a raw Frappe envelope. Frappe remains responsible for object authorization and transactions.

Notifications

Invoices, migration review/cutover/failure/completion, hosting lifecycle and security-relevant events create Portal notifications. Scheduled cleanup removes old records. Optional mail can honor preferences; essential transactional messages remain deliverable.

Error handling

The UI should show an actionable customer message and keep technical detail for support. BFF helpers unwrap Frappe message envelopes. Authentication failures clear stale sessions. HTTP 417, 401 or state conflict responses must never be converted into success.

Adding a feature

  1. Define ownership and the source-of-truth DocType in Core.
  2. Add a narrow Core method with customer authorization.
  3. Add a Portal BFF route; do not call privileged methods from the browser.
  4. Implement translated UI.
  5. Add notifications/mail if the change matters to the customer.
  6. Document schedulers, secrets or external webhooks.