Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
bd3d826
implement schemas
Ronin619 Mar 22, 2026
921e36a
implement get route for /products/:product
Ronin619 Mar 23, 2026
ef040c7
implement get route for /products/:product/review
Ronin619 Mar 23, 2026
aae50d3
implement post /products route
Ronin619 Mar 23, 2026
47ffdca
implement end point post /products/:product/reviews
Ronin619 Mar 24, 2026
beabef4
implement endpoint delete /products/:product
Ronin619 Mar 24, 2026
1de32f0
implement endpoint delete/reviews/:review
Ronin619 Mar 24, 2026
e30473e
update endpoint get /products
Ronin619 Mar 24, 2026
d70d781
update product schema to have required paths
Ronin619 Mar 25, 2026
7e3446c
update get /products to sort products by price
Ronin619 Mar 25, 2026
34b60a4
update get /products query by category
Ronin619 Mar 26, 2026
542452e
update get /product to sort by price
Ronin619 Mar 26, 2026
002af52
update get /products to search by name
Ronin619 Mar 27, 2026
4caf9af
add frontend backend
Ronin619 Mar 31, 2026
13069e4
reorganized backend files
Ronin619 Mar 31, 2026
7c1e48d
reorganized backend files
Ronin619 Mar 31, 2026
4ad61f1
Remove folder-level .gitignore files and keep root .gitignore
Ronin619 Mar 31, 2026
fffa836
update layout file with redux provider and store
Ronin619 Apr 2, 2026
c9ce79a
add cors to server file
Ronin619 Apr 4, 2026
d18fa75
update store directory
Ronin619 Apr 4, 2026
24b3cdd
update package.json
Ronin619 Apr 4, 2026
88026b3
implemeent fetch products function on load
Ronin619 Apr 4, 2026
9111eec
implement backbone code for ProductGrid component
Ronin619 Apr 4, 2026
cfcccc4
implement redux store
Ronin619 Apr 4, 2026
034f36f
update get /products for pagination
Ronin619 Apr 4, 2026
776a4b3
update products slice to include total pages and current page
Ronin619 Apr 4, 2026
16bb0bc
implement pagination component
Ronin619 Apr 4, 2026
92f362c
import Pagination component
Ronin619 Apr 4, 2026
8e564db
update product slice - create product with .map
Ronin619 Apr 4, 2026
fcf0dd2
update: add button to navbar for search purposes
Ronin619 Apr 5, 2026
2fae1fc
update - remove console logs
Ronin619 Apr 5, 2026
233cccd
implement product grid component
Ronin619 Apr 5, 2026
9890968
implement product grid to home page
Ronin619 Apr 5, 2026
5126d95
update action.payload for state.products
Ronin619 Apr 5, 2026
ed86cb9
update root reducer state name and next config
Ronin619 Apr 5, 2026
9bf6dc3
update grid styling
Ronin619 Apr 5, 2026
4661236
update page drop down
Ronin619 Apr 5, 2026
a8808bc
update image alt to show product name
Ronin619 Apr 7, 2026
3def628
update card height
Ronin619 Apr 7, 2026
ca927cc
implement pagination functionality
Ronin619 Apr 7, 2026
816bece
implement checks out of bound page
Ronin619 Apr 7, 2026
a528eb0
update pagination styling
Ronin619 Apr 7, 2026
f7c0cfc
update state name for price handling
Ronin619 Apr 7, 2026
12219e3
update add name to query param in async thunk
Ronin619 Apr 7, 2026
1a2f8e6
implement get all distinct categories route
Ronin619 Apr 7, 2026
39e45dc
implement async thunk fetchCategories and categories to product slice
Ronin619 Apr 7, 2026
edd5393
create categories drop down dynamically
Ronin619 Apr 7, 2026
ea4a68e
update fetchproducts async thunk
Ronin619 Apr 8, 2026
656177f
add sort price state
Ronin619 Apr 8, 2026
80bcdf7
implement query filter reducer
Ronin619 Apr 8, 2026
f5f913e
implement filter for query
Ronin619 Apr 8, 2026
682b43f
implement filter for pagination
Ronin619 Apr 8, 2026
bc39e34
update styling for navbar
Ronin619 Apr 9, 2026
90021e3
implement form validation
Ronin619 Apr 9, 2026
5c62acf
update product image url from fake data generator
Ronin619 Apr 9, 2026
a662f22
implement backend readme
Ronin619 Apr 9, 2026
99ae92d
implement front end read me file
Ronin619 Apr 9, 2026
8445bd6
update form validation to clear input if there is an error
Ronin619 Apr 9, 2026
8c6dc51
implement a user Schema
Ronin619 Apr 12, 2026
dd2a05b
implement log in page
Ronin619 Apr 14, 2026
3525ad3
implement google login with passport
Ronin619 Apr 14, 2026
60db620
update backend ReadMe file
Ronin619 Apr 14, 2026
7798d48
implement logout route
Ronin619 Apr 14, 2026
ba5f74f
style login
Ronin619 Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
frontend/node_modules/
backend/node_modules/
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
frontend/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
6 changes: 0 additions & 6 deletions README.md

This file was deleted.

20 changes: 20 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Product List

1. Clone the repo to your system and then npm install in your terminal while in the backend directory.

2) Enter "npm run start" to start the server and make a get request to "localhost:8000/generate-fake-data" to create and save 90 product documents in your mongoDB database. (install mongodb if you have not already done so.)

3) You need to create your own OAuth 2.0 Client IDs and Client secrets for google passport.

A) Set the Authorized JavaScript origins to "http://localhost:8000".
B) Set the Authorized redirect URLs to "http://localhost:8000/auth/google/callback".

4) In your .env file, include the following variables:

SESSION_SECRET=(set to any string of your choice)
CLIENT_ID=(set to the client id you generate from google cloud)
CLIENT_SECRET=(set to the client secret string you generate from google cloud)

This project has been created by a student at Parsity, an online software engineering course. The work in this repository is wholly of the student based on a sample starter project that can be accessed by looking at the repository that this project forks.

If you have any questions about this project or the program in general, visit [parsity.io](https://parsity.io/) or email [email protected].
12 changes: 12 additions & 0 deletions backend/models/product.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const ProductSchema = new Schema({
category: { type: String, required: true },
name: { type: String, required: true },
price: { type: Number, required: true },
image: String,
reviews: [{ type: Schema.Types.ObjectId, ref: "Reviews" }],
});

module.exports = mongoose.model("Product", ProductSchema);
10 changes: 10 additions & 0 deletions backend/models/reviews.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const ReviewsSchema = new Schema({
userName: { type: String, required: true },
text: { type: String, required: true },
product: { type: Schema.Types.ObjectId, ref: "Product" },
});

module.exports = mongoose.model("Reviews", ReviewsSchema);
12 changes: 12 additions & 0 deletions backend/models/users.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const UserSchema = new Schema({
googleId: String,
name: String,
email: String,
});

const UserModel = mongoose.model("user", UserSchema);

module.exports = UserModel;
Loading