Skip to main content
MiniKit-JS is our official SDK for creating mini apps that work with World App.

Quick Start

The fastest way to get started is by using our template next-15 repository. Run the following command and follow the instructions to create a new mini app. For cleanliness we recommend using pnpm as your package manager.
npx @worldcoin/create-mini-app@latest my-first-mini-app
Template

Correctly running template should look like this

Manual Installation

MiniKit-JS is the core library and is framework agnostic. Install it with pnpm, or use a CDN like jsdelivr for inline HTML. Replace [version] with the release you want to load.
pnpm install @worldcoin/minikit-js

Usage

  1. Wrap your app with MiniKitProvider in a client component. This initializes MiniKit and makes it available throughout your app.
src/app/providers.tsx
"use client";

import { MiniKitProvider } from "@worldcoin/minikit-js/minikit-provider";

export default function Providers({
  children,
}: {
  children: React.ReactNode;
}) {
  return <MiniKitProvider>{children}</MiniKitProvider>;
}
src/app/layout.tsx
import Providers from "./providers";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}
  1. Check if MiniKit is installed. MiniKit.isInstalled() will only return true if the mini app is opened and initialized inside the World App. This is useful to distinguish between a user opening your app in the browser or in the World App.
import { MiniKit } from "@worldcoin/minikit-js";

console.log(MiniKit.isInstalled());

Build with AI

We have generated a llms-full.txt file that converts all our documentation into a single markdown document following the https://llmstxt.org/ standard.

Template Repositories

The following template repositories are also available: Otherwise, continue below with the installation instructions.
Watch a video tutorial here.