A modern, feature-rich starter kit for building Farcaster MiniApps using SvelteKit, TypeScript, and the official Farcaster MiniApp SDK. This demo showcases essential Farcaster integration features including authentication, casting, and frame interactions.
Most of the code is inspider on this links:
This starter kit provides a solid foundation for developers looking to build MiniApps on the Farcaster protocol. It demonstrates best practices for integrating with Farcaster's ecosystem, including quick authentication, cast composition, and frame SDK integration. Built with modern web technologies, it offers a smooth development experience with hot reloading, type safety, and a beautiful UI.
Clone the repository
git clone <your-repo-url>
cd minicaster-svelte
Install dependencies
npm install
# or
yarn install
# or
pnpm install
Configure environment variables
Create a .env
file in the root directory:
# Add your configuration variables here
# Example:
# FARCASTER_DEVELOPER_MNEMONIC=your_mnemonic_here
Start the development server
npm run dev
# or
yarn dev
# or
pnpm dev
Open your browser
Navigate to http://localhost:5173
to see your MiniApp in action!
The app includes a streamlined authentication flow using Farcaster's quickAuth system:
Create and publish casts directly from the MiniApp:
Explore the frame context and understand what data is available:
minicaster-svelte/
โโโ src/
โ โโโ lib/
โ โ โโโ components/ # Reusable UI components
โ โ โ โโโ QuickAuth.svelte
โ โ โ โโโ ComposeCastAction.svelte
โ โ โโโ config/ # Configuration files
โ โ โ โโโ farcaster.ts # Farcaster-specific config
โ โ โ โโโ index.ts # General app config
โ โ โโโ frames/ # Frame-related code
โ โ โ โโโ global/ # Global frame handlers
โ โ โ โโโ merkel/ # Merkle tree utilities
โ โ โโโ stores/ # Svelte stores
โ โ โ โโโ global/ # Global state management
โ โ โโโ types/ # TypeScript type definitions
โ โโโ routes/ # SvelteKit routes
โ โโโ +layout.svelte # Root layout
โ โโโ +page.svelte # Main page
โ โโโ components/ # Page-specific components
โโโ static/ # Static assets
โโโ package.json # Dependencies and scripts
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm run check
- Type check with svelte-checknpm run lint
- Lint code with ESLintnpm run format
- Format code with PrettierHandles Farcaster authentication using the quickAuth system. Provides sign-in/sign-out functionality and displays JWT token information.
Demonstrates cast composition using the Farcaster SDK. Creates and publishes casts with custom text and embeds.
The app includes comprehensive frame support with:
We welcome contributions to improve this starter kit! Here's how you can help:
git checkout -b feature/amazing-feature
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
Happy building! ๐
Built with โค๏ธ for the Farcaster community.