# 📑 PriceWatch - Index des fichiers **Version** : 0.1.0 | **Date** : 2026-01-13 Ce fichier liste tous les fichiers du projet avec leur description. --- ## 📚 Documentation (7 fichiers) | Fichier | Description | |---------|-------------| | **README.md** | Documentation principale du projet (installation, usage, architecture) | | **QUICKSTART.md** | Guide de dĂ©marrage rapide (commandes essentielles) | | **CLAUDE.md** | Guide pour futures instances de Claude Code | | **TODO.md** | Roadmap du projet (Phases 1-5) | | **CHANGELOG.md** | Historique des modifications (v0.1.0) | | **DELIVERY_SUMMARY.md** | RĂ©capitulatif complet de livraison Phase 1 | | **TEST_FILES_README.md** | Guide des fichiers de test et maintenance sĂ©lecteurs | | **INDEX.md** | Ce fichier - Index de tous les fichiers du projet | ## ⚙ Configuration (4 fichiers) | Fichier | Description | |---------|-------------| | **pyproject.toml** | Configuration package Python + dĂ©pendances | | **scrap_url.yaml** | Configuration de scraping (URLs + options) | | **.gitignore** | Fichiers Ă  ignorer par Git | | **PROJECT_SPEC.md** | SpĂ©cifications dĂ©taillĂ©es originales (français) | ## đŸ§Ș Tests (3 fichiers) | Fichier | Description | |---------|-------------| | **test_amazon.json** | Config de test Amazon (URLs, sĂ©lecteurs, valeurs attendues) | | **test_cdiscount.json** | Config de test Cdiscount (URLs, sĂ©lecteurs, valeurs attendues) | | **test_selectors.py** | Script de validation des sĂ©lecteurs | ## 🐍 Code source (18 modules Python) ### Core (4 modules) ``` pricewatch/app/core/ ├── schema.py ModĂšle ProductSnapshot (Pydantic) + validation ├── logging.py SystĂšme de logs colorĂ©s ├── io.py Lecture YAML / Écriture JSON + debug files └── registry.py DĂ©tection automatique stores ``` ### Scraping (2 modules) ``` pricewatch/app/scraping/ ├── http_fetch.py RĂ©cupĂ©ration HTTP avec User-Agent rotation └── pw_fetch.py RĂ©cupĂ©ration Playwright (anti-bot) ``` ### Stores (8 modules) ``` pricewatch/app/stores/ ├── base.py Classe abstraite BaseStore ├── amazon/ │ ├── store.py AmazonStore (match, parse, etc.) │ ├── selectors.yml SĂ©lecteurs CSS/XPath Amazon │ └── fixtures/ Fixtures HTML (vide) └── cdiscount/ ├── store.py CdiscountStore (match, parse, etc.) ├── selectors.yml SĂ©lecteurs CSS/XPath Cdiscount └── fixtures/ Fixtures HTML (vide) ``` ### CLI (1 module) ``` pricewatch/app/cli/ └── main.py CLI Typer avec 5 commandes ``` ### Tests (structure) ``` tests/ ├── core/ Tests core (Ă  implĂ©menter) ├── scraping/ Tests scraping (Ă  implĂ©menter) └── stores/ ├── amazon/ Tests Amazon (Ă  implĂ©menter) └── cdiscount/ Tests Cdiscount (Ă  implĂ©menter) ``` ## 📩 Dossiers gĂ©nĂ©rĂ©s | Dossier | Description | |---------|-------------| | **venv/** | Environnement virtuel Python | | **scraped/** | HTML et screenshots de debug | | **pricewatch.egg-info/** | MĂ©tadonnĂ©es du package installĂ© | ## 📄 Fichiers gĂ©nĂ©rĂ©s | Fichier | Description | |---------|-------------| | **scraped_store.json** | RĂ©sultats du scraping (gĂ©nĂ©rĂ© par `pricewatch run`) | --- ## đŸ—ș Guide de navigation ### Pour dĂ©marrer rapidement → **QUICKSTART.md** ### Pour comprendre l'architecture → **README.md** (section "Structure du projet") → **CLAUDE.md** (section "Architecture") ### Pour les tests → **TEST_FILES_README.md** → **test_amazon.json** et **test_cdiscount.json** ### Pour les prochaines Ă©tapes → **TODO.md** (Phases 2-5) ### Pour l'historique → **CHANGELOG.md** --- ## 📊 Statistiques ``` Code Python : 2328 lignes Modules Python : 18 fichiers Documentation : 8 fichiers Markdown Fichiers de test : 3 fichiers Fichiers config : 4 fichiers Stores supportĂ©s : 2 (Amazon, Cdiscount) Commandes CLI : 5 commandes ``` --- ## 🔍 Rechercher par fonctionnalitĂ© ### Scraping - HTTP → `pricewatch/app/scraping/http_fetch.py` - Playwright → `pricewatch/app/scraping/pw_fetch.py` - Fallback automatique → `pw_fetch.py` (fonction `fetch_with_fallback`) ### Parsing - Amazon → `pricewatch/app/stores/amazon/store.py` - Cdiscount → `pricewatch/app/stores/cdiscount/store.py` - SĂ©lecteurs → `*/selectors.yml` ### Validation donnĂ©es - ModĂšle → `pricewatch/app/core/schema.py` - Enums → `schema.py` (StockStatus, FetchMethod, DebugStatus) ### Configuration - YAML → `scrap_url.yaml` (exemple) - Lecture → `pricewatch/app/core/io.py` (fonction `read_yaml_config`) ### Logging - Configuration → `pricewatch/app/core/logging.py` - Utilisation → `get_logger("module.name")` dans chaque module ### CLI - Point d'entrĂ©e → `pricewatch/app/cli/main.py` - Script entry point → `pyproject.toml` (section `[project.scripts]`) ### Tests - Structure → `tests/` (dossiers créés) - Fixtures → `stores/*/fixtures/` (vides) - Validation sĂ©lecteurs → `test_selectors.py` --- ## 🚀 Commandes essentielles ```bash # Installation source venv/bin/activate pip install -e . playwright install chromium # VĂ©rification pricewatch doctor # Tests python test_selectors.py test_amazon.json # Scraping pricewatch run --yaml scrap_url.yaml --debug # Voir les rĂ©sultats cat scraped_store.json | python -m json.tool ``` --- **DerniĂšre mise Ă  jour** : 2026-01-13 **Phase actuelle** : Phase 1 - CLI (✅ ComplĂ©tĂ©e) **Prochaine phase** : Phase 2 - Base de donnĂ©es