Full stack web application of a beverage ecommerce platform developed in a team during my time studying at Trybe.
In this project, the user is capable of:
-
Register on the platform;
-
Log in, if already registered;
-
The user is authenticated when logging in;
-
Each user sensible credentials are hashed when saved in the database;
-
-
Visualize every product available to purchase;
-
Add the desired product to the cart and checkout;
-
Follow their purchase status (Pending, In Transit, Delivered);
- Update their purchase status according to their permissions;
-
If the user is an admin, they can register new sellers, visualize and delete existing users;
During the development of this project, we had an agile approach using the Kanban method and divided the group into two teams, one for the front-end and the other for the back-end, the Trello platform was used to organize the tasks as well. In addition, a fixed time was defined for holding daily meetings to discuss the progress of the project.
Front-End | Back-End | |||
---|---|---|---|---|
Miguel Santana |
Yang Vieira |
Marllon Martins |
Giovanna Eliz |
Ronny Velárdez |
The Back-End of this project has environment variables. Rename the .env.example
file to .env
and set its values accordingly to your own settings.
git clone git@github.com:marllomartin/delivery-app.git
cd delivery-app
cd app
cd frontend
npm install
cd ..
cd backend
npm install
npm run db:reset
In the backend directory:
npm run dev
In the frontend directory:
npm start
POST /register
Name | Description |
---|---|
name |
The name of the user to be registered |
email |
The email of the user to be registered |
password |
The password of the user to be registered |
Body Example
body:
{
"name": "Cool User",
"email": "user@user.com",
"password": "us3R321"
}
POST /login
Name | Description |
---|---|
email |
The email of an already registered user |
password |
The password of an already registered user |
Body Example
body:
{
"email": "user@user.com",
"password": "us3R321"
}
GET /products
GET /products/${id}
Parameter | Description |
---|---|
id |
The id of the product to be returned |
GET /orders/user/${id}
Parâmetro | Descrição |
---|---|
id |
The id of the user to have their orders returned |
GET /orders/seller/${id}
Parameter | Description |
---|---|
id |
The id of the seller to have their orders returned |
GET /orders/${id}
Parameter | Description |
---|---|
id |
The id of the order to be returned |
POST /orders
Name | Description |
---|---|
sellerId |
The seller id |
totalPrice |
The total price of the order |
deliveryAddress |
The address which the order will be sent to |
deliveryNumber |
The address number which the order will be sent to |
products |
An array containing all the purchased products |
Body Example
body:
{
"sellerId": 3,
"totalPrice": "20.50",
"deliveryAddress": "Rua Teste",
"deliveryNumber": "20",
"products": [
{
"id": 2,
"itemTotal": 7.5,
"name": "Heineken 600ml",
"price": "7.50",
"quantity": 1,
"urlImage": "http://localhost:3001/images/heineken_600ml.jpg"
}
]
}
PATCH /orders/${id}
Parameter | Description |
---|---|
id |
The id of the order to have its status updated |
Name | Description |
---|---|
status |
The new order status |
Body Example
body:
{
"status": "Entregue"
}
POST /admin/register
Name | Description |
---|---|
name |
The name of the user to be registered |
email |
The email of the user to be registered |
password |
The password of the user to be registered |
role |
The role of the user to be registered |
Body Example
body:
{
"name": "Cool Seller",
"email": "cool_seller@email.net",
"password": "ilovesellingstuff123",
"role": "seller"
}
GET /admin/users
DELETE /admin/users/${id}
Parameter | Description |
---|---|
id |
The id of the user to be deleted |