The Berkeley ReEntry Student Program is an application developed by UC Berkeley's CS169L students for the ReEntry Program at UC Berkeley. The application provides an easy-to-use interface for ReEntry students to sign-up for and use resources provided by UC Berkeley's ReEntry program.
Working
- Community space check-in
In Development
- Appointments
- Scholarships
- Courses
This repo is forked from https://github.com/saasbook/berkeley-reentry-student-program
https://sp25-03-reentry-181cb67be4ca.herokuapp.com/
- Fork & clone the repository locally!
- Install Ruby version 3.0.3, and switch to that version using
rvm use 3.0.3
- You must have PostgreSQL installed locally to run the rails server.
- For Mac:
- Install PostgreSQL:
brew install postgresql
- Start PostgreSQL server:
brew services start postgresql
- Install PostgreSQL:
- For Windows:
- Install PostgreSQL: download installer from postgresql.org
- Start PostgreSQL server:
pg_ctl -D "C:\Program Files\PostgreSQL\9.6\data" start
- For Linux:
- Install PostgreSQL:
sudo apt install postgresql postgresql-contrib
- Start PostgreSQL server:
sudo service postgresql start
- Install PostgreSQL:
- For Mac:
- Run
bundle install --without production
- Run
rake db:create
,rake db:schema:load
, andrake db:migrate
- Follow these instructions to create & setup a new Heroku app on the CLI
- Our code requires 4 environment variables to work correctly in production & local environments.
- Local Development: You must set a non-empty string for the environment variables
ADMIN
,STAFF
,GOOGLE_CLIENT_ID
, andGOOGLE_CLIENT_SECRET
- For Mac and Linux: With Terminal open, run
open ~/.bash_profile
- Note: If you are using a different shell, add the following exports to the appropriate shell profile e.g. for zsh, run
open ~/.zshrc
- At the bottom of the text file, add the following:
export ADMINS=string
&export STAFF=string
where string is a comma-separated list of Berkeley email addresses (these do not have to be real); i.e.[email protected],[email protected]
Additionally, addexport GOOGLE_CLIENT_ID=some_value
&export GOOGLE_CLIENT_SECRET=some_value
where some_value is some arbitrary string (these do not need to be valid to run the app locally, since google authentication is stubbed-out unless it is run on production).
- Note: If you are using a different shell, add the following exports to the appropriate shell profile e.g. for zsh, run
- For Windows: follow these instructions to set environment variables
- Set
ADMINS
&STAFF
, where the value of each is a comma-separated list of Berkeley email addresses (these do not have to be real); i.e.[email protected],[email protected]
. - Set
GOOGLE_CLIENT_ID
&GOOGLE_CLIENT_SECRET
to some arbitrary string (these do not need to be valid to run the app locally, since google authentication is stubbed-out unless it is run on production).
- Set
- For Mac and Linux: With Terminal open, run
- For Production: Add the
ADMIN
,STAFF
,GOOGLE_CLIENT_ID
, andGOOGLE_CLIENT_SECRET
environment variables to Heroku via the command line (assuming there is a Heroku app set up in your directory)- Follow these instructions (web app) to obtain a google client secret & a google client ID. For the callback URL, use https://your-app-name.herokuapp.com/auth/google_oauth2/
- Use the command
heroku config:set VARIABLE=value
to set the environment variables. - Add
ADMINS
&STAFF
set to a comma-separated list of verified administrators and staff members for the app. For testing purposes, these variables can both be set to the string”none”
- Add
GOOGLE_CLIENT_SECRET
&GOOGLE_CLIENT_ID
as provided by the instructions above. - Note: The environment variables can be manually entered in the Heroku app's Settings under "Config Vars".
- Attach "Heroku Postgres" as an add-on to the Heroku app's Resource tab.
- Using a terminal, run
heroku run rake db:schema:load
andheroku run rake db:migrate
to load the database.- Note: If you do not have command-line access to run these commands, you can run rake commands directly in the Heroku app's console.
- In order for the GitHub Actions build to pass, you must add a
CC_TEST_REPORTER_ID
as a repository secret on GitHub. To do this, first sign up for an account with codeclimate.com (quality, not velocity). Then, connect your repository and navigate to repo settings on the CodeClimate dashboard. Finally, copy thetest reporter ID
under the test coverage tab, and add it as a new repository secret under repository settings on GitHub.
- That’s all! The app should now run on your local environment and any Heroku apps created from the codebase.
Spring 2025