MuseMVP
Docs do MuseMVP

Tech Stack

Understand the native Worker runtime, bindings and differences from the Next.js templates.

Flare places the application, database, private files, jobs and AI on Cloudflare's native runtime. It does not wrap Next.js in a Worker and has no OpenNext adapter.

Request path

Browser React / React Query
  → TanStack Start server function or /api/* server route
  → application services
  → @musemvp/* domain packages
  → native D1 / R2 / Email / AI / Queues bindings
LayerImplementationEntry
Pages and SSRReact, TanStack Start / Routerapps/web/src/routes
BuildVite, Cloudflare Vite plugin, Tailwind, MDXapps/web/vite.config.ts
UIshadcn/Base UI, Lucide, Tailwind tokensapps/web/src/components/ui
DataDrizzle SQLite schema, D1 queries/batchespackages/db
AuthenticationBetter Auth, SQLite adapter and pluginspackages/auth
BillingFour gateway contracts, D1 inbox/outboxpackages/billing, modules/billing
LanguagesParaglide and bilingual overridespackages/i18n
ToolingTypeScript CLI, Vitest, PlaywrightRoot scripts, packages/cli

Worker bindings

BindingPurposeLocal/remote distinction
DBAccounts, metadata, ledger, jobs, auditWrangler supplies local SQLite state
R2_BUCKETPrivate file contentsLocal objects are not production data
EMAILCloudflare Email SendingDevelopment captures mail in D1
AIWorkers AI inferenceNo local model emulator
JOBSWebhook and summary workProduction has independent consumer and dead-letter queues

src/server.ts handles fetch, queue and scheduled events. The current Wrangler cron runs recovery every five minutes; recovery is not a scan performed by every browser request.

Differences from the Next.js templates

  • Components follow ordinary React/TanStack semantics, not Next.js Server Component or use client boundaries.
  • beforeLoad protects routes before loader. Server endpoints still authenticate independently.
  • Data is D1/SQLite, not PostgreSQL DATABASE_URL; storage uses bindings rather than S3 access keys.
  • Flare owns routing, SSR, resource names and publication. Original MuseMVP commands such as pnpm dev:cf and cf:deploy do not apply.

Before replacing infrastructure

Identify the owning layer first. Plans/quotas belong to packages/config, themes to app CSS/components, and resource names to target-resources.ts. A new database driver or deployment adapter changes architecture; it is not an environment-variable switch.

Use pnpm-lock.yaml as the version source. After upgrades, check types, Workers compatibility and compiled-Worker E2E, not only the development browser.

Continue with Project structure and Environment variables.

Nesta página