The intelligence platform that changes how TMF APIs work.
Comprehensive guide to interactive OpenAPI schema visualization, contract validation, breaking diff detection, Spectra AI WebGPU engine, and Browser-Local PDF Knowledge Base RAG.
Introduction
The TMF API Intelligence Toolkit is an enterprise-grade, browser-local suite designed for telecom solution architects, integration engineers, and API managers working with TM Forum (TMF) Open API standards.
Managing TM Forum specifications involves navigating intricate nested object hierarchies, polymorphic sub-types (FVO/MVO), complex characteristics arrays, and multi-version schema rules across 23 core domain specifications. The Toolkit solves this by converting dense JSON payloads and OpenAPI schemas into interactive, inspectable topological graphs and providing instant client-side validation.
Every visualization render, schema validation, diff comparison, and AI inference runs entirely inside your local browser tab. Payloads, OpenAPI schemas, and uploaded PDF documentation never touch an external server or backend network.
Platform Architecture
The application follows a decoupled, browser-native pipeline architecture:
Core Architectural Components
| Component | Technology | Function |
|---|---|---|
| Schema Walker | ES6 / AST Walker | Recursively resolves OpenAPI $ref pointers, allOf definitions, and polymorphic @type schemas up to 6 levels deep. |
| Validator Engine | AJV v8 + Web Worker | Validates JSON payloads asynchronously in a background Web Worker thread against OpenAPI schema rules. |
| Graph Engine | Dagre + @xyflow/react | Computes directed acyclic graph (DAG) layouts for order items, dependencies, party roles, and geographic sites. |
| Vector RAG Store | IndexedDB (tmf_vector_rag_v1) | Stores normalized feature vectors for 23 TMF OpenAPI schemas and user-uploaded PDF documentation. |
| AI Inference Engine | @mlc-ai/web-llm (Qwen 3.5) | Executes LLM inference locally on client GPU via WebGPU without sending prompt data over HTTP. |
Privacy & Security Model
Zero Server Processing
Payloads dropped into the visualizer or validator are parsed using in-memory Javascript objects. No telemetry, payload logs, or payload snippets are transmitted to remote servers.
Local IndexedDB Isolation
Uploaded PDF user guides and custom documentation are parsed locally via pdfjs-dist, chunked in-memory, and saved securely inside your browser's origin-isolated IndexedDB storage.
Core Concepts & Terminology
| Term | Definition |
|---|---|
| Payload | The raw JSON instance document representing a TMF resource (e.g. ProductOrder, ServiceOrder, CustomerBill). |
| Topology Graph | Visual node-and-edge layout mapping parent-child order items, relationships, party roles, and resource links. |
| Laser Focus Mode | An interactive view state that dims non-selected graph branches to highlight active item relationships during live reviews. |
| FVO / MVO | Full Value Object vs Minimal Value Object schema variants used in TMF POST (Create) vs PATCH (Update) operations. |
| Vector RAG | Retrieval-Augmented Generation that queries vector embeddings in IndexedDB to cite exact documentation pages during AI Q&A. |
Interactive Visualizer Engine
The Visualizer engine renders complex multi-level JSON payloads into visual topology graphs. It handles 23 distinct TMF domain specifications, automatically grouping items, resolving relationships, and highlighting status lifecycles.
Key Features
- Interactive Node Graph: Pan, zoom, and collapse/expand sub-trees for large order payloads containing hundreds of items.
- Polymorphic Type Badges: Color-coded badges for
@type,@baseType,@schemaLocation, and action states (add,modify,delete,noChange). - Characteristic Extraction: Automatically parses
name/valuename-value pair arrays into clean property cards.
Payload Inspection & Deep-Drill
Clicking any node in the topology graph opens the Deep Inspection Drawer:
{
"id": "PO-10492",
"category": "B2B Fiber Service",
"productOrderItem": [
{
"id": "1",
"action": "add",
"state": "acknowledged",
"product": {
"name": "Gigabit Enterprise Fiber",
"productCharacteristic": [
{ "name": "DownloadSpeed", "value": "1000Mbps" },
{ "name": "VLAN_ID", "value": "4092" }
]
}
}
]
}
Laser Focus Mode
Designed for architecture walkthroughs and executive reviews: clicking Laser Mode isolates the selected node and its direct ancestor/descendant relationships while dimming background clutter.
Full-Height PNG Export
Clicking Export PNG renders the entire canvas at high resolution, capturing full document height and node connections for inclusion in architecture design documents (ADDs) or client reports.
Schema Validator Engine
The Schema Validator evaluates JSON payloads against official published TM Forum OpenAPI specification contracts.
Supports both v4.0.0 and v5.0.0 TM Forum specifications, including FVO (Full Value Object), MVO (Minimal Value Object), Create, and Update payload schemas.
OpenAPI v4 vs v5 Specification Handling
| Feature | TMF v4.0.0 | TMF v5.0.0 |
|---|---|---|
| Polymorphism | Uses @type + @schemaLocation | Uses @type + Discriminator Mapping |
| Lifecycle States | String enums (acknowledged, inProgress) | Strict State Machine enums (initial, completed) |
| Resource Identifiers | id and href optional in stubs | Strict id URI patterns enforced on main entities |
Schema Diff Analyzer
The Diff Analyzer compares two OpenAPI schema versions (e.g. TMF622 v4.0.0 vs v5.0.0) or two custom JSON payloads to identify structural changes, property type mutations, and breaking contract modifications.
Breaking Change Detection Rules
- Removed Properties: Highlights mandatory fields removed in newer specification versions.
- Type Mutations: Detects fields changed from
stringtoobjectorarray. - Enum Constraint Tightening: Surfaces restricted enum value sets.
Spectra AI Engine
Spectra AI is an advanced multi-engine AI co-pilot designed specifically for TM Forum Open API architecture, payload inspection, and schema validation.
Browser-Local WebGPU Engine
Runs Qwen 3.5 (0.8B, 2B, 4B, 9B) sharded models natively in WebGPU VRAM. Downloads parameter shards once and stores them in browser CacheStorage (webllm/model) for zero-latency, 100% private inference.
Grounded Domain Context Injection
Spectra automatically receives active TMF schema contracts, JSON payloads, AJV validation error stack traces, and retrieved Vector RAG chunks into every prompt cycle.
Ollama & LM Studio Local Engine Integration
In addition to browser-local WebGPU, Spectra AI supports direct client-side integration with host-level LLM servers including Ollama and LM Studio. This allows architects to run massive local models (7B to 70B+, DeepSeek-R1, Qwen2.5-Coder, Llama 3.3) directly on their workstation with zero API keys and zero cloud cost.
Whether `tmf-visualizer` is hosted on Cloudflare Pages, Hostinger, or run locally on `localhost`, the JavaScript application executes entirely inside your web browser on your personal computer. When you select Ollama or LM Studio, your browser sends HTTP requests directly to `http://localhost:11434` or `http://localhost:1234` on your own machine.
1. Ollama Setup & CORS Configuration
By default, browsers enforce Cross-Origin Resource Sharing (CORS) security when a hosted web page accesses `localhost`. Launch Ollama with the OLLAMA_ORIGINS environment variable to grant browser access:
# Windows Command Prompt (cmd)
set OLLAMA_ORIGINS=* && ollama serve
# Windows PowerShell
$env:OLLAMA_ORIGINS="*" ; ollama serve
# macOS / Linux Terminal
OLLAMA_ORIGINS="*" ollama serve
Spectra AI queries http://localhost:11434/api/tags to automatically detect all pulled models on your machine (e.g. qwen2.5:7b, deepseek-r1:8b, llama3.2) and populates them in the model picker dropdown.
2. LM Studio Setup & CORS Configuration
- Launch LM Studio and load your desired model (e.g., Qwen 2.5 Coder 14B or DeepSeek R1 Distill).
- Open the Local Server / Developer tab (↔) in LM Studio.
- Set Port to
1234and check the box for Enable CORS. - Click Start Server.
Spectra AI automatically connects to http://localhost:1234/v1/models to detect the active model loaded in LM Studio.
| Engine Type | Endpoint URL | Key Required | Auto-Model Detection |
|---|---|---|---|
| Spectra Local WebGPU | Browser GPU (In-Memory) | ❌ No | Built-in Hardware RAM/VRAM Auto-detect |
| Ollama Local Host | http://localhost:11434/v1/chat/completions | ❌ No | GET http://localhost:11434/api/tags |
| LM Studio Local Host | http://localhost:1234/v1/chat/completions | ❌ No | GET http://localhost:1234/v1/models |
| OpenRouter Cloud | https://openrouter.ai/api/v1/chat/completions | ✅ Yes (IndexedDB Saved) | Access 100+ Cloud Models (Claude 3.5, DeepSeek R1, Llama 3.3) |
| Cloud APIs (BYO Key) | OpenAI, DeepSeek, Groq endpoints | ✅ Yes (IndexedDB Saved) | Custom Model ID input pre-filled |
WebGPU Model Shard Auto-Retry & Network Resilience
When loading local WebGPU models (e.g. 2B or 4B Qwen 3.5), model parameter files (~1.2 GB to ~2.4 GB) are downloaded from HuggingFace CDN in sharded binary blocks (e.g. params_shard_20.bin).
If network instability occurs (such as HuggingFace CDN QUIC protocol timeouts ERR_QUIC_PROTOCOL_ERROR or temporary DNS drops ERR_NAME_NOT_RESOLVED), Spectra AI's initialization engine automatically catches the drop, pauses for 1.5s, and retries downloading up to 3 times automatically.
Because downloaded shards are cached incrementally using the browser's native Cache Storage API, an auto-retry resumes instantly from the exact percentage (e.g. 82%) where the network dropped, ensuring uninterrupted completion without losing progress.
Browser-Local Knowledge Base & Vector RAG
The Knowledge Base allows you to upload custom PDF user guides, architecture standards, and domain documentation directly into your browser to power Retrieval-Augmented Generation (RAG).
How Vector RAG Pipeline Works
- Document Ingestion: Upload PDF, MD, TXT, or JSON files into the Knowledge Base modal.
- Client-Side Text Extraction:
pdfjs-distextracts page-by-page text streams in-memory. - Semantic Text Chunker: Text is split into ~500-token chunks with 50-token sliding window context overlap.
- Vector Embeddings: Feature vectors are computed locally for each chunk.
- IndexedDB Storage: Chunks and metadata persist in origin-isolated IndexedDB (
tmf_vector_rag_v1). - Augmented Prompt Injection: On every user query, cosine similarity retrieves top matching chunks and injects them into Qwen 3.5 context with exact page citations.
23 Supported TM Forum Open API Specifications
| API # | Specification Name | Domain | Supported Tools |
|---|---|---|---|
| TMF622 | Product Ordering Management | Order Management | Visualizer, Validator, RAG |
| TMF641 | Service Ordering Management | Order Management | Visualizer, Validator, RAG |
| TMF652 | Resource Ordering Management | Order Management | Visualizer, Validator, RAG |
| TMF620 | Product Catalog Management | Order Management | Visualizer, Validator, RAG |
| TMF648 | Quote Management | Order Management | Visualizer, Validator, RAG |
| TMF629 | Customer Management | Customer & Party | Visualizer, Validator, RAG |
| TMF651 | Agreement Management | Customer & Party | Visualizer, Validator, RAG |
| TMF632 | Party Management | Customer & Party | Visualizer, Validator, RAG |
| TMF621 | Trouble Ticket Management | Customer & Party | Visualizer, Validator, RAG |
| TMF688 | Event Management (ODA) | Customer & Party | Visualizer, Validator, RAG |
| TMF667 | Document Management | Customer & Party | Visualizer, Validator, RAG |
| TMF646 | Appointment Management | Customer & Party | Visualizer, Validator, RAG |
| TMF637 | Product Inventory Management | Inventory & Qual. | Visualizer, Validator, RAG |
| TMF638 | Service Inventory Management | Inventory & Qual. | Visualizer, Validator, RAG |
| TMF645 | Service Qualification | Inventory & Qual. | Visualizer, Validator, RAG |
| TMF679 | Product Offering Qualification | Inventory & Qual. | Visualizer, Validator, RAG |
| TMF673 | Geographic Address Management | Geo & Financial | Visualizer, Validator, RAG |
| TMF674 | Geographic Site Management | Geo & Financial | Visualizer, Validator, RAG |
| TMF666 | Account Management | Geo & Financial | Visualizer, Validator, RAG |
| TMF676 | Payment Management | Geo & Financial | Visualizer, Validator, RAG |
| TMF678 | Customer Bill Management | Geo & Financial | Visualizer, Validator, RAG |
| TMF764 | Cost Management | Geo & Financial | Visualizer, Validator, RAG |
| TMF735 | CDR Transaction Management | Geo & Financial | Visualizer, Validator, RAG |
IndexedDB Storage Schemas (tmf_vector_rag_v1)
Database: tmf_vector_rag_v1 (Version 2)
├── schema_chunks [Key: id, Index: apiId, api_ver]
├── indexing_registry [Key: key]
├── custom_doc_chunks [Key: id, Index: docId, apiId]
└── custom_doc_registry [Key: docId]
Troubleshooting & Browser Requirements
| Issue | Cause | Resolution |
|---|---|---|
| WebGPU Unavailable | Browser or hardware lacks WebGPU support. | Use Chrome 113+, Edge 113+, or switch to Cloud AI provider in Spectra header. |
| PDF Extraction Error | Corrupted or password-protected PDF. | Ensure PDF is unencrypted or convert to Markdown (.md) / Text (.txt) before uploading. |
| IndexedDB Storage Full | Browser storage quota reached. | Open Knowledge Base modal and delete old document records. |