Snowflake
Yet another Go REST API application generator.
Features:
- Opinionated with the best practices.
- Simplicity with batteries.
- Idiomatic. Every Gopher loves that word.
Prerequisite
snowflake requires git and the following Go libraries.
go install github.com/air-verse/air@latest &&
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest &&
go install github.com/pressly/goose/v3/cmd/goose@latest &&
go install honnef.co/go/tools/cmd/staticcheck@latest
Installation
go install github.com/gitkumi/snowflake@latest
Quick Start
Here is how to generate an application.
snowflake new acme
Snowflake uses sqlite3 for database.
If you need a different database, you will need to customize the generated code.
Stack
Snowflake is built with these packages. Make sure to check their documentation.
Dev
Routing
Database
Features
Commands
make dev - Start the development environment with hot reload.
make test - Run tests.
make build - Build the project.
make run - Run the build.
make db - Check database status.
make db.up - Run database migration.
make db.down - Roll back database migration by 1.
make db.create - Create database.
make db.destroy - Destroy database.
make db.reset - Destroy and create database.
make create <table_name> - Create an empty migration file.
TODO
- Cron
- Rate Limiting
- DB Seeding
- mysql and postgres support
- CORS
- Background Jobs (SQS)
- Mail (SES)
- Billing (Stripe)