Skip to main content
These steps run the Xem web app locally against a running Xem API. To run the whole product on a server, use Self-host Xem instead.

Install

You need Bun and a running Xem API. Locally, the API listens on port 9001 by default.

Configure

Edit client/.env.local. The values that matter for local development: On a self-hosted install behind a reverse proxy, set NEXT_PUBLIC_API_URL=/api/v1 and route /api/v1/* and /public/forms/* to the backend. .env.example also lists the server-only settings for the Ask Xem assistant, which you can leave unset.
Only variables that start with NEXT_PUBLIC_ reach the browser. Never give a secret that prefix.

Run

The app starts on http://localhost:3000. Create an account at /auth/register.

Test

Tests live in client/__tests__/. Run both commands before opening a pull request; CI runs the same TypeScript and Jest checks plus a production build.

Build

The build uses Next.js standalone output. client/Dockerfile builds the same output on oven/bun and accepts NEXT_PUBLIC_API_URL and NEXT_PUBLIC_PAYWALL_URL as build arguments, because public variables are fixed at build time.