httpcoffee is a designed to help manage coffee chains, developed using Go, PostgreSQL, GORM, and go-fiber. This project features RESTful APIs for coffee, user, coffeeHouse, and payment management. Currently, payment management only stores payments manually, with plans to integrate Stripe API for actual payment processing in the next version.
-
Install Go: Make sure Go is installed on your system. You can download it from golang.org.
-
Clone the Repository:
git clone https://github.com/2k4sm/httpcoffee.git cd httpcoffee
-
Install Dependencies:
go mod tidy
-
env variables.
HOST=<host> PORT=<server_port> USERNAME=<db_uname> PASSWORD=<db_passwd> DB=<db_name> DBPORT=5432 SSLMODE=disable VERSION=v0
- Then Run
export $(cat .env | xargs)
- Then Run
-
Start PostgreSQL using compose.yaml
docker compose up --build
6 Run the Application:
go run main.go
7 Docker Setup (optional):
- Build the Docker image and Run :
docker build -t httpcoffee . && docker-compose up
8 Building the Application:
go build -o bin/httpcoffee main.go
The initial release includes foundational APIs and manual payment recording, focusing on a clean, decoupled architecture using dependency injection.
- Implement authentication mechanisms.
- Introduce rate limiting for API endpoints.
- Overhaul the payment service to process payments via Stripe API.
- Incorporate unit, end-to-end (e2e), and integration tests using the Go test suite.
Docker and Docker Compose are used for simplified deployment and configuration.