Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WS23/24 #323

Merged
merged 34 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4e8c050
strip whitespaces around username (#281)
Robert27 Jun 13, 2023
4c17093
Fixed issue #282 // Fixed issue #275 (#284)
FabianSimonGross Jun 19, 2023
8ec5711
🌐 Add i18n and internationalize app
BuildmodeOne Jun 23, 2023
771728a
Save user language preference (#290)
BuildmodeOne Jun 23, 2023
c55d300
🧹 General improvements (#292)
BuildmodeOne Jun 26, 2023
26d0c0b
Fix debug page and remove obtainSession method
alexhorn Jun 30, 2023
50a1b83
Upgrade to Node.js 18 LTS
alexhorn Jul 1, 2023
fdb4fd5
✨ add suggestion preferences
BuildmodeOne Jul 4, 2023
b6f2087
🐛 Localize NavBar
BuildmodeOne Jul 4, 2023
abaa0ff
Fixes cookie deletion on browser session end (#300)
Robert27 Jul 6, 2023
2a820c6
🐛 Fix UI error on FoodCard (#303)
BuildmodeOne Jul 6, 2023
650de54
🥅 Improve translation fallback and development (#302)
BuildmodeOne Jul 6, 2023
ae16ba1
Migrate to new API (#295)
alexhorn Jul 8, 2023
642cf20
Fix room 0 being displayed (#305)
alexhorn Jul 9, 2023
d542b45
✨ add ExamsCard (#306)
BuildmodeOne Jul 12, 2023
6206e2e
🐛 Fix duplicate grade listing (#307)
BuildmodeOne Jul 13, 2023
609dc30
🐛 Fix canisius category and unify settings label (#308)
BuildmodeOne Jul 14, 2023
4d98b94
fix(mobility): fixes wrong translation key (#310)
Robert27 Jul 19, 2023
a3196b9
✏️ fix translation key typo (#311)
BuildmodeOne Jul 22, 2023
ae19233
💄 small UI changes and fixes (#312)
BuildmodeOne Jul 23, 2023
461f852
✨ Add basic THI light theme (#313)
BuildmodeOne Jul 23, 2023
441c2c6
✨ add static Reimanns meals (#309)
BuildmodeOne Jul 24, 2023
75478bc
Adds basic yarn support (#301)
Robert27 Jul 24, 2023
15c8703
fixes previous pr #301 (#314)
Robert27 Jul 24, 2023
307f07f
🚸 Improve FoodModal (#315)
BuildmodeOne Jul 27, 2023
d1d8681
refactor(app): moves to jsx files (#316)
Robert27 Jul 28, 2023
034cf74
📝 update docs (#317)
BuildmodeOne Jul 28, 2023
2801b9e
🍱 add rounded corners to favicon (#318)
BuildmodeOne Jul 28, 2023
27f9aeb
🐛 Fix timetable errors during semester break (#320)
BuildmodeOne Aug 2, 2023
04a6349
🐛💄 Fix spo weights and rework grade page (#319)
BuildmodeOne Aug 7, 2023
c398b70
updates calendar entries (#321)
Robert27 Aug 15, 2023
8c13219
🐛 fix german grade summary disclaimer (#322)
BuildmodeOne Sep 18, 2023
4f4cfd5
Fix source URL for Hochschule bus stop
alexhorn Sep 25, 2023
ac164b5
🐛 fix food disclaimer for non-translated meals
BuildmodeOne Sep 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You should know how to program in object oriented languages. Prior experience wi
You need to install the necessary tools.

* [Git](https://git-scm.com/downloads)
* [Node.js 14 LTS](https://nodejs.org/en/)
* [Node.js 18 LTS](https://nodejs.org/en/)
* [Visual Studio Code](https://code.visualstudio.com/)
* [ESLint for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)

Expand All @@ -20,30 +20,41 @@ You need to install the necessary tools.
Make a personal copy of the source code using the *Fork* button on the top right of this page.

Open a terminal (e.g. PowerShell if you're on Windows) and download the source code to your PC using Git:

```bash
git clone https://github.com/your-github-username/THI-App.git
cd THI-App/rogue-thi-app
```

Download everything else that is required to run the app:

```bash
npm install
# or
yarn
```

> **Note**
> For node.js versions 17 and above, you need to set the environment variable `NODE_OPTIONS=--openssl-legacy-provider` to avoid an error when installing the dependencies.

Now open the `rogue-thi-app` folder in Visual Studio Code.

## Developing

Start the application locally:

```bash
npm run dev
# or
yarn dev
```

Go to https://localhost:3000 in your browser and voilà, you're ready to go. You can change things in your code and your browser will automatically load the new version.
Go to [https://localhost:3000](https://localhost:3000) in your browser and voilà, you're ready to go. You can change things in your code and your browser will automatically load the new version.

### Structure of the code

A quick overview over the structure of the source code:

* `/pages`
The pages of the application that you see in your browser. This is where to look if you want to change the structure of the UI.
* `/components`
Expand All @@ -55,4 +66,4 @@ Various reusable utilities such as a client for the THI API and a timestamp form

## Getting help

If you need help with the code, don't hesitate to contact us at [email protected].
If you need help with the code, don't hesitate to contact us at [[email protected]](mailto:[email protected]).
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,24 @@ RUN mkdir ./splash && npx pwa-asset-generator --no-sandbox=true --path-override



FROM node:16
FROM node:18

WORKDIR /opt/next

ARG NEXT_PUBLIC_HACKERMAN_FLAGS
ARG NEXT_PUBLIC_ELECTION_URL
ARG NEXT_PUBLIC_GUEST_ONLY
ARG NEXT_PUBLIC_THI_API_MODE
ARG NEXT_PUBLIC_THI_API_KEY
ENV NEXT_PUBLIC_HACKERMAN_FLAGS $NEXT_PUBLIC_HACKERMAN_FLAGS
ENV NEXT_PUBLIC_ELECTION_URL $NEXT_PUBLIC_ELECTION_URL
ENV NEXT_PUBLIC_GUEST_ONLY $NEXT_PUBLIC_GUEST_ONLY
ARG NEXT_PUBLIC_THI_API_MODE $NEXT_PUBLIC_THI_API_MODE
ENV NEXT_PUBLIC_THI_API_KEY $NEXT_PUBLIC_THI_API_KEY

COPY rogue-thi-app/package.json rogue-thi-app/package-lock.json ./
RUN npm install
# OpenSSL legacy provider needed to build node-forge
RUN NODE_OPTIONS=--openssl-legacy-provider npm install
COPY rogue-thi-app/ .
COPY --from=spo /opt/spo-grade-weights.json data/
COPY --from=distances /opt/room-distances.json data/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can find more information on this in [this document](docs/data-security.md).
Currently the documentation consists of a list of valid requests and examples
of their responses.
You can view [the full list here](docs/thi-rest-api.md). This documentation was
created manually by using the official app and logging requests with mitmproxy.
created manually by using the official app and logging requests with `mitmproxy`.
The app also includes a [debugging tool](https://neuland.app/debug) which handles session generation
and API communication.

Expand Down
13 changes: 9 additions & 4 deletions docs/data-security-de.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Neuland App Datensicherheit

TL;DR: Nur du und die THI Haben Zugriff auf dein Passwort sowie deine
persönlichen Daten.

### Speichert ihr meine Daten?
## Speichert ihr meine Daten?

Nur lokal auf deinem Gerät.

### Klaut ihr mein Passwort?
## Klaut ihr mein Passwort?

Wir haben keinen Zugriff auf dein Passwort.

### Wie funktioniert das?
## Wie funktioniert das?

Normalerweise wenn man der Browser eine REST API benutzt wird `fetch` oder
`XMLHttpRequests` in Javascript benutzt. Der Browser verhindert aber dass
eine Seite A (z.B. neuland.app) auf eine Seite B (z.B. thi.de) zugreift.
Expand All @@ -21,6 +25,7 @@ Anfragen an thi.de werden also im Browser verschlüsselt und nur von unserem
Proxy weitergegeben. So hat nur der THI Server und der Browser Zugriff auf
Passwörter und Nutzerdaten.

### Ich vertraue euch trotzdem nicht!
## Ich vertraue euch trotzdem nicht

Gerne kannst du hier auf Github den Source Code der Neuland App lesen und
diese wenn du möchtest auch selbst auf deinem Server installieren.
16 changes: 11 additions & 5 deletions docs/data-security.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# Neuland App Data Safety

TL;DR: Only you and the THI will have access to your password and other
sensitive information.

### Will my data be stored?
## Will my data be stored?

Only on your own device.

### Will you steal my password?
## Will you steal my password?

We can't.

### Will my data be accesible to you?
## Will my data be accesible to you?

No. It is transmitted end to end encrypted between your browser and the THI
Server. Even though our server is used as a proxy we can only see encrypted
data.

### How does this work?
## How does this work?

Normally when accessing a REST API your browser makes requests to it using
`fetch` or `XMLHttpRequests`. Because of CORS policies the App is not able to
directly contact the THI API. Instead it connects via a Proxy which is hosted
Expand All @@ -24,6 +29,7 @@ a full javascript implementation of TLS and HTTP. This way packets are
encrypted in your browser and simply relayed by our server. Only the THI server
and your browser have access to plain text packet contents.

### What if i still do not trust you?
## What if i still do not trust you?

You can read the source code of the neuland app here on github.
If you want, you can even install it on your own server.
Loading
Loading