- Download and install Node 21.7.3 Node.js
- Confirm installation of node with
node -vandnpm -vin your terminal. You should see the version number of each. - Run this command to be able to start a local version of the website
npm install react-scripts --save - Optional: Download VSCode to easily manage site development. If you don't want to use this, you can just edit files in a text editor.
- Clone the repository to your computer manually or through VSCode. Open the project folder.
- In the terminal or console, run
npm startto start a local version of the website - If the website successfully started, stop the local site and move to a new branch.
- Do
git branchto view all available branchs - Do
git checkout [branch name]to move your head to a different branch - For best practice, never edit the main branch.
- To build and deploy to firebase run
npm install firebaseandsudo npm install -g firebase-tools
- Go to the src directory and open the pages folder. Here you will see a .js and .css file for each page.
- Open the .js file for a page to edit content and basic design or open the .css for more advanced page design.
Code should only be built and deployed to the production Firebase project after having been reviewed and merged into the main branch.
- To test Firebase features in your own dev environment, run
firebase emulators:start --project everyscoutto start a local server. - If your emulator doesn't work, run
firebase init firestoreto make sure you have Firestore installed on your device. - If you get a Java error, install Java JDK 17.
- This emulator will allow you to test the database/auth/storage functions of the app without having to deploy to the production app.
- React is a library for building user interfaces with javascript.
- You can think of
.jsfiles being "function" and.cssfiles being "form."
- If you want your page to perform a certain action, you would code that in the
.jsfile. - If you want your page to look a certain way, you usse the
.cssfile for that.
- In this project, you really only need to work in the
srcfolder.
- In the
srcfolder, there are sub folders for pages, components, and assets.- Pages holds all the pages
- Components holds everything that mauy be resued across pages e.g., the side bar or login/logout buttons.
- Assets are where we store pictures or other media.
- App.js is the main file that defines the structure of the app. If you would want to add a new page, you would define it as a "route" in this file.