Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
38c9474
Added Algorithm, which returns a sorted list of recipes of an matchin…
PrussianBaron May 4, 2026
ef43421
Added Filtering
PrussianBaron May 4, 2026
e701e83
Tests für Database, passwort überprüfung und email überürufung wurden…
Nicoolaus May 4, 2026
ef3fd46
ci pipeline abhägigkeit mit rein gemacht
Nicoolaus May 4, 2026
d2c72c0
Feat bei Ci yml entfernt
Nicoolaus May 5, 2026
70b7d97
Delete project/data/LazyCookDB.sqlite3
GalacticCodeGambit May 5, 2026
7b20faf
Feature: Forgot Password link in signin modal. Popup for Email Input.…
EdenBernhard May 5, 2026
0885213
Feat/ci cd add lint (#142)
GalacticCodeGambit May 5, 2026
a0b9722
Merge remote-tracking branch 'origin/feat/test' into blatt15
GalacticCodeGambit May 5, 2026
534fef4
Merge remote-tracking branch 'origin/blatt15' into blatt15
GalacticCodeGambit May 5, 2026
05c6f83
update super-linter to version 8.6.0 in CI configuration
GalacticCodeGambit May 7, 2026
e821f76
Test Linter
GalacticCodeGambit May 7, 2026
1930c91
Test Linter
GalacticCodeGambit May 7, 2026
68dcdef
Feature: Email and Password change popup width changed
EdenBernhard May 8, 2026
2225fab
Separate linter configuration into its own workflow file (#149)
GalacticCodeGambit May 8, 2026
7f7f042
Update Node.js version in Dockerfile-frontend to 24.1.0
GalacticCodeGambit May 8, 2026
de9f3e4
Merge remote-tracking branch 'origin/blatt15' into RecipeAlgorithm
PrussianBaron May 8, 2026
64be75d
Tested the recipe algorithim
PrussianBaron May 9, 2026
fb33247
Feature: Fix problem with refresh token and include show Password
EdenBernhard May 9, 2026
48251d2
Feature: forgot password functionality works with redirection to home…
EdenBernhard May 10, 2026
c42c310
Merge branch 'feat/forgot-password-functionality'
EdenBernhard May 10, 2026
bee70b0
added SaveInDB Methods
PrussianBaron May 10, 2026
38dbb2d
Potential fix for pull request finding
EdenBernhard May 10, 2026
b09dcbd
Potential fix for pull request finding
EdenBernhard May 10, 2026
833b80e
Potential fix for pull request finding
EdenBernhard May 10, 2026
9f34b74
Fix: Copilot review suggestion
EdenBernhard May 10, 2026
bb1a733
Fix: Copilot review suggestion
EdenBernhard May 10, 2026
86d97a2
Fix: Copilot review suggestion
EdenBernhard May 10, 2026
a495626
Fix: Copilot review suggestion
EdenBernhard May 10, 2026
0501cd8
Feat: forgot password functionality (#151)
EdenBernhard May 10, 2026
9f2abc6
Merge remote-tracking branch 'origin/blatt17'
EdenBernhard May 10, 2026
e90f276
Feat: show top 5 incredients as options (#152)
EdenBernhard May 11, 2026
8ec11cb
Merge remote-tracking branch 'origin/blatt17' into RecipeAlgorithm
PrussianBaron May 11, 2026
a47db44
Black used
PrussianBaron May 11, 2026
0670d45
Merge pull request #153 to blatt17 from RecipeAlgorithm
PrussianBaron May 11, 2026
4f6c21d
Merge remote-tracking branch 'origin/blatt17'
EdenBernhard May 11, 2026
3c02e9f
Info: Standort von Impressum und Datenschutz
EdenBernhard May 11, 2026
a7ceb96
Added Review-Protokoll-01
GalacticCodeGambit May 12, 2026
42e06bb
Clear participant roles in review protocol
GalacticCodeGambit May 12, 2026
e27f003
Update participants and review focus in documentation
GalacticCodeGambit May 12, 2026
3792403
Made the required RecipeSUCUK changes
PrussianBaron May 18, 2026
5db1e8d
Rename RecipeSucuk.py to RecipeSUCUK.py
PrussianBaron May 18, 2026
74f6e20
Added Search Algorithm for Recipe Name search
PrussianBaron May 18, 2026
f6a85bc
Merge branch 'blatt17' of https://github.com/GalacticCodeGambit/LazyC…
PrussianBaron May 18, 2026
4f25613
SearchRecipeNames now returns a list of recipe Objects
PrussianBaron May 18, 2026
f271026
Datenschutz und Impressum MD's hinzugefügt und calls angepasst. (#162)
Hellocrafting May 20, 2026
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
29 changes: 0 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,3 @@ jobs:
- name: Run backend tests
run: |
docker compose -f project/compose.yaml exec -T backend-dev sh -c "python -m pytest tests/ -v"

linter:
name: Lint code base
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run GitHub Super Linter
uses: super-linter/super-linter/slim@v8.6.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: main
VALIDATE_ALL_CODEBASE: false
# Root ignore file
# GitHub workflows
# Project backend/frontend + Dockerfiles + compose files
FILTER_REGEX_INCLUDE: '^/github/workspace/(\.gitignore|\.github/workflows/.*\.ya?ml|project/(backend/.*\.py|frontend/.*\.(ts|tsx|js|jsx|css|mjs|cjs)|Dockerfile[^/]*|(compose|docker-compose)\.ya?ml))$'
VALIDATE_PYTHON: true
VALIDATE_PYTHON_BLACK: true
VALIDATE_PYTHON_FLAKE8: true
VALIDATE_TYPESCRIPT_ES: true
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_CSS: true
VALIDATE_DOCKERFILE: true
VALIDATE_YAML: true
VALIDATE_GITHUB_ACTIONS: true
40 changes: 40 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Lint code base"

on:
pull_request:
branches: [main, 'blatt*']
push:
branches: [main, 'blatt*']

permissions:
contents: read

jobs:
linter:
name: Lint code base
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run GitHub Super Linter
uses: super-linter/super-linter/slim@v8.6.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: main
VALIDATE_ALL_CODEBASE: false
# Root ignore file
# GitHub workflows
# Project backend/frontend + Dockerfiles + compose files
FILTER_REGEX_INCLUDE: '^/github/workspace/(\.gitignore|\.github/workflows/.*\.ya?ml|project/(backend/.*\.py|frontend/.*\.(ts|tsx|js|jsx|css|mjs|cjs)|Dockerfile[^/]*|(compose|docker-compose)\.ya?ml))$'
VALIDATE_PYTHON: true
VALIDATE_PYTHON_BLACK: true
VALIDATE_PYTHON_FLAKE8: true
VALIDATE_TYPESCRIPT_ES: true
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_CSS: true
VALIDATE_DOCKERFILE: true
VALIDATE_YAML: true
VALIDATE_GITHUB_ACTIONS: true
48 changes: 34 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# LazyCook
[![ci](https://github.com/GalacticCodeGambit/LazyCook/actions/workflows/ci.yml/badge.svg)](https://github.com/GalacticCodeGambit/LazyCook/actions/workflows/ci.yml)
[![ci.yml](https://github.com/GalacticCodeGambit/LazyCook/actions/workflows/ci.yml/badge.svg)](https://github.com/GalacticCodeGambit/LazyCook/actions/workflows/ci.yml)
[![lint.yml](https://github.com/GalacticCodeGambit/LazyCook/actions/workflows/lint.yml/badge.svg)](https://github.com/GalacticCodeGambit/LazyCook/actions/workflows/lint.yml)

LazyCook soll eine Webanwendung sein. Die es ermöglichen seine vorhanden Zutaten einzutragen und darauf soll LazyCook dir mögliche Rezepte/Gerichte vorschlagen die du aus diesen Zutaten gemacht werden können.

Expand All @@ -21,6 +22,22 @@ LazyCook soll eine Webanwendung sein. Die es ermöglichen seine vorhanden Zutate
- [x] [#47](https://github.com/GalacticCodeGambit/LazyCook/issues/47) Der Nutzer kann bereits hinzugefügte Zutaten bearbeiten, wie z.B. Menge, Einheit
- [x] [#45](https://github.com/GalacticCodeGambit/LazyCook/issues/45) Passwörter "sicher" in Datenbank Abspeichern als Hash und vom Frontend/Backend "sicher" behandeln

## Installation und Setup
1. Klonen das Repository:
`git clone https://github.com/GalacticCodeGambit/LazyCook.git`
2. Navigieren zum Projektverzeichnis:
`cd LazyCook/Project`
3. Starten der Anwendung mit: Docker Compose:
`docker compose up --build -d`
<!--Unterschied zu "docker compose up -d"? -->
Die Anwendung sollte jetzt unter `http://localhost:8000` erreichbar sein.

Für die Funktion [#115](https://github.com/GalacticCodeGambit/LazyCook/issues/115) von Email Versenden/Empfangen muss im Ordner `project/` eine `.env` Datei mit den folgenden Variablen angelegt werden:
```
EMAIL_HOST=<dein.mail@gmail.com>
GMAIL_PASSWORD=<dein_gmail_passwort>
```

## Verwendete Technologien
- Frontend: HTML, CSS, TypeScript/React
- Backend: Python
Expand All @@ -30,26 +47,29 @@ LazyCook soll eine Webanwendung sein. Die es ermöglichen seine vorhanden Zutate
- Containerization: Docker
- Projekt Management: GitHub Projects

## Code-Quality / Linting
- Der Workflow `.github/workflows/ci.yml` prüft mit dem Job `linter` das Projekt mit **GitHub Super-Linter**.
- Dabei werden u. a. Python-, TypeScript-, JavaScript-, YAML- und Dockerfile-Dateien validiert.
### Code-Quality / Linting
- Der Workflow `.github/workflows/lint.yml` prüft das Projekt mit **GitHub Super-Linter**.
- Dabei werden u.a. Python-, TypeScript-, JavaScript-, YAML- und Dockerfile-Dateien validiert.

<!--
- Mockup: Figma
- UML: UMLet/Drawio
-->

## Installation and Setup
1. Klonen das Repository:
`git clone https://github.com/GalacticCodeGambit/LazyCook.git`
2. Navigieren zum Projektverzeichnis:
`cd LazyCook/Project`
3. Starten der Anwendung mit: Docker Compose:
`docker compose up --build -d`
<!--Unterschied zu "docker compose up -d"? -->
Die Anwendung sollte jetzt unter `http://localhost:8000` erreichbar sein.
## Entwicklung
### Linter
#### Python `Black`
Automatisch formatieren:
```
black project/backend/ .
```

`Black` installieren:
```
python -m pip install black
```

## Probleme beim Entwickeln
### Probleme beim Entwickeln

Problem: Code hinzugefügt/geändert aber Änderungen werden nicht übernommen von Docker
```
Expand Down
34 changes: 34 additions & 0 deletions docs/Review-Protokoll-01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Review-Protokoll-01
### **Datum** (Startzeit und Endzeit):
12.05.2026 16.:00 bis 16:20

### **Teilnehmende**:
- Moderator: PrussianBaron
- Zeitwächter: Nicoolaus
- Notizen: GalacticCodeGambit
- Teilnehmer: EdenBernhard, Hellocrafting

### **Ziel**/**Schwerpunkt** des Reviews: <br>
Schwerpunkt: Team übergreifenden Verständnis des Algorithmus Rezept Suche verbessern.
Warum: Umfangreiches Verständnis schaffen, da es sich um ein Zentrales Feature handelt und um die Umsetzung der Rezept Anzeige bewerten zu können.

Planen/Umsetzung von Features die auf den Algorithmus darauf Bauen.

### **Komponenten für den Review**: <br>
Datei: `RecipeSucuk.py`

### **Kriterien für den Review**:
- Codequalität
- Performance soll auf 100 Rezepten in unter 1s laufen
- Testabdeckung
- Wartbarkeit

### **Review-Methodik**:
Walkthroughs und Code Review von `RecipeSucuk.py`

### **Ergebnisse**:
- Umsetzung der Anzeigen der Rezepte
Top 100 Matching Rezepte werden an Frontend geschickt von Algorithmus.
Danach ist der Mehr-Button nicht mehr da.
- Müssen Test schreiben für die Datei `RecipeSucuk.py`.
- Akronyme für `RecipeSucuk.py` wurde bestimmt (SUCUK - Search for Uncomplicated Cooking and User-friendly Kitchen recipes)
2 changes: 1 addition & 1 deletion project/Dockerfile-frontend
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:24-alpine3.20
FROM node:24.1.0-alpine3.20
WORKDIR /app

# Copy package.json and package-lock.json
Expand Down
43 changes: 42 additions & 1 deletion project/backend/Auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
from fastapi.security import OAuth2PasswordBearer
from jose import JWTError, jwt
import bcrypt
from pydantic import BaseModel

import hashlib

PASSWORD_RESET_EXPIRE_MINUTES = 30

import hashlib

PASSWORD_RESET_EXPIRE_MINUTES = 30

Comment on lines +19 to 22
from Models import Token, User

Expand Down Expand Up @@ -132,3 +139,37 @@ async def getCurrentUser(token: Annotated[str, Depends(oauth2_scheme)]) -> User:
raise credentials_exception

return User(email=konto["email"], name=konto["name"])


# --- Reset Password --- #


def hashResetToken(token: str) -> str:
"""SHA-256 Hash – für Reset-Tokens reicht das, sie sind ohnehin hochentropisch."""
return hashlib.sha256(token.encode()).hexdigest()


def createPasswordResetToken(kontoId: int) -> str:
"""Generiert Klartext-Token (geht per Mail) und speichert nur den Hash in der DB."""
from Database import savePasswordResetToken

token = secrets.token_urlsafe(48)
expiresAt = datetime.now(timezone.utc) + timedelta(
minutes=PASSWORD_RESET_EXPIRE_MINUTES
)
savePasswordResetToken(kontoId, hashResetToken(token), expiresAt.isoformat())
return token


def validatePasswordResetToken(token: str) -> dict | None:
from Database import getPasswordResetToken

entry = getPasswordResetToken(hashResetToken(token))
if entry is None or entry["usedAt"] is not None:
return None
expiresAt = datetime.fromisoformat(entry["expiresAt"])
if expiresAt.tzinfo is None:
expiresAt = expiresAt.replace(tzinfo=timezone.utc)
if expiresAt < datetime.now(timezone.utc):
return None
return entry
Loading
Loading