saadozone / EMPLOYEES_CRUD

A Go (Golang) Backend Clean Architecture project with Gin, MongoDB, JWT Authentication Middleware, Test, and Docker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Backend Clean Architecture

This is Rest Api App with authentication and unit tests. A Go (Golang) Backend Clean Architecture project with Gin, MongoDB, JWT Authentication Middleware, Test, and Docker.

go-backend-clean-architecture (1)-1

Architecture Layers of the project:

  1. Router
  2. Handler
  3. Service
  4. Store
  5. DB interaction

image

Public API Request Flow without JWT Authentication Middleware

image

Private API Request Flow with JWT Authentication Middleware

image

How to run this project?

Move to your workspace

cd your-workspace

Clone this project into your workspace

git clone https://github.com/saadozone/EMPLOYEES_CRUD.git

Run docker

docker-compose up

Run the backend and access it on localhost:8080

go run main.go

How to run the test?

Run all tests

go test ./...

About

A Go (Golang) Backend Clean Architecture project with Gin, MongoDB, JWT Authentication Middleware, Test, and Docker.


Languages

Language:Go 99.0%Language:Dockerfile 1.0%