Skip to content
SineraDocs

Run Platform locally

Install, configure and run the Sinera Platform console on your machine, including the offline preview entry.

Sinera Platform is a Vite and React console for usage, credits and plans. It is a frontend on the Sinera App /v1 API and shares its sign-in with sinera.app, so it needs no backend of its own. This page shows how to run it on your computer and check it.

Preview

Requirements

  • Node 24
  • pnpm 10

Install and start

  1. Install the dependencies with pnpm install.
  2. Copy the example environment file to .env.local, then fill in the values.
  3. Start the dev server with pnpm dev.
  4. Open http://localhost:5173.
pnpm install
cp .env.example .env.local
pnpm dev

.env.local is not committed to git. Use the same values as the Sinera App (sinera.app), because both apps share the API and the sign-in.

Environment variables

These tables list names and meanings only. Ask the project owner for the values.

VariableMeaning
VITE_SINERA_API_BASE_URLRoot of the Sinera API. It stops before the v1 segment, because Platform appends /v1/... itself. Same value as sinera.app.
VITE_SINERA_AUTH_APP_IDThe sign-in application id that sinera.app uses.
VITE_SINERA_PASSWORD_LOGINOptional build-time switch for password sign-in. Leave it empty, or use true, 1, on, yes or enabled, to keep password sign-in. Use false, 0, off, no or disabled to hide it. Sign-in is then an email code, Google or a passkey. Any other value fails the build.
REUI_LICENSE_KEYRead only by the shadcn CLI when it installs premium UI blocks. It never enters the app bundle. Never commit it.

You need the first two for the app to work. The password switch and the license key are optional.

The "Not connected" state

If either VITE_SINERA_API_BASE_URL or VITE_SINERA_AUTH_APP_ID is missing, Platform shows a Not connected state instead of the sign-in screen. Fill in both values in .env.local and restart pnpm dev. Vite reads these variables at start, so a restart is needed after each change.

Billing is not connected yet

Even when the app is connected, the plan catalog is currently empty and payment requests return billing_provider_unavailable until a billing provider is connected. See Plans and billing.

Preview entry with sample data

The dev server also serves /preview.html. It uses the same shell and screens as the real app, but with a signed-in sample account and a simulated API, so you need no environment variables. It is meant for screenshots and end-to-end tests. A Preview data badge appears in the header.

The sample account has one personal organization and one team organization. Open http://localhost:5173/preview.html. Add query parameters to change the scenario.

QueryEffect
?catalog=emptyShows an empty plan catalog, as in the real app today. By default the preview shows 3 plans.
?payments=okCheckout, portal and recharge return a URL instead of a billing_provider_unavailable error.
?account=onboarding, suspended or closedShows the account state that blocks the console.
?latency=<ms>Sets the simulated delay in milliseconds. The default is 350.

Example: http://localhost:5173/preview.html?catalog=empty#plans.

The preview is dev-only. A production build contains only the real entry, and the lint rules block any import of preview code from production code.

Check your work

Run the full check before you share a change:

pnpm run verify

It runs these in order: type check, lint, tests and a production build. Each is also available alone.

ScriptWhat it does
pnpm devStarts the dev server.
pnpm run typecheckChecks types.
pnpm run lintRuns ESLint.
pnpm run testRuns the tests once.
pnpm run buildType checks, then builds the app.
pnpm run previewServes the production build locally.
pnpm run formatFormats the TypeScript files with Prettier.