Skip to content

Full stack e-commerce store built with Node.js, Express, MongoDB, and React.

Notifications You must be signed in to change notification settings

jordanccox/product-list

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 

Repository files navigation

Product List

This is full stack web app built for an evaluation for Parsity Coding School.

About the Backend

The API is built for a mock e-commerce store that sells various "products" -- each product is randomly generated using Faker.

This project was built with TypeScript, Node.js, Express, and MongoDB.

About the Frontend

The frontend for this project was built using React. It displays an e-commerce storefront that allows the user to view all the products upon first load and then filter results by category, price, and a custom search query.

Run API Locally

  1. To run locally, you will need to set up a MongoDB database on your computer. This project was created with MongoDB 5.0, but it should be compatible with later versions as well. Follow this link for installation instructions on your operating system of choice. Ensure that as a part of your installation, you specify a data directory. Test that your database is working using the MongoDB Shell. Once you know the database is set up correctly, move on to the next step.

  2. Fork and clone this repo.

  3. cd into the repo on your local computer, then cd into backend and npm install to install dependencies.

  4. npm start to launch the development server on localhost:8000.

  5. Copy and paste the contents of swagger/swagger.yaml into the Swagger Editor. This is the documentation for the API routes.

IMPORTANT: Before you are able to use any of the routes, you will need to generate fake data. You can do so by navigating first to localhost:8000/generate-fake-data then to localhost:8000/generate-fake-reviews.

For testing GET routes, you can simply type the URL into your web browser -- for example, localhost:8000/products. For POST and DELETE routes, you will need to use a CLI tool like curl or download the desktop agent for Postman.

Run the Frontend Locally

  1. To run the frontend, first ensure that you have followed the previous steps to get the API working. Launch the API by cding into the backend folder and running npm start.

  2. Once the server is running, cd into the frontend folder and launch the frontend server by running npm run dev.

  3. Navigate to localhost:5173 in your browser. If everything was set up correctly, you should be able to interact with your product data with the UI.

About

Full stack e-commerce store built with Node.js, Express, MongoDB, and React.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.4%
  • JavaScript 2.2%
  • HTML 1.2%
  • CSS 0.2%