Getting Started
Get up and running with ExportReady-Battery in under 10 minutes. This guide covers installation, configuration, and your first battery passport.
Prerequisites
JavaScript runtime
Backend runtime
Database (or Supabase)
Version control
Installation
Clone the Repository
Start by cloning the repository to your local machine:
git clone https://github.com/your-org/exportready-battery.git
cd exportready-batteryInstall Frontend Dependencies
Navigate to the frontend directory and install packages:
cd frontend
npm installInstall Backend Dependencies
Navigate to the backend directory and download Go modules:
cd ../backend
go mod downloadConfigure Environment Variables
Copy the example environment files and configure them:
# 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:3000Run Database Migrations
Set up your database schema with migrations:
make migrate-upStart the Development Servers
Open two terminal windows and start both servers:
# Terminal 1: Start backend
cd backend
make run
# Terminal 2: Start frontend
cd frontend
npm run devVerify 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.
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.
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:
serial_number,manufacture_date
BAT-2026-001,2026-01-15
BAT-2026-002,2026-01-15
BAT-2026-003,2026-01-154. 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].