{"id":27160217,"url":"https://github.com/quocanh189/mini_ecommerce_clean","last_synced_at":"2025-04-08T23:40:35.253Z","repository":{"id":283873903,"uuid":"951975561","full_name":"QuocAnh189/Mini_Ecommerce_Clean","owner":"QuocAnh189","description":"E-Commerce mini system via Golang with Clean Architechture","archived":false,"fork":false,"pushed_at":"2025-04-08T08:43:19.000Z","size":25235,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T09:23:52.883Z","etag":null,"topics":["clean-architecture","docker","gin-gonic","golang","grafana","jwt","minio","nginx","postgresql","prometheus","react","redis","swagger"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuocAnh189.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-20T14:35:59.000Z","updated_at":"2025-04-08T08:43:23.000Z","dependencies_parsed_at":"2025-04-08T09:34:15.924Z","dependency_job_id":null,"html_url":"https://github.com/QuocAnh189/Mini_Ecommerce_Clean","commit_stats":null,"previous_names":["quocanh189/go_ecommerce_clean","quocanh189/mini_ecommerce_clean"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuocAnh189%2FMini_Ecommerce_Clean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuocAnh189%2FMini_Ecommerce_Clean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuocAnh189%2FMini_Ecommerce_Clean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuocAnh189%2FMini_Ecommerce_Clean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuocAnh189","download_url":"https://codeload.github.com/QuocAnh189/Mini_Ecommerce_Clean/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947823,"owners_count":21023058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean-architecture","docker","gin-gonic","golang","grafana","jwt","minio","nginx","postgresql","prometheus","react","redis","swagger"],"created_at":"2025-04-08T23:40:34.033Z","updated_at":"2025-04-08T23:40:35.243Z","avatar_url":"https://github.com/QuocAnh189.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Go-Ecommerce-Clean Architecture](docs/static/main.excalidraw.svg)\n\n# Go-Ecommerce-Clean Architecture\n\n## ⭐⭐⭐ Give Me Star\n\nIf this project is helpful to you, please consider giving it a star on GitHub. Contact with me if you have a question.\n\n## Overview\n\nThe purpose of the template is to show:\n\n- how to organize a project and prevent it from turning into spaghetti code\n- where to store business logic so that it remains independent, clean, and extensible\n- how not to lose control when a project grows\n\nUsing the principles of Robert Martin (aka Uncle Bob).\n\n## Demo (Youtube)\n\n[![Watch the demo](docs/static/screeen.png)](https://www.youtube.com/watch?v=v5L2c1o0I7M)\n\n## Clean Architecture\n\n![Clean](docs/static/clean.excalidraw.svg)\n\n## Database\n\n![Database](docs/static/database.png)\n\n## Clean Module\n\n### User_Module\n\n![UserModel](docs/static/user_module.excalidraw.svg)\n\n### Product_Module\n\n![ProductModule](docs/static/product_module.excalidraw.svg)\n\n### Order_Module\n\n![OrderModule](docs/static/order_module.excalidraw.svg)\n\n### Cart_Module\n\n![OrderModule](docs/static/cart_module.excalidraw.svg)\n\n## Tech Stack\n\n![TechStack](docs/static/techstack.excalidraw.svg)\n\n- [React](https://react.dev)\n- [Restful API](https://docs.github.com/en/rest?apiVersion=2022-11-28)\n- [Domain Driven Design](https://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartI/ConceptsOfModernProgramming.html)\n- [Gin-gonic](https://github.com/gin-gonic/gin)\n- [Gorm](https://github.com/go-gorm/gorm)\n- [Swagger](https://github.com/swagger-api)\n- [Logging](https://github.com/uber-go/zap)\n- [Jwt-Go](https://github.com/golang-jwt/jwt)\n- [Casbin](https://github.com/casbin/casbin)\n- [Redis](https://github.com/redis/go-redis)\n- [Minio](https://github.com/minio/minio-go)\n- [Docker](https://www.docker.com/)\n- [Nginx](https://nginx.org/)\n- [Grafana](https://grafana.com/docs/grafana-cloud/monitor-infrastructure/integrations/integration-reference/integration-golang/)\n- [Prometheus](https://github.com/prometheus/client_golang)\n\n## Project Structure\n\n![Project_Structure](docs/static/project_structure.excalidraw.svg)\n\n### `cmd/app`\n\nEntry point of the application. Responsible for initializing the configuration, setting up the logger, and starting the application.\n\n### `configs`\n\nContains configuration files for different environments, such as database connections, API keys, and other application settings.\n\n### `db`\n\nHolds database-related files, including database setup and option function.\n\n### `frontend`\n\nSetup client for demo project.\n\n### `docs`\n\nContains documentation files, API specifications, and related documentation resources.\n\n### `internals`\n\nThis directory houses the core business logic of the application, divided into multiples modules\n\n### `nginx`\n\nStores configuration files for Nginx\n\n### `pkgs`\n\nContains reusable packages and utilities that can be shared across different parts of the project.\n\n### `utils`\n\nIncludes utility functions and helper methods used throughout the project.\n\n### `grafana`\n\nContains configuration files and dashboards for monitoring application metrics using Grafana.\n\n### `prometheus`\n\nHolds configuration files for Prometheus, which collects and stores metrics from the application for monitoring and alerting.\n\n## How to run application (Docker)\n\n1. Clone the repo and cd into it\n2. Set mode `LF` (not `CRLF`) for entrypoint.sh file\n3. Run `docker-compose up --build -d` local dev environment\n4. Setup minio container.\n\n- Run `docker exect -it \u003ccontainer_id of ecommerce.minio\u003e sh`.\n- Run `mc alias set myminio http://ecommerce.minio:9000 minioadmin minioadmin123`.\n- Run `mc anonymous set public myminio/ecommerce`.\n\n5. Test api with BASE_URL is `http://localhost:8080/api/v1` or `http://app.lvh.me/api/v1`\n6. If you want to demo with frontend on React, visit `http://localhost:8005` on browser.\n\n## Reference projects\n\n- [https://github.com/evrone/go-clean-template](https://github.com/evrone/go-clean-template)\n- [https://github.com/bxcodec/go-clean-arch](https://github.com/bxcodec/go-clean-arch)\n\n## Useful links\n\n- [The Clean Architecture article](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)\n- [Twelve factors](https://12factor.net/ru/)\n\n## Author Contact\n\nContact me with any questions!\u003cbr\u003e\n\nEmail: anquoc18092003@gmail.com\nFacebook: https://www.facebook.com/tranphuocanhquoc2003\n\n\u003cp style=\"text-align:center\"\u003eThank You so much for your time !!!\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquocanh189%2Fmini_ecommerce_clean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquocanh189%2Fmini_ecommerce_clean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquocanh189%2Fmini_ecommerce_clean/lists"}