Terminal & 3D Phase

Mod3d

Modular worktree setup for 3D terminals, file cards, prompt cards, and more. Composable building blocks for spatial developer interfaces.

JavaScript Created Jul 25, 2025 1.2 MB
modular composition

Mod3d is the philosophical conclusion of the Terminal/3D phase. After building monolithic 3D filesystem viewers, multi-terminal window managers, and orchestration layers, the question became: what if every piece was a composable module you could snap together?

"Composability over monoliths. Every 3D terminal, every file card, every prompt card should be an independent module that works alone and composes with others. Git worktrees give you isolation. Modules give you freedom."

This project uses git worktrees as an isolation primitive -- each module lives in its own worktree, can be developed independently, and slots into a shared 3D scene through a card-based UI paradigm.

3D Terminal Modules

Self-contained terminal components that render in 3D space. Each module manages its own xterm instance, geometry, and interaction.

Card-Based UI Paradigm

Files, prompts, and data appear as floating cards in 3D space. Cards are the universal UI primitive -- inspect, stack, arrange, connect.

Worktree Isolation

Each module is developed in a separate git worktree. No shared state, no coupling, no merge conflicts. Compose at runtime, not build time.

Composable Architecture

Modules register with a scene coordinator. Drop in a terminal module, a file browser card, a prompt card -- they self-arrange and interconnect.

JavaScript Three.js Git Worktrees CSS3DRenderer xterm.js Module Registry Scene Coordinator Card Layout Engine
// Modular composition via registry SceneCoordinator -- root 3D scene, manages module lifecycle | ├── ModuleRegistry -- register(), get(), list() │ ├── TerminalModule -- 3D terminal (xterm + CSS3DObject) │ ├── FileCardModule -- file preview cards (syntax hl) │ ├── PromptCardModule -- AI prompt interface cards │ └── CustomModule -- user-defined modules | ├── CardLayoutEngine -- spatial arrangement algorithm │ ├── physics-based -- cards repel/attract │ ├── grid-snap -- align to 3D grid │ └── freeform -- manual placement | └── WorktreeManager -- git worktree ops ├── create(branch) -- isolated dev environment └── mount(module) -- hot-load from worktree
1.2
MB Total Size
JS
Primary Language
4+
Module Types
3
Layout Modes