Project Info
Backyard Intelligence Backyard Intelligence turns a natural-language backyard project idea into a structured, inspectable build concept. A user can ask for something like a pergola, shed, or raised garden bed, and the system converts that request into a typed construction spec, deterministic 3D component model, verification report, bill of materials, and safety checklist. An AR companion app allows users to see the structure in real-life size, filter by specific materials and see how they fit together, and precisely fabricate parts using computer vision cutting hints.
Inspiration
We were interested in a version of AI for physical-world projects that does more than produce a nice-looking answer. Backyard construction is full of details that matter: dimensions, stock lengths, support paths, openings, fasteners, roofing layers, and material quantities. A language model is great at understanding messy human intent, but it should not be trusted to hallucinate geometry or a shopping list. So we built a pipeline where AI interprets the request, but deterministic code owns the buildable representation. The combination of AI generation and the AR app provides the speed of vibe coding, the safety of a hired contractor, and the spatial intuition of building a lego set.
What it does
The core flow is: natural language → AI-interpreted design spec → deterministic component generation → verification → BOM + GLB + AR handoff Backyard Intelligence currently supports: Pergolas Sheds Raised garden beds For each generated design, the app produces: A typed construction specification A true-scale 3D model with named parts A verification report for dimensions, connections, stock fit, openings, support paths, and overlaps A bill of materials traced back to generated component IDs A safety/building-guideline checklist A downloadable GLB model An AR handoff path for viewing and fabrication guidance on iOS
How we built it
The web app is built with React, TypeScript, Vite, Three.js, React Three Fiber, and Drei. Gemini is the primary AI interpreter, with Claude available as a fallback. The AI route lives in Vite middleware so API keys stay server-side. The important architectural choice was separating interpretation from generation. The AI produces a structured DesignSpec, then deterministic TypeScript code validates the spec, generates every component, derives the BOM, verifies the assembly, and exports the GLB. The BOM is not guessed by the model; it is calculated from the generated parts. The companion iOS app was built using SwiftUI, ARKit, RealityKit, Metal, OpenCV/ArUco marker tracking, and GLTFKit2. It can fetch the latest exported GLB and render placement/cutting guidance in AR. Challenges The hardest part was making the output inspectable instead of just visually plausible. We had to model real construction details like rafters, studs, siding, roof layers, gable/lean-to geometry, deck blocks, joists, openings, trim, fasteners, and stock-length segmentation. Another challenge was verification. A model can look fine while still having disconnected parts, impossible stock lengths, invalid openings, floating geometry, or overlapping solids. We built checks for required part groups, finite dimensions, connection references, physical joint fit, support paths, roof bearing, BOM correspondence, and more. The AR side also had its own challenges: true-scale unit conversion, loading GLB files on device, marker-based placement, LiDAR occlusion, and making the guide readable over a real camera feed.
What we learned
We learned that AI becomes much more useful for high-stakes physical domains when it is paired with deterministic systems. The language model should help translate intent, ask clarifying questions, and repair invalid specs, but the final geometry, quantities, verification, and exports should come from code. We also learned how much value there is in traceability. When every visible part has a node ID, every BOM item traces back to components, and every verification check explains what passed or failed, the result becomes something a user can inspect instead of blindly trust. What is next Next, we would expand the supported structure library, improve permitting/local-code awareness, add more complete cost and store availability integrations, and tighten the AR workflow so users can move from generated concept to guided layout and cutting more smoothly. Backyard Intelligence is not a permit package or structural certification tool. It is a prototype for a safer AI-assisted design workflow where human intent, deterministic generation, verification, and AR visualization work together.
Backyard Intelligence
Backyard Intelligence is a Berkeley AI Hackathon prototype for turning a natural-language backyard project idea into a structured, inspectable build concept.
The core architecture is:
natural language → AI-interpreted design spec → deterministic component generation → verification → BOM + GLB + AR handoff
The app currently supports:
- Pergolas
- Sheds
- Raised garden beds
It is not a permit package or structural certification tool. The goal is to prove a safer AI-assisted architecture where language models interpret intent, while deterministic code owns geometry, verification, bill of materials, and export.
Why this uses AI
The AI layer is used where language models are strongest:
- Understanding messy user prompts like “make it a 10x8 gable shed with double doors and two left windows.”
- Asking one approval-style follow-up when the prompt is ambiguous.
- Converting conversation history and user revisions into a complete typed construction specification.
- Using the provided shed PDF as design context when forming the spec.
- Falling back across Gemini and Claude providers when one model is unavailable.
- Optionally attempting repair prompts when deterministic validation or verification fails.
The AI does not guess the final BOM, mesh geometry, or verifier output. Those are produced from deterministic code.
System diagram
flowchart TD
A["User prompt or revision"] --> B["Structure router<br/>Any / Pergola / Shed / Garden bed"]
B --> C["AI interpreter<br/>Gemini primary, Claude fallback"]
C --> D{"Ambiguity left?"}
D -- "Yes" --> E["AI asks one approval-style<br/>default confirmation question"]
E --> A
D -- "No" --> F["Structured DesignSpec v2<br/>intent, dimensions, stock IDs,<br/>openings, roof/foundation rules"]
F --> G["Deterministic spec validator"]
G --> H{"Spec valid?"}
H -- "No" --> I["AI repair or recommended fix<br/>depending on env mode"]
I --> F
H -- "Yes" --> J["Deterministic component generator<br/>named part nodes, dimensions,<br/>connections, materials"]
J --> K["Model verifier<br/>required parts, stock fit,<br/>joint fit, support path,<br/>overlaps, openings"]
K --> L{"Model valid?"}
L -- "No" --> I
L -- "Yes" --> M["BOM generator<br/>derived from generated components"]
M --> N["Safety / guideline checklist<br/>shed + pergola advisory checks"]
N --> O["GLB exporter<br/>one named mesh per visible part"]
O --> P["UI response<br/>spec, model, verification,<br/>BOM, safety checklist, GLB"]
O --> Q["Optional S3 current.glb upload<br/>for AR viewer"]
How the system works
- The user describes a structure in chat.
- The app routes the prompt to a family: pergola, shed, garden bed, or “any.”
- Gemini or Claude converts the prompt into a complete structured design specification.
- If key choices are ambiguous, the AI proposes sensible defaults from the current sliders and asks the user to approve or modify them.
- The deterministic validator checks the spec before any geometry is generated.
- The component generator creates the actual construction model from reusable part rules.
- The verifier checks that the generated model is internally consistent.
- The BOM is derived from generated component nodes, not from AI text.
- The GLB exporter creates a true-scale model with one named node per visible part.
- For sheds and pergolas, a safety/building-guideline checklist compares the design against conventional guidance and flags advisory issues.
Generated artifacts
Each successful design returns separate artifacts:
- Design spec — what the user asked for, normalized into typed construction data.
- Component model — what the deterministic generator actually built.
- Verification report — whether the generated model is internally consistent.
- Safety checklist — advisory shed/pergola guideline checks based on sources like AWC, IRC, and Simpson Strong-Tie.
- BOM — materials and purchase quantities derived from component nodes.
- GLB — one named mesh per visible component, with material colors for true-scale 3D/AR viewing.
Keeping these separate is the main safety pattern: the language model describes intent, but deterministic code produces and checks the buildable representation.
Supported structure families
Pergola
Generated assemblies include:
- Concrete footings
- Post bases
- 6x6 posts
- Beam assemblies
- Rafters
- Shade slats
- Knee braces
- Rafter ties / connector markers
- Reference figure, compass, and dimension guides
The generator segments over-length lumber when the selected stock is shorter than the requested run.
Shed
Generated assemblies include:
- Prepared base
- Deck blocks or concrete slab
- Floor skids, joists, and floor deck when raised-floor mode is enabled
- Wall plates, studs, headers, and opening framing
- Door/window units
- Siding, trim, flashing, sealant packages
- Gable or lean-to roof framing
- Roof sheathing, underlayment, shingles, drip edge, fascia, and rake trim
- Fastener and connector point markers
Raised garden bed
Generated assemblies include:
- Side boards
- Corner and intermediate posts
- Top caps
- Optional bottom mesh / liner
- Optional trellis
- Soil and compost volume estimate
AI providers and modes
Server-side AI credentials stay in Vite middleware and are not shipped to the browser.
GEMINI_API_KEY=...
ANTHROPIC_API_KEY=...
AI_PROVIDER_ORDER=gemini,claude
By default, the app uses Gemini first and can fall back to Claude if configured.
Useful modes:
# Local deterministic parser only; no AI interpretation or AI repair.
VITE_DETERMINISTIC_ONLY=true
# AI still parses intent, but failed deterministic review surfaces a recommended fix
# instead of running automatic AI repair turns.
VITE_AI_REPAIR=false
Run locally
npm install
cp .env.example .env
# Add GEMINI_API_KEY and/or ANTHROPIC_API_KEY to .env
npm run dev
AR current GLB upload
Every successful generation exports the same GLB used by the download button and POSTs it to the local server at /api/glb/current. The server overwrites:
https://backyard-intelligence.s3.us-west-1.amazonaws.com/current.glb
Public read access lets the AR viewer fetch the file, but it does not automatically allow overwriting it. The upload endpoint supports both modes:
- With AWS credentials, it performs a signed
PUT. - Without AWS credentials, it tries a public write to the object URL. That succeeds only if the bucket policy explicitly allows anonymous
s3:PutObjectforcurrent.glb.
Optional server-side AWS credentials:
S3_GLB_BUCKET=backyard-intelligence
S3_GLB_REGION=us-west-1
S3_GLB_KEY=current.glb
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
The UI shows whether current.glb uploaded and whether the public AR URL verified.
Verification and safety checks
The internal verifier checks generated geometry and data consistency:
- Required component groups exist
- Dimensions are finite and positive
- Stock lengths fit selected Home Depot-oriented materials
- Connections reference real generated components
- Declared joints physically meet
- Unconnected solid geometry does not overlap
- Openings fit walls
- Roof planes and rafters touch correctly
- BOM traces back to generated components
The safety checklist is advisory and currently applies to sheds and pergolas. It checks the generated spec/model against conventional guidance for:
- Foundation and post/base support
- Exterior-rated materials
- Framing spacing
- Bracing
- Uplift connector locations
- Roof/weathering layers
- Siding and sheathing fastener schedules
- Local permit, frost, wind, snow, seismic, and engineering review warnings
Research sources used in the app:
- American Wood Council DCA6 deck guide
- Simpson Strong-Tie Wood Construction Connectors catalog
- ICC 2021 IRC
Design basis
The researched assembly conventions and limitations are documented in docs/design-basis.md.
This is a concept-design prototype. Always verify local code, permits, loads, soil, frost depth, manufacturers’ instructions, and professional structural requirements before building.
Analysis
View
Metric
- 29
- 27
- 2
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CIn code
- CSSIn code
- HTMLIn code
- PythonIn code
- ReactIn code
- SwiftIn code
- TypeScriptIn code
- AWSClaimed
- Google GeminiClaimed
7 of 9 appear in the indexed code. 2 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- Claude CodeCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
625 KB
Source files
61
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
mp1678/cal-ai-hackathon-26
81 files · 4.8 MB · @ a24f839
Structure
Interface
1 file · 1%Screens, components and styles rendered to the user.
Application logic
63 files · 78%Domain rules, services and shared utilities.
+5 more
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript55%
- Swift27%
- CSS8%
- Markdown6%
- Python3%
- C0%
- Other (2)0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 12- @react-three/drei
- @react-three/fiber
- lucide-react
- react
- react-dom
- three
- +6 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.