This document provides a high-level overview of the hellno/mini-app-ui codebase, including its purpose, architecture, directory structure, key files, and development workflow.
hellno/mini-app-ui is a collection of React components, hooks, and utilities designed to help build Farcaster mini-apps with a consistent UX. It leverages Next.js, TypeScript, Tailwind CSS, and the shadcn registry.
- Ready-to-use UI components for token transfers, sharing casts, pinning mini-apps, displaying coin balances, user avatars, user context, NFT cards, profile search, and more.
- Custom React hooks for Farcaster MiniApp SDK integration and profile management.
- Utility libraries for text manipulation and formatting.
- Integrated registry manifest (
registry.json) and generated JSON exports for the shadcn CLI. - Interactive demo website powered by Next.js with installation snippets.
- Next.js (App Router) and React
- TypeScript
- Tailwind CSS (with
tw-animate-css) - shadcn registry for component distribution
- Husky for Git hooks and pre-commit checks
- PNPM as the package manager
.
├── .github/ # GitHub workflows
├── .husky/ # Git hooks
├── app/ # Next.js App Router source (pages, layouts)
├── components/ # Custom React components
├── lib/ # Shared utilities (cn, components-config)
├── public/ # Static assets (images, previews, registry JSON)
│ ├── previews/ # Component preview media (MP4)
│ └── r/ # Generated registry JSON files for shadcn
├── registry/ # Source files for registry items
│ └── mini-app/
│ ├── blocks/ # React component source code
│ ├── hooks/ # Custom hook source code
│ └── lib/ # Utility libraries (e.g., text-utils)
├── registry.json # Registry manifest for shadcn (items definition)
├── package.json # Project metadata, dependencies, and scripts
├── tsconfig.json # TypeScript configuration
├── next.config.ts # Next.js configuration
├── postcss.config.mjs # PostCSS configuration
├── eslint.config.mjs # ESLint configuration
└── README.md # Setup and contribution guidelines
| Command | Description |
|---|---|
pnpm dev |
Start the Next.js development server (with Turbopack) |
pnpm build |
Build the Next.js application |
pnpm start |
Start the production server |
pnpm lint |
Run ESLint and Prettier checks |
pnpm registry:build |
Generate registry JSON files (shadcn registry:build) |
pnpm prepare |
Install Husky Git hooks |
The registry manifest (registry.json) defines the following items:
- Components
daimo-pay-transfer-buttonshare-cast-buttonadd-miniapp-buttonshow-coin-balanceavataruser-contextnft-cardprofile-search
- Hooks
use-miniapp-sdkuse-profile
- Libraries
text-utilsavatar-utils
- Install dependencies:
pnpm install - Start development server:
pnpm dev - Generate registry JSON:
pnpm registry:build(Husky runs this on pre-commit) - Run pre-commit hook:
pnpm lint+pnpm registry:build - Commit and push: Vercel auto-deploys; the shadcn CLI fetches JSON from
https://hellno-mini-app-ui.vercel.app/r/
This project is licensed under the MIT License (see the License section in README.md).