- Install dependencies in root directory
npm i
and also inclient
foldernpm i
server.js
is the entry point for root directory i.e the server itself.npm
scripts are setup, checkout root folder'spackage.json
file.- Create proxy, to let the Webpack Development Server know that our React app is running too, to proxy our API Requests from client to API Server. It will eventually be on 8080 port.
Add:
"proxy": "http://localhost:8080/"
topackage.json
file in client directory - We will setup how to call React from Node later
- Now lets tweak the architecture of client folder's React structure.
- In react, keep the related items as close as possible, so move the items to their respective folders. Similarly
App
and its sibling components will move tocomponents
folder. With this change, now the entry files are directly under src - Add
Barrel
to the/client /src /components
directory
Dependency | Version |
---|---|
Dependency 1 | version 1 |
Dependency 2 | version 2 |
~~ | Dependency 3 |
/client
- Contains the react app/client /public
- Contains files like manifest.js, robots.txt, favicons etc./client /src
- Contains the entry files for the react app/client /src /components
- Contains barrel and components as sibling directory with their related code/client /src /components /app
- Contains the App component and its related code/client /src /components /custom-component
- Contains the custom-component and their related code/client /src /helpers
- Contains helpers and libraries which can be used directly into the code to avoid repetition of the code/client /src /images
- Contains images for the UI/client /src /open-source
- Contains open-source libraries and modules/client /src /packages
- Can contain packages that are decoupled code/client /src /utils
- Can be used to export utilties/client /src /node_modules
- Modules which will be used by our React App/node_modules
- Contains node modules which are used by the Node and Express for our backend.
- Use Eslint coding conventions
- Update release editions in the
README.md
file - Dont add irrelevant libraries as they just increase the size. Try to find those packages/libraries that solves maximum issues or use and existing one.
- Compilation is successfull but InputField component HTML is never returned in the DOM
- What is the meaning of getElementById in component js?
- Firebase setup
- How should we send the data to Firebase?
- Filtering data, getting it back to the app
- Displaying the data on the app
- Display success/failure bootstrap modal
- Null value treatment
- Insert value validation
- Update records
- Delete records