A modern Go REST API boilerplate ecosystem with powerful tooling and code generation capabilities.
Galaplate is organized into three main repositories that work together to provide a complete development experience:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 📦 Core │ │ 🛠️ CLI │ │ 🎯 Galaplate │
│ │ │ │ │ │
│ Framework & │◄───│ Project │────►│ Example │
│ Libraries │ │ Generator │ │ Implementation │
│ │ │ │ │ │
│ • Fiber Router │ │ • Templates │ │ • Live Demo │
│ • GORM Database │ │ • Scaffolding │ │ • Documentation │
│ • Console Cmds │ │ • Cross-platform│ │ • Best Practices│
│ • Job Queue │ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
The reference implementation and documentation hub. Contains a fully working REST API with authentication, database operations, background jobs, and comprehensive documentation.
Use this to:
- See working examples of all features
- Learn best practices and patterns
- Access complete documentation
- Get started quickly with a full-featured API
The foundational library containing all reusable components and utilities. This is the heart of the Galaplate ecosystem.
Features:
- 🌐 Fiber-based HTTP router with middleware support
- 🗄️ GORM integration for MySQL and PostgreSQL
- 🎮 Console command system with built-in generators
- 🔄 Background job queue with cron scheduling
- 📝 Structured logging with rotation
- ✅ Validation & DTO support
- 🔐 Authentication utilities
The command-line tool for generating new projects and scaffolding code. Cross-platform binary for Linux, macOS, and Windows.
Templates Available:
- API ✅ - REST API with database integration
- Full 🚧 - Full-stack with frontend (coming soon)
- Micro 🚧 - Lightweight microservice (coming soon)
# Quick install to /usr/local/bin
curl -s https://raw.githubusercontent.com/galaplate/cli/main/install.sh -o /tmp/install.sh && chmod +x /tmp/install.sh && sudo /tmp/install.sh
# Or install to custom directory
curl -s https://raw.githubusercontent.com/galaplate/cli/main/install.sh -o /tmp/install.sh && chmod +x /tmp/install.sh && sudo /tmp/install.sh -d ~/.local/bin# Create a new API project
galaplate new my-api
# With custom database
galaplate new my-app --template=api --db=mysql
# Custom module name
galaplate new my-project --module=github.com/myuser/my-projectcd my-api
# Setup database
go run main.go console db:up
# Generate code
go run main.go console make:model User
go run main.go console make:controller UserController
# Start development server
make devBuilt-in generators for rapid development:
go run main.go console make:model User # Generate models
go run main.go console make:controller API # Generate controllers
go run main.go console make:job EmailJob # Generate background jobs
go run main.go console make:dto UserRequest # Generate DTOs
go run main.go console db:up # Run migrationsRobust job queue system with cron scheduling:
// Queue jobs
queue.Dispatch(&jobs.EmailNotification{
To: "[email protected]",
Subject: "Welcome!",
})
// Schedule recurring tasks
scheduler.AddFunc("@daily", func() {
// Daily cleanup task
})Seamless database operations with GORM:
// Auto-migrations
db.AutoMigrate(&User{})
// Or create migration using dbmate
go run main.go console db:create create_users_table
Creating migration: db/migrations/20250831001745_create_users_table.sql
go run main.go console db:up
// Query with pagination
users := pagination.Paginate(db, &User{}, page, limit)- Structured logging with rotation
- Input validation and DTOs
- Authentication utilities
- Environment configuration
- Docker support
- Cross-platform builds
| Component | Status | Version | Language |
|---|---|---|---|
| Core | ❌ Stable | v0.0.7 | Go 1.22+ |
| CLI | ❌ Stable | v0.1.0 | Go 1.22+ |
| Galaplate | ❌ Active | v0.0.5 | Go 1.22+ |
- Core framework with essential features
- CLI tool with API template
- Cross-platform releases
- Comprehensive documentation
- Test setup and framework integration
- Full-stack template with frontend
- Microservice template
- Interactive project setup
- Template customization
- Custom template support
- Plugin system architecture
- Advanced monitoring tools
- Kubernetes deployment helpers
We welcome contributions! Each repository has its own contribution guidelines:
- Core: Framework improvements, new features, bug fixes
- CLI: Template enhancements, new generators, platform support
- Galaplate: Documentation, examples, tutorials
MIT License - see individual repositories for details.
Built with ❤️ for the Go community