Skip to content

DormSoup/dormsoup

Repository files navigation

DormSoup

This is frontend repo for DormSoup. For privacy reasons, only authenticated MIT students could visit the website.

Directory Structure

The project structure should be:

  • DormSoup
    • dormsoup
      • (other files)
      • .env (ask andiliu for the file)
      • public/fonts (ask andiliu for the file)
    • dormsoup-daemon

Setting up for developing locally

After we put your keys in authorized_keys in the server, you put this in your local .ssh/config:

Host DormSoup
  HostName dormdigest.mit.edu
  User dormsoup
  SetEnv GIT_AUTHOR_NAME="YOUR_NAME_HERE" GIT_AUTHOR_EMAIL=YOUR_EMAIL_HERE
  ForwardAgent yes
  IdentityFile ~/.ssh/id_rsa_dormsoup

where YOUR_NAME_HERE and YOUR_EMAIL_HERE are the name and email you want to use.

Then cd into dormsoup to run npm install to install the dependencies.

Developing locally

First start the ssh connection to forward the local 5432 port to the DormSoup database:

ssh DormSoup -L 5432:localhost:5432

Important note: Even though it says localhost, the database is on the server, not on your computer. Be careful with any destructive actions. (Check the daemon repo for instructions of setting up a local development database.)

port forwarding diagram

You can read https://stackoverflow.com/questions/5280827/can-someone-explain-ssh-tunnel-in-a-simple-way for an explanation about port forwarding, or you could find other results on the web or maybe even on man ssh.

Then (on a different tab) run npm run dev at the DormSoup/dormsoup root folder, go to http://localhost:3000 to checkout the website.

Common issues

  • If getting public key denied during ssh, check if you correctly capitalized DormSoup
  • If the website keeps loading after npm run dev, check the dev console for errors. It is possible that the connection to database is not setup correctly possibly due to incorrect .env files
    • Same if you see a page asking you to sign in. Sign-in should happen automatically, but the if .env file is not configured correctly, then auth won't work
  • If some icons are not correctly loading after npm run dev, you need to get the public/fonts files from andiliu

Developing practices

  • Open new branches and PR while developing

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10