Appearance
๐ป 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:
| Panel | Purpose |
|---|---|
| Left Sidebar | File Explorer โ lists all generated project files. Click any file to open it in the editor. |
| Center Editor | Monaco-powered code editor with full syntax highlighting and line numbers. |
| Right Panel | AI 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:
| Mode | Behavior |
|---|---|
| Synthesis (default) | Full code generation from a natural-language description. Builds entire files and project structures from scratch. |
| Refactor | Takes existing code in context and surgically rewrites or optimizes it according to the prompt. |
| Explain | Analyzes 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
contextto the next generation, allowing iterative editing and patching. - ZIP Export: The full multi-file project can be exported as a
.ziparchive directly from the header toolbar.
โก Quick-Start Presets โ
Four one-click preset prompts are available to accelerate common scaffolding tasks:
| Preset | What It Builds |
|---|---|
| FastAPI + PostgreSQL | Production microservice with asyncpg, SQLAlchemy 2.0, Pydantic v2 schemas, JWT auth, and health endpoints |
| React + Tailwind | Full-stack TypeScript dashboard with responsive grid and analytics components |
| Multi-Agent Swarm | Autonomous multi-agent framework with Leader Planner, Specialist Coder, and AST Validator |
| WebSocket Server | High-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 โ
| Field | Type | Description |
|---|---|---|
prompt | string | Natural-language instruction for the AI |
context | string | Current file content to pass as active editing context |
language | string | Target language โ python, typescript, javascript, rust, sql, etc. |
mode | string | Generation mode: synthesis, refactor, or explain |
reference_repo | string | Reference repository hint for the AI (auto lets the backend decide) |
enable_web_search | boolean | If true, performs a live DDG search before generating |
files | object | Current file tree map { "filename.py": "...content..." } |
history | array | Prior conversation turns for multi-turn context |
session_id | string | Client-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.
