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.
- 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
- Laravel (PHP Framework)
- NGINX Web Server
- PHP-FPM
- PostgreSQL
- Adminer
- Docker
- Docker Compose
- Kubernetes
- minikube
- kubectl
- Terraform
- Microsoft Azure
- Github Actions
- draw.io
Updating...
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.
Read here.
$ git clone [email protected]:tp-o/e-commerce-api.git
$ cd e-commerce-api
Install Docker & Docker Compose: https://docs.docker.com/desktop/#download-and-install
$ cp .env.example .env
Then fill in:
DB_DATABASE
,DB_USERNAME
andDB_PASSWORD
to connect database.MAIL_
to make emailing functions work.FACEBOOK_CLIENT_ID
andFACEBOOK_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.
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
Install Terraform: https://learn.hashicorp.com/tutorials/terraform/install-cli
$ cd .infrastructure/azure
nhatnguyen510 |
Titactics |
duythinh26 |
thanhson1207 |
thuongtruong1009 |
-
This project is distributed under the MIT License.
-
Copyright of @TP-O, 2022.