2.1 KiB
Project Configuration (LTM)
This file contains the stable, long-term context for the project. It should be updated infrequently, primarily when core goals, tech, or patterns change.
Core Goal
Create a system to compare and reconcile mechanical manifest data (chutes and conveyors) against extracted device data from DWG files, presenting discrepancies and conflicts in a lightweight, searchable frontend.
Tech Stack
-
Backend: Python Flask on Linux
-
Frontend: Lightweight SPA (e.g. React or Vanilla JS) with a data‐table library for tabular diff views
-
Data Sources:
- XLSX of mechanical manifest (chutes & conveyors)
- XLSX of DWG‑extracted device list
- Repository of SCADA object metadata (name properties)
-
Data Processing: pandas (XLSX ingestion & diff logic)
-
Testing: pytest
-
Linting/Formatting: flake8, black
Critical Patterns & Conventions
-
Manifest Ingestion: Unified loader for XLSX sources, converting to a common schema before comparison
-
Diff Algorithm: Align entries by identifier, flag missing, extra, and mismatched metadata
-
API Design: RESTful endpoints under
/api/v1/:GET /manifests– list loaded manifestsPOST /compare– run diff between specified sourcesGET /conflicts– retrieve paginated conflict records
-
Frontend Components:
- Table view with search & filter by source
- Conflict highlighting (added, removed, changed)
- Modular, single‐file components to minimize bundle size
-
Metadata Loading: SCADA object name properties loaded at startup from version‐controlled repo
-
Error Handling: Return structured JSON errors with HTTP status codes
-
Commit Messages: Conventional Commits format
Key Constraints
- Must run on a Linux server (no Windows dependencies)
- Frontend bundle size < 200 KB gzipped
- Handle XLSX files up to 50 MB without timeouts
- All configuration and manifests stored in plain files or Git (no external DB)
Tokenization Settings
- Estimation Method: Character-based
- Characters Per Token (Estimate): 4