Skip to content

solvedggorg/solved.gg

Repository files navigation

solved.gg

Marketing site, account shell, and legal pages for solved.gg (iResolved, LLC).

Product documentation is hosted on Mintlify at docs.solved.gg. This repo does not ship an on-site docs app.

Stack: Nuxt 4, Vue 3, @nuxt/ui, Clerk, Cloudflare Workers (Nitro cloudflare_module), Bun.

License

This repository is licensed under the MIT License.

Product toolchains (rusty, scripty, and the rest of the suite) may ship under separate product licenses. Site legal pages live under /legal.

Requirements

  • Bun 1.3+
  • Cloudflare account + Wrangler for deploy
  • Clerk application (publishable + secret keys)
  • Optional: Marble API key for blog posts

Setup

bun install
cp .env.example .env
# fill Clerk keys (and optional Marble key)
bun run dev

Dev server defaults to http://0.0.0.0:6543.

Scripts

Command Purpose
bun run dev Local Nuxt dev server
bun run build Nitro/Workers build
bun run test Vitest unit tests
bun run typecheck nuxt typecheck
bun run deploy Build and wrangler deploy
bun run cf:dev Build and wrangler dev

Environment

Vanilla names only. @solvedgg/env (packages/env) maps them to Nuxt (NUXT_PUBLIC_* / NUXT_*) and reads Cloudflare bindings first, then process.env.

Copy .env.example. Never commit real keys.

Vanilla key CF type Notes
CLERK_PUBLISHABLE_KEY var pk_… — public, required for Clerk SSR
CLERK_SECRET_KEY secret sk_…wrangler secret put CLERK_SECRET_KEY
CLERK_SIGN_IN_URL var default /sign-in
CLERK_SIGN_UP_URL var default /sign-up
MARBLE_API_KEY secret Blog CMS
SITE_URL var Canonical origin
FLAGSHIP_APP_ID var / wrangler [[flagship]].app_id Cloudflare Flagship app id for binding FLAGS
FLAGSHIP_ACCOUNT_ID secret (optional) Local HTTP evaluate fallback only
FLAGSHIP_AUTH_TOKEN secret (optional) Local HTTP evaluate fallback only — never public

Legacy NUXT_* / NUXT_PUBLIC_* names still work as aliases (read-only fallbacks). Prefer vanilla.

@solvedgg/env

import { applyEnvAliases, getAppEnv, getCloudflareBindings } from "@solvedgg/env";

applyEnvAliases(); // nuxt.config — maps CLERK_* → NUXT_PUBLIC_CLERK_* etc.
const env = getAppEnv(getCloudflareBindings(event)); // server handlers

Clerk on Cloudflare (SSR)

  1. Worker var: CLERK_PUBLISHABLE_KEY
  2. Worker secret: CLERK_SECRET_KEY (never under [vars])
  3. Same public keys on the build env if using CF builds
  4. Middleware: server/middleware/clerk.ts

Feature flags (Cloudflare Flagship)

Server-side evaluation only (Worker binding FLAGS). Client UI reads /api/flags and /api/account/flags — no Flagship API tokens in the browser.

  1. Cloudflare Dashboard → Compute → Flagship → create app (e.g. solvedgg).
  2. Create boolean flags matching app/utils/feature-flags.ts keys (dashboard-beta-panels, promo-banner, …).
  3. Set FLAGSHIP_APP_ID and fill [[flagship]] app_id in wrangler.toml (or rely on Nitro-generated wrangler with the same id at build).
  4. Account dashboard: /account/feature-flags for opt-in betas (userOptIn catalog keys).

Docs: Flagship.

Deploy

  1. Set Worker name / routes in wrangler.toml.
  2. Bind Flagship FLAGS with your app id ([[flagship]]).
  3. Set vanilla Clerk/Marble vars + secrets (table above).
  4. Clerk Dashboard allowed origins for your domain.
  5. bun run deploy.

/docs and /docs/** 301 to docs.solved.gg (Mintlify).

Repo layout

app/           # Vue pages, components, layouts, client utils
server/        # Nitro API routes and server utils
packages/env/  # Vanilla env → Nuxt/CF mapping (@solvedgg/env)
docs/          # Operator notes for this site (voice, plans)
public/        # Static assets
scripts/       # Bundle size report helpers
tests/         # Unit tests

Contact

Contributors

Languages