f5e83cc6ea
feat(engagement): SPEC-BLOC-1G — Migration supervisor + dashboard admin + cleanup legacy notifications
...
1G.1: 3 supervisor M2 producers (reminder/escalation/report) migrated to RouterService with feature flag ROUTER_USE_FOR_SUPERVISOR
1G.2: Soak report script (npm run router:soak-report) — 7-point analysis
1G.3: Admin dashboard NotificationDeliveriesTab (KPIs + filterable table + detail drawer)
1G.4: NotificationHelper dual-dispatch bridge (NOTIFICATION_HELPER_ROUTER flag, best-effort)
1G.5: Legacy /notifications sidebar + page removed, routes redirect to /agenda
1G.6: PushSubscription weekly cleanup cron (failureCount >= 5 OR stale > 90d)
1G.7: LEGACY-NOTIFICATIONS-DEBT.md documentation
1G.8: 10 Vitest tests (4 supervisor + 3 dual-dispatch + 2 feature flag + 1 cleanup)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-27 23:27:42 +04:00
dae0fa0544
feat(engagement): SPEC-BLOC-1F — PWA installable + Web Push + Auth HTTPOnly cookies
...
Auth: migrate JWT from localStorage to HTTPOnly+Secure+SameSite=Strict cookies.
Bearer header fallback preserved for Playwright E2E compatibility.
Refresh token in dedicated cookie (path=/api/v1/auth/refresh).
PWA: vite-plugin-pwa injectManifest, manifest with shortcuts+icons,
service worker (push/notificationclick/notificationclose handlers),
PwaInstallPrompt + NotificationOptInBanner contextual components.
Push: PwaPushAdapter activated with web-push library (VAPID),
auto-cleanup expired subs on 410/404, TTL/urgency per priority.
PushSubscriptionService + usePushSubscription hook + Settings UI.
5 Vitest tests PwaPushAdapter. 0 TS errors backend+frontend.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-27 22:27:32 +04:00
61ab1a0fba
feat(agent): M2C.2 — real email distribution for weekly reports
...
Replace mock distribute() with real SMTP sending via nodemailer.
- markdown→HTML via marked, text/plain fallback
- Shadow mode: redirect to gruart@cifem-rus.ru + [SHADOW] prefix
- Anti-doublon via AgentAction history per recipient
- SMTP retry: 4xx 3× exponential, 5xx skip, timeout retry 1×
- Audit log REPORT_SENT per recipient with SMTP messageId
- Headers: X-Mk-Report-Id, Reply-To, From: Август
- EmailService extended: text, replyTo, headers support
- 19 Vitest (7 M2C.1 + 12 M2C.2) all green
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-25 14:13:20 +04:00
bb016b5f4c
feat(agent-august): M1A - Supervisor cron + 3 detectors funnel commercial + 18 Vitest
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 17:31:35 +04:00
3c83004e0a
feat(announcements): UserAnnouncement model + dual-channel send + 8 onboarding templates (USER-ANNOUNCEMENT-S108)
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-19 10:20:29 +04:00
b3305ecf3f
feat(bug-reports): Telegram bug bot + ADMIN dashboard (TELEGRAM-BUG-FORM-S107)
...
BugReport model (Prisma) + BugSeverity/BugReportStatus enums.
Telegram bot: /bug conversational flow (description, module keyboard,
severity keyboard, optional screenshot), notification to Louis chat.
6 ADMIN-only REST endpoints (list, detail, status, reporter, screenshot, delete).
16 Vitest tests. node-telegram-bot-api long polling with graceful shutdown.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-19 01:02:22 +04:00
ec15ea7bad
ai-const-1a: prisma models (4) + db push + SDK update 0.96.0
...
AIAdvisorConversation, AIAdvisorMessage, AIAdvisorArticleSuggestion,
AIAdvisorQuota models + User relations + E2E truncation list.
@anthropic-ai/sdk 0.80.0 -> 0.96.0.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-16 20:49:05 +04:00
cb12846d81
ai-const-0a: setup MCP SDK + module skeleton + Prisma audit model
...
Install @modelcontextprotocol/sdk@1.29.0, create src/modules/mcp-erp-context/
with 5 tool files, helpers (prisma-schema-parser, ts-ast-parser, audit-logger),
service orchestration, MCP Fastify server, module-mapping config (25 modules),
types, and README. Add McpErpContextAudit Prisma model + User relation. 0 TS errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-16 20:49:05 +04:00
b27edcf2d5
feat(e2e): set up isolated Playwright infra + 10 smoke tests (PLAYWRIGHT-P0)
...
- DB erp_test isolée (ports 3002/5174, erp_local intouché)
- seed-test.ts déterministe: 3 users, 2 clients, 2 suppliers, 2 orders, 59 help articles
- globalSetup truncate+reseed, webServer dual backend+frontend
- 10 smoke tests: login, RBAC, orders, documents, help drawer, Ctrl+/
- Réorganisation tests/: e2e/ (Playwright) vs backend/ (vitest)
- cross-env + dotenv pour portabilité Windows/Linux
- vite.config.ts proxy dynamique via BACKEND_PORT env var
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 18:26:33 +03:00
0c222183b6
feat(estimates): add deterministic validation to smeta import (SMETA-VAL-1)
...
P0 structural validation (before AI) catches corrupted/missing sheets
without paying 15s of AI cost. P2.5 arithmetic validation (after parse)
adds 7 deterministic checks merged into PostVerificationReport.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 13:17:33 +03:00
4027cf0ee9
feat(client-invoices): INVOICE-DOC-SYNC sync ClientInvoice with Document
...
- create() wraps in $transaction, creates Document INVOICE/CLIENT alongside
- update() propagates invoiceNumber change to Document title/reference
- issue() sets Document.sentAt
- cancel() sets Document.closedAt
- delete() removes Document before deleting ClientInvoice
- Backfill script for existing invoices (idempotent)
- Downgrade @fastify/static to v7.0.4 (Fastify 4 compat)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 11:33:59 +03:00
14408eedd8
feat: ORDER-IMG-3 frontend product image display in 3 locations
...
- GeneralTab: ProductImageUploader with upload/delete/replace
- OrdersPage: 40x40 thumbnail column prepended before Код
- PlanningOverviewPage: 32x32 thumbnail in Заказ column
- Backend: @fastify/static serves /storage/ prefix, planning service returns productImagePath/Hash
- Vite: /storage/ proxy for dev mode
- Utils: getProductImageUrl with cache-busting hash
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 11:06:32 +03:00
9884caae57
feat(orders): ORDER-IMG-1 product image upload backend
...
Add 4 fields to Order model (productImagePath/Mime/Hash/Source).
New ProductImageStorage class with magic-byte MIME detection (file-type),
SHA-256 hash, 5MB limit, PNG/JPEG/WebP only.
Routes POST/DELETE /:id/product-image in orders.routes.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 10:43:08 +03:00
92520c1bfc
feat(42C): cashflow entrées clients - modèles + CRUD + UI basique
...
- 5 enums Prisma (PaymentTrigger, ForecastStatus, ClientInstallmentStatus, ClientInvoiceStatus, DeliveryLotStatus)
- 7 modèles (PaymentTemplate, PaymentTemplateTerm, ClientInvoice, DeliveryLot, ClientInstallment, ClientPaymentReceived, ForecastInstallment)
- 4 relations ajoutées sur Order
- Seed 5 templates standards МеталлКарт
- Backend CRUD complet: 5 services + 5 routes (27 endpoints)
- Frontend: onglet Оплата клиента (fiche Order) + page liste Оплата клиентов
- Statut installment auto-recalculé (PENDING → PARTIALLY_PAID → PAID)
- DeliveryLot /sign stub TODO S42E
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 12:41:07 +03:00
520d5c8853
27B: purchase orders API routes — manual create, delete, PDF, generate-from-tender
...
- POST / manual PO creation with PurchaseOrderLines + auto totalAmount
- DELETE /:id for DRAFT POs only
- POST /generate-from-tender/:tenderId from TenderLineAwards grouped by supplier
- GET /:id/pdf generates PDF via pdfkit (po-pdf.service.ts)
- send-email now attaches PDF + QR code
- SMTP_FROM added to .env
- 18 API e2e + 6 Playwright UI tests pass
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 19:52:51 +00:00
23442cd5d8
spec-26E: test infrastructure - API workflow E2E + Playwright UI + MCP config
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:47:03 +00:00
d0bce9e9d0
feat: add spec_19d module (auto-pipeline)
2026-03-20 13:46:37 +00:00
fe64b56732
feat: add achats_e module (auto-pipeline)
2026-03-18 13:47:49 +00:00
47e202fa1d
feat: ACHATS-B — autonomous email service SMTP/IMAP (nodemailer + imapflow)
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 11:35:29 +00:00
44c3a978a0
feat: add spec_13a1_migration module (auto-pipeline)
2026-03-17 14:44:07 +00:00
741b1cccd1
feat: add cashflow treasury module (SPEC 4A CDC §7.2 ДДС)
...
CashflowEntry CRUD + balance/summary/forecast/gaps, RecurringPayment
CRUD+generate, BankStatement CRUD+latest, ManualEntry1C stubs
(DZ/KZ/ADVANCE), Excel export, enriched financial dashboard.
27 routes API, 155 tests passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:46:49 +00:00
3c1282f433
feat: add module-2c-photos (фотофиксация commandes)
...
StorageProvider abstraction (local + S3-ready), multipart upload single+batch,
soft delete, checkPhotoRequirements for state machine integration, RBAC.
6 API routes, 57 tests passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:26:34 +00:00
af8398946b
feat: payment-requests workflow with XState, 3 categories A/B/C, budget validation, RBAC
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:30:47 +00:00
3e75772fb3
Initial commit: ERP skeleton + CLAUDE.md
2026-03-09 09:10:16 +00:00