Collab Digital Twins (CDT) Documentation

website·Indexed 30 days ago

https://docs.collabdt.org

Developer and user documentation for Collab Digital Twins (CDT), a platform for creating digital representations of physical environments. Includes guides on plugin development, BIM viewer tools, sensor and IoT integration, hexagonal architecture, and self-hosting deployment using Docker or Podman.

Tokens
69.1K
Snippets
261
Records
531
Agent score
50%

What's inside Collab Digital Twins

  1. Overview of CDT Map Viewer controls

    The CDT map viewer is a WebGL-based renderer built on MapLibre GL JS. It serves as the spatial anchor for all data types in the platform. To use it, you require a CDT account and a browser with WebGL enabled.

    Key interface controls include:

    • Search bar (Top-left): Geocodes addresses and place names, and searches organization assets.
    • Layer panel (Left sidebar): Toggles national, provincial/territorial, and municipal data layers.
    • Bottom toolbar (Bottom of viewport): Provides access to Datasets, Compare Buildings, Share, and Measure tools.
    • Settings (Left sidebar): Manages language, support, and account settings.
  2. Overview of MapClickManager click dispatch

    MapClickManager is a priority-based click dispatch system for MapLibre. It solves the problem of overlapping layers by ensuring that when a user clicks the map, only the handler with the highest priority whose layer contains a rendered feature at the click point is executed. This makes click behavior deterministic rather than relying on registration order.
  3. Overview of BIM viewer toolbar tools

    The BIM viewer toolbar is composed of Tool objects defined in useBimToolbarTools(). These tools are rendered as React components within a ToolbarSubmenu and are managed via ToolsContext.
  4. Overview of CDT Backend Architecture

    The CDT backend is implemented as a Core API using Next.js API routes, eliminating the need for a separate server process. Business logic and CRUD endpoints are organized by domain under src/app/api/. Authentication is handled via NextAuth v5, and authorization is managed through Role-Based Access Control (RBAC) using CASL.
  5. Overview of Collab Digital Twins (CDT)

    Collab Digital Twins (CDT) is an open-source, browser-based platform designed to bridge BIM (Building Information Modeling) and GIS (Geographic Information Systems) using open standards. It allows users to work with buildings, sites, point clouds, datasets, and live sensor data on a single interactive map, enabling seamless navigation from a national map view down to a single IFC element.

    Key capabilities include:

    • Integrated Viewers: Combines a MapLibre web map and an IFC BIM viewer (That Open Engine) sharing a single coordinate system.
    • Open Data Integration: A federated catalogue of national, provincial, and municipal portals fetched live.
    • Live Data Loops: IoT and sensor feeds linked to BIM elements or map locations.
    • Collaboration: Multi-tenant support with role-based permissions, threaded comments, and BCF issue tracking.

    CDT is a federation and visualization layer; it is not a BIM authoring tool (like Revit or Archicad) or a desktop GIS (like QGIS or ArcGIS Pro), but consumes their outputs such as IFC, GeoJSON, and LAS.

  6. Understand the single-route architecture for data pages

    The application does not use separate routes for buildings, sites, or files. Instead, the entire authenticated application is a single route (src/app/[instance]/page.tsx) that renders a <Viewer> component. The specific view displayed is determined by the viewer search parameter in the URL. Moving between these views changes the search parameter rather than the route.
    /ottawa?viewer=buildings   → buildings table → row click → BuildingDetails
    /ottawa?viewer=sites       → sites table     → row click → SiteDetails
    /ottawa?viewer=files       → files table     → row click → FileDetails
    /ottawa?viewer=map | bim | infrastructure | users | extensions | settings
    /ottawa?viewer=plugin:<pluginId>:<pageId>
  7. Use CDT Assisted Self-Hosting for custom infrastructure

    The 'Self Hosted — We Install' option allows the CDT team to deploy the software on your own infrastructure. This provides full control over data and infrastructure with no recurring license fees and no vendor lock-in. This is best for organizations with existing IT capacity that require strict data sovereignty or custom configurations.
  8. Navigate Collab Digital Twins (CDT) user guides

    Depending on the operational goal, use the following guides:

    • Map Viewer: Browse buildings, datasets, and the city on a map.
    • BIM Viewer: Open and inspect IFC building models.
    • Point Clouds: Visualize LiDAR or photogrammetry scans.
    • Buildings & Sites: Add and organize buildings and sites.
    • File Management: Upload and manage files.
    • Sensors & IoT Data: Connect IoT and sensor data.
    • Datasets & Open Data: Discover and overlay open data.
    • Collaboration: Invite teammates, comment, and share views.
  9. Developer entry points for Collab Digital Twins

    Collab Digital Twins provides three primary ways for developers to extend or integrate with the platform:

    1. Plugins: Add custom UI and behavior that can be enabled on a per-organization or per-user basis.
    2. Integrations: Use the REST API to allow external systems to consume data from the platform.
    3. Core Contributions: Contribute components and hooks directly to the core codebase.

    Depending on your goal, start with these resources:

    • Platform Fundamentals: Review the Concepts documentation for information on digital twins, BIM, GIS, and open standards.
    • UI Extensions: Start with the Plugins overview, followed by the 'Create your first plugin' guide and the capability reference.
    • Core Development: Review the Architecture overview, hooks and components references, and the Contributing guide.
  10. Understand Map Viewer Layer Composition

    The map viewer uses a fixed set of named layers declared in @collabdt/core/core/components/viewers/map/src/MapLayers/. Each layer is a self-contained React component responsible for fetching its own data, adding MapLibre sources and layers, and registering click handlers via the MapClickManager.

    Visual stacking is determined by the render order in MapLayers/index.tsx, while interaction priority is managed separately by the MapClickManager.

    // @collabdt/core/core/components/viewers/map/src/MapLayers/index.tsx
    export const MapLayers = () => (
      <>
        <CountryLayer />
        <OpenDataLayers />
        <BuildingLayer maptilerKey={maptilerKey} />
        <CommentLayer />
        <SensorLayers />
        <FileLayers />
        <BimLayer />
      </>
    )
  11. Understand the Digital Twin Maturity Model levels

    A digital twin is a capability that evolves through five progressive levels. Each level builds upon the previous one; for example, predictive capabilities require live observation (Informative level), and autonomous action requires prediction (Predictive level).

    1. Descriptive (Map what exists): A static digital representation using federated 3D geometry, BIM, and GIS data to establish a geospatial baseline. It documents the world but does not reflect real-time change.
    2. Informative (See what is happening now): Integration of live data via IoT and telemetry feeds and asset information management to provide real-time awareness of asset conditions in 4D.
    3. Predictive (Anticipate what is next): Use of analytics for trend and anomaly detection, performance scoring, and predictive maintenance to identify risks and degradation before they occur.
    4. Prescriptive (Test what could be): Use of simulation, what-if scenarios, optimization, and remote diagnosis to compare outcomes and test interventions safely before real-world implementation.
    5. Autonomous (Let the system act): A closed-loop system where AI twins and self-adaptive control allow the system to sense, decide, and act with minimal human intervention.
  12. Understand the Core Data Model and Multi-tenancy

    The system uses a multi-tenant architecture where the Organization model serves as the top-level tenant container. Every other record in the database is scoped to an organization, and queries must be filtered by the caller's organization ID on every request. Key models include:

    • Organization: Tenant container owning users, sites, buildings, files, sensors, comments, and roles.
    • User: Member of one organization with a single assigned role.
    • Role: Named role (Admin/User/Viewer) defining (action, subject) permissions.
    • Site: Geographic grouping of buildings within an organization.
    • Building: Primary asset entity belonging to a site and organization.
    • Infrastructure: Non-building assets like roads or utility lines.
    • File: Metadata for binary assets stored in MinIO.
    • Sensor / SensorType: IoT sensors and their category/unit definitions.
    • Comment: Threaded annotations attached to entities.