All Projects → zhashkevych → Go Clean Architecture

zhashkevych / Go Clean Architecture

👨‍💻 REST API example, built by following Uncle Bob’s clean architecture principles

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Clean Architecture

Clean Ts Api
API em NodeJs usando Typescript, TDD, Clean Architecture, Design Patterns e SOLID principles
Stars: ✭ 619 (+365.41%)
Mutual labels:  rest-api, mongodb, clean-architecture, clean-code, docker-compose
Modular Monolith With Ddd
Full Modular Monolith application with Domain-Driven Design approach.
Stars: ✭ 6,210 (+4569.17%)
Mutual labels:  rest-api, architecture, clean-architecture, clean-code
Go Bank Transfer
Simple API for banking routines using a Clean Architecture in Golang. 💳 💰 💸
Stars: ✭ 123 (-7.52%)
Mutual labels:  mongodb, architecture, clean-architecture, clean-code
Equinoxproject
Full ASP.NET Core 5 application with DDD, CQRS and Event Sourcing concepts
Stars: ✭ 5,120 (+3749.62%)
Mutual labels:  jwt, architecture, clean-code
iOS-Clean-Architecture-Example
An iOS app designed using clean architecture and MVVM.
Stars: ✭ 50 (-62.41%)
Mutual labels:  clean-code, architecture, clean-architecture
Cleanaspnetcorewebapi
Starter project for creating APIs built on ASP.NET Core using clean architecture.
Stars: ✭ 279 (+109.77%)
Mutual labels:  architecture, clean-architecture, clean-code
Mongoke
Instant Graphql for MongoDb (active branch is golang, rewrite in process)
Stars: ✭ 203 (+52.63%)
Mutual labels:  mongodb, jwt, docker-compose
Antvueblogfront
🔥使用Vue全家桶 + Egg + Mongodb 写的个人网站博客。使用docker compose 一键部署。(最近比较忙,部署还有点问题,后期补上)
Stars: ✭ 36 (-72.93%)
Mutual labels:  mongodb, jwt, docker-compose
Aspnet Core Clean Arch
It is a clean architecture project template which is based on hexagonal-architecture principles built with .Net core.
Stars: ✭ 60 (-54.89%)
Mutual labels:  mongodb, clean-architecture, clean-code
Event Sourcing Castanha
An Event Sourcing service template with DDD, TDD and SOLID. It has High Cohesion and Loose Coupling, it's a good start for your next Microservice application.
Stars: ✭ 68 (-48.87%)
Mutual labels:  mongodb, clean-architecture, clean-code
Sample Dotnet Core Cqrs Api
Sample .NET Core REST API CQRS implementation with raw SQL and DDD using Clean Architecture.
Stars: ✭ 1,273 (+857.14%)
Mutual labels:  rest-api, clean-architecture, clean-code
Appkernel
API development made easy: a smart Python 3 API framework
Stars: ✭ 152 (+14.29%)
Mutual labels:  rest-api, mongo, mongodb
Mongo Cluster Docker
Docker compose config for mongodb cluster
Stars: ✭ 165 (+24.06%)
Mutual labels:  mongo, mongodb, docker-compose
Run Aspnetcore Microservices
Microservices on .Net platforms which used Asp.Net Web API, Docker, RabbitMQ, MassTransit, Grpc, Ocelot API Gateway, MongoDB, Redis, PostgreSQL, SqlServer, Dapper, Entity Framework Core, CQRS and Clean Architecture implementation. Also includes Cross-Cutting concerns like Implementing Centralized Distributed Logging with Elasticsearch, Kibana and SeriLog, use the HealthChecks with Watchdog, Implement Retry and Circuit Breaker patterns with Polly and so on.. See Microservices Architecture and Step by Step Implementation on .NET Course w/ discount->
Stars: ✭ 406 (+205.26%)
Mutual labels:  rest-api, mongodb, clean-architecture
Dotnet New Caju
Learn Clean Architecture with .NET Core 3.0 🔥
Stars: ✭ 228 (+71.43%)
Mutual labels:  mongodb, clean-architecture, clean-code
Dev Stuff
😎 Programming stuff for everyone. Collection of articles, videos about architecture, Domain Driven Design, microservices, testing etc.
Stars: ✭ 105 (-21.05%)
Mutual labels:  architecture, clean-architecture, clean-code
Architecture
.NET 6, ASP.NET Core 6, Entity Framework Core 6, C# 10, Angular 13, Clean Code, SOLID, DDD.
Stars: ✭ 2,285 (+1618.05%)
Mutual labels:  architecture, clean-architecture, clean-code
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (+15.04%)
Mutual labels:  mongodb, jwt, docker-compose
Flask Restful Authentication
An example for RESTful authentication using nginx, uWSGI, Flask, MongoDB and JSON Web Token(JWT).
Stars: ✭ 63 (-52.63%)
Mutual labels:  rest-api, mongodb, jwt
Node Typescript Mongodb
node js typescript mongodb express generator yo
Stars: ✭ 96 (-27.82%)
Mutual labels:  rest-api, mongo, mongodb

