Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. go-sample

go-sample

MITGo

A sample Go application project layout implementing Clean Architecture with real, runnable code.

GitHubGitHub
140 stars26 forks0 contributors

What is go-sample?

go-sample is a sample layout for Go application projects that implements Clean Architecture principles with real, executable code. It provides a concrete blueprint for structuring production-ready Go applications with proper separation of concerns between business logic, interfaces, and infrastructure. The project serves as both an educational resource and a starting point for developers building maintainable Go systems.

Target Audience

Go developers and teams looking to implement Clean Architecture, Domain-Driven Design, or hexagonal patterns in their applications. It's particularly valuable for engineers transitioning from theoretical architecture discussions to practical implementation.

Value Proposition

Unlike theoretical architecture articles or minimal boilerplate, go-sample provides a complete, working application that demonstrates how to properly structure a Go project according to established architectural patterns. It bridges the gap between architectural theory and production-ready code.

Overview

Go Project Sample Layout

Use Cases

Best For

  • Learning Clean Architecture implementation in Go
  • Starting new Go projects with proven structure
  • Understanding Domain-Driven Design patterns in Go
  • Reference for organizing large Go codebases
  • Comparing different architectural approaches in Go
  • Bootstrapping enterprise Go applications

Not Ideal For

  • Rapid prototyping or MVP development where architectural overhead slows iteration
  • Simple CRUD applications that don't benefit from layered separation of concerns
  • Teams already deeply invested in a different architectural pattern like MVC or microservices

Pros & Cons

Pros

Concrete Architecture Implementation

Provides a fully functional example of Clean Architecture with distinct layers for entities, use cases, interfaces, and infrastructure, making it easy to understand and apply in real projects.

Production-Ready Blueprint

Includes a complete, runnable application with Docker setup and comprehensive testing, offering a scalable foundation for real-world Go applications as highlighted in the key features.

Educational Resource

Bridges the gap between theoretical architecture discussions and practical code, with inspirations from Clean Architecture, DDD, and other patterns listed in the README.

Maintainable Code Structure

Organizes packages and dependencies to promote separation of concerns and long-term maintainability, based on established best practices for Go projects.

Cons

Complexity Overhead

The Clean Architecture approach introduces multiple layers and abstractions that can be excessive for smaller or simpler projects, potentially increasing development time without tangible benefits.

Sparse Documentation

The README is minimal, focusing on basic setup without detailed guidance on extending or customizing the architecture for specific needs, which could hinder adaptation.

Docker-Centric Setup

Relies on Docker for running the application, which might not align with all development workflows, especially for those preferring native Go toolchains or working in restricted environments.

Frequently Asked Questions

Quick Stats

Stars140
Forks26
Contributors0
Open Issues0
Last commit7 years ago
CreatedSince 2019

Tags

#sample-project#boilerplate#ddd#hexagonal-architecture#docker#project-structure#go#clean-architecture

Built With

G
Go
D
Docker Compose
D
Docker

Included in

Go169.1k
Auto-fetched 16 hours ago

Related Projects

project-layoutproject-layout

Standard Go Project Layout

Stars56,350
Forks5,436
Last commit2 months ago
go-blueprintgo-blueprint

Go-blueprint allows users to spin up a quick Go project using a popular framework

Stars8,894
Forks487
Last commit2 months ago
serviceservice

Starter-kit for writing services in Go using Kubernetes.

Stars4,097
Forks725
Last commit1 month ago
goxygengoxygen

Generate a modern Web project with Go and Angular, React, or Vue in seconds 🎲

Stars3,594
Forks221
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub