Quick Start Guide

Getting Started

Get up and running with ExportReady-Battery in under 10 minutes. This guide covers installation, configuration, and your first battery passport.

Prerequisites

Node.js18.x or later

JavaScript runtime

Go1.24 or later

Backend runtime

PostgreSQL14+

Database (or Supabase)

GitLatest

Version control

Installation

1

Clone the Repository

Start by cloning the repository to your local machine:

Terminal
bash
git clone https://github.com/your-org/exportready-battery.git
cd exportready-battery
2

Install Frontend Dependencies

Navigate to the frontend directory and install packages:

Terminal
bash
cd frontend
npm install
3

Install Backend Dependencies

Navigate to the backend directory and download Go modules:

Terminal
bash
cd ../backend
go mod download
4

Configure Environment Variables

Copy the example environment files and configure them:

.env
bash
# Backend configuration
cp .env.example .env

# Edit .env with your database credentials
DATABASE_URL=postgresql://user:password@localhost:5432/battery_db
JWT_SECRET=your-secure-random-secret-key
PORT=8080
FRONTEND_URL=http://localhost:3000
QR_BASE_URL=http://localhost:3000
5

Run Database Migrations

Set up your database schema with migrations:

Terminal
bash
make migrate-up
6

Start the Development Servers

Open two terminal windows and start both servers:

Terminal
bash
# Terminal 1: Start backend
cd backend
make run

# Terminal 2: Start frontend
cd frontend
npm run dev

Verify Installation

If everything is set up correctly, you should be able to access:

Create Your First Passport

1. Register an Account

Navigate to /register and create a new company account.

API Request
json
POST /api/v1/auth/register
{
  "company_name": "Acme Batteries",
  "email": "admin@acme.com",
  "password": "SecurePass123!"
}

2. Create a Batch

From the dashboard, click "Create Batch" and fill in the battery specifications.

API Request
json
POST /api/v1/batches
{
  "batch_name": "Q1-2026-Production",
  "market_region": "EU",
  "specs": {
    "chemistry": "Li-ion NMC",
    "voltage": "48V",
    "capacity": "100Ah"
  }
}

3. Upload Serial Numbers

Upload a CSV file with serial numbers to generate passports:

passports.csv
csv
serial_number,manufacture_date
BAT-2026-001,2026-01-15
BAT-2026-002,2026-01-15
BAT-2026-003,2026-01-15

4. Download QR Codes

Once passports are generated, download the QR codes as a ZIP file and attach them to your batteries. Each QR code links to a unique public passport page at /p/[uuid].

Next Steps