Forked from https://github.com/AndrejPHP/w3schools-database for academic purposes.
This repository provides:
- a docker compose which sets up the DB on port 3309 (non-default, no clashes)
- initializes the database data from w3schools (provided by @AndrejPHP)
- Visual Studio Code config
Make sure that the following software is installed:
- Docker
- If you are on Windows, please use WSL with Ubuntu for the setup and use the bash terminal
Go to github.com, create a new account or login.
- Fork this repo (https://github.com/ibuenuel/w3schools-database.git)
Now you have a repository w3schools-database in your github account. Clone that with:
git clone https://github.com/YOURUSERNAME/w3schools-database
cd w3schools-database
code .Run the database and rest-api
sudo docker compose upStart the react app
cd my-app
npm install
npm startExecute:
docker compose down
rm -rf data
docker compose up -dWhen the docker container starts, it creates database named w3schools with the following tables
categories
customers
employees
orders
order_details
products
shippers
suppliers
and inserts the respective data.
- Get and list all Products
- Get and list all Categories
- Get and list all Suppliers
- Create a new Product
- Create a new Categorie
- Create a new Supplier
- Update an existing Product
- Update an existing Categorie
- Update an existing Supplier
- Delete a Product
- Delete a Categorie
- Delete a Supplier
- Filter by Category or Supplier (If its provided, to test see Products Page)
- Search Entity by Name
- Reset Filters and Search Term with a Button
- Sort by Entity Fields
- Pagination of the Table
The project setup was quite challenging, but I was able to install it successfully using WSL. VirtualBox used too much RAM and the VM froze a lot, so I switched to WSL.
Made some reasearch about routing and added routing functionality to the application. Added the needed Features as follows:
- 3 Entities will be shown with the GET Method (Products, Categories, Suppliers)
- Creating of 3 different Entities with POST Method is working (Products, Categories, Suppliers)
- Update of 3 different Entities with PATCH Method is working (Products, Categories, Suppliers)
- Delete of 3 different Entities with the DELETE Method is working (Products, Categories, Suppliers)
- Added new Feature Filtering (Filter Entities)
- Added Feature Pagination
- Added Sort function (click table head)
Wrote the technical documentation, documented the features in Markdown and updated the journal.