Universal Next.js starter for Flowless/Pubflow frontends. It ships with branded auth, login-time 2FA through @pubflow/react, a protected dashboard, light/dark mode, English/Spanish UI, and optional Cloudflare deployment through OpenNext.
@pubflow/reactprovider and auth forms wired for Flowless login, 2FA, account creation, and password recovery.- Protected
/dashboardwithuseAuth()user data surfaced for future modules. - Environment-based branding: app name, logo, colors, theme, language, API paths.
- Bridge requests can send
X-Bridge-Secretdirectly from public env config. - Portable deploy: standard Next.js for Node/self-host/Vercel, optional OpenNext Cloudflare scripts, plus a Deno Deploy path.
cp .env.example .env.local
npm install
npm run devOpen http://localhost:3000.
Use NEXT_PUBLIC_* only for values that can be exposed to the browser.
NEXT_PUBLIC_API_BASE_URL=http://localhost:8787
NEXT_PUBLIC_BRIDGE_BASE_PATH=/bridge
NEXT_PUBLIC_AUTH_BASE_PATH=/auth
NEXT_PUBLIC_APP_NAME=Flowfull Client
NEXT_PUBLIC_APP_LOGO=
NEXT_PUBLIC_PRIMARY_COLOR=#006aff
NEXT_PUBLIC_SECONDARY_COLOR=#4a90e2
NEXT_PUBLIC_DEFAULT_THEME=system
NEXT_PUBLIC_DEFAULT_LANGUAGE=en
NEXT_PUBLIC_ENABLE_ACCOUNT_CREATION=true
NEXT_PUBLIC_ENABLE_PASSWORD_RESET=trueNEXT_PUBLIC_BRIDGE_SECRET=your_bridge_secretnpm run dev # Next development server
npm run build # Standard Next production build
npm run start # Start standard Next production server
npm run typecheck # TypeScript verification
npm run lint # ESLint
npm run build:cf # OpenNext Cloudflare build
npm run preview:cf # Cloudflare local preview
npm run deploy:cf # Cloudflare deploy
npm run build:deno # Deno Deploy build checkCloudflare/OpenNext builds should use the normal npm or Bun install layout. If Windows reports EPERM while creating symlinks under node_modules\.deno, rebuild from a clean npm/Bun install, enable Developer Mode/elevated symlinks, or run the Cloudflare build in WSL/Linux. The Deno deploy path remains separate via npm run build:deno.
/checks auth state and routes to/dashboardor/login./loginuses@pubflow/reactLoginForm; OTP appears automatically when Flowless returnsrequires2fa./registerusesAccountCreationForm; the login link is controlled byNEXT_PUBLIC_ENABLE_ACCOUNT_CREATION./forgot-passwordand/reset-passwordusePasswordResetForm; the login link is controlled byNEXT_PUBLIC_ENABLE_PASSWORD_RESET./dashboardis protected and shows session/config/user payload.- Bridge calls made through
@pubflow/reactcan includeX-Bridge-SecretfromNEXT_PUBLIC_BRIDGE_SECRET.
More details live in docs/.