2026-10-03 10:26:05 +02:00
# BuyingAgent
2026-10-03 10:47:48 +02:00
Backend für einen generischen Buying-/Deal-Agenten. Der erste fachliche Schnitt ist in `.specs/buying-agent-v0.1-spec.md` beschrieben.
2026-10-03 10:26:05 +02:00
2026-10-03 10:47:48 +02:00
Entwicklung auf `develop` . Push nach `develop` baut die Dev-Umgebung auf dem Raspberry Pi. Ein Merge-Commit nach `main` deployt Production. Details: `docs/DEPLOYMENT.md` .
2026-10-03 10:26:05 +02:00
2026-10-03 10:47:48 +02:00
## Stack
Python 3.13, FastAPI, Pydantic 2, SQLAlchemy 2, Alembic, PostgreSQL 17, pytest, Docker Compose. Build-Tool: [uv ](https://docs.astral.sh/uv/ ) 0.10.11.
## Lokal starten
```powershell
Copy-Item .env.example .env
docker compose up --build -d
```
```sh
cp .env.example .env
docker compose up --build -d
```
API: `http://127.0.0.1:8000`
Live: `GET /health/live`
Ready: `GET /health/ready` (PostgreSQL erreichbar und Alembic auf Head)
## Tests
2026-10-03 11:20:30 +02:00
Lokal, isolierter Stack (tmpfs, kein Dev-/Prod-Volume):
2026-10-03 10:47:48 +02:00
```sh
docker compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from api
```
2026-10-03 11:20:30 +02:00
Auf dem Server nach Dev-Deploy (Gitea `test.yml` , analog Kanshō): pytest gegen `buyingagent_test` auf dem Dev-Postgres plus read-only Smoke gegen `http://192.168.2.49:8095/health/ready` .
2026-10-03 10:47:48 +02:00
## Server
| Umgebung | Branch | Verzeichnis | API |
|---|---|---|---|
2026-10-03 11:03:06 +02:00
| Development | `develop` | `~/docker/buyingagent-dev` | `http://192.168.2.49:8095` |
| Production | `main` | `~/docker/buyingagent` | `http://192.168.2.49:8006` |
2026-10-03 10:47:48 +02:00
Repo: `http://192.168.2.144:3000/Lars/BuyingAgent.git`