Documentation

Run locally

Start the Rust API and Next.js frontend on your computer.

Step 01

Prepare your environment

You need the project checkout, Rust 1.91 or newer with Cargo, and Node.js compatible with Next.js 16 plus npm. Run the commands from your project root unless a step says otherwise. Initial dependency installation needs internet access.

Step 02

Start the API

Create the local configuration if it does not exist, then start the backend. These commands use macOS / Linux shell syntax.

Terminal
cp -n .env.example .env
cargo run -p lightning-api

The default API address is http://localhost:3001. Leave this terminal running.

Step 03

Start the frontend

Open a second terminal at the project root:

Terminal
cd frontend
cp -n .env.example .env.local
npm install
npm run dev -- --port 3000

In frontend/.env.local, set NEXT_PUBLIC_API_BASE_URL=http://localhost:3001. Open http://localhost:3000. Restart the frontend after changing this variable; deployed builds need to be rebuilt.

Step 04

Check the connection

Terminal
curl http://localhost:3001/health

A healthy API returns {"status":"ok"}. Stop either development server with Ctrl+C in its terminal.

← All guides