IT-Stock/.claude/skills/seed-demo-data/SKILL.md
maxsoch 8bb5c9406a Initial scaffold: gestion de stock IT pour le département IT
App FastAPI + SQLite + SQLModel + Jinja2 pour gérer le stock de matériel
IT (catégories/sous-catégories/matériels), avec recherche par scan de
code-barres et alertes email de stock bas.
2026-07-14 18:38:59 +02:00

20 lines
1.1 KiB
Markdown

---
name: seed-demo-data
description: Populates the local SQLite database with demo categories, subcategories, and materials (with barcodes and alert thresholds) so scanning and email-alert flows can be tested locally without manual data entry. Use when the user wants to test the app locally and the stock database is empty, or asks to seed/reset demo data.
---
Run `python scripts/seed.py` (with the project's venv activated) to populate
`data/stock.db` with sample data: 3 categories, 6 materials with barcodes
(some already below their alert threshold, to verify alerts trigger), and
one alert recipient (`it-dept@clinique.local`).
The script is idempotent — it does nothing if the database already has
materials in it, so it's safe to invoke repeatedly.
Barcodes to use for manual testing on `/scan`: `1111111111111` (PC Dell XPS
13, already below threshold), `2222222222221` (Câble RJ45 2m), `3333333333331`
(Souris USB, already below threshold).
To reset and reseed from scratch, delete `data/stock.db` first (or the whole
`data/` directory content), then rerun the script.