Prerequisites
Before you begin, ensure you have the following tools installed:- Go 1.26 - We use Go 1.26 for advanced features and runtime improvements
- Docker Desktop - Required for local Supabase instance (Download here)
- Supabase CLI - Database management
- Mac:
brew install supabase/tap/supabase - Windows/Linux:
npm install -g supabase
- Mac:
- Air - Hot reloading for development:
go install github.com/air-verse/air@latest - Git - Version control
- golangci-lint (optional) - Code quality checks:
brew install golangci-lint
Quick Start
Setup Git hooks
Enable pre-commit hooks for automatic formatting:The Git hooks will automatically format your code before each commit:
- Go files formatted with
gofmt - Markdown, YAML, JSON formatted with Prettier
- No manual formatting needed!
Start development environment
That’s it! Just run:This single command will:
- ✅ Check prerequisites (Docker Desktop + Supabase CLI)
- ✅ Start local Supabase instance (if not running)
- ✅ Apply all database migrations automatically
- ✅ Watch for migration changes and auto-reset database
- ✅ Configure Air for your platform automatically
- ✅ Connect to isolated local database on port 54322
- ✅ Start the app with hot reloading on port 8847
- ✅ Display helpful URLs for easy access
- ✅ Use clean logging by default (info level)
- ✅ Zero production database interference
Environment Configuration
The app automatically uses.env.local for development, which provides:
Development Server
Once started, the server will be available at:- App:
http://localhost:8847 - Supabase Studio:
http://localhost:54323 - Local Database:
postgresql://postgres:postgres@localhost:54322/postgres
Hot Reloading
Air provides automatic hot reloading:- Watches Go files for changes
- Automatically rebuilds and restarts the server
- Displays build errors in real-time
Manual Start (Without Hot Reloading)
Database Migrations
Creating new migrations (fully automatic):
No manual steps required - the
dev script watches for migration changes and automatically runs supabase db reset when you save any .sql file.
Prerequisites Check
Ifair fails, verify your setup:
Code Quality
Formatting (Automatic)
Pre-commit hooks automatically format files - you don’t need to do anything! To manually format all files:Local Development Checks
Before pushing, run these local checks:CI Linting (Enforced)
Our GitHub Actions CI runs golangci-lint v2.9.0 with Go 1.26 support:- Runs automatically on every push/PR
- Blocks merges if linting fails
- Core linters enabled: govet, staticcheck, errcheck, revive, gofmt, goimports, ineffassign, gocyclo, misspell
- Configured for Australian English spelling
- Cyclomatic complexity threshold: 35
Troubleshooting
Database Connection Errors
Port Already in Use
Module Dependencies
Hot Reloading Not Working
Next Steps
- Read Architecture to understand system design
- Review Database Schema for schema details
- Explore Testing Guide for test strategies
- Check the API Reference for endpoint documentation