Skip to content

HideBuilder is a Next.js + React Three Fiber application for designing site/building models in 3D, with scene-graph editing, geometry systems, cloud-ready data flow, and an integrated AI assistant panel.

License

Notifications You must be signed in to change notification settings

xgauravyaduvanshii/hidebuilder

Repository files navigation

HideBuilder

AI-assisted 3D building editor by FlyingDarkDev.

HideBuilder is a Next.js + React Three Fiber application for designing site/building models in 3D, with scene-graph editing, geometry systems, cloud-ready data flow, and an integrated AI assistant panel.

Why HideBuilder

  • 3D-first editor for architectural/site planning workflows
  • Scene graph model with typed nodes and hierarchical relationships
  • Modular systems for walls, roofs, slabs, ceilings, zones, items, guides, and scans
  • AI panel for assisted workflows and context-aware editing support
  • Monorepo architecture for clean separation between core logic, viewer, and app UI

Core Features

  • Interactive 3D canvas with selection and editing tools
  • Model hierarchy: Site -> Building -> Level -> Element/Zone
  • Geometry systems for procedural updates from node data
  • Store-driven architecture with undo/redo support
  • Context actions for object operations (copy/paste/cut/delete/move/select all/add to AI)
  • Property + cloud sync foundation (auth + DB packages)
  • Help/brand integrations and contact workflow support

Tech Stack

  • Next.js 16 + React 19
  • Three.js + @react-three/fiber + @react-three/drei
  • Zustand for editor/viewer/core state
  • Turborepo for monorepo orchestration
  • Supabase + Better Auth for backend/auth workflows
  • Biome for linting/formatting
  • Bun as package manager/runtime

Monorepo Structure

.
├── apps/
│   └── editor/                    # Main HideBuilder web application
├── packages/
│   ├── auth/                      # Auth integration
│   ├── core/                      # Scene schema, store, systems, event bus
│   ├── db/                        # Supabase schema/client/helpers
│   ├── viewer/                    # R3F viewer/rendering layer
│   ├── ui/                        # Shared UI primitives
│   ├── eslint-config/             # Shared lint config
│   └── typescript-config/         # Shared tsconfig presets
├── turbo.json
├── package.json
└── SETUP.md

Architecture Overview

1. Scene Graph (Data Layer)

  • Nodes are stored in a flat map (Record<id, node>)
  • Parent/child relations are resolved by IDs
  • Node types include site, building, level, wall, slab, roof, ceiling, zone, item, scan, guide
  • Dirty-node marking allows systems to update only what changed

2. Systems (Computation Layer)

Core and viewer systems run per-frame or per-update and regenerate geometry/transforms when nodes are dirty:

  • Wall system
  • Slab system
  • Ceiling system
  • Roof system
  • Item placement system
  • Level visibility/positioning system
  • Guide/scan visibility systems

3. Viewer (Render Layer)

  • React Three Fiber canvas with renderers for node types
  • Object registry for fast lookup of rendered objects by node ID/type
  • Camera/controls + selection handling integrated with editor state

4. App UI (Editor Layer)

  • Toolbars, side panels, hierarchy navigation, AI assistant panel
  • Context actions and multi-step editing flows
  • Property/cloud interaction paths via auth + DB packages

Data Flow

User action
  -> Tool handler
  -> Scene store update (create/update/delete)
  -> Dirty node marking
  -> Renderer/registry sync
  -> System recompute
  -> Updated mesh in canvas

Local Development

Prerequisites

  • Node.js >= 20
  • Bun >= 1.3
  • Docker Desktop (for local Supabase)

Install

bun install

Configure Environment

Create/update apps/editor/.env.local.

Typical variables used in this project:

  • NEXT_PUBLIC_APP_URL
  • POSTGRES_URL
  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY
  • SUPABASE_SERVICE_ROLE_KEY
  • BETTER_AUTH_SECRET
  • BETTER_AUTH_URL
  • RESEND_API_KEY (optional for email/contact)
  • NEXT_PUBLIC_GOOGLE_MAPS_API_KEY (optional)
  • OPENAI_API_KEY / ANTHROPIC_API_KEY / GEMINI_API_KEY (optional AI providers)

Detailed setup: SETUP.md

Run Development

bun dev

App URL: http://localhost:3000

Scripts (Root)

  • bun dev -> run all workspace dev tasks via Turbo
  • bun run build -> build all packages/apps
  • bun run check-types -> type-check workspaces
  • bun run lint -> Biome lint
  • bun run lint:fix -> auto-fix lint issues
  • bun run format -> format codebase
  • bun run check -> Biome check
  • bun run db:start -> start local Supabase
  • bun run db:stop -> stop local Supabase
  • bun run db:reset -> reset local DB/migrations

Package Responsibilities

  • @hide-builder/core: schema, state, systems, event bus, spatial helpers
  • @hide-builder/viewer: canvas/viewer and renderers
  • @hide-builder/auth: Better Auth server/client setup
  • @hide-builder/db: Supabase clients, DB types, migrations
  • apps/editor: full product UI and editor workflows

Troubleshooting

  • If viewer errors mention unknown R3F objects, confirm custom objects are extended/registered correctly and mounted in the correct layer.
  • If cloud/auth fails, verify .env.local values and Supabase local instance status.
  • If workspace changes in packages/* do not reflect, restart bun dev from repo root.

Project Identity

  • Project: HideBuilder
  • Maintainer: FlyingDarkDev
  • Website: flyingdarkdev.com (coming soon)
  • GitHub: https://github.com/xgauravyaduvanshii
  • X (Twitter): https://x.com/darkdev064
  • LinkedIn: https://lindin.com/in/flyingdarkdev
  • Instagram: https://instagram.com/gaurav_.096

License

MIT License. See LICENSE.

About

HideBuilder is a Next.js + React Three Fiber application for designing site/building models in 3D, with scene-graph editing, geometry systems, cloud-ready data flow, and an integrated AI assistant panel.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages