Core Shop Service is a microservice for managing goods and orders in an online store. The project is built on Go using PostgreSQL and Redis to work with data and caching.
- Product management: add, update, delete and view the list of products.
- Order management: create, update and view orders.
- Authentication and authorization using JWT.
- Caching of data using Redis.
- Golang 1.23+
- Docker & Docker Compose
- PostgreSQL (preferably, because it runs in docker container)
- pgAdmin (preferably, because it runs in docker container)
Clone the repository and set up the environment:
git clone https://github.com/NIC-Golang/core-shop-service.git
cd core-shop-service
cp .env.example .env
make help # Show available commands
make install # Install dependencies (go mod tidy)
make run # Run the server
make stop # Stop the server
make restart # Restart the server
make compile # Compile the application
make clean # Clean the build cache
make test # Run the test container (docker compose -f docker-compose.test.yml up -d)
make build # Build the docker container
make up # Run the docker container
make down # Stop the docker container
Make sure Docker Engine is running, then execute:
docker compose build
docker compose up
To stop the service:
docker compose down
If you are using an older Docker version, use docker-compose instead of docker compose.