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 lib, framework agnostic,
pnpm install @worldcoin/minikit-js
Or use a CDN like jsdelivr, for inline HTML, make sure to fill in the version.
<script type="module">
  import { MiniKit } from "https://cdn.jsdelivr.net/npm/@worldcoin/minikit-js@[version]/+esm";
</script>

Usage

  1. Wrap your root with the MiniKitProvider component. This will initialize MiniKit and make it available throughout your app.
src/index.tsx
import { MiniKitProvider } from "@worldcoin/minikit-js/minikit-provider";
export default async function Root({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <MiniKitProvider>
        <body className={inter.className}>{children}</body>
      </MiniKitProvider>
    </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.
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.