Skip to content

Go Hexagonal - v1.0.0

Latest
Compare
Choose a tag to compare
@RanchoCooper RanchoCooper released this 24 Mar 00:51
· 5 commits to master since this release

Go Hexagonal Architecture v1.0.0

We are excited to announce the official release of Go Hexagonal Architecture, a comprehensive Go microservice framework based on Hexagonal Architecture and Domain-Driven Design principles. This framework provides a clear project structure and design patterns to help developers build maintainable, testable, and scalable applications.

Key Features

Architecture Design

  • Domain-Driven Design (DDD) - Business logic organization through Aggregates, Entities, and Value Objects
  • Hexagonal Architecture - Clear separation between domain, application, and adapter layers
  • Dependency Injection - Utilizing Google Wire for flexible and testable code
  • Repository Pattern - Abstract data access layer with full transaction support
  • Domain Events - Event-Driven Architecture supporting loose coupling between components
  • CQRS Pattern - Command and Query Responsibility Segregation for optimized operations
  • Interface-Driven Design - Service contracts defined through interfaces

Technical Implementation

  • RESTful API - HTTP API implemented with the Gin framework
  • Database Support - GORM integration with MySQL and PostgreSQL
  • Advanced Caching - Redis integration with negative caching, distributed locks, and key tracking
  • MongoDB Support - Document database integration
  • Structured Logging - High-performance logging with Zap
  • Graceful Shutdown - Proper handling of service lifecycle
  • Comprehensive Testing - Extensive testing utilities and mock implementations

Enhanced Features

  • Unified Error Handling - Consistent error types and propagation
  • Structured Logging - Context-aware logging with tracing support
  • Asynchronous Event System - Worker pool-based event processing with reliability features
  • Transaction Support - Simplified service-repository interaction

Getting Started

Prerequisites

  • Go 1.21 or later
  • Docker (for running dependencies)

Installation

git clone https://github.com/RanchoCooper/go-hexagonal.git
cd go-hexagonal

Refer to the README.md for detailed setup instructions and example usage.

Development Tools

  • Code Quality - Integrated with Golangci-lint
  • Commit Standards - Conventional commits enforced with Commitlint
  • Pre-commit Hooks - Automated checks with Pre-commit
  • CI/CD - GitHub Actions workflows for testing and deployment

Roadmap

We are working on several exciting features for future releases:

  • gRPC Support - Adding comprehensive gRPC service implementation
  • Monitoring Integration - Prometheus metrics and dashboards
  • GraphQL API - Alternative API implementation
  • Event Sourcing - Enhanced event persistence and replay capabilities

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs, feature requests, or documentation improvements.

License

This project is licensed under the MIT License - see the LICENSE file for details.