About The Project
RESTFUL API for TakTuku an E-Commerce App created for the purpose of study.
Building the project with layered architecture, and clean code approach for the structure, with the intention of simplicity when the app is scaling up and ease of maintenance
Built With
This project structure is built using
- Swagger
- [Golang]
- [Mysql]
- [Labstack/Echo]
Features
- USERS CRUD
- PRODUCT CRUD
- CART CRUD
- ORDER CR
Folder Structure
├── addMiddleware/ # Create middleware
├── config/ # Configuration to connect to database
├── controller/ # Create controller for user, product, cart, and order
├── entities/ # Create entities for user, product, cart, and order
├── helper/ # Create request, response, and helper for user, product, cart, and order
├── repository/ # Get all required data from database for user, product, cart, and order
├── service/ # Create service for handle the data from repository of user, product, cart, and order
Getting Started
To start project, just clone this repo
Installation
- Clone the repo
git clone https://github.com/hilmihi/e-commerce-project.git
- Create .env file in main directory
touch .env
- Write the following example environment
export DB_CONNECTION_STRING='root:[fillpasswordhere]@/[schema name]?charset=utf8&parseTime=True&loc=Local'
- Run the server
source .env && go run main.go