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.
- Create a new repository based on this template by clicking the Use this template button at the top of this page.
-
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.
go mod tidy
go run cmd/main.go
├── api/
│ ├── controller/
│ ├── middleware/
│ └── route/
├── bootstrap/
├── models/
├── cmd/
│ └── main.go
├── domain/
├── repository/
├── usecase/
├── utils/
Hello, I am Emre, a fullstack developer from Turkey. I am interested in fullstack development and cyber security. You can find me on LinkedIn.