This README provides guidelines to install, and use the Retail API and the Web Application.
- Getting Started
- Prerequisites
- Installation
- Running
- How to Use
- Routes and Methods
- Built With
- Video Demo
- Author
Web application to manage a retail business, where you can create users, add address to the users, create orders to the users, and create payments. The web application have a view to search and filter data from the database. This project was based on the assessment by Holberton School, here you can find more information about.
mysql=> v8.0.23npm=> v6.14.4node=> v10.19.0python=> v3.8.5
git clone https://github.com/devarias/RetailApp.gitcd RetailApp- First you have to enable the virtual environment for python.
source env.sh=> Here you will install virtualenv withpip3, create the venv and enter to this.- Everything is installed and ready to run.
- You will be now in the virtual environment to run the installation and start the RESTful API and Web Application, or just start them.
./start- This command will start the instructions to install or start the RESTful API and the Web Application.
- The option number
1is to create the Database, create the user in MySQL and install all the dependencies and the python requirements to run the application, after installation will start the RESTful API and the Web Application. - Remember we are going to create the DataBase and the users, we will do under the
rootuser, then the program will ask you for your mysql password. - The option number
2is to start the RESTful API and the Web Application, because you have the database created and everything created. - To exit from the web application in the terminal just press
Ctrl + C - To exit from the virtual environment just type
deactivate
To log in in the web application use the next credentials:
- email:
react.fastapi.app@gmail.com - password:
Password123
Once you are logged in, you are in the Home with a Navigate Side Bar with the next options:
- Users: You can create Users.
- Addresses: You can add to a specific user a shipping address.
- Orders: You can select an user and create an order to it.
- Payments: You can select the user and the order to create a payment.
- Search: You have a table to search by Order ID, by name, by address, by a range date, and by location.
- Logout: Logout of the web application.
Here you can create an User, the fields required have the exclamation mark next to the label.
- First Name. (Required)
- Last Name. (Required)
- Gov ID. (Required)
- email.
- Company
Notice if you don't fill out the required fields the submit button will stay disabled. Also you can reset the fields with the button Reset. When you click the submit button will appear a modal box asking to confirm the data given.
If you confirm the data, a successfully message will show up.
In this section you can add a shipping address to a User.
- Select User. (required)
- Select Country. (required)
- Select State. (required)
- Select City. (required)
- Address Line. (required)
Now you can add orders to the users, selecting the user and its shipping address. When you select the address it will show you automatically the State, Country and Shipping taxes. And if you are typing the cost of the order, you can see the total including the taxes.
- Select User. (required)
- Select an Address. (required)
- State.
- Country.
- Order Cost. (required)
- Shipping Taxes.
- Total
Now you can add payments to the order's users, selecting the user and its order. When you select the order it will show you automatically the Total Cost of the Order. Also you have to select the Type of Payment, Credit Card, Debit Card, or Cash.
- Select User. (required)
- Select an Order. (required)
- Total.
- Select Type Payment. (required)
- Pay Amount. (required)
Here you can filter by Order ID, or by user name, or by shipping address, also you can filter by a date range or by location.
| Route | Method | Description |
|---|---|---|
api/users/all |
get |
To get all the data of the users |
api/users/{id} |
get |
To get the information of an user |
api/users |
post |
To create an user |
| Route | Method | Description |
|---|---|---|
api/shippings/ |
get |
To get all the data of the shipping addresses |
api/shippings/ |
post |
To create a new shipping addresses to an user |
| Route | Method | Description |
|---|---|---|
api/orders |
get |
To get all the data of the orders |
api/orders/ |
post |
To create an order |
api/orders/shipping/{key} |
get |
To get all the orders with the same key as Country, State or City |
api/orders/{order} |
get |
To get all the data of the orders according to the string passed |
{order}could be:2a single order.1,2,3,4,5a list of orders separated by comma.123e4567-e89b-12d3-a456-426614174000a user id to know all the orders by it.2021-04-15-2021-04-25a date range to know all the orders between that range.
| Route | Method | Description |
|---|---|---|
api/payments |
get |
To get all the data of the payments |
| Route | Method | Description |
|---|---|---|
api/countries |
get |
To get all the data of the countries |
| Route | Method | Description |
|---|---|---|
api/states |
get |
To get all the data of the states |
| Route | Method | Description |
|---|---|---|
api/cities |
get |
To get all the data of the cities |
- Python
- FastAPI
- MySQL
- React.js
- npm
- Bash
- Auth0
You can find the demo video here











