Skip to content

Principles of Database Management Project in HCMIU - Simple e-commerce API based on Shopee.

License

Notifications You must be signed in to change notification settings

TP-O/e-commerce-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This repository is an E-Commerce API used as my Principle of Database Management and Web Application Development projects at International University (HCMIU). In order to not waste time on system design, I decided to make it based on Shopee. Because of API's simplicity, only some of Shopee basic features are covered in the project.

Features

  • Resource uploading
    • Images
  • Authentication (user and admin)
    • Sign-up
    • Sign-in
      • System account
      • Facebook account
      • Google account
      • Github account
    • Sign-out
    • Email verification
    • Password reset
  • User account management
    • Profile
    • Addresses
    • Bank accounts
    • Credit cards
  • Shop management
    • Profile
    • Products
    • Orders
    • Statistics
  • Discount management
    • Wholesale price
    • Apply voucher
    • Discount product
  • Product management
    • CRUD
    • Searching (currently using Wildcard Characters - Elasticsearch in future)
    • Review
  • Order management
    • CRUD
    • Progress
  • Payment management
    • Credit card
    • On delivered

Tools And Technologies

Details

Use Case Diagram

Updating...

Database Design

I just referred to Shopee's workflows and assumed that the tables below are used in their system, so the design may not be the same as theirs.

E-commerce Database Design

API Documentaion

Read here.

Setup

Clone repo

$ git clone git@github.com:tp-o/e-commerce-api.git

$ cd e-commerce-api

Run with Docker Compose

Install Docker & Docker Compose: https://docs.docker.com/desktop/#download-and-install

$ cp .env.example .env

Then fill in:

  • DB_DATABASE, DB_USERNAME and DB_PASSWORD to connect database.
  • MAIL_ to make emailing functions work.
  • FACEBOOK_CLIENT_ID and FACEBOOK_CLIENT_SECRET if you want users to be able sign in with Facebook (the same with Google and Github).
$ docker-compose -f docker-compose.demo.yml up -d --build

$ docker-compose -f docker-compose.demo.yml exec api php artisan key:generate

$ docker-compose -f docker-compose.demo.yml exec api php artisan migrate --seed

Access https://127.0.0.1/api/v2 or https://localhost/api/v2 to interact with the API endpoints.

Run with minikube

Install Docker: https://docs.docker.com/desktop/#download-and-install

Install minikube: https://minikube.sigs.k8s.io/docs/start/

Install kubectl: https://kubernetes.io/docs/tasks/tools/

$ minikube start
$ cd .infrastructure/local

Next steps

Run with AKS

Install Terraform: https://learn.hashicorp.com/tutorials/terraform/install-cli

$ cd .infrastructure/azure

Next steps

Contributors

Version 1.x.x (Principle of Database Management project)


nhatnguyen510

Titactics

duythinh26

Version 2.x.x (Web Application Development project)


thanhson1207

thuongtruong1009

License