Stun is an infinite multimodal canvas where AI visually understands, organizes, and navigates knowledge. Instead of responding in chat boxes, AI executes structured UI actions directly on the workspace.
AI does not reply in text.
AI navigates the canvas.
Every idea becomes a node.
Every relationship becomes a connection.
Every command results in visible transformation.
Stun uses a 3-layer hybrid canvas system:
ββββββββββββββββββββββββββββββββββββββββββββ
β TLDraw - Infinite Workspace (Layer 1) β
β βββ Excalidraw - Visual UI (Layer 2) β
β βββ React Flow - AI Graph (Layer 3) β
ββββββββββββββββββββββββββββββββββββββββββββ
- TLDraw: Infinite canvas operating system (pan/zoom/camera)
- Excalidraw: Drawing tools, shapes, diagrams (user interaction)
- React Flow: Knowledge graph engine (AI-readable structure)
See Canvas-system.md for full architectural details.
Stun/
βββ web/ # Next.js Frontend
β βββ components/
β β βββ canvas/ # β
Hybrid canvas layers
β β βββ nodes/ # Node renderers
β β βββ voice/ # Voice command UI
β β βββ layout/ # App layout
β βββ hooks/ # β
useBoard (hybrid state)
β βββ store/ # β
Zustand board store
β βββ lib/ # β
Action executor, camera sync, mapping
β βββ types/ # β
Canvas architecture types
β
βββ backend/ # Express + TypeScript API
β βββ routes/ # API endpoints
β βββ services/ # Gemini AI, board logic
β βββ middleware/ # Auth verification
β βββ config/ # Firestore, Vertex AI
β
βββ docs/ # Documentation
β βββ Canvas-system.md # Architecture spec
β βββ PRD.md # Product requirements
β βββ IDEA.md # Original vision
β
βββ infra/ # Cloud Run deployment
- β Hybrid canvas architecture (TLDraw + Excalidraw + React Flow)
- β Camera synchronization service
- β Element-to-node mapping system
- β AI action executor (move, connect, highlight, zoom, group, etc.)
- β Multi-layer state management
- β Type system for hybrid canvas
See FRONTEND_IMPLEMENTATION.md for complete details.
β οΈ API routes defined (/health,/auth/me,/boards,/ai/plan)β οΈ Gemini service placeholderβ οΈ Auth middleware stub- π² Firebase Auth integration needed
- π² Firestore board persistence needed
- π² Vertex AI Gemini integration needed
cd web
bun install # or npm install
bun dev # or npm run devApp runs on http://localhost:3000
Try it: Navigate to /board/demo-board
cd backend
npm install
npm run devAPI runs on http://localhost:8080
- Open infinite canvas board
- Draw freely with Excalidraw tools
- Add nodes via React Flow
- Issue voice command: "Turn this into a roadmap"
- AI captures screenshot
- Gemini analyzes spatial layout
- AI returns structured action plan
- Actions execute on canvas (nodes move, connect, transform)
Voice Command
β
Screenshot Capture (html2canvas)
β
Backend API (/ai/plan)
β
Gemini Multimodal Analysis
β
JSON Action Plan
β
ActionExecutor
β
Visual Canvas Transformation
- Framework: Next.js 14 (App Router)
- Canvas Engines:
- TLDraw 2.4.6 (workspace)
- Excalidraw 0.17.6 (drawing)
- React Flow 11.11.4 (graph)
- State: Zustand
- Voice: Web Speech API
- Screenshot: html2canvas
- Styling: SCSS
- Language: TypeScript
- Runtime: Node.js
- Framework: Express
- AI: Google GenAI SDK + Vertex AI
- Database: Firestore
- Auth: Firebase Authentication
- Deployment: Google Cloud Run
- Validation: Zod
- Canvas-system.md - Hybrid canvas architecture
- PRD.md - Product requirements & technical specs
- IDEA.md - Original vision & use cases
- FRONTEND_IMPLEMENTATION.md - Implementation details
- Implement Firebase Auth token verification
- Connect Firestore for board persistence
- Integrate Vertex AI Gemini multimodal model
- Wire up
/ai/planendpoint - Validate action plans before execution
- Auto-sync Excalidraw elements β React Flow nodes
- Implement full camera synchronization
- Connect Voice Orb to backend
- Add screenshot upload pipeline
- Build custom node types (video, summary, diagram)
- Configure Cloud Run service
- Set up Firebase project
- Enable Vertex AI API
- Deploy backend API
- Deploy Next.js frontend
β
Uses Gemini Multimodal Model
β
Google GenAI SDK integration
β
Vertex AI platform
β
Cloud Run deployment ready
β
Follows UI Navigator track requirements
β
Multimodal screenshot interpretation
β
Structured executable UI output
See LICENSE
Frontend: Production-ready with hybrid canvas architecture
Backend: Scaffold complete, integration pending
Deployment: Ready for Cloud Run
The spatial AI thinking environment is ready to transform how humans and AI collaborate! π