๐ NOTE
Use this template to initialize the contents of a README.md file for your application. As you work on your assignment over the course of the week, update the required or stretch features lists to indicate which features you have completed by changing [ ]
to [x]
. (๐ซ Remove this paragraph before submitting your assignment.)
Submitted by: Bailey Williams
Deployed Application (optional): Student Store Deployed Site
- [ x] Database Creation: Set up a Postgres database to store information about products and orders.
- Use the provided schema to create tables for
products
,orders
, andorder_items
.
- Use the provided schema to create tables for
- Products Model: Develop a model to represent individual items available in the store.
- This model should include attributes such as
id
,name
,description
,price
,image_url
, andcategory
. - Implement methods for CRUD operations on products.
- Ensure transaction handling for the deletion of products to also delete related
order_items
- This model should include attributes such as
- [x]Orders Model: Develop a model to manage orders.
- This model should include attributes such as
order_id
,customer_id
,total_price
,status
, andcreated_at
. - Implement methods for creating, fetching, updating, and deleting orders.
- Ensure transaction handling for the deletion of orders to also delete related
order_items
- This model should include attributes such as
- Order Items Model: Develop a model to represent the items within an order.
- This model should include attributes such as
order_item_id
,order_id
,product_id
,quantity
, andprice
. - Implement methods for fetching and creating order items.
- This model should include attributes such as
- API Endpoints
- Product Endpoints:
-
GET /products
: Fetch a list of all products. -
GET /products/:id
: Fetch details of a specific product by its ID. -
POST /products
: Add a new product to the database. -
PUT /products/:id
: Update the details of an existing product. -
DELETE /products/:id
: Remove a product from the database.
-
- Order Endpoints:
-
GET /orders
: Fetch a list of all orders. -
GET /orders/:order_id
: Fetch details of a specific order by its ID, including the order items. -
POST /orders
: Create a new order with order items. -
PUT /orders/:order_id
: Update the details of an existing order (e.g., change status). -
DELETE /orders/:order_id
: Remove an order from the database.
-
- Product Endpoints:
- Frontend Integration
- Connect the backend API to the provided frontend interface, ensuring dynamic interaction for product browsing, cart management, and order placement. Adjust the frontend as necessary to work with your API.
- Added Endpoints
- Create an endpoint for fetching all orders in the database.
- Create an endpoint for serving an individual order based on its ID.
- Filter Orders
- Allow users to use an input to filter orders by the email of the person who placed the order.
- Implement Your Own Frontend
- Build your own user interface for browsing products, managing the shopping cart, and placing orders. This will involve integrating the frontend you create with the backend API you developed during the project.
- Past Orders Page
- Build a page in the UI that displays the list of all past orders. The user should be able to click on any individual order to take them to a more detailed page of the transaction.
`
` ``- Did the topics discussed in your labs prepare you to complete the assignment? Be specific, which features in your weekly assignment did you feel unprepared to complete?
Yes, but the project instructions were not clear. There were features, such as the "success" section that needed to be fixed that were not included in the instructions. THe labs prepared me as much as they could considering the fact that the instructions did not.
- If you had more time, what would you have done differently? Would you have added additional features? Changed the way your project responded to a particular event, etc.
I would fix the view of the frontend. WHile the site is functional, it's not visually pleasing enough to be useful.
- Reflect on your project demo, what went well? Were there things that maybe didn't go as planned? Did you notice something that your peer did that you would like to try next time?
My peers added some designs and stretch features. If I had more time, I would focus on that.
- chatgpt.com
- w3schools.com
SHOUT OUT DEVARSH LUCKY KIAHNA AND CHRIS!!