🇺🇸 English |
🇧🇷 Português |
Video | Technologies | About | Pages | Routes | Cloning | Contact
![](https://private-user-images.githubusercontent.com/86276393/313479528-72304b0f-d81f-443b-ae15-9fb3397b9b69.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzQ0MTEsIm5iZiI6MTczOTEzNDExMSwicGF0aCI6Ii84NjI3NjM5My8zMTM0Nzk1MjgtNzIzMDRiMGYtZDgxZi00NDNiLWFlMTUtOWZiMzM5N2I5YjY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIwNDgzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiZmFhZjkzZTZiOTRlZmViMjVlYzgwYTA0ZTFmMjVlOGYwZDUwMDhhZTEwYWY2ZDJhNWNhYWEyMDZiZjA5MTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.A4ZGQvdjcRYe9ZNxZOUopzoSjkBO_SthPeGn3XCGNLg)
Click to check out the presentation video on Youtube!
Below are the 19 main technologies used in the development of the project, and their reasons
The application consists of a FullStack project for a web platform for a burger restaurant.Watching the video above will help you understand the explanation!
As a Customer, you can create an account (or log in if you already have one), view the registered products and place orders. Does not have access to functionality and administrator pages.
As an Administrator, in addition to being able to do everything a user can, he can manage the platform: adding, removing or editing orders and accessing the order history and controlling the status of each order.
pages/SignUp
(/cadastrar): Through this page the user can create an account;pages/Login
(/entrar): Through this page the user can log in to their account;pages/Home
(/): Page that the user is redirected to after creating or logging into their account. Basically, the user can see the product categories and go to the /produtos page with the clicked category already selected, and can also see the products on offer and easily place an order by going to the /carrinho with the clicked product already added to the cart;pages/Products
(/produtos): On this page the user can see all the products registered on the platform, filter them by category, and add them to the shopping cart if they wish;pages/Cart
(/carrinho): On this page the user can see pertinent information about the purchase, such as all the products in their cart, the total price and purchase fee, and can also increase the quantity of a product, and place the order if you wish;pages/Admin
(/gestao): On this page, the administrator can manage the platform, adding, removing or editing orders and accessing the order history and controlling the status of each order;
All pages have their proper validations and treatment of possible errors.
The logic used in the private routes was: /register and /enter are only available to users who are not logged in, the others are only available to logged in users, and /gestao is only available to administrators.
I developed from scratch the components that are used on almost all pages, except /gestao, where I chose to use MUI.
controllers/UserController
(POST: /users): Waits to receive the data necessary to create a user (name, email, password, admin), creates a user and returns the new created user;controllers/SessionController
(POST: /sessions): Waits to receive the data necessary to log in to the user (email, password), and returns the user information (and a token);controllers/ProductController
:- (POST: /products): Waits to receive the data necessary to create a product (name, price, category_id, offer, file)), creates a product, and returns the new product created, and the list updated with all the products;
- (PUT: /products/:id): Waits to receive the data necessary to edit a product (name, price, category_id, offer, file), edits the product with id received, and returns the updated product, and the updated list with all products;
- (DELETE: /products/:id): Waits to receive the id of the product to be deleted, deletes that product, and returns the deleted product;
- (GET: /products): Returns the list of registered products;
controllers/CategoryController
:- (POST: /categories): Waits to receive the data necessary to create a category (name, file), creates a category, and returns the new created category;
- (PUT: /categories/:id): Waits to receive the data necessary to edit a category (name, file), edits the category of id received, and returns the updated category;
- (GET: /categories): Returns the list of registered categories;
controllers/OrderController
:- (POST: /orders): Waits to receive the data necessary to create an order (a list of objects with id, quantity), formats the list of objects, populating each object with the product data of each id, creates the order, containing the purchased products, the user who purchased it and the initial status of order-placed, and returns the order;
- (PUT: /orders/:id): Waits to receive the new status of the order, updates the order id received, and returns the updated order;
- (GET: /orders): Returns the list of orders placed;
All routes have their proper validations and treatment of possible errors.
Middleware to assist with authentication is used in almost all routes except /users and /sessions.
To clone and run this project on your computer you will need Git and Node.js v20.10.0 or higher and previously installed.
After that, in the terminal:
# Clone this repository with:
> git clone https://github.com/Luk4x/codeburger-v2.git
# Enter the repository with:
> cd codeburger-v2
# Now being at the root of the project, create a `.env` file, following the `.env.example` of each project as a base.
# Run the Backend in another terminal:
> cd backend
> yarn install
> yarn dev
# Run the Frontend in another terminal:
> cd frontend
> yarn install
> yarn dev
# Once this is done, you will be able to access the project at: http://localhost:5173/
Vitrine.Dev 🪟
|
![]() |