Logo of the RoomMates Web App (A stylized house that resembles a calendar)

Tags

  • Rust
  • Dioxus
  • Web Applikation
  • Fullstack
  • Mobile

A Web Application for managing shared events and to-do lists among roommates

Description

RoomMates is a Full-Stack application written in Rust using Dioxus. It allows users to share and manage events and to-do lists with other people, for example within a shared apartment. The project was developed as part of a practical course on software development with a focus on Rust.

Screenshots

Dashboard with current to-dos and events (Screenshot)
Calendar showing various events (Screenshot)
To-Do list with example entries (Screenshot)
Example of a group with various management options (Screenshot)

Features

  • Create, view and share Events with groups and individual users
  • Manage and collaborate on To-Do Lists with different permissions
  • Choose from multiple themes to personalize your experience
  • Compatible with both MySQL and SQLite databases
  • Cross-Platform Support (See Clients)
  • OIDC Support

Deployment

Server

To deploy the server use the provided Dockerfile to build a docker image serving both frontend and api. This requires docker on your machine and the server.

Server with Sqlite Database

docker run -d -p 8080:8080 \
  -e DATABASE_URL="sqlite://db/db.sqlite?mode=rwc" \
  -e ACCESS_LOG=true \
  -v database:/app/db/ \
  --name roommates-server \
  ghcr.io/sfseeger/roommates:latest

Server with MySQL/MariaDB

Create a docker-compose.yml file with the following content:

services:
  db:
    image: mariadb
    environment:
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
      MYSQL_DATABASE: roommates
      MYSQL_USER: roommates
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
    volumes:
      - db_data:/var/lib/mysql

  roommates-server:
    image: ghcr.io/sfseeger/roommates:latest
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      DATABASE_URL: "mysql://roommates:${MYSQL_PASSWORD}@db:3306/roommates"
      ACCESS_LOG: true # Optional shows a access log in stdout
    depends_on:
      - db

volumes:
  db_data:

And a .env file like this in the same directory:

MYSQL_PASSWORD = <super secret password>
MYSQL_ROOT_PASSWORD = <super secret password 2>

Then run:

docker compose --env-file .env up -d

OIDC Support

RoomMates supports OIDC using the openidconnect crate. OIDC is not enabled by default and can be configured using the following Environment Variables:

Enviroment Variable Name Description Required
OIDC_ENABLED Controls wether OIDC is enabled or not
OIDC_ISSUER_URL Url to the Issuer. Gets used to retrieve the required Metadata using the .well-known endpoint
OIDC_CLIENT_ID Client ID used to authenticate against
OIDC_CLIENT_SECRET Client Secret for the supplied client
SERVER_URL Domain where the server is deployed. Used for redirection after the OIDC flow is compleated
SIGNUP_ENABLED Controls wether users can create an account using the signup provided by RoomMates. OIDC accounds will always be created
OIDC_SCOPES Scopes the application has access to. Note that the application needs at least the email as well as the given and family name Defaults to email profile openid
OIDC_PROVIDE_NAME The name of the provider displayed in the login form. Defauls to SSO
OIDC_JWKS_REFRESH_INTERVALL Intervall in secounds when to reload the jwks used to validate auth tokens.
OIDC_AUDIENCE Comma seperated list of audiences (e.g. account,app)

Clients

Roommates is available on the following platforms. Some are fully supported and tested, while others may require additional configuration. Please refer the table below.

Client Tested
Web
Linux
Windows
macOS
Android
iOS

To bundle clients for production, install the required tools or use the devcontainer. Then choose the platform you want to bundle and optionally the package type. Run the following command in the root of the project1:

[!IMPORTANT] SERVER_URL should be the URL of your deployed server. Defaults to http://localhost:8080.

[!TIP] You can also bundle the server this way, if you don’t want to use docker. In this case set PLATFORM to web. You can omit SERVER_URL as it is not needed for the web platform.

make bundle PLATFORM=<platform> SERVER_URL="<your-server-url>" [PACKAGES="<package1> [<package2> ...]"]

Android

[!IMPORTANT] This bundling config assumes you have a valid keystore in ~/.android/keystore.jks. You can override the keystore location by using the KEYSTORE_PATH argument when bundling. Refer to the android docs on how to create one

[!NOTE] This creates a .apk file for sideloading. The .aab bundle created by dioxus does not include the app icon

make bundle PLATFORM=android SERVER_URL="<your-server-url>" KEYSTORE_PASSWORD="<your-keystore-password>"

Tools and Dependencies

For bundling, refer to the Dioxus documentation for the platform you want to bundle for. Additionally you need:

Disclosure of AI Usage

AI was used for Tab-Completing and Debugging, never for generating whole sections of code without a human creating derivatives of said generated code. Model used were:

  • ChatGPT 4o, 4.1 and 5
  • Github Copilot
  • Google Gemini

Footnotes

  1. Angle brackets (<>) indicate required arguments, square brackets ([]) indicate optional arguments. ↩