Skip to content

DoWithLogic/go-echo-realworld

Repository files navigation

Golang Clean Architecture

This is an example of implementation of Real World Application backend-specs

🔥 Layers of Domain

The diagram:

golang clean architecture

🦄 TO DO :

  • Application
    • Go-Standards Project Layout
    • Environment Variable Configuration
    • Health-Check and Debug API
    • Graceful Shutdown
  • Layered architecture
  • HTTP Server
    • Echo framework
    • Server Side Caching
      • Cache but revalidate (Header Cache-Control: no-cache)
      • Set Expiration Time (Header Cache-Control: max-age=120)
    • Request ID in logger (Header X-Request-Id: xxx)
  • RESTful
    • Create Resource (POST verb)
    • Update Resource (PUT verb)
    • Partially Update Resource (PATCH verb)
    • Find Resource (GET verb)
      • Offset Pagination (Query param ?limit=10&page=1)
      • Sorting (Query param ?sort=fullname DESC,id DESC)
  • Testing
    • Table Driven Test
    • Mocking
  • Others
    • Database migration and seed tool
    • Releaser

🏗️ How To Run

setup environment and running on local

make run    # Start the database, run migrations, and start the application locally

✨ References

Golang:

🛡️ License

This project is licensed under the MIT License.

Releases

No releases published

Packages

No packages published