FlowIndex
FlowIndex

Getting Started

Run FlowIndex locally using Docker Compose.

LLM IndexLLM Full

This guide walks you through running a local FlowIndex instance with Docker Compose. By the end you will have the backend indexer, frontend UI, and PostgreSQL database running on your machine.

Prerequisites

Quick Start

1. Clone the repository

git clone https://github.com/Outblock/flowindex.git
cd flowindex

2. Start all services

docker compose up -d --build

This starts the following core services:

ServicePortDescription
frontendlocalhost:5173Web UI (TanStack Start SSR)
backendlocalhost:8080Go API server + indexer
dblocalhost:5432PostgreSQL database

Additional services (Supabase auth stack, developer portal, etc.) are also started automatically.

3. Verify the backend is running

curl http://localhost:8080/health

Expected response:

{"status":"ok"}

4. Check indexing status

curl http://localhost:8080/status

This returns a JSON object with indexing progress, including:

{
  "chain_id": "flow",
  "latest_height": 142610500,
  "indexed_height": 142610498,
  "progress": "99.98%",
  "behind": 2,
  "total_blocks": 1500000,
  "total_transactions": 3200000,
  "status": "ok"
}

5. Open the frontend

Navigate to http://localhost:5173 in your browser. You should see the FlowIndex explorer with blocks appearing in real time.

Viewing Logs

# Backend logs (indexer + API)
docker compose logs -f backend

# Frontend logs
docker compose logs -f frontend

# Database logs
docker compose logs -f db

Stopping Services

docker compose down

To also remove stored data (database volumes):

docker compose down -v

Local Development (Without Docker)

Backend

cd backend
go mod download && go mod tidy

# Build
CGO_CFLAGS="-std=gnu99" CGO_ENABLED=1 go build -o indexer main.go

# Run (requires a running PostgreSQL instance)
DB_URL=postgres://flowscan:secretpassword@localhost:5432/flowscan \
FLOW_ACCESS_NODE=access-001.mainnet28.nodes.onflow.org:9000 \
PORT=8080 \
./indexer

Frontend

cd frontend

# Install dependencies
bun install

# Start dev server
bun run dev

The frontend dev server starts at http://localhost:3000 and connects to the backend at http://localhost:8080 by default.

Database

If running outside Docker, create the database and apply the schema:

createdb flowscan
psql postgres://flowscan:secretpassword@localhost:5432/flowscan < backend/schema_v2.sql

Or use the built-in migration command:

./indexer migrate

Next Steps

On this page