err0r500 / go-realworld-clean

a clean architecture implementation of the realworldapp : https://github.com/gothinkster/realworld
MIT License
516 stars 82 forks source link
clean-architecture clean-code ddd ddd-architecture example-project go golang hexagonal-architecture ports-and-adapters realworld realworld-backend testing

RealWorld Example App

Golang clean-architecture codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

Demo    RealWorld

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.

Build Status BCH compliance Codacy Badge codecov

How it works

Clean Architecture :

Layers ( from the most abstract to the most concrete ) :

Golden rules :

Benefits :

Getting started

Build the app

make

Run the app

./go-realworld-clean

Run the integration tests

Start the server with an existing user

./go-realworld-clean --populate=true

In another terminal, run the tests against the API

newman run api/Conduit.postman_collection.json \
  -e api/Conduit.postman_integration_test_environment.json \
  --global-var "EMAIL=joe@what.com" \
  --global-var "PASSWORD=password"

Additional

Make Targets

The version is either 0.1.0 if no tag has ever been defined or the latest tag defined. The build number is the SHA1 of the latest commit.