GithubHelp home page GithubHelp logo

nyccreator / site-week4-student-store-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codepath/site-week4-student-store-starter

0.0 0.0 0.0 13.14 MB

JavaScript 74.69% CSS 24.62% HTML 0.68%

site-week4-student-store-starter's Introduction

Unit Assignment: Student Store

Submitted by: Andrey Fernandez

Application Features

CORE FEATURES

  • Database Creation: Set up a Postgres database to store information about products and orders.
    • Use the provided schema to create tables for products, orders, and order_items.
  • 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, and category.
    • Implement methods for CRUD operations on products.
    • Ensure transaction handling for the deletion of products to also delete related order_items
  • Orders Model: Develop a model to manage orders.
    • This model should include attributes such as order_id, customer_id, total_price, status, and created_at.
    • Implement methods for creating, fetching, updating, and deleting orders.
    • Ensure transaction handling for the deletion of orders to also delete related order_items
  • 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, and price.
    • Implement methods for fetching and creating order items.
  • 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.
  • 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.

STRETCH FEATURES

  • 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.

Walkthrough Video

https://www.loom.com/share/ed8abeb4868544f1a6b6770b0d074852?sid=c12094e8-1bd2-4ce9-98a4-e6285759845b

Reflection

  • 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, the lectures were very helpful. We were taught about prisma, postgres, relational databases, and CRUD operations such as get, post, put, and delete. These were critical to implementing the backend api for the student store. The in class demos also served as a good reference for what a backend api should look like.

  • 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.

If I had more time, I would have liked to display a receipt of the order after it has been placed underneath the cart. I would also have liked to change the styling or structure of the frontend.

  • 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 project demo went well. Despite the project being backend focused, there was still plenty to show in the presentation. Having my postman endpoints well organized helped to present the efficiently. Using prisma studio for proving my checkout created an order with the selected items was also helpful. I felt comfortable presenting and was able to project my voice.

Open-source libraries used

N/A

Shout out

Shoutout Devarsh for helping me throughout the project.

site-week4-student-store-starter's People

Contributors

nyccreator avatar joicodes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.