Inspiration
Every community I've been in — book clubs, festival committees, gaming servers — needs small software: a shift table, an RSVP page, a vote. Nobody builds these tools, because the people who feel the pain can't code, and the coders never have time. I wanted the place where the community already talks to be the place where its software gets made.
What it does
DiscordBuilder turns a Discord server into a development studio:
- A member types
/build <what they want>in plain language (any language — our first community app was requested in Japanese). - OpenAI Codex (GPT-5.6 Sol) implements a full-stack app (Next.js + SQLite) inside a per-project Docker sandbox, while the thread streams its progress live — every command, every file change, in Codex's own words.
- The result lands back in the thread: screenshots, a plain-language summary of changes, and a public URL that works on members' phones.
- Any reply in the thread becomes an edit request. Codex modifies the same app while preserving all data the community has entered.
- Nothing ships without consent: the bot opens a 👍 vote after each build, and enough votes trigger a release announcement to the whole server.
The conversation log doubles as the spec, the development history, and the changelog.
Try it
DiscordBuilder is a real Discord integration, not a standalone web app.
The fastest way to experience the complete workflow is to join the dedicated demo Discord server and run:
/build request: Build an RSVP page for our next community meetup.
DiscordBuilder creates a thread, streams Codex's progress, and returns screenshots and a working preview URL. Reply in the same thread to request an edit, or react 👍 to approve the latest build.
Demo server: Join DiscordBuilder on Discord
The hosted bot is intentionally limited to the demo server because every build runs Codex and a dedicated Docker sandbox. The public repository also includes instructions for running the complete Discord integration with your own Discord bot and either a ChatGPT subscription or an OpenAI API key.
For a faster technical evaluation without configuring Discord, judges can run the same Codex sandbox and quality pipeline through the repository's CLI.
How Codex and GPT-5.6 were used
Codex running GPT-5.6 (codex exec --json, non-interactive) is the runtime engine of the product — every generated app is 100% Codex's work. The integration goes well beyond an API call:
- Bounded authority: Codex works inside a Docker sandbox and may only edit application code. Auth, DB wiring, and deploy config are human-owned template files, enforced through
AGENTS.md— the contract Codex reads at runtime. - A design system as a hard requirement:
DESIGN.mdpins a monochrome, documentation-first visual system (tokens pre-wired into Tailwind), so every community app ships with a coherent product look instead of default-AI styling. - A self-check quality loop: before finishing, Codex must run typecheck, a production build, DB migrations, and Playwright screenshots — desktop and 390px mobile — and look at what it built. A cramped phone layout is a build failure.
- Structured, untrusted output: Codex ends every build by writing a
BUILD_RESULT.jsoncontract (status, summary, changes, screenshots, data-reset flag), which the orchestrator validates field-by-field. Screenshot uploads go through O_NOFOLLOW file descriptors with same-inode checks, so even a compromised build can't leak host files into Discord. - Event-stream UX: the
--jsonstream drives the live progress message — GPT-5.6's reasoning becomes the loading screen, and the full stream is archived as the project's development record.
Codex also accelerated development of DiscordBuilder itself: the event-stream format, sandbox flags, and quality-loop behavior were all discovered by running real Codex sessions and iterating on the AGENTS.md contract until generated apps passed their own checks.
Challenges
- Trusting an agent with a community's data: edit builds must never destroy what members entered. The AGENTS.md contract forbids destructive migrations, and a surfaced
dataResetflag warns the community when a reset is truly unavoidable. - Making waiting feel alive: builds take minutes. Parsing the Codex event stream into one continuously-edited Discord message turned dead time into the product's most-watched moment.
- Adversarial robustness: every PR to main is reviewed in CI by two split-context AI reviewers who only see the diff and must prove each finding with a concrete failure scenario — 30+ confirmed findings (races, resource leaks, a symlink exfiltration vector) were caught and fixed this way.
What's next
A Discord-OAuth gate so only server members can open their apps, stable per-community subdomains, and faster edit turnarounds.
Late in the project, Codex sessions also landed PRs directly on this repository — including the secure API-key authentication mode (keys passed over stdin per-exec, never stored) that judges can use to test the pipeline without a ChatGPT subscription.
Built With
- cloudflare-tunnel
- codex
- discord.js
- docker
- drizzle-orm
- gpt-5.6
- next.js
- node.js
- playwright
- react
- sqlite
- tailwindcss
- typescript
- vitest
Log in or sign up for Devpost to join the conversation.