Golang Clean Architecture Template with JWT Auth, Google OAuth2 Authentication, MySQL Connection and User CRUD operations
APACHE-2.0 License
This is a template repository for building a Golang backend application following the Clean Architecture principles. It includes the following features:
You can use this project as a template to build your Backend project in the Go language on top of this project.
Edit the project to suit your needs after you use it as a template.
Please ⭐️ this repository if this project helped you, also contributions are welcome 🙏🏼
Follow the steps below to set up and start using this template for your Golang backend project.
Before you begin, ensure you have the following installed:
There are two ways to start using this template:
Clone this repository to your local machine:
git clone https://github.com/oguzhantasimaz/Go-Clean-Architecture-Template.git
cd your-repo-name
Create a .env
file in the root directory based on the .env.example
template and fill in your configuration details.
Install the necessary Go packages:
go mod tidy
Set up your Google OAuth credentials in the Google Cloud Console, and update your .env
file with the corresponding client ID and client secret.
Configure your MySQL database connection in the .env
file with the appropriate credentials.
Run the following command to start the Golang backend server:
go run main.go
Your server should now be running at port you specified in the .env
file.
├── api/
│ ├── controller/
│ ├── middleware/
│ └── route/
├── bootstrap/
├── cmd/
├── domain/
├── internal/
│ ├── tokenutil/
├── repository/
├── usecase/
├── utils/
└── main.go
Hello, I am Oguzhan Tasimaz, a software engineer from Turkey. I am interested in backend development, distributed systems, and cloud computing. You can find me on LinkedIn.
Feel free to contribute to this project.
All pull requests are welcome.