If this project is helpful to you, please consider giving it a star on GitHub. Contact with me if you have a question.
The purpose of the template is to show:
- how to organize a project and prevent it from turning into spaghetti code
- where to store business logic so that it remains independent, clean, and extensible
- how not to lose control when a project grows
Using the principles of Robert Martin (aka Uncle Bob).
- React
- Restful API
- Domain Driven Design
- Gin-gonic
- Gorm
- Swagger
- Logging
- Jwt-Go
- Casbin
- Mailer
- Redis
- Minio
- Docker
- Nginx
- Grafana
- Prometheus
Entry point of the application. Responsible for initializing the configuration, setting up the logger, and starting the application.
Contains configuration files for different environments, such as database connections, API keys, and other application settings.
Holds database-related files, including database setup and option function.
Setup client for demo project.
Contains documentation files, API specifications, and related documentation resources.
This directory houses the core business logic of the application, divided into multiples modules
Stores configuration files for Nginx
Contains reusable packages and utilities that can be shared across different parts of the project.
Includes utility functions and helper methods used throughout the project.
Contains configuration files and dashboards for monitoring application metrics using Grafana.
Holds configuration files for Prometheus, which collects and stores metrics from the application for monitoring and alerting.
- Clone the repo and cd into it
- Set mode
LF
(notCRLF
) for entrypoint.sh file - Copy
.example.env
(notapp.example.env
) file to.env
file and update yourenv variables
- Run
docker-compose up --build -d
local dev environment - Setup minio container.
- Run
docker exec -it <container_id of ecommerce.minio> sh
. - Run
mc alias set myminio http://ecommerce.minio:9000 minioadmin minioadmin123
. - Run
mc anonymous set public myminio/ecommerce
.
- Test api with BASE_URL is
http://localhost:8080/api/v1
orhttp://app.lvh.me/api/v1
- If you want to demo with Frontend on React, visit
http://localhost:8005
on browser.
Contact me with any questions!
Email: anquoc18092003@gmail.com Facebook: https://www.facebook.com/tranphuocanhquoc2003
Thank You so much for your time !!!