This reverts commit 78626c2dc7d4646bdd9b60b8f67f3ffe5c1defb5, reversing changes made to b1fdfc19a92241638692d58494f48ce1bb25df74.
Farcaster Mini Apps (formerly Frames v2) Quickstart by Neynar 🪐
A Farcaster Mini Apps quickstart npx script.
This is a NextJS + TypeScript + React app.
Guide
Check out this Neynar docs page for a simple guide on how to create a Farcaster Mini App in less than 60 seconds!
Getting Started
To create a new mini app project, run:
npx @neynar/create-farcaster-mini-app@latest
To run the project:
cd <PROJECT_NAME>
npm run dev
Code Formatting & Linting
This template includes comprehensive formatting and linting tools to ensure consistent code quality:
- Prettier: Automatic code formatting
- ESLint: Code linting with Next.js and TypeScript support
- EditorConfig: Cross-editor consistency
Available Scripts
npm run format # Format all files with Prettier
npm run format:check # Check if files are properly formatted
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues automatically
npm run type-check # Run TypeScript type checking
npm run check # Run all checks (types, lint, format)
See FORMATTING.md for detailed configuration and setup information.
Importing the CLI
To invoke the CLI directly in JavaScript, add the npm package to your project and use the following import statement:
import { init } from '@neynar/create-farcaster-mini-app';
Deploying to Vercel
For projects that have made minimal changes to the quickstart template, deploy to vercel by running:
npm run deploy:vercel
Building for Production
To create a production build, run:
npm run build
The above command will generate a .env file based on the .env.local file and user input. Be sure to configure those environment variables on your hosting platform.
Developing Script Locally
This section is only for working on the script and template. If you simply want to create a mini app and use the template, this section is not for you.
Recommended: Using npm link for Local Development
To iterate on the CLI and test changes in a generated app without publishing to npm:
-
In your installer/template repo (this repo), run:
npm linkThis makes your local version globally available as a symlinked package.
-
Now, when you run:
npx @neynar/create-farcaster-mini-app...it will use your local changes (including any edits to
init.jsor other files) instead of the published npm version.
Alternative: Running the Script Directly
You can also run the script directly for quick iteration:
node ./bin/index.js
However, this does not fully replicate the npx install flow and may not catch all issues that would occur in a real user environment.
Environment Variables and Scripts
If you update environment variable handling, remember to replicate any changes in the dev, build, and deploy scripts as needed. The build and deploy scripts may need further updates and are less critical for most development workflows.