Getting Started

Quick Setup

Get AutoPilot running locally in under 5 minutes. This guide covers cloning the repository, setting up environment variables, and launching both the frontend and backend.

Prerequisites

Node.js 18+ and npm/pnpm
A Freighter browser wallet extension
Git installed
PostgreSQL database (Neon recommended)
Redis instance (Upstash recommended)
Groq API key (free tier available)

Installation Steps

1

Clone the Repository

Clone the AutoPilot repository from GitHub and navigate into the project directory.
bash
git clone https://github.com/aditya-jha033/autopilot-stellar.git
cd autopilot-stellar
2

Install Frontend Dependencies

Navigate to the frontend directory and install all dependencies.
bash
cd frontend
npm install
3

Configure Frontend Environment

Copy the example environment file and fill in your values.
bash
cp .env.example .env.local
Edit .env.local:
env
NEXT_PUBLIC_BACKEND_URL=http://localhost:3001
DATABASE_URL=postgresql://...       # Neon PostgreSQL URL
NEXTAUTH_SECRET=your-random-secret  # Generate with: openssl rand -hex 32
4

Install Backend Dependencies

bash
cd ../backend
npm install
5

Configure Backend Environment

bash
cp .env.example .env
Edit .env:
env
DATABASE_URL=postgresql://...       # Same Neon URL
GROQ_API_KEY=gsk_...                # From console.groq.com
UPSTASH_REDIS_REST_URL=https://...  # From upstash.com
UPSTASH_REDIS_REST_TOKEN=...
AUTOPILOT_SECRET_KEY=S...           # Stellar keypair secret
AUTOPILOT_PUBLIC_KEY=G...           # Stellar keypair public
JWT_SECRET=your-jwt-secret

To generate a new Stellar keypair for the engine account, run: npx tsx src/scripts/genKeypair.ts in the backend directory.

6

Generate a Stellar Keypair

The AutoPilot engine needs a Stellar keypair to fund automated vault transactions on Testnet.
bash
# Run from backend/ directory
npx tsx src/scripts/genKeypair.ts

# Fund the engine account with Testnet XLM via Friendbot
npx tsx src/scripts/friendbot.ts YOUR_PUBLIC_KEY
7

Start the Backend

bash
# From backend/ directory
npm run dev
The backend starts on http://localhost:3001
8

Start the Frontend

Open a new terminal tab:
bash
# From frontend/ directory
npm run dev
Open http://localhost:3000 in your browser.

Make sure you have the Freighter wallet extension installed and set to Testnet network before connecting your wallet on the onboarding page.

✅ You're all set!

Once running, connect your Freighter wallet on the onboarding page, create your first vault, and let the AI set up your first automated savings rule.

Continue to Usage Guide