SplitMates is a roommate management app for CS 3200 (Spring 2026). It helps roommates track shared bills, chores, and group events, and provides system administrator and data analyst interfaces for tracking user engagement, managing support tickets, and banning users.
- A GitHub Account
- A terminal-based git client or GUI Git client such as GitHub Desktop or the Git plugin for VSCode.
- A distribution of Python running on your laptop. The distribution supported by the course is Anaconda or Miniconda.
- Create a new Python 3.11 environment in
condanameddb-projby running:conda create -n db-proj python=3.11
- Install the Python dependencies listed in
api/requirements.txtandapp/src/requirements.txtinto your local Python environment. You can do this by runningpip install -r requirements.txtin each respective directory.Note that thecd api pip install -r requirements.txt cd ../app/src pip install -r requirements.txt
..means go to the parent folder of the folder you're currently in (which isapi/after the first command).Why install locally if everything runs in Docker? Installing the packages locally lets your IDE (VSCode) provide autocompletion, linting, and error highlighting as you write code. The app itself always runs inside the Docker containers — the local install is just for editor support.
- Create a new Python 3.11 environment in
- VSCode with the Python Plugin installed
- You may use some other Python/code editor. However, Course staff will only support VS Code.
-
This repository is organized into the main project folders:
./app- the Streamlit app./api- the Flask REST API./database-files- SQL scripts to initialize the MySQL database./seeder- Python seed script for mock data./docs- project documentation
-
The repo also contains a
docker-compose.yamlfile that is used to set up the Docker containers for the front end app, the REST API, MySQL database, and the seeder.
If you are not familiar with web app development, this code base might be confusing. But don't worry, we'll get through it together. Here are some suggestions for learning the code base:
- Start by exploring the
./appdirectory. This is where the Streamlit app is located. The Streamlit app is a Python-based web app that is used to interact with the user. It's a great way to build a simple web app without having to learn a lot of web development. - Next, explore the
./apidirectory. This is where the Flask REST API is located. The REST API is used to interact with the database and perform other server-side tasks. You might also consider this the "application logic" or "business logic" layer of your app. - Finally, explore the
./database-filesdirectory. This is where the SQL scripts are located that will be used to initialize the MySQL database. - Bonus: If you want to have a totally separate copy of the Template Repo on your laptop that you can use to explore and try things without messing up your team repo, see Setting Up a Personal Testing Repo (Optional) section below.
Setting Up a Personal Sandbox Repo (Optional)
Before you start: You need to have a GitHub account and a terminal-based git client or GUI Git client such as GitHub Desktop or the Git plugin for VSCode.
- Clone this repo to your local machine.
- You can do this by clicking the green "Code" button on the top right of the repo page and copying the URL. Then, in your terminal, run
git clone <URL>. - Or, you can use the GitHub Desktop app to clone the repo. See this page of the GitHub Desktop Docs for more info.
- You can do this by clicking the green "Code" button on the top right of the repo page and copying the URL. Then, in your terminal, run
- Open the repository folder in VSCode.
- Set up the
.envfile in theapifolder based on the.env.templatefile.- Make a copy of the
.env.templatefile and name it.env. - Open the new
.envfile. - On the last line, delete the
<...>placeholder text, and put a password. Don't reuse any passwords you use for any other services (email, etc.)
- Make a copy of the
- For running the testing containers (for your personal repo), you will tell
docker composeto use a different configuration file than the typical one. The one you will use for testing issandbox.yaml.docker compose -f sandbox.yaml up -dto start all the containers in the backgrounddocker compose -f sandbox.yaml downto shutdown and delete the containersdocker compose -f sandbox.yaml up db -donly start the database container (replace db with api or app for the other two services as needed)docker compose -f sandbox.yaml stopto "turn off" the containers but not delete them.
Before you start: As a team, one person needs to assume the role of Team Project Repo Owner.
- The Team Project Repo Owner needs to fork this template repo into their own GitHub account and give the repo a name consistent with your project's name. If you're worried that the repo is public, don't. Every team is doing a different project.
- In the newly forked team repo, the Team Project Repo Owner should go to the Settings tab, choose Collaborators and Teams on the left-side panel. Add each of your team members to the repository with Write access.
Remaining Team Members
- Each of the other team members will receive an invitation to join.
- Once you have accepted the invitation, you should clone the Team's Project Repo to your local machine.
- Set up the
.envfile in theapifolder based on the.env.templatefile. - For running the testing containers (for your team's repo):
docker compose up -dto start all the containers in the backgrounddocker compose downto shutdown and delete the containersdocker compose up db -donly start the database container (replace db with api or app for the other two services as needed)docker compose stopto "turn off" the containers but not delete them.
Note: You can also use the Docker Desktop GUI to start and stop the containers after the first initial run.
- In general, any changes you make to the api code base (REST API) or the Streamlit app code should be hot reloaded when the files are saved. This means that the changes should be immediately available.
- Don't forget to click the Always Rerun button in the browser tab of the Streamlit app for it to reload with changes.
- Sometimes, a bug in the code will shut the containers down. If this is the case, try and fix the bug in the code. Then you can restart the
appcontainer in Docker Desktop or restart all the containers withdocker compose restart(no -d flag).
- The MySQL Container is different.
- When the MySQL container is created the first time, it will execute any
.sqlfiles in the./database-filesfolder. Important: it will execute them in alphabetical order. - The MySQL Container's log files are your friend! Remember, you can access them in Docker Desktop by going to the MySQL Container, and clicking on the
Logstab. If there are errors in your .sql files as it is trying to run them, there will be a message in the logs. You can search 🔍 forErrorto find them more quickly. - If you need to update anything in any of your SQL files, you MUST recreate the MySQL container (rather than just stopping and restarting it). You can recreate the MySQL container by using the following command:
docker compose down db -v && docker compose up db -d.docker compose down db -vstops and deletes the MySQL container and the volume attached to it.docker compose up db -dwill create a new db container and re-run the files in thedatabase-filesfolder.
- When the MySQL container is created the first time, it will execute any
SplitMates uses a simple role-based access control setup in Streamlit without full username/password authentication. The app is organized around three roles:
- roommate - normal roommate workflow, including group creation and group dashboards
- analyst - analyst views for usage, sessions, and inactive users
- administrator - system admin dashboard and admin management pages
- The standard Streamlit sidebar navigation is disabled in
app/src/.streamlit/config.tomlso the project can control the links directly. app/src/modules/nav.pybuilds the sidebar dynamically based on the current role stored inst.session_state.app/src/Home.pyprovides mock login buttons that switch the user into the roommate or system administrator flows.- Every page that needs navigation calls
SideBarLinks()near the top so the correct links appear for that role. - The page prefixes control ordering in the sidebar:
00-07- roommate workflow pages07-09- analyst pages20-25- system admin pages