Transform vague ideas into detailed construction plans and photorealistic images using AI agents.
Buildable is a full-stack application that uses a multi-agent AI system to help users create custom DIY furniture and structures. Simply describe what you want to build (e.g., "Cyberpunk Throne"), and the system will generate a detailed construction plan, select materials from inventory, and create photorealistic visualizations.
- Conversational Design Assistant: Interactive conversation to gather requirements (use case, dimensions, style, materials, etc.)
- AI-Powered Planning: Multi-agent workflow that transforms vague ideas into detailed construction plans
- Intelligent Material Selection: Automatically selects appropriate materials from inventory using vector search
- Photorealistic Image Generation: Uses FLUX API to generate high-quality images of the final product
- Assembly Manual Generation: Creates step-by-step assembly instructions with images
- Modern Web Interface: Beautiful Next.js dashboard with real-time updates
Buildable consists of two main components:
- FastAPI REST API server
- LangGraph for orchestrating multi-agent workflows
- MongoDB for inventory management
- FLUX API integration for image generation
- Langfuse for observability and tracing
- Next.js 16 with React 19
- TypeScript for type safety
- Tailwind CSS for styling
- shadcn/ui components
- Real-time updates via Server-Sent Events (SSE)
The system uses a LangGraph-based workflow with specialized AI agents:
- Conversation Agent: Gathers requirements through natural conversation
- Style Optimizer: Refines style preferences and aesthetic direction
- Planner (Agent A): Generates detailed construction plans from user requirements
- Inventory Clerk (Agent B): Selects specific materials from inventory using vector search
- Prompt Engineer (Agent C): Creates optimized prompts for image generation
- Flux Generator (Agent D): Generates photorealistic images using FLUX API
The workflow includes feedback loops - if materials can't be found, the Planner revises the plan and tries again.
- Python 3.11+ (for backend)
- Node.js 18+ (for frontend)
- MongoDB (local or Atlas)
- API Keys:
- OpenAI API key (for LLM)
- Black Forest Labs API key (for FLUX image generation)
- Langfuse keys (optional, for observability)
-
Navigate to backend directory:
cd backend -
Create virtual environment (recommended):
python -m venv ../buildable-env source ../buildable-env/bin/activate # On Windows: ..\buildable-env\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment:
cp env.example .env # Edit .env and add your API keys and MongoDB connection string -
Start MongoDB:
# Local MongoDB mongod # Or use MongoDB Atlas and update MONGO_URI in .env
-
Seed the database:
python scripts/seed_db.py
-
Run the server:
uvicorn app.main:app --reload
The API will be available at http://localhost:8000
- API docs:
http://localhost:8000/docs - Health check:
http://localhost:8000/health
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install # or pnpm install -
Configure backend URL (optional): Create
.env.local:NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
Default is
http://localhost:8000/api/v1 -
Run the development server:
npm run dev # or pnpm dev
The frontend will be available at http://localhost:3000
Generate a construction plan and image from a user query.
Request:
{
"user_query": "Cyberpunk Throne",
"skip_conversation": false,
"conversation_history": [],
"conversation_data": {},
"previous_image_url": null,
"previous_image_urls": []
}Response:
{
"success": true,
"user_query": "Cyberpunk Throne",
"status": "success",
"style_description": "...",
"construction_plan": "...",
"selected_item_ids": ["pipe-001", "light-001", ...],
"selected_items": [...],
"flux_prompt": "...",
"final_image_url": "..."
}Stream conversation agent responses in real-time using Server-Sent Events (SSE).
Generate step-by-step assembly instructions with images.
Get all inventory items.
Test FLUX image generation directly.
See the Backend README for detailed API documentation.
buildable/
βββ backend/ # FastAPI backend
β βββ app/
β β βββ api/ # API routes and schemas
β β βββ core/ # Configuration and database
β β βββ graph/ # LangGraph workflow and nodes
β β βββ services/ # External service integrations
β β βββ utils/ # Utility functions
β β βββ main.py # FastAPI app entry point
β βββ data/ # Seed data
β βββ scripts/ # Utility scripts
β βββ requirements.txt # Python dependencies
β
βββ frontend/ # Next.js frontend
β βββ app/ # Next.js app directory
β βββ components/ # React components
β βββ lib/ # Utilities and API client
β βββ package.json # Node dependencies
β
βββ README.md # This file
Backend (.env):
OPENAI_API_KEY: Your OpenAI API keyBFL_API_KEY: Your Black Forest Labs API key for FLUXMONGO_URI: MongoDB connection stringMONGO_DB_NAME: Database nameLLM_MODEL: LLM model to use (default:gpt-4o-mini)FLUX_MODEL: FLUX model to use (default:flux-pro-1.1)LANGFUSE_PUBLIC_KEY&LANGFUSE_SECRET_KEY: Optional, for observability
Frontend (.env.local):
NEXT_PUBLIC_API_URL: Backend API URL (default:http://localhost:8000/api/v1)
See backend/env.example for all available options.
- API docs available at
/docs(Swagger UI) or/redoc - Enable debug mode by setting
DEBUG=Truein.env - Langfuse tracing is automatically enabled if credentials are provided
- Hot reload enabled by default
- TypeScript for type safety
- ESLint for code quality
This project was created for a hackathon. See individual component READMEs for more details.
- Backend README - Detailed backend documentation
- Frontend README - Detailed frontend documentation
This is a hackathon project. Contributions and improvements are welcome!
- MongoDB connection errors: Ensure MongoDB is running and
MONGO_URIis correct - API key errors: Verify all API keys are set in
.env - Import errors: Make sure virtual environment is activated and dependencies are installed
- API connection errors: Ensure backend is running on
http://localhost:8000 - CORS errors: Backend CORS is configured to allow all origins in development
- Build errors: Clear
.nextdirectory andnode_modules, then reinstall
Built with β€οΈ for the hackathon