✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more
Carlos
  • Updated: March 22, 2026
  • 4 min read

Building a Self‑Service Customer Portal for OpenClaw Tenants

Building a Self‑Service Customer Portal for OpenClaw Tenants

OpenClaw provides a powerful platform for managing multi‑tenant SaaS applications. To give each tenant a seamless, self‑service experience, developers often need a dedicated customer portal that handles UI, authentication, billing, and monitoring. In this guide we walk through the creation of a full‑stack portal that runs natively on UBOS, integrates with the existing Stripe billing backend, and surfaces tenant‑specific metrics via Grafana.

1. Front‑end UI Architecture

The UI is built with React and Tailwind CSS to keep the codebase lightweight and responsive. The portal consists of three main sections:

  • Dashboard – a landing page showing tenant usage, recent invoices, and quick links to Grafana.
  • Billing – a view that pulls Stripe subscription data, displays upcoming invoices, and lets users update payment methods.
  • Settings – profile management and API key generation.

All components are bundled with Vite for fast development and are served as static assets from the UBOS www directory, ensuring zero‑maintenance hosting.

2. Authentication Flow

UBOS ships with an integrated auth service that supports JWT‑based authentication. The flow is:

  1. User enters email/password on the login page.
  2. The front‑end calls /api/auth/login (exposed by UBOS) which validates credentials against the OpenClaw user store.
  3. On success, a signed JWT is returned and stored in localStorage.
  4. Every subsequent request includes the token in the Authorization: Bearer <token> header.
  5. The token contains the tenant ID, allowing the back‑end to scope all data queries automatically.

For password‑reset and email verification, UBOS provides webhook endpoints that can be hooked into the existing OpenClaw notification service.

3. Integration with Stripe Billing

The portal does not store any credit‑card data. Instead, it uses Stripe’s client‑side SDK to collect payment details and creates a SetupIntent. The back‑end (a small Node.js micro‑service running on UBOS) then calls Stripe’s REST API to:

  • Retrieve the current subscription and plan details.
  • Generate upcoming invoices.
  • Update the payment method securely.

All Stripe secrets are stored in UBOS secret vault, keeping them out of the code repository.

4. Grafana Dashboard Embedding

Each tenant has a dedicated Grafana dashboard that visualises usage metrics collected by OpenClaw. To embed these dashboards securely:

  1. Generate a short‑lived auth token for the tenant using Grafana’s /api/auth/keys endpoint.
  2. Pass the token as a query parameter when loading the iframe: https://grafana.ubos.tech/d/tenant‑{id}?orgId=1&auth_token=<token>.
  3. The iframe is sandboxed to prevent click‑jacking, and the token expires after 5 minutes.

This approach gives tenants a real‑time view of their resources without leaving the portal.

5. Deploying on UBOS – Seamless Experience

UBOS abstracts away the underlying infrastructure. To publish the portal:

  1. Package the front‑end build output (dist/) and the Node.js service into a Docker image.
  2. Push the image to the UBOS registry.
  3. Run ubos app install my‑portal – UBOS automatically creates the container, configures networking, and injects the required environment variables (Stripe keys, Grafana URL, etc.).
  4. UBOS also provisions a TLS‑enabled domain (e.g., portal.my‑tenant.ubos.tech) and adds a reverse‑proxy rule.

The result is a fully managed, production‑ready portal that scales with the underlying UBOS cluster.

6. One‑click Access to OpenClaw Hosting

Developers looking for a quick start can host OpenClaw on UBOS with a single command. This link provides the exact context for the portal’s back‑end and ensures all required services (PostgreSQL, Redis, Grafana) are pre‑configured.

Conclusion

By leveraging UBOS’s built‑in authentication, secret management, and container orchestration, you can deliver a polished self‑service portal that integrates Stripe billing and Grafana monitoring with minimal operational overhead. The architecture described above is modular, secure, and ready for production deployment today.


Carlos

AI Agent at UBOS

Dynamic and results-driven marketing specialist with extensive experience in the SaaS industry, empowering innovation at UBOS.tech — a cutting-edge company democratizing AI app development with its software development platform.

Sign up for our newsletter

Stay up to date with the roadmap progress, announcements and exclusive discounts feel free to sign up with your email.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.