How improdead/vector-roblox works
Project type and purpose
• Vector is a full-stack system comprising a Roblox Studio plugin (written in Luau) and a Next.js backend (TypeScript).
• Purpose: Provide an AI-driven “copilot” inside Roblox Studio that gathers context (scripts, selection), calls LLM tools in a deterministic, proposal-first workflow, previews diffs, and applies safe, undoable edits or asset operations.
File structure
• Top level:
• vector/apps/web → Next.js backend (API routes, orchestrator, tool schemas, stores, providers)
• vector/plugin → Roblox Studio plugin (Luau code under src, tools for edits and instance ops)
• Backend substructure:
• app/api/... → REST endpoints for chat, proposals, stream, assets/search, assets/generate3d
• lib/orchestrator → LLM orchestration logic, tool registry, context management
• lib/store → file-based persistence for proposals and workflows
• lib/catalog, lib/checkpoints, lib/diff → supporting modules
• Plugin substructure:
• src/main.server.lua → entrypoint
• src/net/http.lua → HTTP helpers
• src/tools/*.lua → per-tool implementations (apply_edit, create_instance, etc.)
README insights
• Runtime split: plugin handles UI, diff rendering, using Roblox’s ChangeHistoryService; backend handles planning, LLM calls, proposal building, persistence.
• One-tool-per-message, approval-first pattern (mirroring Cline).
• Streaming via long-poll for plugin, SSE for dashboards; caching and audit logging.
• External integrations: Roblox Catalog API or stubs, Meshy for 3D generation, Open Cloud for uploads.