Skip to main content

Prerequisites

Before setting up ActumX, ensure you have the following tools installed:

Bun

Required for running the API serverInstall Bun

pnpm

Required for the dashboard frontendInstall pnpm

Docker

Required for running PostgreSQLInstall Docker

Setup Steps

1

Start PostgreSQL Database

Create and start a PostgreSQL container using Docker:
docker run --name actumx-postgres \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_DB=x402 \
  -p 5432:5432 \
  -d postgres:latest
This creates a database named x402 accessible at:
postgres://postgres:postgres@localhost:5432/x402
2

Configure the API

Navigate to the API directory and set up environment variables:
cd api
cp .env.example .env
Your api/.env file should contain:
.env
PORT=3001
DATABASE_URL=postgres://postgres:postgres@localhost:5432/x402
BETTER_AUTH_URL=http://localhost:3001
DASHBOARD_ORIGIN=http://localhost:3000
BETTER_AUTH_SECRET=dev-only-better-auth-secret-change-me-32-plus-characters
SOLANA_RPC_URL=https://api.devnet.solana.com
In production, use a strong random secret for BETTER_AUTH_SECRET (minimum 32 characters).
3

Install Dependencies and Run Migrations

Install the API dependencies and set up the database schema:
bun install
bun run db:migrate
The db:migrate command creates all necessary tables for agents, API keys, billing, and x402 transactions.
4

Start the API Server

Launch the API in development mode:
bun run dev
The API will be available at http://localhost:3001.
Other useful commands:
  • bun run start - Run without watch mode
  • bun run check - Type-check the codebase
  • bun run db:reset - Reset and re-run migrations
5

Configure the Dashboard

In a new terminal, navigate to the dashboard directory:
cd dashboard
cp .env.example .env.local
Your dashboard/.env.local file should contain:
.env.local
NEXT_PUBLIC_API_BASE_URL=http://localhost:3001
6

Start the Dashboard

Install dependencies and launch the dashboard:
pnpm install
pnpm dev
The dashboard will be available at http://localhost:3000.

Verify Installation

Once both servers are running, you should be able to:
  1. Access the dashboard at http://localhost:3000
  2. Create a new account
  3. Navigate through the dashboard UI
  4. Access API health check at http://localhost:3001/health
Your ActumX development environment is now ready! Proceed to create your first agent.

Project Structure

x402/
├── api/        # Elysia server, DB schema, auth, x402 modules
└── dashboard/  # Next.js dashboard UI

Next Steps