Department-based document management system with OCR, AI classification, and semantic search. Built on Django with on-premises NAS storage, queue-based processing, and role-based access control.
Find a file
Sanguine dbd6835ce1 SECADA V13: OCR-error fallback variants for '1'-starting item codes
Adds a small variant pipeline for codes that start with digit 1 (Eaton
internal catalog pattern). When exact match fails, tries in order:
  1. O/o → 0        (OCR letter/digit confusion, cheapest fix)
  2. . → -          (punctuation swap, preserves length)
  3. remove dashes  (last resort, strips structure)

Least-destructive variant wins. Codes with 3+ alpha runs (e.g. 1BAR-500)
are excluded to avoid mangling named codes.

_verify_item_codes now returns dict {atom: canonical_erp_name} so callers
know which canonical form to link into the payload and whether a variant
was substituted. _find_matching_pair returns (asked, matched) so the
preflight modal can surface the substitution to the user before push.

Preflight modal:
- New yellow section for auto-corrected matches (icon, arrow, note)
- Title now context-aware: "Review ERP Item Codes" / "ERP Auto-Corrected
  Some Codes" / "Some Rows Have No Item Code" / original wording
- Modal now opens even when everything matched IF any substitution
  happened, so user reviews before Proceed
2026-09-10 10:49:32 +08:00
core/services feat: SECADA V2 - clean codebase with improved search and updated gitignore 2025-11-13 10:21:37 +08:00
webocr SECADA V13: OCR-error fallback variants for '1'-starting item codes 2026-09-10 10:49:32 +08:00
.dockerignore SECADA V7: Pre-upload duplicate detection + queue daemon improvements 2026-03-03 18:07:32 +08:00
.gitignore SECADA V8: Unified filter modal, catalog migration, security fix 2026-03-31 16:10:44 +08:00
bulk_upload.py SECADA V8/V9: Three-tier queue daemon, smart search, account page, bulk upload CLI, unified filter, trash system, catalog migration, security hardening, vector manager, password audit, expanded file types 2026-05-25 09:55:31 +08:00
CLAUDE.md docs: update CLAUDE.md for V12/V13 2026-09-09 14:16:52 +08:00
docker-compose.yml SECADA V8/V9: Three-tier queue daemon, smart search, account page, bulk upload CLI, unified filter, trash system, catalog migration, security hardening, vector manager, password audit, expanded file types 2026-05-25 09:55:31 +08:00
Dockerfile SECADA V11: Google Docs–style comments, edit system with history and revoke, post-edit Qwen metadata refresh, CSV export, live doc-lifecycle events, and new SVG logo 2026-08-24 12:16:35 +08:00
entrypoint.sh Add NAS auto-mount in Docker, GPU support, fix duplicate modal JS 2026-02-25 14:50:27 +08:00
input.css SECADA V7: Trash settings + UI improvements 2026-03-19 14:40:14 +08:00
logs.txt feat: implement department-based RBAC for document access 2025-11-13 15:38:42 +08:00
README.md Add project README 2026-03-31 15:57:13 +08:00
requirements.txt SECADA V12: ERP export scaffolding, Qwen2.5-VL upgrade, OCR pipeline overhaul, schema-free CSV export, admin cross-edit, download button 2026-09-01 09:29:31 +08:00
restart_gunicorn.sh feat: SECADA V3 - department-based RBAC, admin accounts, and UI improvements 2025-12-03 13:04:45 +08:00
restart_gunicorn_basic.sh feat: V6 comprehensive metadata extraction and type confirmation system 2026-02-12 09:43:22 +08:00
start_gunicorn.sh feat: implement department-based RBAC for document access 2025-11-13 15:38:42 +08:00
start_gunicorn_basic.sh feat: V6 comprehensive metadata extraction and type confirmation system 2026-02-12 09:43:22 +08:00
start_secadapro.sh SECADA V7: Pre-upload duplicate detection + queue daemon improvements 2026-03-03 18:07:32 +08:00
SYSTEM_DEPENDENCIES.md feat: SECADA V2 - clean codebase with improved search and updated gitignore 2025-11-13 10:21:37 +08:00
tailwind.config.js SECADA V7: Trash settings + UI improvements 2026-03-19 14:40:14 +08:00
tailwind.input.css SECADA V10: reprocess queue, OCR improvements, remember me login, UI refinements 2026-06-03 10:05:57 +08:00
VERSION SECADA V10: search results redesign, unified filter back btn, numbered pagination, admin panel, notifications, help feedback, purge commands, OCR/queue improvements 2026-06-25 07:15:47 +08:00

SECADA

Document management system with OCR and AI-powered search.

Features

  • OCR Processing - Qwen2-VL extracts text from PDFs and images
  • AI Classification - Automatic document type detection with 40+ categories
  • Three-Stage Search - Exact match → Fuzzy search → OCR content search
  • Department RBAC - Users see only their department's documents
  • Soft-Delete Trash - Configurable retention (1-30 days) with recovery
  • Duplicate Detection - Pre-upload checks prevent duplicates
  • Queue-Based Processing - Priority queue with lazy model loading

Supported Formats

PDF, PNG, JPG, JPEG, TIFF, BMP, WEBP, CSV

Tech Stack

  • Django 4.x
  • Qwen2-VL (OCR)
  • MySQL
  • Docker
  • TailwindCSS

Quick Start

# Start services
docker compose up -d

# Run migrations
docker compose exec web python manage.py migrate

# Create admin user
docker compose exec web python manage.py createuser admin --email admin@example.com --admin

# Process documents
docker compose exec web python manage.py start --watch

Directory Structure

/mnt/nas/archive/     # Archived documents
/mnt/nas/queue/       # Processing queue
/app/upload/          # Upload directory

License

Proprietary