From 729a13bfca0c39395ce1735780f9e17199669f1d Mon Sep 17 00:00:00 2001 From: kai Date: Wed, 9 Sep 2026 07:49:52 +0200 Subject: [PATCH] Initial finance dashboard --- .gitignore | 4 +++ Dockerfile | 12 +++++++++ app/main.py | 16 +++++++++++ app/templates/index.html | 57 ++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 10 +++++++ requirements.txt | 3 +++ 6 files changed, 102 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 app/main.py create mode 100644 app/templates/index.html create mode 100644 docker-compose.yml create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d51f033 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +__pycache__/ +*.pyc +.env +data/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6f1ee72 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.13-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY app/ /app/ + +EXPOSE 8080 + +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"] diff --git a/app/main.py b/app/main.py new file mode 100644 index 0000000..34fdaa5 --- /dev/null +++ b/app/main.py @@ -0,0 +1,16 @@ +from fastapi import FastAPI, Request +from fastapi.responses import HTMLResponse +from fastapi.templating import Jinja2Templates + +app = FastAPI(title="Finance Dashboard") +templates = Jinja2Templates(directory="/app/templates") + + +@app.get("/", response_class=HTMLResponse) +async def index(request: Request): + return templates.TemplateResponse(request=request, name="index.html") + + +@app.get("/health") +async def health(): + return {"status": "ok"} diff --git a/app/templates/index.html b/app/templates/index.html new file mode 100644 index 0000000..7b24e3a --- /dev/null +++ b/app/templates/index.html @@ -0,0 +1,57 @@ + + + + + + + Finance Dashboard + + + +
+

💶 Finance Dashboard

+

pinguAurora meldet sich zum Dienst.

+

Hier entsteht dein persönliches Dashboard für Dividenden, Zinsen, Depot und Notgroschen.

+
+ + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a3c9b04 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + finance-dashboard: + build: . + container_name: finance-dashboard + restart: unless-stopped + ports: + - "8081:8080" + volumes: + - ./data:/data + mem_limit: 128m diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..243af8b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +fastapi +uvicorn[standard] +jinja2