repositorypackage
0.0.0-20240811103135-c16f52c512fe
Repository: https://github.com/adedunmol/mycart.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
mycart
API docs here.
Table of Contents
General Information
- An e-commerce cart-centric REST API the leverages redis for cart.
- This project aims to reduce cart abandonment rate by reducing time to add and remove items from cart.
Tech used
Database
- PostgreSQL
ORM
- GORM
Language
- Golang
Router
- Chi
Queue
- Redis
Installation
Using Git
- Navigate & open CLI into the directory where you want to put this project & clone this project using this command.
git clone https://github.com/Adedunmol/mycart.git
- Run
go get
to install all dependencies
Running tests
- Set the
environment
variable in.env
totest
. - Run
go test ./... -v
to run unit tests.
Setting up environments
- There is a file named
.env.example
on the root directory of the project - Create a new file by copying & pasting the file on the root directory & rename it to just
.env
- The
.env
file is already ignored, so your credentials inside it won't be committed - Change the values of the file. Make changes of comment to the
.env.example
file while adding new constants to the.env
file. - Setup Redis on docker or locally
Usage
- Run
air
to start the application. - Connect to the API using Postman on port 5000.
Project Status
Project is: in progress.
Features
- Creating cart in Redis for users.
- Migrate data from Redis to PostgreSQL when TTL for cart expires.
- Migrate data from PostgreSQL to Redis when needed.
- Generation and sending of receipt for users on purchase
Contact
Created by Adedunmola - feel free to contact me!