Getting Started
Prerequisites
- Go 1.22 or later (the router uses method+path patterns introduced in 1.22)
- No other external dependencies — SQLite is bundled via
modernc.org/sqlite (pure Go, no CGO required)
Installation
Copy the example environment file:
Install Go module dependencies:
Running the Server
On first run, the engine will:
- Open (or create) the SQLite database at the path specified by
DB_PATH (defaults to fpa.db in the current directory)
- Run
CREATE TABLE IF NOT EXISTS migrations automatically — no migration tool needed
- Start the HTTP server on port
8080 (or the value of PORT)
You should see structured JSON log output:
Verify It's Running
Load Demo Data
The repo includes a seed script with realistic data for Engineering, Sales, and Marketing departments across FY2024 period 9. See scripts/seed_demo.sh or POST directly to /api/v1/actuals/ingest.
Stopping the Server
Send SIGINT or SIGTERM (i.e. Ctrl+C). The server performs a graceful shutdown with a 15-second drain timeout before closing.
Running Tests
Tests use Go's built-in testing package. The database is configured to use :memory: for tests so no disk state is left behind.
Next Steps