fca4f75e9c8bd3bcfb453027bc5ab7a7f2ad7a85
Upload an invoice photo → Claude extracts {supplier_name, date, currency,
items, total} as JSON → auto-create a draft Purchase + PurchaseItems →
redirect to edit so the user reviews before confirming/receiving.
OcrInvoiceService:
- Validates supported MIME (jpg/png/webp/gif)
- Reads tenant Claude key (settings.ai.claude_key) — friendly error if missing
- Calls /v1/messages with image content block + structured-output system prompt
- Tolerant parser: strips ```json fences, falls back to first {…} block
- normalize(): computes per-item total when absent, fills overall total
- All return shapes: {ok:bool, data?, error?, raw?, tokens?}
Filament:
- "Import factură (OCR)" header action on Purchases list
- Image file upload → service → matches Supplier by case-insensitive name
(notes the unmapped name if no match) → creates draft Purchase + items →
redirects to the Edit page
Tests (6 new):
- clean JSON parses; markdown fences stripped; malformed → graceful error;
missing key → friendly message + no HTTP; unsupported MIME rejected;
item total computed when missing
Full suite: 123 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AutoCRM
SaaS CRM multi-tenant pentru autoservice și magazin piese auto.
Stack
- Laravel 12 + Filament 5
- Octane (FrankenPHP runtime)
- MariaDB 11.4
- Redis 7
- Stancl/Tenancy v3 (single-DB multi-tenant)
Domenii
service.mir.md— panou central super-admin<slug>.service.mir.md— instanță tenant
Documentație
Vezi /root/service/docs/00-index.md în repo-ul părinte (separat de cod) pentru:
- Arhitectură + decizii
- Setup multi-tenant (3 niveluri izolare)
- Toate cele 31 module preluate din prototip
- Operațiuni (deploy / backup / add-tenant / troubleshoot)
Dev local
cp .env.example .env
composer install
npm install
php artisan key:generate
php artisan migrate
npm run build
php artisan octane:start --server=frankenphp
Deploy
Push pe main → Coolify auto-deploy.
License
Proprietary. © 2026.
Description
Languages
PHP
78.5%
Blade
21.2%
Dockerfile
0.2%
Shell
0.1%