Domain Viewer
This page mirrors the domain-viewer README (branch develop).
The repository is the source of truth.

A web-based 3D visualization tool for exploring posemesh domains. This application enables users to visualize the digital overlays of physical spaces, including point cloud data, navigation meshes, occlusion meshes, and portal locations in an intuitive 3D environment.
What are Domains?â
Domains are digital overlays of physical spaces that bridge the gap between the physical and digital worlds. Powered by Auki Labs' posemesh technology, domains transform physical environments into interactive canvases for digital interactions and AI applications. They serve as the foundation for:
- Spatial Computing: Create and manage virtual real estate that maps directly to physical spaces
- Digital Navigation: Enable precise indoor positioning and wayfinding
- AR Experiences: Support augmented reality applications with accurate spatial awareness
- Operational Efficiency: Map and track assets, products, and resources in physical spaces
- Collaborative Environments: Enable asynchronous communication and interaction in spatial contexts
Whether you're developing retail solutions, creating immersive experiences, or building innovative spatial applications, domains provide the underlying infrastructure for seamless physical-digital bridges.
Featuresâ
- Interactive 3D visualization using Three.js and React Three Fiber
- Gaussian splat rendering via
@sparkjsdev/sparkwith dynamic loading, partitioned LOD, and reveal animations - Point cloud data rendering with color support
- Navigation and occlusion mesh visualization
- Portal location markers
- Visibility toggles for different data layers (all layers on by default, including splats)
- Fullscreen loading overlay with blur effect â stays visible until all data (including splat binaries) finishes downloading
- Auto-rotating camera when idle
- FPS Camera Mode (First Person View)
- Persisted Camera State
- Responsive grid system with infinite ground plane
- Domain information display with copy-to-clipboard functionality
Technology Stackâ
- Next.js 15
- React 19
- Three.js
- React Three Fiber
- @sparkjsdev/spark (Gaussian splat rendering engine)
- TypeScript
- Tailwind CSS
- Radix UI Components
- Lucide Icons
- Jotai (State Management)
- React Query (@tanstack/react-query)
Project Structureâ
âââ app/ # Next.js app directory
â âââ [id]/ # Dynamic domain viewer route
â â âââ page.tsx # Individual domain viewer page
â âââ actions.ts # Server actions for API calls to fetch domain data
â âââ globals.css # Global CSS styles
â âââ layout.tsx # Root layout component
â âââ page.tsx # Home page
âââ components/ # React components
â âââ 3d/ # 3D specific components
â â âââ spark-r3f/ # Gaussian splat rendering module
â â â âââ index.ts # Web entry: re-exports SparkRenderer, SplatMesh, SplatFileType
â â â âââ SparkRenderer.tsx # Initialises the Spark rendering engine
â â â âââ SplatMesh.tsx # Renders a single Gaussian splat mesh
â â â âââ useSparkModule.ts # Dynamic import of @sparkjsdev/spark (SSR-safe)
â â âââ renderers/ # Renderer components
â â â âââ PointCloudRenderer.tsx # Point cloud renderer with vertex colors
â â âââ RefinementSplat.tsx # Composition: ties splat data loading to spark renderer
â â âââ FloorGrid.tsx # Infinite grid component
â â âââ OriginLines.tsx # XYZ axis lines
â âââ ui/ # Common reusable UI components
â â âââ button.tsx
â â âââ collapsible.tsx # Radix Collapsible primitives
â â âââ input.tsx # Form input component
â âââ DomainInfo.tsx # Domain metadata display panel
â âââ FPSControls.tsx # First person camera controls
â âââ Navbar.tsx # The top navigation bar component with domain id input field
â âââ PersistedMapControls.tsx # Map controls with state persistence
â âââ SkyBox.tsx # Skybox environment
â âââ ToggleVisibility.tsx # Layer visibility controls
â âââ Viewer3D.tsx # Main 3D visualization component
âââ hooks/ # Custom React hooks
â âââ useRefinementSplat.ts # Loads partitioned/single-file Gaussian splat data
â âââ useRefinementHasSplat.ts # Lightweight check for splat data existence
â âââ useInterval.ts # Polling helper for periodic updates
â âââ useColorScheme.ts # Theme detection hook
âââ types/ # TypeScript type definitions
â âââ splat.ts # SplatEffect type for reveal animations
âââ store/ # Global state management
â âââ domainStore.ts # Domain data, loading states (incl. splatLoadingAtom)
â âââ visualizationStore.ts # Visibility toggles (portals, meshes, splat, etc.)
â âââ camera-store.ts # Camera position and target state
âââ utils/ # Utility functions
â âââ splatShaders.ts # GLSL shader utilities for splat reveal animations
â âââ ply-parser.web.ts # PLY parsing with optional Web Worker
â âââ posemeshClientApi.ts # Frontend API client
â âââ posemeshServerApi.ts # Backend API client
â âââ three-utils.ts # Three.js helper functions
âââ public/ # Static assets
â âââ images/ # Image assets
â âââ workers/ # Web Workers for processing point cloud files
â âââ QR.glb # A 3D model of a QR code (i.e. a portal)
âââ lib/ # Shared libraries and configurations
â âââ utils.ts # Common utility functions
âââ charts/ # Helm chart for Kubernetes deployments
â âââ domain-viewer/
â âââ Chart.yaml
â âââ values.yaml
â âââ values.staging.yaml
â âââ values.prod.yaml
âââ package.json # Project configuration
Getting Startedâ
Prerequisitesâ
- Node.js 18.x or later
- npm or yarn
- Docker (for containerized deployment)
Installationâ
Local Developmentâ
- Clone the repository:
git clone git@github.com:aukilabs/domain-viewer.git
cd domain-viewer
- Install dependencies:
npm install
- Create a
.env.localfile in the root directory with your credentials and servers:
AUKI_APP_KEY=your_app_key_here
AUKI_APP_SECRET=your_app_secret_here
AUKI_API_SERVER=https://api.auki.network # or your provided API server
AUKI_DDS_SERVER=https://dds.auki.network # or your provided DDS server
# Optional â Amplitude analytics (see "Analytics" section below)
NEXT_PUBLIC_AMPLITUDE_API_KEY=your_amplitude_api_key
- Run the development server:
npm run dev
Open http://localhost:3000 in your browser.
Docker Deploymentâ
- Clone the repository and navigate to the project directory:
git clone git@github.com:aukilabs/domain-viewer.git
cd domain-viewer
-
Create a
.env.localfile with your Auki credentials and servers as shown above. -
Build and run with Docker Compose:
docker compose up -d
The application will be available at http://localhost:3000.
To stop the application:
docker compose down
Building for Productionâ
Local Buildâ
npm run build
Docker Buildâ
docker compose build
Usageâ
- Enter a domain ID in the top navigation bar
- Click "Load" to fetch and display the domain data
- Use mouse/touch controls to navigate the 3D view:
- Left click + drag to rotate
- Right click + drag to pan
- Scroll to zoom
- Press 'F' to toggle FPS camera mode (WASD to move, Mouse to look)
- Toggle visibility of different layers using the buttons in the bottom left panel
- View domain details in the expandable panel
Analyticsâ
This project includes optional Amplitude analytics integration. When configured, the following events are tracked:
| Event | Trigger |
|---|---|
page_viewed | Every route navigation |
session_started | Once per browser session |
domain_search_initiated | User submits a domain ID via the navbar |
domain_loaded | Domain data fetched successfully (includes load time, data availability metadata) |
domain_load_failed | Domain fetch errors (categorized as not_found, network, access_denied) |
viewer_interaction_started | First pointer or scroll interaction with the 3D viewer per domain |
camera_mode_switched | Toggling between map and FPS camera modes |
layer_toggled | Showing/hiding a visualization layer |
field_copied | Copying a value from the domain details panel |
preview_viewed | Loading the embed/preview route (includes referrer and embed context) |
Every event automatically includes view_context (e.g. twitter_embed, direct) and referrer_domain properties. Country, browser, device, and OS are captured by Amplitude automatically via IP geolocation and user-agent.
Setupâ
To enable analytics, add your Amplitude browser API key to .env.local:
NEXT_PUBLIC_AMPLITUDE_API_KEY=your_amplitude_api_key
If this variable is not set, analytics initialization is skipped and no events are sent. The app runs normally without it.
Contributingâ
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgmentsâ
âšī¸ Info: This code was generated with the assistance of AI tools. While efforts have been made to ensure quality and functionality, users should exercise appropriate caution and review critical components, especially those handling security, data processing, or core business logic.