HTTP services and frontend for meshed operations
A modular, source-keyed architecture for DAG construction, data storage, and stream visualization built on the i2mint ecosystem (meshed, dol, i2, creek, ju, qh).
app_meshed provides a web-based platform to:
- Compose and execute
meshedDAGs through a visual interface - Access data through flat, key-value interfaces (source-keyed architecture)
- Visualize multi-dimensional time-series streams
- Generate forms automatically from function signatures
Source-Keyed Data: All data is accessed via flat, key-value interfaces (Mappings) provided by dol.
Interface-First: Python functions are the source of truth. Their signatures (i2) drive frontend forms (ju + RJSF) and API endpoints.
- Storage Layer:
dol- Abstracts local files, S3, or DBs into dict-like interfaces - Logic Layer:
meshed- DAGs and Slabs for workflow composition - Stream Layer:
creek- Time-series data with[bt:tt]slicing - Adaptation Layer:
i2- Function signature introspection,ju- JSON Schema generation - Service Layer: FastAPI - HTTP endpoints for all operations
- Frontend: React + React Flow (visual graphs) + RJSF (forms) (to be implemented)
# Clone the repository
git clone https://github.com/i2mint/app_meshed.git
cd app_meshed
# Install dependencies
pip install -e .
# Or install with development dependencies
pip install -e ".[dev]"# Start the server (default: http://0.0.0.0:8000)
python -m app_meshed.cli
# Custom port and data directory
python -m app_meshed.cli --port 8080 --data-path /path/to/data
# Enable auto-reload for development
python -m app_meshed.cli --reload --debugOnce the server is running, visit:
- Interactive API Docs: http://localhost:8000/docs
- Alternative Docs: http://localhost:8000/redoc
curl http://localhost:8000/functionscurl http://localhost:8000/schema/function/addcurl -X POST http://localhost:8000/dag/execute \
-H "Content-Type: application/json" \
-d '{
"dag_config": {
"name": "simple_add",
"nodes": [
{"id": "add_node", "function": "add"}
],
"edges": []
},
"inputs": {
"add_node": {"a": 5, "b": 3}
}
}'# List available streams
curl http://localhost:8000/streams
# Slice a stream by time range [bt:tt]
curl "http://localhost:8000/streams/audio_sample/slice?bt=0.0&tt=1.0"
# Get synchronized multi-channel data
curl -X POST http://localhost:8000/streams/multi-channel/slice \
-H "Content-Type: application/json" \
-d '{
"channel_ids": ["sensor_accel_x", "sensor_accel_y"],
"bt": 0.0,
"tt": 5.0
}'app_meshed/
├── app_meshed/
│ ├── api/
│ │ ├── main.py # FastAPI application
│ │ └── startup.py # Initialization tasks
│ ├── stores/
│ │ └── root_store.py # Unified dol-based storage
│ ├── services/
│ │ ├── function_registry.py # Function introspection (i2)
│ │ ├── schema_service.py # JSON Schema generation (ju)
│ │ ├── dag_service.py # DAG serialization/execution (meshed)
│ │ └── stream_service.py # Stream slicing (creek)
│ └── utils/
│ └── example_functions.py # Sample functions for DAG composition
├── data/ # Default data directory (gitignored)
│ ├── raw_data/ # Binary blobs (audio, sensor data)
│ ├── functions/ # Saved functions (pickled)
│ ├── meshes/ # DAG configurations (JSON)
│ └── configs/ # Application configs (JSON)
└── pyproject.toml
GET /store/list- List all available storesGET /store/{store_name}/keys- List keys in a storeGET /store/{store_name}/{key}- Get an item from a storePUT /store/{store_name}/{key}- Store an itemDELETE /store/{store_name}/{key}- Delete an item
GET /functions- List all registered functionsGET /functions/{name}/metadata- Get function metadata
GET /schema/function/{name}- Get JSON Schema for a function's parametersPOST /schema/object- Generate schema from an objectGET /schema/dag-config- Get DAG configuration schema
POST /dag/execute- Execute a DAG from JSON configPOST /dag/validate- Validate DAG config without executingGET /dag/examples- Get example DAG configurations
GET /streams- List all registered streamsGET /streams/{id}/metadata- Get stream metadataGET /streams/{id}/slice?bt=0&tt=10- Slice stream by time rangePOST /streams/multi-channel/slice- Get synchronized multi-channel dataPOST /streams/multi-channel/info- Get multi-channel metadata
- Unified dol-based storage interface
- Function registry with i2 signatures
- HTTP service with store CRUD operations
- Schema generation with ju
- DAG JSON serialization/deserialization
- Schema endpoints for function parameters
- DAG execution and validation
- Example DAG configurations
- Stream abstraction with creek
- [bt:tt] time-based slicing
- Multi-channel synchronization
- Sample stream generation
- React-based Store Browser UI
- React Flow canvas for visual DAG composition
- RJSF forms for node configuration
- Plotly/Chart.js for stream visualization
All data sources are accessed through a uniform Mapping interface:
from app_meshed.stores.root_store import create_default_root_store
root = create_default_root_store()
root.meshes["my_dag"] = {"nodes": [...], "edges": [...]}
config = root.configs["app_settings"]Functions registered in the system are introspected using i2, and their schemas are generated with ju:
def process(audio: np.ndarray, gain: float = 1.0) -> np.ndarray:
"""Apply gain to audio signal."""
return audio * gainThis automatically generates:
- API endpoint:
/schema/function/process - JSON Schema for RJSF forms
- Parameter metadata for the frontend
Stream data is accessed using time ranges:
stream = stream_registry.get("audio_sample")
chunk = stream[0.5:1.5] # Get data from 0.5s to 1.5sSee the main i2mint organization for contribution guidelines.
MIT