Add your description here
Project description
RealTimeX.AI Manifest - Document Analysis & Validation
๐ Directory Structure
manifest-ai/
โโโ src/
โ โโโ realtimex_manifest_ai/ # Main package source
โ โโโ main.py # MCP tools and server entry
โ โโโ batch.py # Batch ID generation
โ โโโ registry.py # Document registry
โ โโโ master_records.py # Master records extraction
โ โโโ template_filler.py # Template filling utility
โ โโโ utils.py # Utility functions
โ โโโ schemas/ # JSON schemas
โ โโโ batch_data/ # Runtime batch data (git-ignored)
โโโ examples/ # Sample data (not installed)
โ โโโ README.md # Examples documentation
โ โโโ setup_samples.py # Script to copy samples to cache
โ โโโ sample_batch_data/ # Pre-generated sample batches
โ โโโ {batch_id}/ # Sample batch
โ โโโ registry.json # Document registry
โ โโโ summary.json # Batch summary
โ โโโ data/ # Extracted structured data
โ โโโ enhanced_data/ # AI-enhanced data
โ โโโ images/ # Page images
โ โโโ ocr_data/ # OCR results
โ โโโ outputs/ # Generated outputs
โ โโโ documents/ # Original documents
โโโ templates/ # Web UI templates
โ โโโ index.html # Main dashboard
โ โโโ summary.html # Summary view
โ โโโ css/ # Stylesheets
โ โโโ js/ # JavaScript modules
โโโ plannings/ # Implementation plans
โโโ README.md
๐ Quick Start
Installation
pip install realtimex-manifest-ai
Setup Sample Data
To test the package with pre-generated sample data:
python examples/setup_samples.py
This copies sample batches to ~/.realtimex.ai/Resources/agent-resources/manifest-ai/batch_data/
See examples/README.md for more details.
๐ MCP Tools
Document Analysis
get_document_batch_id(file_path)- Generate batch ID for documentget_document_registry(batch_id, file_path)- Get document registry
Master Records
get_master_records(batch_id)- Map which document contains which fieldextract_master_records_data(batch_id)- Extract actual data valuesexport_payment_order(batch_id)- Generate filled payment order
Dashboard & Analysis
show_manifest_dashboard(batch_id)- Show dashboard UIanalyze_with_bank_flow(batch_id)- Analyze with banking context
๐ Batch Data Structure
Runtime batch data is stored in cache:
~/.realtimex.ai/Resources/agent-resources/manifest-ai/batch_data/
โโโ {batch_id}/ # Each batch has its own folder
โโโ registry.json # Document registry for this batch
โโโ summary.json # Batch summary
โโโ data/ # OCR JSON payloads
โ โโโ bank/ # Banking-specific data
โ โโโ master_records.json # Final extracted data
โโโ enhanced_data/ # AI-enhanced data (optional)
โโโ images/ # Rendered page images
โโโ ocr_data/ # OCR results per document
โโโ outputs/ # Generated outputs (payment orders, etc.)
โโโ documents/ # Original documents
โโโ master_records.json # Document-to-field mapping
๐ Web Dashboard
Start the Server
# From project root
python -m realtimex_manifest_ai.server
Or:
python src/realtimex_manifest_ai/server.py
Expected Output:
================================================================================
๐ Manifest AI Server Starting
================================================================================
๐ Batch Data Directory: ~/.realtimex.ai/Resources/agent-resources/manifest-ai/batch_data
๐จ Templates Directory: /path/to/src/realtimex_manifest_ai/templates
โ Found 1 batch(es) in cache:
- c45cd2fbfa40c4663862ec723ef17a5fd17635dd
๐ Server URL: http://localhost:8000
๐ Dashboard: http://localhost:8000/templates?batch_id=<BATCH_ID>
================================================================================
The server:
- Serves templates from package directory
- Reads/writes batch data from cache directory
- Provides API endpoints for user data (overrides, verifications, etc.)
- Auto-creates user_data folder for modifications
Access the Dashboard
http://localhost:8000/templates?batch_id={BATCH_ID}&theme=light
Example with Sample Data:
http://localhost:8000/templates?batch_id=c45cd2fbfa40c4663862ec723ef17a5fd17635dd&theme=light
Note: If you see a warning about no batch data, run:
python examples/setup_samples.py
๐ Documentation
For detailed documentation:
- Documentation Index
- Implementation Guides
- Architecture Docs
- Example Usage
- Test Suite
- Utility Scripts
๐ 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.2.tar.gz.
File metadata
- Download URL: realtimex_manifest_ai-0.1.2.tar.gz
- Upload date:
- Size: 125.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4773265ad26d4dbad54d4ca566239cd788c6cc1362045312e1996e761b8202a
|
|
| MD5 |
b79137d31ed0e89668a36fbd72dfc596
|
|
| BLAKE2b-256 |
019535f7ba1a510f18803bfc317d9f6f5ebb77928af50614e78817cd1a556388
|
File details
Details for the file realtimex_manifest_ai-0.1.2-py3-none-any.whl.
File metadata
- Download URL: realtimex_manifest_ai-0.1.2-py3-none-any.whl
- Upload date:
- Size: 149.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c50d5c712f66a30e9780c43ac5a2eebd43db9201d2b49046872ea2e3d6263f2
|
|
| MD5 |
851b59a79f57d6fdefc1d623919ae458
|
|
| BLAKE2b-256 |
5a79ebb96e0628d46bf3c14e9ef0d6533fe368a8d0cdd775e8197c2dd3a3dc8e
|