Pular para o conteúdo principal

Client Documentation

Welcome to the Cactus front-end documentation. This guide covers everything you need to set up, customize, and deploy your branded front-end (React template, SDK, theming, and deployment).

What you get

The Cactus platform provides:

  • A React application template (front-web-base) with SSR, auth, theming, and multi-language support
  • SDK packages (@cactus-agents/*) with business logic, auth, payments, and more
  • Cloudflare Workers deployment for fast global delivery
  • Theming system to match your brand identity

How it works

Your site is a full copy of the Cactus base template. You have complete freedom to customize it.

Configuration lives under app/config/, organized into semantic subfolders by domain (22 today — browse app/config/ for the current set). The three most common entry points are:

  • Colorsapp/config/theme/colors.ts (your brand palette; fonts are separate, in app/config/theme/fonts.ts)
  • Pagesapp/config/routes/paths.ts (the URL for each route) and app/router/routes.ts (the route tree itself)
  • Layoutapp/config/layout/composition.ts (which components fill which slots)

But you're not limited to those files. You can create your own components, pages, hooks, services — anything you need. The fork is fully yours.

Per-brand overrides

If your fork serves more than one brand, you don't have to edit app/config/ directly. Each brand gets a folder under overrides/<brand-key>/, mirroring the app/ tree. When a file exists there, the build uses it in place of the base file. Your brand key is derived from ORIGIN_DOMAIN (minhamarca.comminhamarca-com).

:::caution An override replaces the whole file Overrides are file replacement, not a field-by-field merge. If you override app/config/features/features.ts, your file must declare every flag the base file declares — anything you leave out arrives as undefined rather than falling back to the base value. The one exception is app/config/layout/composition.ts, which is merged through defineLayoutConfig(). :::

The SDK

Business logic (auth, payments, games, etc.) comes from @cactus-agents/* packages that you update via pnpm update. These are the only thing you should avoid modifying directly — they are npm dependencies, and any local edit is lost on the next update. If you need behavior the SDK doesn't expose, contact the Cactus team.

Next steps