before claude

This commit is contained in:
Gilles Soulier
2026-01-18 06:26:17 +01:00
parent dc19315e5d
commit 740c3d7516
60 changed files with 3815 additions and 354 deletions

View File

@@ -196,6 +196,8 @@ Guide de migration JSON -> DB: `MIGRATION_GUIDE.md`
L'API est protegee par un token simple.
Note: l endpoint `/products` expose des champs Amazon explicites (asin, note, badge Choix d Amazon, stock_text/in_stock, model_number/model_name, main_image/gallery_images). Les reductions ne sont plus calculees cote API.
```bash
export PW_API_TOKEN=change_me
docker compose up -d api
@@ -204,8 +206,54 @@ docker compose up -d api
Exemples:
```bash
curl -H "Authorization: Bearer $PW_API_TOKEN" http://localhost:8000/products
curl http://localhost:8000/health
curl -H "Authorization: Bearer $PW_API_TOKEN" http://localhost:8001/products
curl http://localhost:8001/health
```
Filtres (exemples rapides):
```bash
curl -H "Authorization: Bearer $PW_API_TOKEN" \\
"http://localhost:8001/products?price_min=100&stock_status=in_stock"
curl -H "Authorization: Bearer $PW_API_TOKEN" \\
"http://localhost:8001/products/1/prices?fetch_status=success&fetched_after=2026-01-14T00:00:00"
curl -H "Authorization: Bearer $PW_API_TOKEN" \\
"http://localhost:8001/logs?fetch_status=failed&fetched_before=2026-01-15T00:00:00"
```
Exports (CSV/JSON):
```bash
curl -H "Authorization: Bearer $PW_API_TOKEN" \\
"http://localhost:8001/products/export?format=csv"
curl -H "Authorization: Bearer $PW_API_TOKEN" \\
"http://localhost:8001/logs/export?format=json"
```
CRUD (examples rapides):
```bash
curl -H "Authorization: Bearer $PW_API_TOKEN" -X POST http://localhost:8001/products \\
-H "Content-Type: application/json" \\
-d '{"source":"amazon","reference":"REF1","url":"https://example.com"}'
```
Webhooks (exemples rapides):
```bash
curl -H "Authorization: Bearer $PW_API_TOKEN" -X POST http://localhost:8001/webhooks \\
-H "Content-Type: application/json" \\
-d '{"event":"price_changed","url":"https://example.com/webhook","enabled":true}'
curl -H "Authorization: Bearer $PW_API_TOKEN" -X POST http://localhost:8001/webhooks/1/test
```
## Web UI (Phase 4)
Interface Vue 3 dense avec themes Gruvbox/Monokai, header fixe, sidebar filtres, et split compare.
```bash
docker compose up -d frontend
# Acces: http://localhost:3000
```
## Configuration (scrap_url.yaml)

View File

@@ -22,6 +22,7 @@ pricewatch/app/scraping/pipeline.py
pricewatch/app/scraping/pw_fetch.py
pricewatch/app/stores/__init__.py
pricewatch/app/stores/base.py
pricewatch/app/stores/price_parser.py
pricewatch/app/stores/amazon/__init__.py
pricewatch/app/stores/amazon/store.py
pricewatch/app/stores/cdiscount/__init__.py