Inspired by go-blueprint, I aim to develop a modern CLI tool that generates Go web projects. go-symphony produces Go applications utilizing the Gin framework, PostgreSQL database, and SQLC for type-safe queries. My motivation stems from exclusively employing Gin as an API server and PostgreSQL as my database, eliminating the need for alternative options. Having recently adopted Supabase extensively, I intend to integrate its capabilities into this project. Finally, as I use SvelteKit or Next.js to build the front-end, so I incorporate it into go-symphony.
Check out a video walkthrough of go-symphony in action: YouTube Demo
Go Symphony generates projects with this consistent structure:
your-project/
โโโ cmd/api/main.go # Application entry point
โโโ internal/
โ โโโ server/ # Gin server and routes
โ โโโ database/ # Database service layer
โ โโโ db_sqlc/ # SQLC generated code (optional)
โโโ sqlc/ # Standard PostgreSQL setup
โ โโโ migrations/ # SQL schema files
โ โโโ queries/ # SQL query files
โโโ supabase/ # Supabase setup (alternative)
โ โโโ migrations/ # Supabase migration files
โโโ Makefile # Build and development commands
โโโ .env # Environment configuration
โโโ .air.toml # Hot reload configuration
โโโ docker-compose.yml # Database containers (non-Supabase)
go install github.com/Tomlord1122/go-symphony@latest
Download the latest release from GitHub Releases:
git clone https://github.com/Tomlord1122/go-symphony.git
cd go-symphony
go build -o go-symphony .
sudo mv go-symphony /usr/local/bin/
# Interactive mode (recommended for first use)
go-symphony create
# Create project with advanced features
go-symphony create -a
# Create project with name my-api
go-symphony create -n my-api
# Create project with name my-api and advanced features
go-symphony create -n my-api -a
postgres
, supabase
, none
sqlc
, docker
, githubaction
, websocket
sveltekit
, nextjs
, none
commit
, stage
, skip
After creating your project:
cd your-project
# Start PostgreSQL database (if using postgres driver)
make docker-run
# Generate SQLC code (if using SQLC)
make sqlc-generate
# Start development server with hot reload
make watch
# Run tests
make test
# Build for production
make build
go-symphony create [flags]
Flags:
-n, --name string
: Name of project to create-a, --advanced
: Enable advanced features promptgo-symphony version
We welcome contributions! Please see our contributing guidelines:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.