Skip to content

Commit b7fea88

Browse files
committed
docs: Update Readme
1 parent 06f875f commit b7fea88

7 files changed

Lines changed: 82 additions & 31 deletions

File tree

README.md

Lines changed: 82 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,38 @@
1111

1212
- [Features](#features)
1313
- [Deployment](#deployment)
14-
- [Server](#server)
15-
- [Server with Sqlite Database](#server-with-sqlite-database)
16-
- [Server with MySQL/MariaDB](#server-with-mysqlmariadb)
17-
- [Clients](#clients)
18-
- [Android](#android)
19-
- [Tools and Dependencies](#tools-and-dependencies)
14+
- [Server](#server)
15+
- [Server with Sqlite Database](#server-with-sqlite-database)
16+
- [Server with MySQL/MariaDB](#server-with-mysqlmariadb)
17+
- [OIDC Support](#oidc-support)
18+
- [Clients](#clients)
19+
- [Android](#android)
20+
- [Tools and Dependencies](#tools-and-dependencies)
2021
- [Development](#development)
21-
- [Project Structure](#project-structure)
22-
- [Serving Your App](#serving-your-app)
23-
- [Development Services](#development-services)
24-
- [Dev Container](#dev-container)
25-
- [Pre-Commit Hooks](#pre-commit-hooks)
26-
- [Testing](#testing)
22+
- [Project Structure](#project-structure)
23+
- [Serving Your App](#serving-your-app)
24+
- [Development Services](#development-services)
25+
- [Dev Container](#dev-container)
26+
- [Pre-Commit Hooks](#pre-commit-hooks)
27+
- [Testing](#testing)
2728
- [Disclosure of AI Usage](#disclosure-of-ai-usage)
2829

2930
</details>
3031

3132
## Features
33+
3234
* Create, view and share Events with groups and individual users
33-
![alt text](screenshots/eventcreate.png)![alt text](screenshots/group-dark.png) ![alt text](screenshots/calendar.png)
35+
![Event Creation](docs/screenshots/eventcreate.png)
36+
![Group List](docs/screenshots/group-dark.png)
37+
![Calendar](docs/screenshots/calendar.png)
3438
* Manage and collaborate on To-Do Lists with different permissions
35-
![alt text](screenshots/todolist.png)
39+
![Todo List](docs/screenshots/todolist.png)
3640
* Choose from multiple themes to personalize your experience
37-
![alt text](screenshots/dashboard-dark.png)
38-
![alt text](<screenshots/dashboard pastel.png>)
41+
![Dashboard in a dark color theme](docs/screenshots/dashboard-dark.png)
42+
![Dashboard in a pastel color theme](docs/screenshots/dashboard-pastel.png)
3943
* Compatible with both MySQL and SQLite databases
4044
* Cross-Platform Support ([See Clients](#clients))
41-
45+
* OIDC Support
4246

4347
## Deployment
4448

@@ -90,27 +94,48 @@ volumes:
9094
```
9195
9296
And a `.env` file like this in the same directory:
97+
9398
```shell
9499
MYSQL_PASSWORD = <super secret password>
95100
MYSQL_ROOT_PASSWORD = <super secret password 2>
96101
```
102+
97103
Then run:
98104

99105
````shell
100106
docker compose --env-file .env up -d
101107
````
102108

109+
#### OIDC Support
110+
111+
RoomMates supports OIDC using the [openidconnect crate](https://docs.rs/openidconnect/latest/openidconnect/).
112+
OIDC is not enabled by default and can be configured using the following Environment Variables:
113+
114+
| Enviroment Variable Name | Description | Required |
115+
|:-----------------------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------:|
116+
| `OIDC_ENABLED` | Controls wether OIDC is enabled or not | :white_check_mark: |
117+
| `OIDC_ISSUER_URL` | Url to the Issuer. Gets used to retrieve the required Metadata using the .well-known endpoint | :white_check_mark: |
118+
| `OIDC_CLIENT_ID` | Client ID used to authenticate against | :white_check_mark: |
119+
| `OIDC_CLIENT_SECRET` | Client Secret for the supplied client | :white_check_mark: |
120+
| `SERVER_URL` | Domain where the server is deployed. Used for redirection after the OIDC flow is compleated | :white_check_mark: |
121+
| `SIGNUP_ENABLED` | Controls wether users can create an account using the signup provided by RoomMates. OIDC accounds will always be created | :x: |
122+
| `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` | :x: |
123+
| `OIDC_PROVIDE_NAME` | The name of the provider displayed in the login form. Defauls to SSO | :x: |
124+
| `OIDC_JWKS_REFRESH_INTERVALL` | Intervall in secounds when to reload the jwks used to validate auth tokens. | :x: |
125+
| `OIDC_AUDIENCE` | Comma seperated list of audiences (e.g. `account,app`) | :x: |
126+
103127
### Clients
104128

105-
Bundling the following targets have been tested. While bundling untested targets may work, there is a chance they require additional configuration.
129+
Bundling the following targets have been tested. While bundling untested targets may work, there is a chance they
130+
require additional configuration.
131+
106132
- [X] Web
107133
- [X] Linux
108134
- [ ] Windows
109135
- [ ] macOS
110136
- [X] Android
111137
- [ ] iOS
112138

113-
114139
To bundle clients for production, install the [required tools](#tools-and-dependencies) or use the devcontainer.
115140
Then choose the platform you want to bundle and optionally
116141
the [package type](https://dioxuslabs.com/learn/0.7/tutorial/bundle#bundling-for-desktop-and-mobile).
@@ -119,25 +144,27 @@ Run the following command in the root of the project[^1]:
119144
> `SERVER_URL` should be the URL of your deployed server. Defaults to `http://localhost:8080`.
120145

121146
> [!TIP]
122-
> 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.
147+
> 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
148+
> omit `SERVER_URL` as it is not needed for the web platform.
123149

124150
```shell
125151
make bundle PLATFORM=<platform> SERVER_URL="<your-server-url>" [PACKAGES="<package1> [<package2> ...]"]
126152
```
153+
127154
#### Android
155+
128156
> [!IMPORTANT]
129-
> This bundeling 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.
157+
> This bundling config assumes you have a valid keystore in `~/.android/keystore.jks`. You can override the keystore
158+
> location by using the `KEYSTORE_PATH` argument when bundling.
130159
> Refer to [the android docs](https://developer.android.com/studio/publish/app-signing) on how to create one
131160

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

135-
136164
```shell
137165
make bundle PLATFORM=android SERVER_URL="<your-server-url>" KEYSTORE_PASSWORD="<your-keystore-password>"
138166
```
139167

140-
141168
### Tools and Dependencies
142169

143170
For bundling, refer to
@@ -203,11 +230,28 @@ make dev-server PLATFORM=desktop
203230

204231
### Development Services
205232

206-
| Port | Service | Description |
207-
| ---- | ----------- | ------------------------------------------------ |
208-
| 8080 | Application | The Application served by the development server |
209-
| 8000 | phpMyAdmin | Database frontend for development |
210-
| 3306 | MariaDB | Database Server |
233+
The RoomMates Dev Container uses a `traefik` to route to all required services. For this to work, you need to extend
234+
your `/etc/hosts` (Linux / MacOS) `%windir%\system32\drivers\etc` (Windows) with these lines:
235+
236+
```text
237+
127.0.0.1 roommates.local
238+
127.0.0.1 auth.roommates.local
239+
127.0.0.1 db.roommates.local
240+
127.0.0.1 traefik.roommates.local
241+
```
242+
243+
| Domain | Service | Description |
244+
|:-------------------------:|:--------------|-------------------------------------------------------|
245+
| `roommates.local` | Dev Container | Forwards port 8080 |
246+
| `auth.roommates.local` | Keycloak | Auth Provider for OIDC |
247+
| `db.roommates.local` | PhpMyAdmin | Database Frontend |
248+
| `traefik.roommates.local` | Traefik | Used to access `traefik` dashboard under `/dashboard` |
249+
250+
If you want to use OIDC in the development, you also need to create a User in the Keycloak. For this, open
251+
`auth.roommates.local` and login using the username `admin` with password `password`.
252+
Then click `Manage Realms > RoomMates`. Once you are in the RoomMates Realm navigate to `Users > Create new User`.
253+
After entering an email, first name and last name, open the tab `Credentials` and set a password. Make sure to disable
254+
`temporary`, otherwise you'll need to change it on first login.
211255

212256
### Dev Container
213257

@@ -226,7 +270,12 @@ should already be installed in the devcontainer.
226270

227271
Test Disclaimer:
228272

229-
Some tests for basic and advanced database logic were done using unit tests. However later on, most tests were conducted by directly running and using the project, since a lot of the work was concerning the UI. Additionally most of the database operations are pretty similar, so in the interest of saving time, there was not a need to write individual tests for every one of them. The focus was on working directly with the interactive components of the project, seeing what worked and gaining concrete information about occurring errors through example data and debugging with developer tools.
273+
Some tests for basic and advanced database logic were done using unit tests. However later on, most tests were conducted
274+
by directly running and using the project, since a lot of the work was concerning the UI. Additionally most of the
275+
database operations are pretty similar, so in the interest of saving time, there was not a need to write individual
276+
tests for every one of them. The focus was on working directly with the interactive components of the project, seeing
277+
what worked and gaining concrete information about occurring errors through example data and debugging with developer
278+
tools.
230279

231280
To run the tests for the project, use the following command:
232281

@@ -235,11 +284,13 @@ make tests
235284
```
236285

237286
## Disclosure of AI Usage
238-
AI was used for Tab-Completing and Debugging, never for generating whole sections of code without a human creating derivatives of said generated code.
287+
288+
AI was used for Tab-Completing and Debugging, never for generating whole sections of code without a human creating
289+
derivatives of said generated code.
239290
Model used were:
291+
240292
- ChatGPT 4o, 4.1 and 5
241293
- Github Copilot
242294
- Google Gemini
243295

244-
245296
[^1]: Angle brackets (`<>`) indicate required arguments, square brackets (`[]`) indicate optional arguments.

0 commit comments

Comments
 (0)