Installation

Get Miko402 running locally in under 5 minutes. This guide covers cloning the repository, configuring your environment, and verifying the setup.

Quick Install

git clone https://github.com/Miko402-xyz/miko402.git
cd miko402
npm install
cp .env.example .env.local
# Add your OpenRouter API key to .env.local
npm run dev

Open http://localhost:3000arrow-up-right to access the application.

Prerequisites

Required

  • Web3 Wallet — Phantom, MetaMask, or Coinbase Wallet

  • Some crypto — For testing payments (devnet works for free)

  • Modern browser — Chrome, Firefox, Brave, or Edge

Verify Your Environment

Step-by-Step Installation

1. Clone the Repository

2. Install Dependencies

This installs Next.js, React, Tailwind CSS, Solana Web3.js, the Vercel AI SDK, and all other required packages. Allow 2–3 minutes for completion.

3. Configure Environment Variables

Open .env.local and configure:

To obtain your OpenRouter API key:

  1. Sign up or log in

  2. Navigate to Keys → Create New Key

  3. Copy the key into .env.local

Tip: Start with devnet for testing (free), then switch to mainnet when ready for production.

4. Start the Development Server

You should see:

5. Open in Browser

Visit http://localhost:3000arrow-up-right. You should see the Miko402 landing page with the "Launch App" button.

Advanced Setup

Alternative Package Managers

Custom Port

Production Build

Production mode enables minification, tree-shaking, image optimization, and code splitting.

Solana RPC Configuration

Free Public RPCs

Premium RPC Providers

For production workloads, a dedicated RPC provider offers better reliability, higher rate limits, and faster response times.

Heliushelius.devarrow-up-right

QuickNodequicknode.comarrow-up-right

Alchemyalchemy.comarrow-up-right

Verify Installation

Test the Chat Interface

  1. Click "Launch App"

  2. The chat interface should load

  3. Send a test message (no wallet required for chat)

  4. Miko should respond within seconds

Test Wallet Connection

  1. Install Phantom or MetaMask

  2. Click "Connect Wallet" in the application

  3. Approve the connection

  4. Your wallet address should appear in the UI

Test a Payment (Optional)

  1. Connect a wallet configured for devnet

  2. Obtain devnet SOL from the faucetarrow-up-right

  3. Request a service: "Get weather data for San Francisco"

  4. Approve the payment and observe the transaction flow

Common Issues

Port Already in Use

Module Not Found

API Key Not Working

  1. Verify the key is correct in .env.local

  2. Ensure there are no quotes around the value

  3. Restart the dev server after making changes

  4. Check key status on the OpenRouter dashboardarrow-up-right

Environment Variables Not Loading

  1. The file must be named exactly .env.local

  2. It must reside in the project root directory

  3. Restart the dev server after any changes

  4. Confirm .gitignore includes .env.local

Next Steps

Tips

  • Keep the dev server running during development — hot reload updates instantly

  • Never commit .env.local to version control

  • Use separate API keys for development and production

  • Rotate keys regularly as a security best practice

  • Use a premium RPC provider for production deployments

Need Help?


Installation complete? Continue to the Quick Start Guide to make your first autonomous payment.

Last updated