Add document storage (local filesystem) + fix dashboard outstanding KPI

- Local file storage via STORAGE_PATH env var (replaces DO Spaces)
- POST/GET/DELETE /api/cases/:caseId/documents + GET /api/documents/:docId/download
- useDocuments hook + upload/list/download/delete UI in CaseDetailPage
- GET /api/invoices/summary — live SUM of sent+overdue invoices
- Dashboard outstanding KPI wired to real DB value
- api.upload() for FormData, formatBytes() utility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Leon Serfaty
2026-04-26 03:07:37 -04:00
co-authored by Claude Sonnet 4.6
parent 0700d54225
commit ce2278f4be
13 changed files with 334 additions and 14 deletions
+1
View File
@@ -19,6 +19,7 @@ const envSchema = z.object({
WEB_DIST_PATH: z.string().optional(),
SUPERADMIN_EMAILS: z.string().optional().default(''),
SENTRY_DSN_API: z.string().optional().default(''),
STORAGE_PATH: z.string().min(1).default('./storage'),
RESEND_API_KEY: z.string().optional().default(''),
EMAIL_FROM: z.string().optional().default('eLegal Software <noreply@elegalsoftware.com>'),
STRIPE_SECRET_KEY: z.string().optional().default(''),