πŸ’»Installation

Get Yuki402 running on your machine in under 5 minutes. Whether you're a developer looking to integrate autonomous payments or a crypto enthusiast wanting to experience the future firsthandβ€”this guide has you covered.

⚑ Quick Install

TL;DR for the impatient:

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

Open http://localhost:3000arrow-up-right and you're live. That's it.

πŸ“‹ Prerequisites

Before diving in, make sure you have:

Required

  • Web3 Wallet - MetaMask, Phantom, or Coinbase Wallet

  • Some crypto - For testing payments (devnet works too!)

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

Check Your Setup

If any of these fail, install the missing tools first.

πŸš€ Step-by-Step Installation

1. Clone the Repository

What this does: Downloads the entire Yuki402 codebase to your machine.

2. Install Dependencies

What this does: Installs all required packages (Next.js, React, Tailwind, Solana Web3.js, AI SDK, etc.)

This might take 2-3 minutes. Go grab a coffee β˜•

3. Set Up Environment Variables

Now open .env.local in your favorite editor and add your keys:

Getting your OpenRouter API key:

  1. Sign up or log in

  2. Go to Keys β†’ Create New Key

  3. Copy and paste into .env.local

Pro tip: Start with devnet for testing (free!), then switch to mainnet when you're ready.

4. Start the Development Server

You should see:

5. Open in Browser

Visit http://localhost:3000arrow-up-right

You should see:

  • Yuki's landing page with the hero section

  • "Launch App" button ready to go

  • Beautiful animations and glass-morphism effects

If you see this, you're golden. Welcome aboard! πŸŽ‰

πŸ”§ Advanced Setup

Using Yarn Instead of npm

Using pnpm (Faster!)

Custom Port

Production Build

Production mode optimizations:

  • Minified JavaScript

  • Optimized images

  • Tree-shaken code

  • Faster load times

🌐 Solana RPC Configuration

Free Public RPCs

Devnet (Testing):

Mainnet (Production):

Premium RPC Providers

For production and heavy usage, use a dedicated RPC:

Helius:

Get Helius API keyarrow-up-right

QuickNode:

Get QuickNode endpointarrow-up-right

Alchemy:

Get Alchemy keyarrow-up-right

Why premium RPC?

  • Higher rate limits

  • Better reliability

  • Faster responses

  • Historical data access

πŸ§ͺ Verify Installation

Test the Chat Interface

  1. Click "Launch App"

  2. You should see the chat interface

  3. Try sending a message (no wallet needed for chat)

  4. AI should respond within seconds

Test Wallet Connection

  1. Install MetaMask or Phantom

  2. Click "Connect Wallet" in the app

  3. Approve the connection

  4. Your wallet address should appear

Test a Mock Payment (Optional)

  1. Connect wallet

  2. Make sure you're on devnet

  3. Get devnet SOL from faucetarrow-up-right

  4. Request: "Generate an OpenWeatherMap API key"

  5. Approve the mock payment

  6. Watch Yuki work her magic!

πŸ› Common Issues

Port Already in Use

Solution: Kill the process or use a different port

Module Not Found

Solution: Reinstall dependencies

API Key Not Working

Solution:

  1. Verify key is correct in .env.local

  2. Make sure there are NO quotes around the key

  3. Restart the dev server (Ctrl+C, then npm run dev)

Environment Variables Not Loading

Solution:

  1. File must be named exactly .env.local

  2. File must be in project root (not in app/ folder)

  3. Must restart dev server after changes

  4. Check .gitignore includes .env.local

🚒 Next Steps

Now that Yuki is installed:

  1. Quick Start Guide - Make your first autonomous payment

  2. Configuration - Set up spending limits and preferences

  3. Using the Chat - Master the AI interface

πŸ’‘ Pro Tips

Development Workflow:

  • Keep the dev server running while coding

  • Hot reload updates instantly

  • Check browser console for errors

  • Use React DevTools for debugging

Environment Management:

  • Never commit .env.local to git

  • Use .env.example as template

  • Different keys for dev/prod

  • Rotate keys regularly

Performance:

  • Use premium RPC for production

  • Enable caching where possible

  • Monitor API usage/costs

  • Set appropriate rate limits

πŸ†˜ Need Help?

Installation Issues:

Have Suggestions?


Installed successfully? Head to the Quick Start Guide to make your first autonomous payment! ⚑

Last updated