Scanning a stack of bills and keying them in are the same daily job, ending in the same ledger path, so OCR intake becomes a mode of the capture screen instead of a second menu entry: - components/Captura.tsx holds the mode switch; the manual check form moves verbatim to components/ManualCheckCapture.tsx and the OCR intake to components/StatementIntake.tsx. - /estado-cuenta/lote opens on manual, /recibos on automatic — both render Captura, so batch-review links and old bookmarks still land right. - Nav drops "Recibos (OCR)"; "Captura" covers both, with a NavLink.aliases field so /recibos still highlights it. Also fixes the "El almacenamiento de documentos no está configurado" failure staff hit on upload. Uploading with no object storage configured used to succeed, then die on the first put minutes later, leaving a FAILED batch whose only explanation was that string. createBatch now refuses up front, GET /statements/status reports storageAvailable alongside ocrAvailable, and the intake tab explains the situation instead of offering an upload that cannot work. S3_* documented in .env.example (deploy stacks already set it). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
36 lines
1.5 KiB
Bash
36 lines
1.5 KiB
Bash
# Copy to .env and fill in for local development.
|
|
DATABASE_URL=mysql://jorgecuadros:jorgecuadros@localhost:3306/jorgecuadros
|
|
SESSION_SECRET=change-me-to-a-random-string
|
|
WEB_ORIGIN=http://localhost:3000
|
|
NEXT_PUBLIC_API_ORIGIN=http://localhost:3001
|
|
|
|
# Object storage (MinIO / S3) for document blobs and scanned receipt pages.
|
|
# Without S3_ENDPOINT + credentials the API still boots, but every document
|
|
# upload/download and the whole recibo OCR intake are disabled. Credentials fall
|
|
# back to MINIO_ROOT_USER / MINIO_ROOT_PASSWORD when the S3_* pair is unset.
|
|
S3_ENDPOINT=http://localhost:9000
|
|
S3_BUCKET=jorgecuadros-documents
|
|
S3_ACCESS_KEY=
|
|
S3_SECRET_KEY=
|
|
|
|
# Login the "Operaciones" screen runs mysqldump/mysql as. Optional locally: when
|
|
# unset it falls back to the DATABASE_URL credentials, which a dev MySQL usually
|
|
# grants enough for. Required in any deployment, where the application user has
|
|
# only ALL ON jorgecuadros.* and mysqldump --single-transaction needs the global
|
|
# RELOAD privilege. Host/port/database always come from DATABASE_URL.
|
|
OPS_DB_ADMIN_USER=
|
|
OPS_DB_ADMIN_PASSWORD=
|
|
|
|
# Company info — printed in the header of every report (PDF + browser
|
|
# print). Leave blank to use the placeholders. COMPANY_LOGO_PATH is
|
|
# optional; when unset the API falls back to apps/api/assets/company_logo.png.
|
|
COMPANY_NAME=Jorge Cuadros & Asociados
|
|
COMPANY_ADDRESS_LINE1=
|
|
COMPANY_ADDRESS_LINE2=
|
|
COMPANY_CITY_STATE=
|
|
COMPANY_PHONE=
|
|
COMPANY_EMAIL=
|
|
COMPANY_TAX_ID=
|
|
COMPANY_WEBSITE=
|
|
COMPANY_LOGO_PATH=
|