feat(ocr): Add modular store profiles with hot-reload support
## Store Profiles System
- Add ProfileRegistry for CUI-based profile lookup
- Add BaseStoreProfile with generic extraction patterns
- Implement hot-reload via POST /api/data-entry/ocr/profiles/reload
## 12 Store Profiles
- LIDL: Multi-rate TVA (A, B, C, D codes)
- OMV, SOCAR: B2B with client CUI, YYYY.MM.DD dates
- BRICK, DEDEMAN: Standard TVA, e-factura support
- KINETERRA, BEST PRINT: Non-VAT payers (returns [])
- STEPOUT MARKET: TVA 5% (books/reduced rate)
- UNLIMITED KEYS: NUMERAR payment detection
- GAMA INK, ELECTROBERING, PICTUS VELUM: Standard TVA
## Flexible TVA Patterns
- All patterns use (\d{1,2})% to accept any rate
- Supports historical (19%, 9%, 5%) and current (21%, 11%)
## Payment Methods Fix
- Fixed base.py to support multiple payments of same type
- Changed deduplication from method-only to (method, amount) tuple
- Returns separate entries for split payments
## Tools
- Add generate_store_profile.py for automatic profile generation
- Analyzes PDFs via OCR API and detects patterns
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
83
.claude/rules/claude-learn-domains.md
Normal file
83
.claude/rules/claude-learn-domains.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# Claude Learn Domains Configuration
|
||||
|
||||
**Last updated**: 2026-01-06
|
||||
|
||||
This file defines available knowledge domains and their file path patterns.
|
||||
|
||||
---
|
||||
|
||||
## Domains
|
||||
|
||||
### frontend
|
||||
**File**: `claude-learn-frontend.md`
|
||||
**Patterns**:
|
||||
- `src/**/*.vue`
|
||||
- `src/**/*.js`
|
||||
- `src/**/*.ts`
|
||||
- `src/**/*.css`
|
||||
- `vite.config.*`
|
||||
- `package.json`
|
||||
|
||||
---
|
||||
|
||||
### backend
|
||||
**File**: `claude-learn-backend.md`
|
||||
**Patterns**:
|
||||
- `backend/**/*.py`
|
||||
- `backend/modules/**/*`
|
||||
- `requirements.txt`
|
||||
|
||||
---
|
||||
|
||||
### database
|
||||
**File**: `claude-learn-database.md`
|
||||
**Patterns**:
|
||||
- `**/*.sql`
|
||||
- `**/models.py`
|
||||
- `**/schemas.py`
|
||||
- `backend/**/db/**/*`
|
||||
|
||||
---
|
||||
|
||||
### testing
|
||||
**File**: `claude-learn-testing.md`
|
||||
**Patterns**:
|
||||
- `tests/**/*`
|
||||
- `**/*.test.*`
|
||||
- `**/*.spec.*`
|
||||
- `pytest.ini`
|
||||
- `vitest.config.*`
|
||||
|
||||
---
|
||||
|
||||
### deployment
|
||||
**File**: `claude-learn-deployment.md`
|
||||
**Patterns**:
|
||||
- `deployment/**/*`
|
||||
- `public/web.config`
|
||||
- `Dockerfile*`
|
||||
- `docker-compose*.yml`
|
||||
- `*.sh`
|
||||
- `ansible/**/*`
|
||||
|
||||
---
|
||||
|
||||
### global
|
||||
**File**: `claude-learn-global.md`
|
||||
**Patterns**:
|
||||
- `*` (catch-all for cross-cutting concerns)
|
||||
|
||||
---
|
||||
|
||||
## Statistics
|
||||
|
||||
| Domain | Patterns | Gotchas | Last Updated |
|
||||
|--------|----------|---------|--------------|
|
||||
| frontend | 8 | 10 | 2026-01-06 |
|
||||
| deployment | 1 | 0 | 2026-01-06 |
|
||||
| global | 0 | 1 | 2026-01-06 |
|
||||
| backend | 2 | 0 | 2026-01-06 |
|
||||
| database | 0 | 0 | - |
|
||||
| testing | 0 | 0 | - |
|
||||
|
||||
**Total**: 11 patterns, 11 gotchas across 4 domains
|
||||
Reference in New Issue
Block a user