Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
00794cf
Add .circleci/config.yml
Dargon789 Apr 13, 2025
513a732
chore: add context exports (#2261)
abcrane123 Apr 14, 2025
a3907e5
feat: Add batch ENS / Basename resolution with useAddresses hook and …
Apr 14, 2025
3e7c8f2
chore: add provider exports back (#2278)
abcrane123 Apr 14, 2025
b369057
refactor: Replace Packemon with Vite (#2227)
dgca Apr 14, 2025
8e49fa4
fix: Don't clean out out dir when building in dev mode (#2279)
dgca Apr 14, 2025
f9ac80c
fix wallet modal (#2282)
abcrane123 Apr 15, 2025
89647f0
fix: Separate deafult Wagmi and Query providers (#2280)
dgca Apr 15, 2025
6539766
chore: show connect button when disconnected in Identity demo (#2285)
abcrane123 Apr 16, 2025
b43425c
Fix: Flaky AppchainBridgeProvider network toggle test (#2288)
Apr 16, 2025
a1cd8f0
refactor: send display name (#2283)
Apr 16, 2025
36e894a
chore: Refactor getNames utility to leverage batch processing with ge…
Apr 16, 2025
0e6a2dc
chore: fix typos in documentation (#2286)
leopardracer Apr 16, 2025
abfb783
chore: Dynamically set version in version.ts (#2290)
dgca Apr 17, 2025
e5199b6
fix: viem version (#2291)
alessey Apr 17, 2025
a39e8b2
fix: viem (#2293)
alessey Apr 17, 2025
c4bf182
fix: viem (#2295)
alessey Apr 17, 2025
04b4007
chore: Add @farcaster/frame-sdk dependency to minikit templates (#2297)
heyztb Apr 18, 2025
388771c
chore: bump cli templates deps (#2296)
alessey Apr 21, 2025
6208192
chore: remove smart wallet check from cli prompt (#2287)
abcrane123 Apr 21, 2025
0189040
fix: ready options (#2300)
alessey Apr 22, 2025
a5aff39
fix: authenticate against user fid (#2299)
alessey Apr 22, 2025
11ecee2
chore: version packages v 0.38.8 🌊 (#2276)
github-actions[bot] Apr 22, 2025
a7f2797
fix: OnchainKit package.json publishConfig.access = public (#2306)
dgca Apr 22, 2025
b671486
chore: add redirect for `getOnrampBuyUrl` (#2104)
dschlabach Apr 23, 2025
0227374
fix: signature provider unmount reset (#2172)
teimurjan Apr 23, 2025
721ca38
fix: Updates playground to remove outdated imports (#2294)
dgca Apr 23, 2025
b1f6a34
chore(deps): bump next from 14.2.25 to 14.2.26 (#2215)
dependabot[bot] Apr 23, 2025
f5b1d80
chore: update `create-onchain` version (#2315)
dschlabach Apr 26, 2025
45af789
fix: rpcUrl (#2319)
Apr 28, 2025
7e84d03
chore: update release workflows (#2314)
dschlabach Apr 29, 2025
befb555
fix: fix root build command (#2320)
dschlabach Apr 29, 2025
e449832
fix: fix build command in workflow (#2321)
dschlabach Apr 29, 2025
c7fa9e4
fix: narrow filtering for release workflow (#2322)
dschlabach Apr 29, 2025
a3ce1e7
chore: version packages v0.38.9 🌊 (#2323)
github-actions[bot] Apr 29, 2025
5d6e915
fix: support an insecure fallback for session id to allow for testing…
xtbase Apr 29, 2025
c48aa52
chore: Make create-onchain library public (#2324)
dgca Apr 30, 2025
cbebd29
chore: Don't ask to generate manifest during app creation in create-o…
dgca May 1, 2025
c811694
fix: Basenames bidirectional validation (#2329)
dgca May 1, 2025
1cc007e
chore: version packages v0.38.10 🌊 (#2330)
github-actions[bot] May 1, 2025
421b03d
fix: getSocials (#2333)
dgca May 2, 2025
8cc7a78
docs: fix broken link (#2331)
GarmashAlex May 2, 2025
293c336
feat: Make sign up button optional (#2332)
dgca May 6, 2025
436729d
chore: Release changesets (#2342)
dgca May 6, 2025
11beba0
Chore: workflow improvement for vscode/cursor users (#2334)
xtbase May 6, 2025
1817884
chore: version packages 🚀 (#2343)
github-actions[bot] May 7, 2025
0cf7de7
chore: enable paymaster for wallet advanced Send (#2335)
abcrane123 May 7, 2025
0b433fe
fix: MiniKit frames connector (#2347)
dgca May 7, 2025
840de87
chore: version packages 🚀 (#2348)
github-actions[bot] May 7, 2025
eff917e
fix: Update wagmi config if connectors change (#2350)
dgca May 7, 2025
f7a35dd
chore: version packages 🚀 (#2352)
github-actions[bot] May 7, 2025
5c78d77
chore(deps-dev): bump vite from 6.2.3 to 6.2.7 (#2327)
dependabot[bot] May 8, 2025
a1e63d1
chore: Use signed commits for Changesets action (#2351)
dgca May 13, 2025
930c401
chore: Update MiniKit mini app manifest (#2355)
dgca May 13, 2025
bb07ea0
chore: version packages 🚀 (#2362)
github-actions[bot] May 14, 2025
a79e3a0
Merge remote-tracking branch 'upstream/main' into circleci-project-setup
Dargon789 Dec 15, 2025
20a9a0c
Merge branch 'main' into circleci-project-setup
Dargon789 Dec 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions packages/create-onchain/templates/minikit-basic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# MiniKit Template

This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-onchain --mini`](), configured with:

- [MiniKit](https://docs.base.org/builderkits/minikit/overview)
- [OnchainKit](https://www.base.org/builders/onchainkit)
- [Tailwind CSS](https://tailwindcss.com)
- [Next.js](https://nextjs.org/docs)

## Getting Started

1. Install dependencies:
```bash
npm install
# or
yarn install
# or
pnpm install
# or
bun install
```

2. Verify environment variables, these will be set up by the `npx create-onchain --mini` command:

You can regenerate the FARCASTER Account Association environment variables by running `npx create-onchain --manifest` in your project directory.

The environment variables enable the following features:

- Frame metadata - Sets up the Frame Embed that will be shown when you cast your frame
- Account association - Allows users to add your frame to their account, enables notifications
- Redis API keys - Enable Webhooks and background notifications for your application by storing users notification details

```bash
# Shared/OnchainKit variables
NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME=
NEXT_PUBLIC_URL=
NEXT_PUBLIC_ICON_URL=
NEXT_PUBLIC_ONCHAINKIT_API_KEY=

# Frame metadata
FARCASTER_HEADER=
FARCASTER_PAYLOAD=
FARCASTER_SIGNATURE=
NEXT_PUBLIC_APP_ICON=
NEXT_PUBLIC_APP_SUBTITLE=
NEXT_PUBLIC_APP_DESCRIPTION=
NEXT_PUBLIC_APP_SPLASH_IMAGE=
NEXT_PUBLIC_SPLASH_BACKGROUND_COLOR=
NEXT_PUBLIC_APP_PRIMARY_CATEGORY=
NEXT_PUBLIC_APP_HERO_IMAGE=
NEXT_PUBLIC_APP_TAGLINE=
NEXT_PUBLIC_APP_OG_TITLE=
NEXT_PUBLIC_APP_OG_DESCRIPTION=
NEXT_PUBLIC_APP_OG_IMAGE=

# Redis config
REDIS_URL=
REDIS_TOKEN=
```

3. Start the development server:
```bash
npm run dev
```

## Template Features

### Frame Configuration
- `.well-known/farcaster.json` endpoint configured for Frame metadata and account association
- Frame metadata automatically added to page headers in `layout.tsx`

### Background Notifications
- Redis-backed notification system using Upstash
- Ready-to-use notification endpoints in `api/notify` and `api/webhook`
- Notification client utilities in `lib/notification-client.ts`

### Theming
- Custom theme defined in `theme.css` with OnchainKit variables
- Pixel font integration with Pixelify Sans
- Dark/light mode support through OnchainKit

### MiniKit Provider
The app is wrapped with `MiniKitProvider` in `providers.tsx`, configured with:
- OnchainKit integration
- Access to Frames context
- Sets up Wagmi Connectors
- Sets up Frame SDK listeners
- Applies Safe Area Insets

## Customization

To get started building your own frame, follow these steps:

1. Remove the DemoComponents:
- Delete `components/DemoComponents.tsx`
- Remove demo-related imports from `page.tsx`

2. Start building your Frame:
- Modify `page.tsx` to create your Frame UI
- Update theme variables in `theme.css`
- Adjust MiniKit configuration in `providers.tsx`

3. Add your frame to your account:
- Cast your frame to see it in action
- Share your frame with others to start building your community

## Learn More

- [MiniKit Documentation](https://docs.base.org/builderkits/minikit/overview)
- [OnchainKit Documentation](https://docs.base.org/builderkits/onchainkit/getting-started)
- [Next.js Documentation](https://nextjs.org/docs)
- [Tailwind CSS Documentation](https://tailwindcss.com/docs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
function withValidProperties(
properties: Record<string, undefined | string | string[]>,
) {
return Object.fromEntries(
Object.entries(properties).filter(([key, value]) => {
if (Array.isArray(value)) {
return value.length > 0;
}
return !!value;
}),
);
}

export async function GET() {
const URL = process.env.NEXT_PUBLIC_URL;

return Response.json({
accountAssociation: {
header: process.env.FARCASTER_HEADER,
payload: process.env.FARCASTER_PAYLOAD,
signature: process.env.FARCASTER_SIGNATURE,
},
frame: withValidProperties({
version: "1",
name: process.env.NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME,
subtitle: process.env.NEXT_PUBLIC_APP_SUBTITLE,
description: process.env.NEXT_PUBLIC_APP_DESCRIPTION,
screenshotUrls: [],
iconUrl: process.env.NEXT_PUBLIC_APP_ICON,
splashImageUrl: process.env.NEXT_PUBLIC_APP_SPLASH_IMAGE,
splashBackgroundColor: process.env.NEXT_PUBLIC_SPLASH_BACKGROUND_COLOR,
homeUrl: URL,
webhookUrl: `${URL}/api/webhook`,
primaryCategory: process.env.NEXT_PUBLIC_APP_PRIMARY_CATEGORY,
tags: [],
heroImageUrl: process.env.NEXT_PUBLIC_APP_HERO_IMAGE,
tagline: process.env.NEXT_PUBLIC_APP_TAGLINE,
ogTitle: process.env.NEXT_PUBLIC_APP_OG_TITLE,
ogDescription: process.env.NEXT_PUBLIC_APP_OG_DESCRIPTION,
ogImageUrl: process.env.NEXT_PUBLIC_APP_OG_IMAGE,
}),
});
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
function withValidProperties(
properties: Record<string, undefined | string | string[]>,
) {
return Object.fromEntries(
Object.entries(properties).filter(([key, value]) => {
if (Array.isArray(value)) {
return value.length > 0;
}
return !!value;
}),
);
}

export async function GET() {
const URL = process.env.NEXT_PUBLIC_URL;

return Response.json({
accountAssociation: {
header: process.env.FARCASTER_HEADER,
payload: process.env.FARCASTER_PAYLOAD,
signature: process.env.FARCASTER_SIGNATURE,
},
frame: withValidProperties({
version: "1",
name: process.env.NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME,
subtitle: process.env.NEXT_PUBLIC_APP_SUBTITLE,
description: process.env.NEXT_PUBLIC_APP_DESCRIPTION,
screenshotUrls: [],
iconUrl: process.env.NEXT_PUBLIC_APP_ICON,
splashImageUrl: process.env.NEXT_PUBLIC_APP_SPLASH_IMAGE,
splashBackgroundColor: process.env.NEXT_PUBLIC_SPLASH_BACKGROUND_COLOR,
homeUrl: URL,
webhookUrl: `${URL}/api/webhook`,
primaryCategory: process.env.NEXT_PUBLIC_APP_PRIMARY_CATEGORY,
tags: [],
heroImageUrl: process.env.NEXT_PUBLIC_APP_HERO_IMAGE,
tagline: process.env.NEXT_PUBLIC_APP_TAGLINE,
ogTitle: process.env.NEXT_PUBLIC_APP_OG_TITLE,
ogDescription: process.env.NEXT_PUBLIC_APP_OG_DESCRIPTION,
ogImageUrl: process.env.NEXT_PUBLIC_APP_OG_IMAGE,
}),
});
}
50 changes: 50 additions & 0 deletions packages/create-onchain/templates/minikit-snake/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import "./theme.css";
import "@coinbase/onchainkit/styles.css";
import type { Metadata, Viewport } from "next";
import "./globals.css";
import { Providers } from "./providers";

export const viewport: Viewport = {
width: "device-width",
initialScale: 1,
};

export async function generateMetadata(): Promise<Metadata> {
const URL = process.env.NEXT_PUBLIC_URL;
return {
title: process.env.NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME,
description:
"Generated by `create-onchain --template=minikit-snake`, a Next.js template for MiniKit",
other: {
"fc:frame": JSON.stringify({
version: "next",
imageUrl: process.env.NEXT_PUBLIC_APP_HERO_IMAGE,
button: {
title: `Launch ${process.env.NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME}`,
action: {
type: "launch_frame",
name: process.env.NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME,
url: URL,
splashImageUrl: process.env.NEXT_PUBLIC_SPLASH_IMAGE,
splashBackgroundColor:
process.env.NEXT_PUBLIC_SPLASH_BACKGROUND_COLOR,
},
},
}),
},
};
}

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className="bg-background overflow-hidden">
<Providers>{children}</Providers>
</body>
</html>
);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions packages/onchainkit/src/minikit/hooks/useMiniKit.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,22 @@ describe('useMiniKit', () => {
expect(result.current.isFrameReady).toBe(true);
});

it('allows users to pass through ready options', async () => {
const { result } = renderHook(() => useMiniKit(), {
wrapper: ({ children }) => (
<MiniKitContext.Provider value={mockContext}>
{children}
</MiniKitContext.Provider>
),
});

await act(async () => {
result.current.setFrameReady({ disableNativeGestures: true });
});

expect(result.current.isFrameReady).toBe(true);
});

it('should return the correct values', () => {
const { result } = renderHook(() => useMiniKit(), {
wrapper: ({ children }) => (
Expand Down
Loading
Loading