Skip to content

YaleComputerSociety/MajorAudit

Repository files navigation

MajorAudit

Repository Layout

  • /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

Local DevEnv's

We're working fullstack.

  • Base Firebase
  1. In root directory, run: npm install -g firebase-tools
  • Backend Venv
  1. Update to python3.12
  2. Navigate to backend
  3. Run: python3.12 -m venv venv
  4. Run: source venv/bin/activate
  5. Run: pip install -r requirements.txt
  6. Run: deactivate
  • Secrets
  1. Make a "secrets" directory in backend
  2. Go to Firebase Console
  3. Select majoraudit
  4. Click on the gear icon next to Project Overview and select Project Settings
  5. Select Service Accounts
  6. Generate a new Node.js private key
  7. Move the file to your secrets directory
  8. Update the cred = credentials.Certificate(r'...') line in main.py to path to that file
  • Go
  1. In frontend directory, run: npm run build
  2. In root or frontend directory, run: firebase emulators:start
  3. 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:
    1. Change the useState(auth) value in App.tsx to true
    2. Change the initLocalStorage() method in Graduation.tsx to yield data from MockStudent rather than the getData() API
    3. In frontend directory, run: npm start
    4. The frontend will now update as you go.

Contributing

  1. Create a branch for your feature. Likely, git checkout -b <username>/<feature_name>
  2. make changes
  3. Create some commits and push your changes to the origin.
  4. Create a pull request and add a few reviewers. In the pull request, be sure to reference any relevant issue numbers.
  5. Once the pull request has been approved, merge it into the master branch.

Roadmap

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/.