Pixie is a SaaS-style, chat-driven website builder: describe what you want to build, and Pixie generates a working Next.js app in a live sandbox—complete with a shareable preview URL and browsable source code.
Under the hood, Pixie orchestrates an AI “code agent” that runs inside an isolated E2B sandbox, writes/updates files, executes safe terminal commands, and streams real-time progress back to the UI.
Pixie turns natural language into runnable web apps.
You can:
- Start a new project with a single prompt.
- Continue iterating via chat (follow-ups update the existing generated project).
- Preview the app instantly in an embedded iframe (or open the sandbox URL in a new tab).
- Explore generated source files directly in the app.
- Make “visual edits” by clicking an element in the preview, then telling Pixie how to modify it.
Pixie is built around projects and generation fragments:
- A Project is your persistent workspace.
- Each assistant response can include a Fragment: a sandbox URL + a snapshot of generated files.
- Create a project from the homepage prompt.
- Pixie consumes usage credits and triggers a background generation job.
- The UI shows a live “what’s happening” timeline (reading files, creating/updating files, running commands, fetching images, etc.).
- When complete, Pixie will inform you via a live link
- You can:
- Switch between Demo (preview) and Code (file explorer)
- Send follow-up instructions to iterate
Pixie is built for fast, repeatable “idea → live app” loops:
- Chat to build: start from a prompt, then iterate with follow-ups.
- Spec-first UX (USP): enhance prompts or generate a structured blueprint before you build.
- See it instantly: live sandbox preview + generated code side-by-side.
- Edit precisely: click an element in the preview and tell Pixie what to change.
- Know what’s happening: real-time generation timeline.
- Saved projects per user.
- One workspace with Chat + Demo + Code.
Before generating, users can improve their prompt into a clearer spec with different enhancement styles:
- Balanced
- Developer
- Product Manager
- Designer
This runs as a separate AI call (distinct from the code-generation agent).
For users who want more guidance than free-form prompting, Pixie offers a Blueprint builder:
- Choose a taste profile (vibe/design-system guidance)
- Optionally choose a layout archetype
- Add custom instructions
Pixie packages this blueprint as structured JSON, which the code agent can use to produce more consistent UI.
- Start from a prompt, then refine with follow-up messages.
- Follow-ups build on the last generated files (no “start over” resets).
- Toggle Visual edits in the preview and click an element.
- Pixie captures selector + context and prepends it to your next instruction.
- Great for targeted tweaks like typography, copy, spacing, and component changes.
- Generated apps run in an isolated E2B sandbox.
- Preview in-app via iframe, with refresh / copy URL / open new tab.
- File tree + code viewer for generated output.
- Copy any file’s contents to clipboard.
- Live timeline: sandbox init, context restore, reads/writes, terminal runs, summary.
- Delivered to the client via Inngest Realtime subscriptions.
The homepage includes quick-start project templates (prewritten prompt snippets) so users can get started immediately.
Pixie enforces usage limits with a credit system:
- Free tier: 5 credits per 30 days
- Pro tier: 100 credits per 30 days
- Each generation consumes 1 credit (project creation and each follow-up message)
Plans are evaluated via Clerk, and the UI shows remaining credits + reset timing.
When a user is out of credits, Pixie directs them to the Pricing page.
- Next.js App Router UI: homepage, auth pages, pricing, project workspace.
- tRPC API layer: typed procedures for projects, messages, AI tools, and usage status.
- Postgres + Prisma: persists projects, chat messages, generation fragments, and rate-limit usage records.
- Inngest: background job orchestration for code generation.
- Inngest Realtime: streams generation events to the client.
- E2B Sandbox: executes generated Next.js apps in isolated environments.
Project: user-owned container for messages.Message: chat history (USER/ASSISTANT) and status (RESULT/ERROR).Fragment: saved generation output (sandbox URL, title, files JSON snapshot).Usage: backing store for rate-limiting credits.
- User triggers
projects.create(new project) ormessages.create(follow-up). - Server consumes credits (
consumeCredits). - Server sends an Inngest event:
code-agent/run. - Inngest function:
- Creates an E2B sandbox (template:
pixie) - Loads the last known file snapshot (if follow-up) back into the sandbox
- Runs an AI agent loop that can:
- Read targeted files
- Create/update files
- Run terminal commands
- Optionally fetch images (Unsplash tool)
- Injects a small element-picker script for Visual Edit mode
- Generates a summary + fragment title
- Saves an assistant message + fragment (URL + files) to Postgres
- Publishes real-time progress events throughout
- Creates an E2B sandbox (template:
- Next.js 15 (App Router) + React 19
- TypeScript
- Tailwind CSS
- shadcn/ui + Radix UI primitives
- TanStack React Query
- tRPC v11
- Clerk for authentication and pricing
- Plan gating via Clerk
- Prisma ORM
- PostgreSQL
- Inngest (background jobs)
- Inngest Realtime (client subscriptions)
- E2B Code Interpreter sandboxes
- OpenAI SDK for AI workflow
- Unsplash API integration for asset fetching inside the sandbox
src/app— App Router routes (home, auth, pricing, projects, API routes)src/modules/*— Feature moduleshome— project creation UI + templates + prompt toolsprojects— project workspace UImessages— chat persistence + generation triggersusage— credit system + rate limitingai— prompt enhancement
src/ingest/*— Inngest + AgentKit code generation pipelineprisma/— schema + migrationspublic/— product assets (logos, hero image)sandbox-templates/— E2B template config (Next.js + shadcn bootstrap)
- Node.js (recommended: 20+)
- Postgres database
- Clerk application (keys)
- Inngest CLI (the repo uses
npx inngest-cli@latest dev) - OpenAI API key
- (Optional) Unsplash Access Key
pnpm installCreate a .env file in the project root.
Copy the contents from .env.example file to .env file
pnpm run db:migrate
pnpm run db:studiopnpm run devIn a second terminal:
pnpm run inngestThis enables the generation pipeline to execute and stream real-time progress.
pnpm run dev # Next.js dev (Turbopack)
pnpm run build # Production build
pnpm run start # Start production server
pnpm run lint # ESLint
pnpm run db:migrate # Prisma migrate dev
pnpm run db:studio # Prisma Studio
pnpm run inngest # Inngest dev serverIf you get redirected to /pricing, you likely hit the credit limit.
Confirm the user has the pro_user plan in Clerk, or wait for credits to reset.
If server-side calls fail, confirm NEXT_PUBLIC_APP_URL is set correctly (e.g. http://localhost:3000).
- Ensure
pnpm run inngestis running. - Ensure
OPENAI_API_KEYis set. - Ensure your Postgres DB is reachable and migrated.
