/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.
- Base Firebase
- In root directory, run: npm install -g firebase-tools
- Backend Venv
- Update to python3.12
- Navigate to backend
- Run: python3.12 -m venv venv
- Run: source venv/bin/activate
- Run: pip install -r requirements.txt
- Run: deactivate
- Secrets
- Make a "secrets" directory in backend
- Go to Firebase Console
- Select majoraudit
- Click on the gear icon next to Project Overview and select Project Settings
- Select Service Accounts
- Generate a new Node.js private key
- Move the file to your secrets directory
- Update the cred = credentials.Certificate(r'...') line in main.py to path to that file
- Go
- In frontend directory, run: npm run build
- In root or frontend directory, run: firebase emulators:start
- Troubleshoot any errors
- Notes
- Anytime you change the frontend, you need to cut the emulators and rebuild. They only host the most recent build.
- Anyime you change the webscraper, you need to remove and reconfigure the extension in chrome.
- You can change backend code as you go. Whenever you save, the emulators will automatically restart.
- Strategies
- If focused purely frontend development:
- Change the useState(auth) value in App.tsx to true
- Change the initLocalStorage() method in Graduation.tsx to yield data from MockStudent rather than the getData() API
- In frontend directory, run: npm start
- The frontend will now update as you go.
- Create a branch for your feature. Likely,
git checkout -b <username>/<feature_name>
- make changes
- Create some commits and push your changes to the origin.
- Create a pull request and add a few reviewers. In the pull request, be sure to reference any relevant issue numbers.
- Once the pull request has been approved, merge it into the master branch.
We use GitHub issues to track bugs and feature requests: https://github.com/YaleComputerSociety/MajorAudit/issues. We use GitHub projects to manage everything and do planning: https://github.com/orgs/YaleComputerSociety/projects/2/.