A temporary deployed version of the DB can be found here: https://temp-sdb-2020.herokuapp.com/ This project is an attempt to completely re-write, with all its existing functionality, the database system and interface used in Simmons Hall at MIT. These include, but are not limited to,
- Tracking the rooming status and history of residents
- Logging and managing packages delivered to residents
- Logging and managing items checked out by students
- Organizing directories of students, student groups, and student officers
- Managing the administrative staff assigned to various parts of the building (GRAs, HOH, etc.)
- Managing and allowing the creation of mailing lists
- Managing and allowing the creation of polls and lotteries
- Managing and viewing the guest list of residents
- Creating, viewing, and managing House Government proposals
- Creating, presenting, and viewing the history of house meetings
- Creating, managing, viewing the history of, and joining social lounges
- Logging and managing financial balances for various groups within the dormitory (e.g. the main house account, lounge accounts, etc.)
- And much, much more...
This project has several goals, which are, in order of importance:
- Implement every feature the old DB provides
- Be extensively and clearly documented
- Use modern, easy to learn and use languages and frameworks
- Separate backend DB logic from client-facing HTML
- Natively support mobile devices
- Add, where appropriate and sensible, new features to the old DB that improves the user experience
Before attempting to make any changes to this project, please read this, and the entirety of
/docs
very carefully.
The following programs are required to run and develop this project:
- Yarn version 1.21
- Python version 3.7 (or higher)
- Nodejs version 11.12
- Pip (for Python 3; tested with version 18)
Additionally, to fully test asynchronous functionality (such as sending emails for overdue items), your operating system should have some way to run Cron jobs.
This project uses React for the frontend website and Django for the backend server. Specifically,
the backend provides a REST API through much of the Django REST Framework
Django package.
Luckily, these frameworks are easy to learn and jump into with a working knowledge of Javascript, Python, and web development. If you do not have Javascript and Python knowledge, it is highly recommended that you first learn up to an intermediate level of those languages before attempting to understand or make changes to this project.
If you are unfamiliar with React, read through the React docs and tutorials: https://reactjs.org/docs/getting-started.html The Codecademy course on React is also pretty good: https://www.codecademy.com/learn/react-101
If you are unfamiliar with Django, work through the entirety of the "Writing your first Django app" tutorial on the Django website: https://docs.djangoproject.com/en/3.0/intro/tutorial01/
Lastly, the Django REST Framework
documentation will be very helpful in understanding a lot of
the codebase: https://www.django-rest-framework.org/
To get your environment set up for local development, perform for the following actions in the specified order
- Navigate to the
frontend
directory. - Run
yarn install
. This installs the packages necessary for the frontend site. - Navigate to the root directory.
- Optionally create a Python venv and activate it (recommended). To do this, run
python -m venv PATH_TO_YOUR_VENV
followed bysource PATH_TO_YOUR_VENV/bin/activate
.PATH_TO_YOUR_VENV
can be anywhere on your machine; note that venv paths cannot contain spaces. Make sure the Python version in this venv satisfies the requirements above. - Run
pip install -r requirements.txt
. This installs the Python packages required for the backend server. - Run
python manage.py makemigrations
and thenpython manage.py migrate --run-sync
. This initializes an empty sqlite3 database. Runpython manage.py createsuperuser
and follow the instructions. This creates an account with the given username and password that can be used to log into the site with. - Run
python manage.py setadmin YOUR_USERNAME
whereYOUR_USERNAME
was the username you used in the previous step. This adds your account to theAdministrator
group on the DB. - Run
python manage.py initdb
. This does two things:- Creates all the
Room
andSection
objects needed for the DB. This data comes fromdata/room_sections.csv
. - Creates an account on the DB for every row (user) in
data/sample_user_csv.csv
. This is all dummy data.
- Creates all the
Once you perform these actions, to get the development servers running you need to
- Run
yarn start
from thefrontend
directory to get the frontend development server (React) started. - In a separate terminal, run
python manage.py runserver
from the root directory to get the backend server (Django) started. - Navigate to http://localhost:3000/ in your browser.
- Add ability to login with MIT Certificates. This should use the same middleware pipeline and work in tandem with the regular username/password login.
- Figure out how to send emails.
- Add ability to set your display name (instead of the registered name).
- Add Guest List functionality.
- Add packages functionality.
- Figure out how to authenticate front desk. One way is to look at the request IP address. Another way is to create a separate desk user that has to be logged in. Are there other ways though?
- Add mailing lists functionality.
- Add votes and polls functionality.
- Add lotteries functionality.
- Add desk movies database list functionality.
- Add library catalogue link.
- Create an About page.
- Create house meetings flow
- Ability to register an upcoming meeting
- Ability to submit proposals/other things
- Ability to close an upcoming meeting from new proposals + send out email with schedule
- Ability to arrange proposal + announcement order
- Ability run house meeting
- Display list, in the given order
- Keep track + allow amendments, and ability to approve, reject, or table
- Close house meeting
- Everything to do with lounges.
- Create a frontend and backend hierarchical authorization scheme.
- Figure out how to keep track of account balances.