Add your description here
Project description
Document Validator - Templates Structure
๐ Directory Structure
realtimex-ai-manifest-template/
โโโ templates/
โ โโโ index.html # HTML template
โ โโโ css/
โ โ โโโ main.css # Global styles
โ โ โโโ modal.css # Modal and grid view styles
โ โ โโโ tree.css # Tree view styles
โ โ โโโ components.css # UI components
โ โโโ js/ # Application logic split by feature
โ โโโ state.js
โ โโโ icons.js
โ โโโ utils.js
โ โโโ overrides.js
โ โโโ changelog.js
โ โโโ analysis.js
โ โโโ tree.js
โ โโโ canvas.js
โ โโโ render.js
โ โโโ viewer.js
โ โโโ verification.js
โ โโโ ai-enhancements.js
โ โโโ events.js
โโโ batch_data/ # Batch data folders
โ โโโ {batch_id}/ # Each batch has its own folder
โ โโโ registry.json # Document registry for this batch
โ โโโ summary.json # Batch summary
โ โโโ data/ # OCR JSON payloads
โ โโโ enhanced_data/ # AI-enhanced data (optional)
โ โโโ images/ # Rendered page images
โ โโโ documents/ # Original documents
โโโ user_data/ # User edits (auto-generated, git-ignored)
โ โโโ overrides.json # Field value overrides
โ โโโ changelog.json # Change history
โ โโโ verifications.json # Verification states
โ โโโ dismissed_ai.json # Dismissed AI suggestions
โโโ server.py # Python server with API endpoints
โโโ README.md
๐ How to Run
1. Start the server
The application requires a Python server to save/load overrides:
cd /path/to/realtimex-ai-manifest-template
python3 server.py
The server will:
- Serve the application at
http://localhost:8000 - Provide API endpoints for saving/loading overrides
- Automatically save changes to
user_data/folder - Create the
user_data/folder if it doesn't exist
2. Open the dashboard
Navigate to:
http://localhost:8000/templates?batch_id={BATCH_ID}
Example:
http://localhost:8000/templates?batch_id=BATCH-VN-CN-2021-9982
Note: If you omit the batch_id parameter, the app will fallback to legacy paths (../data/, ../images/, etc.)
๐ Files
1. index.html
- Basic HTML shell
- Links to CSS and JavaScript modules
- Minimal body placeholder
2. CSS modules (templates/css/...)
main.css: Global styles and CSS variablesmodal.css: Modal, grid view, and AI enhancement stylestree.css: Tree view stylescomponents.css: UI components (tabs, badges, buttons)
3. JavaScript modules (templates/js/...)
state.js: Shared data structures and UI stateanalysis.js: Data loading, validation logic, and batch URL parameter handlingtree.js: Builds and renders the validation tree + related handlersrender.js: List/document/table/grid rendering helperscanvas.js: Drawing utilities for the viewer and cropped previewsviewer.js: Modal/viewer controls, zooming, and master evidence logicoverrides.js: Data override management system for editing field valueschangelog.js: Changelog viewer UI for tracking all data modificationsverification.js: Field verification systemai-enhancements.js: AI enhancement loading and applicationevents.js: Global event wiring, search/tabs, resize handling, and document togglesicons.js&utils.js: Shared SVG icons + formatting helpers
โจ Features
Batch Data Loading
Load different batches using URL parameter:
?batch_id=BATCH-VN-CN-2021-9982
The app automatically loads from batch_data/{batch_id}/ folder.
Data Override System
The application includes a powerful override system that allows you to edit field values without modifying the original JSON files:
- Edit Values: Click the edit button (โ๏ธ) on any field value in the grid view to modify it
- Visual Indicators: Edited fields are highlighted with an "EDITED" badge
- Revert Changes: Use the revert button (โบ) to restore original values
- File-based Storage: All overrides are automatically saved to
user_data/overrides.json - Change Log: View all modifications in the change log panel (clock icon in bottom-right)
- Auto-Save: Every change is immediately saved to disk
AI Enhancement System
If a document has AI-enhanced data in enhanced_data/ folder:
- Banner Notification: A banner appears at the top of the document fields panel
- Apply All: Click โ to apply all AI suggestions at once
- Dismiss: Click โ to hide the banner
- Individual Suggestions: Apply or dismiss suggestions field by field
Verification System
- Mark Fields as Verified: Toggle verification status on any validation
- Verification Statistics: Track verified vs. total fields
- Persistent State: Verifications are saved to
user_data/verifications.json
Change Log Features
- Track All Changes: Every edit, revert, and clear action is recorded with timestamp
- Export/Import Backup: Create backups of your overrides or import from a backup file
- Clear All: Remove all overrides at once (with confirmation)
- Real-time Updates: Change count badge updates automatically
Responsive Design
- Desktop (โฅ1024px): Split-view with validation list and viewer side-by-side
- Mobile (<1024px): Full-screen modal viewer
- Auto-resize: UI automatically updates when resizing browser window
Dark/Light Theme
The application supports dark and light themes controlled via URL parameter:
Main Dashboard (index.html):
http://localhost:8000/templates?batch_id=BATCH-VN-CN-2021-9982&theme=dark
http://localhost:8000/templates?batch_id=BATCH-VN-CN-2021-9982&theme=light
Summary Page (summary.html):
http://localhost:8000/templates/summary.html?batch_id=BATCH-VN-CN-2021-9982&theme=dark
- Default theme is light if no parameter is specified
- Theme parameter:
?theme=darkor?theme=light - Summary page is designed for iframe embedding with minimal UI
๐ง Maintenance
Update CSS
Edit the modules under templates/css/
Update JavaScript
Edit the modules under templates/js/
Update HTML shell
Edit templates/index.html
โ ๏ธ Notes
- Use
python3 server.pyinstead of the basic HTTP server โ the override system requires API endpoints for saving/loading data. - JavaScript modules use
batch_idURL parameter to determine data paths. - On XL screens the dashboard/tree view stays on the left (scrollable) and previews render on the right.
- Data overrides are stored in files (in the
user_data/folder) โ they persist across sessions and browsers. - The
user_data/folder is automatically git-ignored to prevent committing user-specific data.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file realtimex_manifest_ai-0.1.1.tar.gz.
File metadata
- Download URL: realtimex_manifest_ai-0.1.1.tar.gz
- Upload date:
- Size: 30.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da5b2956def626730b1225bba17819e8346ec4086c832b32c3e9587e1fd6e417
|
|
| MD5 |
324e57c320637b4d935a132b3d83c3a2
|
|
| BLAKE2b-256 |
acfcce70f836cc71c41dba8f249067a8316d935b1f51943a8a3d3b4d30082a6f
|
File details
Details for the file realtimex_manifest_ai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: realtimex_manifest_ai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 30.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
585e412a7106fa802d6983addf214324f63fa12b0bc400fee01a162f01b14e9f
|
|
| MD5 |
f89d37397b9d493bc6fd0cd2bd083e52
|
|
| BLAKE2b-256 |
0a90dc82cac114f8afd7bbf607d7964712402debd5d5590f343c3a2040bba047
|