Go Clean Architecture

Example that shows core principles of the Clean Architecture in Golang projects.

Blog Post

Rules of Clean Architecture by Uncle Bob:

  • Independent of Frameworks. The architecture does not depend on the existence of some library of feature laden software. This allows you to use such frameworks as tools, rather than having to cram your system into their limited constraints.
  • Testable. The business rules can be tested without the UI, Database, Web Server, or any other external element.
  • Independent of UI. The UI can change easily, without changing the rest of the system. A Web UI could be replaced with a console UI, for example, without changing the business rules.
  • Independent of Database. You can swap out Oracle or SQL Server, for Mongo, BigTable, CouchDB, or something else. Your business rules are not bound to the database.
  • Idependent of any external agency. In fact your business rules simply don’t know anything at all about the outside world.

More on topic can be found here.

Project Description&Structure:

REST API with custom JWT-based authentication system. Core functionality is about creating and managing bookmarks (Simple clone of Pocket).

Structure:

4 Domain layers:

  • Models layer
  • Repository layer
  • UseCase layer
  • Delivery layer

API:

POST /auth/sign-up

Creates new user

Example Input:
{
	"username": "UncleBob",
	"password": "cleanArch"
} 

POST /auth/sign-in

Request to get JWT Token based on user credentials

Example Input:
{
	"username": "UncleBob",
	"password": "cleanArch"
} 
Example Response:
{
	"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzEwMzgyMjQuNzQ0MzI0MiwidXNlciI6eyJJRCI6IjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMCIsIlVzZXJuYW1lIjoiemhhc2hrZXZ5Y2giLCJQYXNzd29yZCI6IjQyODYwMTc5ZmFiMTQ2YzZiZDAyNjlkMDViZTM0ZWNmYmY5Zjk3YjUifX0.3dsyKJQ-HZJxdvBMui0Mzgw6yb6If9aB8imGhxMOjsk"
} 

POST /api/bookmarks

Creates new bookmark

Example Input:
{
	"url": "https://github.com/zhashkevych/go-clean-architecture",
	"title": "Go Clean Architecture example"
} 

GET /api/bookmarks

Returns all user bookmarks

Example Response:
{
	"bookmarks": [
            {
                "id": "5da2d8aae9b63715ddfae856",
                "url": "https://github.com/zhashkevych/go-clean-architecture",
                "title": "Go Clean Architecture example"
            }
    ]
} 

DELETE /api/bookmarks

Deletes bookmark by ID:

Example Input:
{
	"id": "5da2d8aae9b63715ddfae856"
} 

Requirements

  • go 1.13
  • docker & docker-compose

Run Project

Use make run to build and run docker containers with application itself and mongodb instance

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].