This codebase was created to demonstrate a fully fledged fullstack application built with go including CRUD operations, authentication, routing, pagination, and more.
We’ve gone to great lengths to adhere to the go community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
How it works
Clean Architecture :
Layers ( from the most abstract to the most concrete ) :
- domain : abstract data structures
- uc : “use cases”, the pure business logic
- implem : implementations of the interfaces used in the business logic (uc layer)
- infra : setup/configuration of the implementation
Golden rules :
a layer never imports something from a layer below it
3rd-party libraries are forbidden in the 2 topmost layers
go get -u github.com/golang/dep/cmd/dep
Run the app
Run the integration tests
Start the server with an existing user
In another terminal, run the tests against the API