The Storm Framework is a Go-based service boilerplate designed for building scalable applications of any size, from microservices to monoliths. It provides a solid foundation with best practices for modern Go service development.
# Clone the repository
git clone https://github.com/Arsfiqball/storm.git
cd storm
# Start development environment
sh ./scripts/isolate_up.sh --expose
# To stop the development environment
sh ./scripts/isolate_down.sh- Dependency Injection: Uses Wire for compile-time dependency injection
- HTTP Server: Built with Fiber for high-performance HTTP handling
- Database Integration: GORM for PostgreSQL database interactions
- Asynchronous Messaging: Watermill for event-driven architecture
- Background Processing: Redis-based job processing with gocraft/work
- Observability: OpenTelemetry integration with Zipkin tracing support
- Structured Logging: Using Go's
slogpackage with configurable outputs
The project follows a clean architecture pattern with:
- cmd: Application entry points
- internal: Private application code
provider/: Core service providers (Fiber, GORM, Redis, etc.)system/: Application bootstrapping and lifecycle management
- pkg: Public packages that can be imported by other projects
- database: Database migration scripts
- scripts: Utility scripts for development workflows
The framework includes several convenience scripts:
- isolate_up.sh: Start the development environment with Docker
- isolate_down.sh: Tear down the development environment
- wire.sh: Generate dependency injection code
- test_component.sh: Run component tests in an isolated environment
- gomarkdoc.sh: Generate Markdown documentation from code comments
The framework supports multiple deployment methods:
- Docker containers: Multi-stage Docker builds for minimal production images
- Debian packages: Build scripts for creating Debian packages with systemd service files
Configuration is managed through:
- Environment variables with
APP_prefix - YAML configuration file (.config.yml)
- Viper for configuration management
This framework is designed to be flexible enough for any Go service development while providing a solid foundation of best practices and patterns.
storm/
├── bin/ # Binary artifacts
│ └── server # Compiled server binary
├── build/ # Build configurations
│ ├── docker/ # Docker build files
│ │ ├── dev/ # Development Docker setup
│ │ └── prod/ # Production Docker setup
│ └── linux/ # Linux packaging
│ └── debian/ # Debian package build scripts
├── cmd/ # Application entry points
│ └── server/ # Main server executable
│ └── main.go
├── database/ # Database migrations
│ └── postgresql/ # PostgreSQL specific migrations
│ └── migrations/
├── docs/ # Documentation
│ └── packages/ # Package-specific documentation
├── internal/ # Private application code
│ ├── provider/ # Service providers
│ └── system/ # Application bootstrapping
├── pkg/ # Public packages
│ ├── example/ # Example package
│ └── kernel/ # Core functionality
├── scripts/ # Utility scripts
├── test/ # Test files
│ ├── component/ # Component tests
│ └── testhelper/ # Test helper utilities
├── tmp/ # Temporary files
├── .air.toml # Air configuration for hot reload
├── .config.yml # Application configuration
├── docker-compose.isolated.yml # Isolated Docker Compose
├── docker-compose.isolated.expose.yml # Exposed ports Docker Compose
├── go.mod # Go module definition
└── go.sum # Go module checksums
- Go 1.21+
- Docker and Docker Compose
- PostgreSQL 15+
- Redis 7+
- Gomarkdoc (for documentation generation)
- Wire (for dependency injection)
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.