Skip to content

๐Ÿ’ป LuxurAI Coder โ€” Autonomous Code Synthesis Studio โ€‹

LuxurAI Coder is a full-featured, AI-powered engineering studio built directly into the platform. It is designed for developers who need to generate, refactor, debug, and architect production-grade code โ€” across multiple languages and frameworks โ€” using natural language prompts.

Unlike a simple chat-based coding assistant, Coder operates with a persistent multi-file project workspace, a built-in terminal, live syntax highlighting, and an intelligent web-grounded research layer.


๐Ÿ—๏ธ Studio Layout โ€‹

The Coder interface is a three-panel engineering environment:

PanelPurpose
Left SidebarFile Explorer โ€” lists all generated project files. Click any file to open it in the editor.
Center EditorMonaco-powered code editor with full syntax highlighting and line numbers.
Right PanelAI stream output โ€” shows live thought logs and prose explanations as the AI synthesizes code.

A collapsible terminal at the bottom streams live output and web research logs.


๐ŸŽ›๏ธ Generation Modes โ€‹

The input bar exposes three synthesis mode pills that control how the AI approaches a task:

ModeBehavior
Synthesis (default)Full code generation from a natural-language description. Builds entire files and project structures from scratch.
RefactorTakes existing code in context and surgically rewrites or optimizes it according to the prompt.
ExplainAnalyzes the code in context and produces detailed inline commentary and architectural breakdowns.

๐ŸŒ DuckDuckGo Web Search Grounding โ€‹

The DDG Search toggle (enabled by default) allows the AI to perform live internet searches before generating code:

  • When enabled, the system sends a structured search query to DuckDuckGo and fetches the top live results.
  • The results are displayed in a collapsible Live Grounding badge directly in the output panel, listing source URLs and snippet previews.
  • The gathered context is silently injected into the generation prompt, ensuring the AI produces current, accurate code (e.g. using the latest library APIs or fresh documentation).
  • Toggle off for purely offline, context-only generation.

๐Ÿ“ Multi-File Project Workspace โ€‹

Coder maintains a persistent file tree for the current session:

  • Initial file: main.py (default). The AI can generate additional files automatically based on prompt complexity.
  • File Explorer: All generated files appear in the left sidebar. Clicking a filename loads it into the editor.
  • Active File Context: The currently open file's content is automatically passed as context to the next generation, allowing iterative editing and patching.
  • ZIP Export: The full multi-file project can be exported as a .zip archive directly from the header toolbar.

โšก Quick-Start Presets โ€‹

Four one-click preset prompts are available to accelerate common scaffolding tasks:

PresetWhat It Builds
FastAPI + PostgreSQLProduction microservice with asyncpg, SQLAlchemy 2.0, Pydantic v2 schemas, JWT auth, and health endpoints
React + TailwindFull-stack TypeScript dashboard with responsive grid and analytics components
Multi-Agent SwarmAutonomous multi-agent framework with Leader Planner, Specialist Coder, and AST Validator
WebSocket ServerHigh-concurrency async Pub/Sub server with heartbeat ping/pong and recovery

๐Ÿ”Œ API Integration โ€‹

Submit a Coder Generation Request โ€‹

Stream code generation via SSE.

  • Endpoint: POST /api/stream/coder
  • Headers:
    http
    Content-Type: application/json
    Authorization: Bearer <your_session_token>
  • Request Body:
    json
    {
      "prompt": "Create a FastAPI endpoint with JWT auth and role-based access control",
      "context": "",
      "language": "python",
      "mode": "synthesis",
      "reference_repo": "auto",
      "enable_web_search": true,
      "files": {},
      "history": [],
      "session_id": "cdr_abc123xyz"
    }

Request Fields โ€‹

FieldTypeDescription
promptstringNatural-language instruction for the AI
contextstringCurrent file content to pass as active editing context
languagestringTarget language โ€” python, typescript, javascript, rust, sql, etc.
modestringGeneration mode: synthesis, refactor, or explain
reference_repostringReference repository hint for the AI (auto lets the backend decide)
enable_web_searchbooleanIf true, performs a live DDG search before generating
filesobjectCurrent file tree map { "filename.py": "...content..." }
historyarrayPrior conversation turns for multi-turn context
session_idstringClient-generated session identifier (prefix cdr_)

SSE Event Stream โ€‹

The endpoint returns a text/event-stream. Events follow the same SSE protocol as the main chat:

http
data: {"type": "routing", "text": "Engaged Base Model ยท Code Synthesis Engine"}

data: {"type": "step", "step": "Searching DuckDuckGo: 'FastAPI JWT role-based access 2025'"}

data: {"type": "web_search", "query": "FastAPI JWT...", "results": [...]}

data: {"type": "token", "text": "from fastapi import"}

data: {"type": "token", "text": " Depends, HTTPException"}

data: [DONE]

๐Ÿ—‚๏ธ Supported Languages โ€‹

Selectable from the language dropdown in the input bar:

  • Python
  • TypeScript / JavaScript
  • React (JSX/TSX)
  • Rust
  • Go
  • Java
  • PostgreSQL / SQLX

โญ Feedback & Rating โ€‹

Each generated response includes thumbs-up / thumbs-down buttons. Votes are submitted to POST /api/feedback/rate to help improve external model routing and prompt quality over time.

TIP

Multi-turn Iterations After the first generation, subsequent prompts automatically carry the full conversation history and the current files state. This lets you iteratively build on the same codebase โ€” asking the AI to "add error handling to the existing route" or "refactor the authentication module" without losing prior context.

Released under the MIT License.