feat: migrate receiptwitness to standalone repo with inlined common
Extract receiptwitness/ from the monorepo into cartsnitch/receiptwitness. Inline the consumed modules from cartsnitch-common so there is no cross-repo dependency. - Add src/receiptwitness/shared/ with inlined models, schemas, constants, database - Update all imports from cartsnitch_common to receiptwitness.shared - Remove cartsnitch-common dependency from pyproject.toml - Copy and update Alembic config (alembic.ini, alembic/) - Update Dockerfile for standalone build context, add migration CMD - Add CI workflow with lint, test, build, grype scan, deploy-dev, deploy-uat - Add .grype.yaml Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# ReceiptWitness
|
||||
|
||||
Purchase data ingestion service for CartSnitch. Authenticates with grocery retailer web portals (Meijer, Kroger, Target) via Playwright, scrapes purchase history, and writes structured records to the shared PostgreSQL database.
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
pip install -e ".[dev]"
|
||||
|
||||
# Run tests
|
||||
pytest tests/ -v
|
||||
|
||||
# Local dev with Docker Compose
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
- **Scrapers:** Playwright-based browser automation for each retailer
|
||||
- **Parsers:** Converts raw receipt data to structured `Purchase` / `PurchaseItem` records
|
||||
- **Database:** SQLAlchemy 2.0 async; models inlined under `src/receiptwitness/shared/`
|
||||
- **Events:** Publishes `cartsnitch.receipts.ingested` to Redis after ingestion
|
||||
|
||||
## Branches
|
||||
|
||||
- `dev` — development, auto-deploys to dev cluster
|
||||
- `uat` — user acceptance testing
|
||||
- `main` — production, auto-deploys to prod cluster
|
||||
Reference in New Issue
Block a user