## Inspiration

We kept seeing the same pattern: people have app ideas but can't
build them. Existing AI code generators either produce broken snippets or require you to stitch everything together yourself. We wanted to build something that goes end-to-end — from a plain English description to a live, deployed app — in minutes, not hours.

The GLM 5.1 ecosystem was the perfect fit. With thinking mode for deep reasoning, vision for screenshot-to-code, web search for real-time research, and CogView-4 for image generation — we
realized we could build a multi-step agent pipeline that doesn't just generate code, but actually thinks through
architecture, reviews its own work, and deploys the result.

We also drew inspiration from the graveyard of abandoned GitHub
repos. What if AI could perform a forensic autopsy on a dead project and bring it back to life?

## What it does

Builddy is an AI-powered app builder with a 5-stage agent
pipeline
:

  1. PARSE — Understands what you want (text prompt or
    screenshot)
  2. PLAN — Designs architecture using GLM's thinking mode +
    optional web search
  3. CODE — Generates complete, dependency-free applications
  4. REVIEW — Self-reviews and fixes bugs before you ever see
    them
  5. DEPLOY — Ships a live app instantly

Users watch every step unfold in real time, including GLM's
reasoning traces. They can iterate with natural language
modifications ("add dark mode"), browse a community gallery, and
remix other people's apps.

Bonus: Code Autopsy — paste a dead GitHub repo URL and our forensic agent diagnoses why it failed, then generates a revival plan.

## How we built it

The backend is a FastAPI service orchestrating GLM 5.1 API
calls through an async pipeline. Each build progresses through status stages tracked in SQLite via SQLModel. The pipeline
leverages different GLM capabilities per step:

  • Thinking mode during PLAN, CODE, and REVIEW for long-horizon reasoning
  • GLM-5V-Turbo for screenshot-to-app (vision input)
  • Web search during planning for real-time technology research
  • CogView-4 for generating app thumbnails for the gallery

The frontend is Next.js 14 (App Router) with Tailwind CSS, polling the backend every 3 seconds during builds to show
real-time pipeline progress with step badges.

For fullstack apps, we built a process manager that spawns
Express.js servers on dynamic ports with concurrency limits, idle timeouts, and auto npm install — giving users a live backend
preview, not just static HTML.

Cloud deployment integrates with GitHub + Railway/Render for
one-click production hosting.

## Challenges we ran into

  • Prompt engineering at scale — Getting GLM to produce
    complete, working single-file apps (not snippets) required
    extensive prompt iteration. We had to be extremely specific about "no CDN dependencies, no external imports, everything inline."

  • Self-review reliability — The REVIEW step sometimes
    hallucinated fixes for non-existent bugs. We tuned the review prompt to focus on specific categories: runtime errors, missing
    event listeners, CSS overflow issues.

  • Fullstack process management — Spawning Express servers
    on-demand with proper cleanup, port management, and idle timeouts was tricky. Race conditions around port allocation and zombie
    processes required careful engineering.

  • Thinking mode fallbacks — GLM's thinking mode occasionally
    fails on certain prompts. We implemented automatic fallback to non-thinking mode to ensure builds always complete.

## What we learned

  • Multi-step agent pipelines >> single-shot generation.
    Breaking the task into PARSE → PLAN → CODE → REVIEW → DEPLOY with thinking mode at each step produces dramatically better results
    than a single "generate an app" prompt.

  • Self-review is a game-changer. Having GLM review its own
    code catches ~40% of bugs before the user ever sees the output. The key insight: the review step needs a different system prompt persona than the coding step.

  • GLM's thinking mode is incredibly powerful for architecture. The planning step with thinking enabled produces structured, well-reasoned app designs that lead to much better generated code downstream.

## What's next for Builddy

  • Collaborative building — multiple users iterating on the
    same app in real time
  • Plugin ecosystem — connect to databases, APIs, and auth
    providers during generation
  • Mobile app generation — React Native output from the same
    pipeline
  • Fine-tuned models — train on successful builds to improve first-attempt success rate

Built With

Share this project:

Updates