A web application that allows users to track the price history of products and add them to wishlists.
- Create an account and sign in to create wishlists and add products to them
- Search for products to look up their current prices and their pricing history
- Fork and clone this repository.
- Run the command
pipenv install
thenpipenv shell
at the root of the project directory to start the virtual environment. - Run the command
npm install --prefix client
to download the dependencies for the frontend client. - Create a .env file in the project root.
- Enter the python environment and enter
import os
. Then run the commandprint(os.urandom(32))
to generate a secret key. - In the .env file, type
APP_SECRET_KEY =
followed by the key you generated. - Run the command
python server/app.py
in one terminal andnpm start --prefix client
in another to start the application.
- Contains backend API with the following Flask-Restful routes:
- Signup : Route to add new user information to database
- CheckSession: Checks if session has a user_id
- Login / Logout: Sets session's user_id cookie to current user's id. Deletes it on logout.
- ProductIndex : Get/Post to list of all Products
- ProductByID: Retrieve data for a single Product by its id
- WishlistIndex: Get/Post to list of all Wishlists
- WishlistProductByID: Adds or deletes a Product from a Wishlist
- Contains the model classes for the users, products, prices, and wishlists tables
- Contains imports necessary for API and database creation, as well as for deployment.
- Contains code for setting up wishlists, products, and checks for session user_id.
- Front-end forms which use the Formik library to validate user data on account signup or login.
- Sets up NavBar for user in application. Only shows "All Products", "Login" and "Sign Up" routes when logged out. Shows "All Products", "Wishlists", "Create Wishlist", and "Logout" routes when logged in.
- Components which set up the "All Products" page. Each individual ProductCard is a part of the ProductCollection which is displayed on the ProductPage.
- Displays the detail view of an individual product. Contains the name, current price, image, and a graph of the price history of the product. Users can add the product to a wishlist by selecting one from the "Add to Wishlist" dropdown menu.
- List component that is displayed on the wishlist page.
- Graph component which uses the chart.js library to generate graph of a product's history of prices.
- Components which set up the "Wishlists" page. Each individual WishlistCard is a part of the WishlistCollection which is displayed on the WishlistPage.
- Form to create a new wishlist.
- Search bar on "All Products" page.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Product images from Wikimedia
Database seed data generated by ChatGPT