Skip to content
Igor Toporet edited this page Apr 19, 2022 · 1 revision

Go Clean!

Pitch

A reference implementation of Clean Architecture in Go that can be used in the real world.

One that not only withstands the team and product scale-up but enables it from the get-Go!

Details

The vast majority of code samples online are incomplete or even wrong!

At least for the stacks I’m familiar with, I anticipate the same is true for the Go lang. I’ve shipped multiple products and (micro-) services using Clean Architecture in .Net/C# and Node.js/TypeScript stacks. The reality is, despite the seeming similarity of these stacks and languages, there were significant differences in the language features, libraries ecosystem, developer tools, and overall ideology and idiomaticity. Substantial time investment is required until all the pieces can come together and be used for real-world applications and use cases.

Having looked into the Go language, I was impressed by its simplicity and power. I noticed some of the language features that should be a perfect match for Clean Architecture implementation, where two other stacks mentioned above required a library, for example.

The central promise of Clean Architecture is that it opens the door widely for other great patterns and paradigms, like DDD, FP, CQRS, TDD, BDD, and a plethora of others. But ultimate benefits are loose coupling, the explicitness of the design, extreme testability, and easy adoption, including new hires ramp up, among other things.

Deliverables

  • Working App backend in Go, including the database
  • Idiomatic and straightforward code that is easy to follow and reason about
  • High code coverage with easy to maintain tests
  • Running locally or in the app playground
  • Is checked into GitHub

Nice to Have

  • Demo-quality frontend, most likely in Svelte
  • Deployed using Zero

To think about

  • Docker
  • What database to use: PostgreSQL? SQLite? A NoSQL one?
    • I wanted to play with Redis as well.
  • – – TO BE FILLED IN LATER – –
  • Tech limitations?
  • What external factors are there?
  • Privacy concerns
  • etc

Stretch Goals

If you were given a month, what would you do next? Could this integrate with other Commit projects?

– – TO BE FILLED IN LATER – –

References

GitHub Repo Link

https://github.com/commit-app-playground/go-clean

Clone this wiki locally