Pular para o conteúdo principal

First Run

Start the dev server

pnpm dev

This starts the development server at http://localhost:5173. SSR runs inside that same server, through the Cloudflare dev proxy — there is no second port to open.

What you should see

  1. The app loads with your brand configuration (logo, colors, name)
  2. The header shows your brand logo and the casino navigation
  3. Login and Register buttons are visible in the header
  4. The sidebar shows the casino sections

:::note Sports is off by default A fresh clone ships with the sportsbook disabled (sportsConfig.main is null), so no sports entry appears in the header or the sidebar. That is expected — it is not a broken setup. See Sports to enable a provider for your brand. :::

Verify the setup

  • Brand loads correctly — Logo and brand name appear in the header
  • Theme colors — The primary color matches app/config/theme/colors.ts
  • Auth works — Click the login button in the header to open the login modal
  • Pages load — Navigate to different routes

Testing the production build

pnpm dev is a Vite server. To exercise the real Workers runtime — the one production uses — build first and then run the preview:

pnpm build
pnpm preview

pnpm preview serves on http://localhost:8787 (Wrangler's default). It requires a prior pnpm build; running it against a stale or missing build/ directory will not reflect your latest changes.

Common issues

Blank page or error

Check that both .dev.vars and .env exist and carry the same values. A variable present in only one of the two is missing on the other side — see Installation.

"Failed to fetch brand" error

Verify API_BASE_URL and ORIGIN_DOMAIN are correct. The API must be reachable from your machine.

Colors don't match

Theme colors come from app/config/theme/colors.ts (or your brand's override of that file). Changes to config files require restarting the dev server.

My brand overrides are being ignored

Overrides are resolved from the brand key derived from ORIGIN_DOMAIN in .dev.vars, not from a variable you set by hand. Confirm that ORIGIN_DOMAIN normalizes to the folder name you created under overrides/ (minhamarca.comoverrides/minhamarca-com/).

pnpm install fails with 404

Your .npmrc is missing the scope→registry mapping. It needs both the @cactus-agents:registry= line and the _authToken line — see Prerequisites.

Port 5173 is already in use

The dev server port can be changed with DEV_PORT in a local .env.local file.

Next steps

  • Theming — Customize your brand colors
  • Routes — Add or remove pages
  • Layout — Customize the layout