/frontend
: The current face of the site, built with React./backend
: The backend logic for the site, built with Flask./scrapers
: Chrome extensions for web scraping./docs
: Documentation.
We're working fullstack.
- Access to MajorAudit GitHub repository.
- npm (Node Package Manager).
- Clone the MajorAudit Repository:
git clone <repository_url>
- In the root directory, run:
Note: If it throws permission errors, prepend the command with
npm install -g firebase-tools
sudo
:sudo npm install -g firebase-tools
-
Update Python to version 3.12.
- You can use Homebrew to install the latest version of Python:
brew install [email protected]
-
Navigate to the
/backend
directory. -
Create a virtual environment:
python3.12 -m venv venv
-
Activate the virtual environment:
source venv/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Deactivate the virtual environment:
deactivate
- Create a
secrets
directory in the/backend
folder:mkdir secrets
- Go to the Firebase Console.
- Select the
majoraudit
project. - Click the gear icon next to "Project Overview" and select "Project Settings".
- Navigate to the "Service Accounts" tab.
- Generate a new Node.js private key.
- Move the generated key file to your
secrets
directory. - Update the path to the key file in
main.py
:cred = credentials.Certificate(r'path_to_secrets_file')
-
Install the required frontend dependencies:
cd frontend npm i
-
Ensure you have Java version >= 20 installed.
-
Log in to Firebase:
firebase login
-
In the
/frontend
directory, build the frontend:npm run build
-
In the root or
/frontend
directory, start the Firebase emulators:firebase emulators:start
-
Troubleshoot any errors as needed.
- Frontend Changes: Anytime you change the frontend code, stop the emulators, rebuild the frontend, and restart the emulators. The emulators only host the most recent build.
- Web Scraper Changes: If you modify the web scraper, remove and reconfigure the extension in Chrome.
- Backend Changes: You can modify the backend code on the fly. The emulators will automatically restart when you save changes.
- Frontend-Only Development:
- Change the
useState(auth)
value inApp.tsx
totrue
. - Modify the
initLocalStorage()
method inGraduation.tsx
to useMockStudent
instead of calling thegetData()
API. - Run the frontend in development mode:
npm start
- The frontend will now automatically update as you make changes.
- Change the
- Create a branch for your feature:
git checkout -b <username>/<feature_name>
- Make your changes.
- Commit and push your changes to the origin:
git commit -m "Your commit message" git push origin <branch_name>
- Create a pull request and add reviewers. In the pull request, reference any relevant issue numbers.
- Once the pull request is approved, merge it into the master branch.
- We use GitHub issues to track bugs and feature requests: GitHub Issues.
- We use GitHub projects to manage everything and do planning: GitHub Projects.