Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shahincsejnu/gocom
:rocket: **gocom** is a monorepo which have Golang based microservices following clean architecture for a ecommerce site
https://github.com/shahincsejnu/gocom
docker-compose ecommerce golang kubernetes microservices monorepo postgresql
Last synced: 27 days ago
JSON representation
:rocket: **gocom** is a monorepo which have Golang based microservices following clean architecture for a ecommerce site
- Host: GitHub
- URL: https://github.com/shahincsejnu/gocom
- Owner: shahincsejnu
- License: apache-2.0
- Created: 2023-01-01T15:40:10.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-11T12:31:26.000Z (over 1 year ago)
- Last Synced: 2024-09-30T11:01:27.149Z (about 1 month ago)
- Topics: docker-compose, ecommerce, golang, kubernetes, microservices, monorepo, postgresql
- Language: Go
- Homepage:
- Size: 438 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gocom
In this `gocom` monorepo we'll demonstrate Golang based microservices following clean architecture for a ecommerce site.## This monorepo's structure
* [auth](./auth/README.md) : Auth service which have all the endpoints related to authn/authz.
* [ecom](./ecom/README.md) : ecom service which have all the endpoints to do CRUD operations for a ecommerce site.
* [frontend](./frontend/README.md) : frontend service which connect to the BE services
* [schemas](./schemas/README.md) :
- DB migrations
- DB schemas
- SQLC queries
- code generations## Tech Stack & Tools
- Golang
- Gin Framework
- Ginkgo
- Gomega
- Golang Mockgen
- PostgreSQL
- SQLC
- Golang Migrate
- Docker
- Kubernetes
- GH Actions
- ArgoCD
- OpenAPI Schema## How to run this project locally?
- clone this repo & go to the root directory (`cd ~/<>/gocom`)
- `docker compose up`:
- to run all the services according to `docker-compose.yaml` file use this command
- if you change anything in the proeject and wanna run with that then use `docker compose up --build`
- you can run any specific service by `docker compose up
- [optional] you can connect to the DB via any(Like: `table plus`) GUI providing the connection info given in the `docker-compose.yaml` file's `db` service:
```
POSTGRES_USER: gocom
POSTGRES_PASSWORD: gocom123
POSTGRES_DB: gocomdb
```
- open another terminal to apply the migrations files into DB
- `cd schemas`
- `export POSTGRESQL_URL='postgresql://gocom:gocom123@localhost:5432/gocomdb?sslmode=disable'`
- `migrate -database $POSTGRESQL_URL -path db/migrations up` : apply the migrations files
- [🎉] now the projects setup is successful, for checking the API endpoints of each service pls have a look into each service's README.md file and test those endpoints from `postman` or etc.## How to deploy `gocom` to a K8s cluster?
- follow the details from [here](./schemas/manifests/)## Auth Service's RESTful API Endpoints
- check [here](./auth/openapi.yaml) for OpenAPI schema of auth service's api endpoints
- also look into the [examples](./auth/README.md)## Ecom Service's RESTful API Endpoints
- check [here](./ecom/openapi.yaml) for OpenAPI schema of ecom service's api endpoints
- also look into the [examples](./ecom/README.md)