For Builders

Writing Solutions

Clone, build, test, iterate. Everything you need to complete Buildium tutorials.

Quick Start

1

Start a Project

Go to a tutorial page and click "Start Project". Choose your language (Go, Node, Python). You'll get a unique projectId.

2

Clone the Starter Template

Install the Buildium CLI (GitHub), then use it to log in and create your starter project with a template.

> buildium login -email <your-email> -password <your-password>
> buildium project create-template -projectid <id> 
-lang <language> -name <repo-name>
3

Configure Your Project

Update meta.json with your project ID and set up credentials:

meta.json
{
  "stage": 0,
  "entrypoint": "app",
  "projectId": "YOUR_ID_HERE"
}
.env
BUILDIUM_EMAIL=you@example.com
BUILDIUM_PASSWORD=your_password
4

Build & Test

Write your code, then run the test harness:

make build   # Compile your solution
make run    # Run the Docker test harness

📁 Project Structure

my-project/
├── Dockerfile      
├── docker-compose.yml
├── Makefile  
├── meta.json   
├── .env         
├── go.mod
└── main.go      
Dockerfile

Inherits from the tutorial's test harness image. Copies your binary.

Makefile

Shortcuts for building and testing. Customize as needed.

meta.json

Tells the harness which stage to test and where to find your binary.

⚙️ Understanding meta.json

{
  "stage": 0,           // Which stages to test (0-indexed)
  "entrypoint": "app",  // Your compiled binary name
  "projectId": "abc123" // Links runs to your project
}
FieldTypeDescription
stagenumber0-indexed. Stage 0 runs Stage 1 tests. Stage 2 runs Stages 1-3.
entrypointstringName of your compiled executable. Must match what's in the Docker image.
projectIdstringGet this from the Buildium website when you start a project.

💡 Pro tip: Start with stage: 0 and increment only after all tests pass. This ensures you build incrementally.

🔐 Environment Variables

Create a .env file (already gitignored in the template):

BUILDIUM_EMAIL=your-email@example.com
BUILDIUM_PASSWORD=your-password

# Optional
ENVIRONMENT=PROD           # Set to report runs to Buildium
SERVER_STARTUP_TIME=500    # Milliseconds to wait for server start

🔓 Local Development

Leave ENVIRONMENT empty. Tests run but don't report to Buildium.

📤 Report Results

Set ENVIRONMENT=PROD to submit runs. Requires valid credentials.

🔧 Troubleshooting

Tests pass locally but fail when reporting

Check that your .env credentials are correct. Run docker logs to see authentication errors.

Server tests timing out

Increase SERVER_STARTUP_TIME in your .env. Some servers need more time to initialize.

"Binary not found" error

Ensure meta.json entrypoint matches your actual binary name. Run make build before make run.

Wrong stage tests running

Remember stage is 0-indexed. Stage 0 = Stage 1 tests only. Stage 2 = Stages 1, 2, and 3.

Ready to Build?