Monitoring/project_config.md
2025-07-03 15:09:43 +04:00

2.1 KiB
Raw Permalink Blame History

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 datatable library for tabular diff views

  • Data Sources:

    • XLSX of mechanical manifest (chutes & conveyors)
    • XLSX of DWGextracted 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 manifests
    • POST /compare run diff between specified sources
    • GET /conflicts retrieve paginated conflict records
  • Frontend Components:

    • Table view with search & filter by source
    • Conflict highlighting (added, removed, changed)
    • Modular, singlefile components to minimize bundle size
  • Metadata Loading: SCADA object name properties loaded at startup from versioncontrolled 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 < 200KB gzipped
  • Handle XLSX files up to 50MB 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