From 849b37164a5626c68ee538eb47ce4fb37f2bacaa Mon Sep 17 00:00:00 2001 From: ShaBle <141682408+PnePnePne@users.noreply.github.com> Date: Thu, 12 Feb 2026 19:17:28 +0100 Subject: [PATCH] Update README.md --- README.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/README.md b/README.md index 3532910..df91de7 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,80 @@ Im Dev-Modus läuft das Frontend über Vite (`localhost:5173`) und proxyt API-Ca ## Repository Struktur (High-Level) +. +├─ LagerFastApi/ # Backend (LagerFastApi) +│ └─ app/ +│ ├─ api/ # Router/Schemas (HTTP Layer) +│ ├─ db/ # DB Session/Engine, Alembic Integration +│ ├─ domain/ # Domain Model (framework-agnostisch) +│ └─ main.py # FastAPI App Entry +├─ alembic/ # Migrationen +├─ data/ # Lokale SQLite (ignored) +├─ frontend/ # Vue 3 + Vite +│ ├─ src/ +│ │ ├─ api/ # HTTP + API Adapter (einziger Axios-Ort) +│ │ ├─ features/ # Feature-Services + Views/Pages +│ │ └─ generated/ # Generierte OpenAPI Types (ignored) +│ └─ vite.config.ts # Proxy /api -> 127.0.0.1:8000 +└─ package.json # Root Dev-Orchestrierung (optional) + +--- + +## Voraussetzungen + +- Python 3.11+ (empfohlen) +- Node.js 20+ (du nutzt bereits eine aktuelle Version) +- Git + +--- + +## Setup + +### 1) Backend installieren + +Im Projektroot: + +```bash +python -m venv .venv +# Windows PowerShell: +.\.venv\Scripts\Activate.ps1 + +pip install -r requirements.txt + +Db-Migrationen anwenden: alembic upgrade head +Backend starten: python -m uvicorn fastapi_demo.app.main:app --reload --host 127.0.0.1 --port 8000 +Test: +OpenAPI JSON: http://127.0.0.1:8000/openapi.json +Health: http://127.0.0.1:8000/api/health + + +Frontend Setup +1) Dependencies installieren +cd frontend +npm install +2) Env konfigurieren + +frontend/.env.development: + +VITE_API_BASE=/api +VITE_OPENAPI_URL=http://127.0.0.1:8000/openapi.json +3) OpenAPI Types generieren + +Backend muss laufen! + +npm run gen:api +4) Frontend starten +npm run dev + +Webpage: + +http://localhost:5173 + +Proxy-Test: + +http://localhost:5173/api/health (geht über Vite Proxy zum Backend) + +Dev-Orchestrierung (optional, Root) + +Du kannst optional eine Root-package.json verwenden, um Backend+Frontend mit einem Command zu starten.