If you luurve Next.js
on Vercel
, check out Demo by the Warpcast team, or Stephan's Frames v2 Starter and limone.eth's Frames v2 Starter Kit all on Next.
If not, keep reading! 👇👇👇
This starter is meant for anyone who wants to quickly build a Farcaster Frame V2, with a focus on lightning-fast DX and gtm. It is not meant to showcase bleeding-edge features of the Frames v2 spec, nor to enable devs to re-build common Frames infrastructure such as auth or a notifications service.
git clone https://github.com/artlu99/framesv2-remix-cf [your-folder-name]
cd [your-folder-name]
pnpm i
pnpm dev
- update project name in
wrangler.toml
- deploy to Cloudflare Pages using
pnpm run deploy
- pay attention to the deployment branch name, update in
package.json
as necessary - [ONE-TIME OPTIONAL, BUT RECOMMENDED]. Assign
Custom domain
via Cloudflare dashboard. Sign manifest in Warpcast, update/public/.well-known/farcaster.json
and re-deploy
permissionless install, managed user notifications, auth, redis, postgres
Click to expand/collapse
- update
/public/.well-known/farcaster.json
- icons can be changed later, but caching can cause issues / delays. Avoid headaches later; try to get it right before Warpcast scrapes your site.
- set up an app with Neynar. Details [here]
- for local dev, update environment variable in
.dev.vars
(not checked into git, but followdev.vars.example
) - update
NEYNAR_FRAME_WEBHOOK_URL
env variable as a secret via Cloudflare dashboard (do not usewrangler.toml
for secrets!)
- set up an application with Privy. Follow Steps 1 and 2 [here]. This starter implements Steps 3 and 4 for you!
- update
/app/config.json
with your PrivyappId
- set up an Upstash Redis instance via their dashboard
- this starter shares data across dev and prod environments. It does not expose the Redis connection to browsers; only the server-side Remix loader has access to it
Secrets setup
- copy two (2) secrets from the
REST API
->.env
section. Ensure you have copied the actual token, and not a bunch of asterisks to your clipboard (don't ask me how I know!) - update secrets via Cloudflare dashboard (do not use
wrangler.toml
for secrets!) - for local dev, update environment variables in
.dev.vars
(not checked into git, but followdev.vars.example
)
- set up Neon Postgres via their dashboard
- this starter shares data across dev and prod environments. It does not expose the Postgres connection to browsers; only the server-side Remix loader has access to it
Secrets setup
- copy one (1) secret from the
Connection Details
->Connection string
section - update secrets via Cloudflare dashboard (do not use
wrangler.toml
for secrets!) - for local dev, update environment variables in
.dev.vars
and.env
(not checked into git, but follow the example files) - run
pnpm run migrate
to create the database and tables
This starter emphasizes iteration speed and type-safety.
It postpones scale decisions by leaning on serverless site generation, stateless connections and edge datastores.
It expects zero cost-to-launch, and the first bottleneck is expected to be the Privy plan (at ~150 users). Neynar is currently $9/month until much higher loads, and the plan includes many other useful features for Farcaster devs. Hosting and data should remain performant on the free tiers until much later. YMMV.
Click to expand/collapse a nerd list 🤓
Remix
onCloudflare Pages
, for light, fast SSR with familiarReact
mental models. Serverless that feels like a long-lived serverVite
for lightning-fast local development with HMRHono Stack
for end-to-end type safety, zero codegen and de minimis boilerplateKysely
Typescript query builder and migration scriptsshadcn/ui
TailwindCSS
components,Framer
motion animationsUpstash Redis
andNeon Postgres
as edge, scalable datastores on stateless connections- Seamless Farcaster login via
Privy
[details], with easy pathway to providing embedded wallets - webhook logging, optionally verified and/or managed via
Neynar
(see [docs]). Send managed notifications [here] Biome
linting at the speed of Rust.pnpm
because it's 2025.- BYO: test suite, CI/CD, local frame debugger
Click to expand/collapse a nerd table 🏓
Feature | artlu Starter | Warpcast Demo Repo |
---|---|---|
Framework | Remix | Next App router |
Local Development Tool | Vite | Next |
UI components | shadcn/ui | Radix + TailwindCSS |
End-to-End Type Safety | Hono Stack | nah, we have Zod at home |
Datastores | Upstash Redis, Neon Postgres (optional) | Vercel KV (Redis) |
Notifications | Neynar (optional) | integrated + Neynar Hub verification |
Authentication | Privy (optional) | SIWF on NextAuth |
Deployment | Cloudflare Pages | Vercel |
Dynamic OG Generation | separate microservice | integrated |
Linting and Formatting | Biome | ESLint, Prettier |
CI/CD | bring-your-own | Vercel + GitHub Actions (default) |
testing | bring-your-own | bring-your-own |
Edge Functions | Yes | Yes |
Cost Efficiency | Free tiers recommended | Free tiers recommended |
Philosophy | serverless V8 | long-lived Node server + Edge serverless |
-
https://frames.artlu.xyz/pinned/6546 (artlu) and https://frames.artlu.xyz/pinned/5650 (Vitalik)
- dynamic OG image generation is a separate microservice. FOSS and MIT Licensed [here].
- Neon supports painless database branching, which is a great feature for development. Out of scope for this starter.
- when you need the full Cloudflare environment, first run
pnpm build
and thenpnpm start
(this should be rare).
- @horsefacts, @deodad and @cmlad for Demo and https://framesv2.com
- jiangsi for Remix on Cloudflare Pages template
- Yusuke Wada for Hono 🔥
MIT