Skip to content

rodrigoenzohernandez/ecommerce

Repository files navigation

ecommerce

Is an ecommerce for a hardware store. It has the next modules:

  • Log In
  • Log Out
  • User's CRUD
  • Product's CRUD
  • Cart's CRUD (Add items to cart, modify quantity, delete items from cart)
  • Confirm purchase
  • List of products by category
  • Product detal
  • User profile

Get started 🚀

Follow this instructions to locally deploy the project

Preconditions 📋

Installation 🔧

Clone the repo

git clone https://github.com/rodrigoenzohernandez/ecommerce.git

Navigate to project directory

cd ecommerce

Create files to set the enviroment variables

api.env

No variables yet

db.env

MYSQL_DATABASE=ecommerce_database
MYSQL_ROOT_PASSWORD=any-password-you-want
PMA_HOST_db

Local deploy

docker-compose up

Create and populate database with basic information

POST http://localhost:3000/api/setup

Create a user (The first user will have admin role, the rest of the users will have the client role)

http://localhost:3000/register

Endpoints

/api/setup

If it doesn't exist, creates the database tables and populates them with basic test data.

Build with 🛠️