-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation Frontend
These docs are for the frontend folder i.e. the React Project.
If you are looking for some other docs, then please refer here.
The frontend folder is a Create React App Project
The project structure for the React App (frontend) is shown below:
src
βββ assets
| ββ ...
|
βββ components
β ββ AddressBar.js
β ββ CartBar.js
β ββ CartItems.js
β ββ FoodItem.js
β ββ Header.js
β ββ LoginForm.js
β ββ OrdersPage.js
β ββ PaymentsBar.js
β ββ RegisterForm.js
β ββ RestaurantBanner.js
β ββ RestaurantList.js
| ββ ...
|
βββ context # Contains user authentication code
β ββ AuthContext.js
|
βββ pages
β ββ CheckoutCancelPage.js
β ββ CheckoutPage.js
β ββ CheckoutSuccessPage.js
β ββ HomePage.js
β ββ LandingPage.js
β ββ LoginPage.js
β ββ RegisterPage.js
β ββ UserProfile.js
β ββ ViewFoodItems.js
| ββ ...
|
βββ utils
β ββ PrivateRoute.js
|
βββ restaurants # A sub-app for 'restaurants'
β ββ assets
β ββ components
β ββ context
β ββ pages
β ββ utils
β ββ ...
|
βββ App.js
βββ App.css
βββ index.js
The main working of React JS is to get data from backend by making API calls to an endpoint and then displaying the retrieved data to the end user. Vice versa, it's job is also to submit data to backend by making POST API calls to an endpoint in the backend.
There is a separate folder called restaurants which is kind of a sub-app for the restaurants (similar to how there's a different app for restaurants in the backend). The sub-app is for restaurant owners, where they can login, list/manage their food items, and perform all the restaurant owner features which we provide to them.
NOTE: This documentation is open to contributions. Feel free to create a new issue if you'd like to add anything to the docs.