This Go application is a backend implementation for an ecommerce application. It provides a range of features such as user authentication, products management, creating carts and orders. This project is using clean architecture.
- Go
- Fiber
- PostgreSQL
- Docker
- nginx
- pgAdmin
- Docker
- Docker Compose
- Go
Clone the repository:
git clone https://github.com/fazelsamar/go-ecommerce.git
To run this application you have two options:
-
First is to run it using docker-compose for production :
docker-compose -f docker-compose-prod.yml up -d
-
Second is to run just the dependecy in docker-compose for development :
docker-compose up -d
And then run the go:
go run ./cmd
cmd
: contains the main go entry file.internal/
entity
: contains database models.handlers
: contains http handlers for each of the supported endpoints.middleware
: contains custom middleware used in the application.repositories
: contains implementations of the persistence interface to interact with the database.routes
: contains the main application logic for the backend.services
: contains the business logic and use case implementation of the application.
pkg
: contains the packages such as database connection and managing env files.proxy
: contains the nginx config file.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Copyright© 2023 Fazelsamar, Licensed under MIT