-
Notifications
You must be signed in to change notification settings - Fork 1
/
helper.txt
95 lines (84 loc) · 5.03 KB
/
helper.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
This is a helper file that will help us understand the codebase of the project. This is being updated by Tanvi.
HOW TO RUN THE APP
1. Clone the master branch of the repository in your CLI by "git clone https://github.com/tanviroy/fshn.git"
2. Then enter "npm install" in the root directory (/fshn) and in the frontend directory (/fshn/frontend) to install all dependencies.
3. Open the entire project in an IDE (VSCode is great). Open a terminal and in the root directory (/fshn) run "npm start" to start the backend server at localhost:5000.
4. Open another terminal in the frontend directory (/frontend) and run "npm start" to start the React App which will be served at at localhost:3000.
CODEBASE
.
├── backend/
│ ├── data.js
│ ├── passportConfig.js
│ ├── product.js
│ ├── server.js
│ └── user.js
├── frontend/
│ ├── public/
│ └── src/
│ ├── components/
│ │ ├── carousel.js
│ │ ├── cart.js
│ │ ├── footer.js
│ │ ├── navbar.js
│ │ ├── product.js
│ │ ├── products.js
│ │ ├── profileitems.js
│ │ ├── reviews.js
│ │ └── wishlist.js
│ ├── Pages/
│ │ ├── AboutUs.js
│ │ ├── Cart.js
│ │ ├── Contact.js
│ │ ├── Home.js
│ │ ├── Login.js
│ │ ├── Product.js
│ │ ├── Profile.js
│ │ ├── Shop.js
│ │ └── T&C.js
│ ├── App.css
│ ├── App.js
│ ├── font.ttf
│ ├── index.css
│ └── index.js
├── .babelrc
├── .gitignore
├── helper.txt <---YOU ARE HERE--->
├── package-lock.json
├── package.json
└── README.md
/BACKEND
/data.js: This is a file of all product data just for our purposes. Products are stored as objects. Products are now being served to the API from MongoDB Atlas.
/passportConfig.js: This is where authentication strategies for passport js are confugured. Supports local and Google authentication.
/product.js: This is a Mongoose schema (model) for a product.
/server.js: This is the entry point for the backend (aka the index.js file). All backend dependencies are connected here. Mongoose is connected, RESTful routes defined.
/user.js: This is a Mongoose schema (model) for a user.
/FRONTEND
/public: (Do not remove any of the default files in this directory.)
/src:
/components: (files begin in lowercase and components are have suffix "Comp" to them)
/carousel.js: This is the Carousel Component for the Home Page - "CarouselComp"
/cart.js: This is the things that go on the Cart Page Component for the Cart Page - "CartComp"
/footer.js: This is the Footer Component for all pages - "FooterComp"
/navbar.js: This is the Navigation bar Component for all pages - "NavbarComp"
/product.js: This is the single Product Component for the individual product pages - "ProductComp"
/products.js: This is the "view all products" Products Component for the Shop Page - "ProductsComp" (blueprint code to dynamically serve product data)
/profileitems.js: This is the component that is used for products in cart, wishlist and past orders on Profile Page - "ProfileComp"
/reviews.js: This is the Reviews Component used to render product reviews on that individual product's page - "ReviewsComp"
/wishlist.js: This is the Wishlist Comp on the Cart Page - "WishComp"
/Pages: (files begin in uppercase, each of these pages are also components)
/AboutUs.js: This is the About Us Page.
/Cart.js: This is the Cart Page - will show products (if any) that are in the cart and wishlist.
/Contact.js: This is the Contact Us Page.
/Home.js: This is the Home Page - main page. Has a carousel landing, catchy banners, and featured products.
/Login.js: This is the Signup and Login Page - user can login through email ID or Google OAuth. Currently supports local authentication, and login/ register/ getUser functions.
/Product.js: This is the individual Product Page - users can view details of each product and take actions here.
/Profile.js: This is the Profile Page - users can view their account details and update their information here.
/Shop.js: This is the Shop Page / All Products Page - users can view, search for, and filter products here.
/T&C.js: This is the Terms and Conditions Page.
/App.js: This is the main file containing the core of the application. It holds major routes and renders pages (Home, Cart, SignUp, Profile) as components.
/App.css: This is the main CSS file that we will add to. Linked to App.js
/index.css: This is the wrapper CSS file and can override App.css. We don't need to add to this.
/index.js: This is the starter file, containing React and the application essentially. Do NOT mess with this file!
OTHERS
.gitignore: A plaintext file that specifies which files Git should ignore.
.babelrc: This file is for Babel dependencies. https://medium.com/@rajithaeye/what-is-babel-8dcfdf84ea3e