M Multi-Map

Multi-Map Master Reference

Welcome to the definitive documentation for Multi-Map v14.11. This wiki serves both daily users navigating the spatial interface and developers building federated companion applications.

Part I

User Guide

1. Getting Started

Multi-Map is a spatial mapping ecosystem. Instead of folders and files, you organize information into "Constellations" of interconnected nodes. Every map begins with a Universe Root. From there, you can spawn Hubs, Notes, Portals, and structured Web elements.

3. Two-Step Targeted Linking

While "Add" creates strict hierarchical structures (solid lines), you can draw conceptual relationships between any two nodes using the Two-Step Linking workflow (dotted lines).

  1. Select your source node and click the Link (๐Ÿ”—) button on its Radial Menu.
  2. The system enters Linking Mode. A pulsing gold banner appears at the top of the screen.
  3. You are free to pan the map, open other nodes, and explore. Your clicks are not hijacked.
  4. When you find your target node, select it. Its Radial Menu will appear.
  5. Click the pulsing Green Confirm Link button to finalize the connection. (Or click the Red Cancel button on the original node to abort).

4. Phase Engines (Views)

Multi-Map separates your raw data from how it is displayed. "Phases" are different lenses through which you can view the exact same Mapstate JSON.

  • ๐Ÿ—บ๏ธ
    Celestial Map

    The default spatial graph. Free-form dragging, physics engine enabled.

  • ๐Ÿ”ฎ
    Orbital Focus (Magic Circle)

    A strict hierarchical view. Displays only the selected "Sun" node, its immediate "Planets" (children), and its "Halo" (parent). Clicking planets navigates deep into the tree without visual clutter.

  • ๐ŸŒ
    ๐ŸŒ
    Web Architect & Spatial Browser

    A live HTML compiler. If your map uses web-* nodes, this engine dynamically compiles them into live, rendered HTML/Tailwind inside an iframe.

    Advanced Iframe Integration: If you input a valid URL (e.g. google.com or https://wikipedia.org) into the payload of a web-root node, the engine will automatically mount the live website into the background iframe. Any children attached to that node will physically render beneath the live website. If a site employs X-Frame blocking, an "Open in New Tab" escape hatch appears.

5. Profile & Data Manager

Accessible via the "Profile" icon in the top right corner, the right-side drawer serves as your unified command center for Account settings and the Data Manager. It allows you to log in, manage cloud templates, and export the local library.

๐ŸŒ Cloud Templates

Provides read-only master templates. You can import these directly into your active workspace. Click "Upload" to upload external JSON templates to your local library.

๐Ÿ“š Saved Constellations

Your personal repository. You can Save your active session, Load previous sessions, or click "Export" to download your entire constellation library as a single JSON array.

6. Submaps and Portals

Maps in Multi-Map have intrinsic Subtype Mapstates (e.g., "Generic", "Web Architecture"). This enforces strict Ontology rules globally across the map.

To link maps together, create a Portal node. Using the Portal Inspector, you can either select an existing map as the destination, or create a New Submap by selecting a Map Type. Creating a "Web Architecture" map will instantly enforce Web-only rules and generate a web-root node in the new space.

๐ŸŒ€ Enter Portal

Entering a portal replaces your current workspace with the destination submap. Depending on the submap's Type, Multi-Map will automatically switch your Phase Engine (e.g., jumping into a Web Map auto-activates the Web Architect phase). Click the ๐Ÿ”™ button in the top menu to traverse back up the portal history stack.

Part II

Developer Documentation

6. Core Architecture

The platform relies on a Decoupled State Machine pattern. The DOM never dictates truth.

The Kernel (multi-map-core.js)

Holds the MapState object. Performs all array mutations, handles UUID generation, runs the resolveOverlaps() physics loop, and manages the Breadth-First Search (BFS) algorithm for cascading downstream node deletions. Emits this.notify() on state change.

The Sandbox (multi-map-sandbox.js)

The View Controller. Subscribes to the Kernel. Utilizes pure mathematical DOM-Diffing (checking dataset.stateHash) to apply targeted innerHTML updates without destroying active mobile keyboards or CSS animation frames.

7. Node & Connection Ontology

Defined in Multi-Map-rules.js, this schema dictates what types of nodes can exist and how they are allowed to connect. Rule Exception: Any node is allowed to have a child of type 'note'.

Connection Types

  • Structural (Solid): Strict Parent/Child hierarchy. Acts as a spring in the physics engine. Triggers cascading deletions.
  • Association (Dashed): Loose conceptual relation. Ignored by physics springs and orbital views. Created via 2-Step linking.
  • Flow (Dotted): Directional sequence logic (reserved for Logic Gates / execution loops).

Web Architect Nodes

Node Type HTML Element Allowed Children (Strict) Behavior
web-root <body> / <iframe> nav, hero, section, footer Mounts embedded URLs or basic HTML roots.
web-nav <nav> link, button Sticks to top of compiled page.
web-section <section> text, image, button, link Standard flex container.
web-text <p> / <h3> None Renders text block w/ line breaks.
web-link <a> None Content payload acts as href target.

8. JSON Schema & Arrays

The JSON standard for importing/exporting mapstates. The v14.9 system can parse a single object OR an array `[{...}, {...}]` of mapstates during upload.

{
  "map_id": "u7b9v2z1x",
  "meta": {
    "title": "Project Master Plan",
    "created": "2026-02-24T12:00:00Z",
    "notes": "System schema reference",
    "shared": false
  },
  "nodes": [
    {
      "id": "abc123xyz",
      "type": "hub",
      "title": "Central Architecture",
      "content": "Description payload here...",
      "data": {
        "x": 145.2,
        "y": -22.4,
        "isCore": true,
        "collapsed": false
      },
      "submaps": [] 
    }
  ],
  "connections": [
    {
      "id": "edge_999",
      "from": "abc123xyz",
      "to": "def456lmn",
      "type": "structural"
    }
  ],
  "submaps": [] // Caches templates or local portal configurations
}

9. Force-Directed Physics

The layout is driven by a custom iterative algorithm found in Kernel.resolveOverlaps(). It applies two simultaneous forces to form organic trees dynamically.

1. Universal Repulsion

An O(Nยฒ) calculation where every node pushes away from every other node if distance < 240px. (kRepel = 0.08).

2. Hooke's Law Springs

Only applies to structural connections. Pulls connected nodes toward an ideal resting distance of 160px. (kSpring = 0.05).

Upon node creation, a fast 40-iteration burst runs to clear space. Clicking the "Arrange" UI button triggers a deep 150-iteration simulation to organically untangle complex webs.

10. Serverless Library Engine

In v14.7, we deprecated fetch() calls to external JSON files to bypass local file:// CORS restrictions. The engine now uses a globally mounted MultiMapLibrary object loaded via multi-map-library.js.

How AI Integration Works

To add new templates generated by an LLM, you have two options:

  1. Manual Source: Paste the generated JSON directly into the defaults: [...] array inside multi-map-library.js.
  2. Runtime Upload: Save the AI output as a .json file, open the Data Manager Phase in the app, and click the Upload Template button to write it permanently to your LocalStorage.