Skip to content
/ go-rest-api-template Public template

Golang Clean Architecture Rest API Template with MongoDB,Authentication,Jwt Auth

Notifications You must be signed in to change notification settings

Sw0xy/go-rest-api-template

Repository files navigation

Go REST API Template

This repository provides a clean architecture template for building RESTful APIs using Go (Golang), MongoDB for data storage, and JWT authentication. It follows best practices for structuring your project and separating concerns to ensure maintainability and scalability.

Installation

  1. Create a new repository based on this template by clicking the Use this template button at the top of this page.

  1. Clone this repository to your local machine

    git clone https://github.com/Sw0xy/go-rest-api-template.git
    cd ./go-rest-api-template

    Create a .env file in the root directory based on the .env.example template and fill in your configuration details.

Install Go packages:

go mod tidy

Run

go run cmd/main.go

Project Structure

├── api/
│   ├── controller/
│   ├── middleware/
│   └── route/
├── bootstrap/
├── models/
├── cmd/
│   └── main.go
├── domain/
├── repository/
├── usecase/
├── utils/

About Me

Hello, I am Emre, a fullstack developer from Turkey. I am interested in fullstack development and cyber security. You can find me on LinkedIn.

About

Golang Clean Architecture Rest API Template with MongoDB,Authentication,Jwt Auth

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages