11 Commits
Author SHA1 Message Date
rudi ad678df2ce Merge pull request 'Readme' (#5) from readme into main
Reviewed-on: #5
2026-08-22 22:49:43 +00:00
rudi 8b70ed1550 last fix 2026-08-22 22:49:29 +00:00
rudi 05128b5156 Fix: Danger 2026-08-22 22:43:20 +00:00
rudi 8e8e03d4e0 Unstable Warning
Warnung, dass das Repo unter Entwicklung ist
2026-08-22 22:40:55 +00:00
rudi ca6c31b91d Merge pull request 'Added 'Ablauf' and 'Installation'' (#4) from readme into main
Reviewed-on: #4
2026-08-22 22:37:20 +00:00
Rudi 8c6c4ff253 Solved merge conflict 2026-08-23 00:36:42 +02:00
Rudi 6b84441d75 Added 'Ablauf' and 'Installation' 2026-08-23 00:26:31 +02:00
rudi 61ee4ba1f8 Merge pull request 'Added Installation and 'Ablauf'' (#3) from readme-updates into main
Reviewed-on: #3
2026-08-22 22:09:32 +00:00
Rudi 396b4636f3 Added Installation and 'Ablauf' 2026-08-23 00:08:13 +02:00
rudi ce8857f92b Merge pull request 'README.md aktualisiert' (#2) from readme-updates into main
Reviewed-on: #2
2026-08-22 21:56:37 +00:00
rudi 85faf8aa5b README.md aktualisiert 2026-08-22 21:56:14 +00:00
3 changed files with 52 additions and 43 deletions

No files matched your search

+49 -7
View File
@@ -1,14 +1,21 @@
# Tandoor-Shoppinglist # Tandur
Eine Website, die sich von einer selber gehosteten Tandoor-Instanz die Shoppinglist Einträge nimmt, und als Shoppinglist anzeigt. Eine Website, die sich von einer selber gehosteten Tandoor-Instanz die Shoppinglist Einträge nimmt, und als Shoppinglist anzeigt.
<div style="border-left: 4px solid #da3633; background-color: rgba(218, 54, 51, 0.1); padding: 12px 16px; border-radius: 0 6px 6px 0; margin: 16px 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;">
<div style="font-weight: 600; color: #f85149; margin-bottom: 4px; display: flex; align-items: center; gap: 8px;">
<span>⚠️</span> <strong>Just created</strong>
</div>
<div style="color: #c9d1d9; font-size: 14px;">
This Repository was just created. It isnt finished and under heavy construction. So this Service is unstable!
</div>
</div>
## Inhalt ## Inhalt
- TODO - TODO
- Fsetlegungen - Festlegungen
- Ablauf
- Installation
## TODO ## TODO
@@ -17,6 +24,41 @@ Eine Website, die sich von einer selber gehosteten Tandoor-Instanz die Shoppingl
- [ ] Next.js -> Frontend ? - [ ] Next.js -> Frontend ?
- [ ] Python -> Backend - [ ] Python -> Backend
- [ ] Implementieren - [ ] Implementieren
- [ ] README in English and German
## Festlegungen ## Festlegungen
*Hier muss noch beschrieben werden, wie genau das gemacht wird.* - Database: SQLite3 mit sqlmodel
- API FastAPI
- Jinja
- TailwindCSS + Alpine.js
???
## Ablauf
- Data fetch from Tandoor via APIs
- Data fetch from Database
- View on Website and edit
- Order vie Mail
- CSV download *optional
## Installation
### Bare metal
##### Linux
**Download and Setup**
```
git clone https://git.schamagusa.de/rudi/Tandur.git
cd Tandur
source .venv/bin/activate
#source .venv/bin/activate.fish #if you are using fish-shell
pip install --no-cache-dir -r requirements.txt
```
##### Run
```
uvicorn main:app
```
### Docker Compose (recomended)
#TODO
-23
View File
@@ -1,23 +0,0 @@
from typing import Optional
from sqlmodel import Field, SQLModel, create_engine, Session
# 1. Das Datenmodell (Tabelle in der DB)
class ShoppingItem(SQLModel, table=True):
id: Optional[int] = Field(default=None, primary_key=True)
name: str
menge: int = Field(default=1)
gekauft: bool = Field(default=False)
# 2. Die SQLite-Verbindung
# check_same_thread=False ist zwingend nötig für FastAPI + SQLite
sqlite_url = "sqlite:///tandur.db"
engine = create_engine(sqlite_url, connect_args={"check_same_thread": False})
# 3. Funktion zum Erstellen der Tabellen
def create_db_and_tables():
SQLModel.metadata.create_all(engine)
# 4. Session-Generator für die Routen
def get_session():
with Session(engine) as session:
yield session
+3 -13
View File
@@ -1,19 +1,9 @@
from contextlib import asynccontextmanager from fastapi import FastAPI, Request
from fastapi import FastAPI, Request, Depends
from fastapi.templating import Jinja2Templates from fastapi.templating import Jinja2Templates
from database import create_db_and_tables, get_session, ShoppingItem
from sqlmodel import Session
# Wird beim Starten des Servers exakt einmal ausgeführt app = FastAPI()
@asynccontextmanager
async def lifespan(app: FastAPI):
create_db_and_tables()
yield
app = FastAPI(lifespan=lifespan)
templates = Jinja2Templates(directory="templates") templates = Jinja2Templates(directory="templates")
@app.get("/") @app.get("/")
async def home(request: Request, session: Session = Depends(get_session)): async def home(request: Request):
# Hier können wir bald Daten aus der DB laden
return templates.TemplateResponse(request=request, name="index.html") return templates.TemplateResponse(request=request, name="index.html")