Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Enforce LF line endings for all text files
* text=auto eol=lf

# Explicitly mark as text
*.ts text eol=lf
*.tsx text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.json text eol=lf
*.md text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.html text eol=lf
*.svg text eol=lf
*.yml text eol=lf
*.yaml text eol=lf

# Binary files
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.woff binary
*.woff2 binary
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ body:
value: |
Thank you for reporting an issue :pray:.

This issue tracker is for bugs and issues found with [Bolt.new](https://bolt.new).
If you experience issues related to WebContainer, please file an issue in our [WebContainer repo](https://github.com/stackblitz/webcontainer-core), or file an issue in our [StackBlitz core repo](https://github.com/stackblitz/core) for issues with StackBlitz.
This issue tracker is for bugs and issues found with X Builder.
For issues related to the upstream Bolt.new codebase, see [stackblitz/bolt.new](https://github.com/stackblitz/bolt.new).

The more information you fill in, the better we can help you.
- type: textarea
Expand All @@ -20,7 +20,7 @@ body:
- type: input
id: link
attributes:
label: Link to the Bolt URL that caused the error
label: Link to the X Builder URL that caused the error
description: Please do not delete it after reporting!
validations:
required: true
Expand Down
12 changes: 3 additions & 9 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Bolt.new Help Center
url: https://support.bolt.new
about: Official central repository for tips, tricks, tutorials, known issues, and best practices for bolt.new usage.
- name: Billing Issues
url: https://support.bolt.new/Billing-13fd971055d680ebb393cb80973710b6
about: Instructions for billing and subscription related support
- name: Discord Chat
url: https://discord.gg/stackblitz
about: Build, share, and learn with other Bolters in real time.
- name: Upstream Project (Bolt.new)
url: https://github.com/stackblitz/bolt.new
about: Original Bolt.new project by StackBlitz
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
ci:
name: Lint, Typecheck & Test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.4.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.15.1'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm run lint

- name: Typecheck
run: pnpm run typecheck

- name: Test
run: pnpm test
45 changes: 45 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Staging

on:
push:
branches: [main]
workflow_dispatch:

jobs:
deploy:
name: Deploy to Cloudflare Pages
runs-on: ubuntu-latest
# Only deploy after CI passes
needs: []
Comment on lines +12 to +13
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states "Only deploy after CI passes" but the needs array is empty. If there's a CI job that should run before deployment, it should be referenced here (e.g., needs: [ci]). Otherwise, deployments will run without waiting for CI validation.

Suggested change
# Only deploy after CI passes
needs: []

Copilot uses AI. Check for mistakes.

permissions:
contents: read
deployments: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.4.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.15.1'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm run build

- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./build/client --project-name=x-builder-staging
125 changes: 95 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,119 @@
[![Bolt.new: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.jpg)](https://bolt.new)
# X Builder

# Bolt.new: AI-Powered Full-Stack Web Development in the Browser
[![CI](https://github.com/yosiwizman/x-builder/actions/workflows/ci.yml/badge.svg)](https://github.com/yosiwizman/x-builder/actions/workflows/ci.yml)

Bolt.new is an AI-powered web development agent that allows you to prompt, run, edit, and deploy full-stack applications directly from your browser—no local setup required. If you're here to build your own AI-powered web dev agent using the Bolt open source codebase, [click here to get started!](./CONTRIBUTING.md)
AI-powered full-stack web development in the browser.

## What Makes Bolt.new Different
> **Based on [Bolt.new](https://github.com/stackblitz/bolt.new)** - the open-source AI web development agent by StackBlitz.

Claude, v0, etc are incredible- but you can't install packages, run backends or edit code. That’s where Bolt.new stands out:
## Production

- **Full-Stack in the Browser**: Bolt.new integrates cutting-edge AI models with an in-browser development environment powered by **StackBlitz’s WebContainers**. This allows you to:
- Install and run npm tools and libraries (like Vite, Next.js, and more)
🚀 **Live URL**: https://x-builder-staging.pages.dev

**Status**: Production (Cloudflare Pages)

> **Note**: Custom domain can be added later without downtime.

## About

X Builder is a white-label fork of Bolt.new that allows you to prompt, run, edit, and deploy full-stack applications directly from your browser.

### Features

- **Full-Stack in the Browser**: Integrates AI models with an in-browser development environment powered by **StackBlitz's WebContainers**
- Install and run npm tools and libraries (Vite, Next.js, etc.)
- Run Node.js servers
- Interact with third-party APIs
- Deploy to production from chat
- Share your work via a URL

- **AI with Environment Control**: Unlike traditional dev environments where the AI can only assist in code generation, Bolt.new gives AI models **complete control** over the entire environment including the filesystem, node server, package manager, terminal, and browser console. This empowers AI agents to handle the entire app lifecycle—from creation to deployment.
- **AI with Environment Control**: AI models have complete control over the filesystem, node server, package manager, terminal, and browser console

Whether you’re an experienced developer, a PM or designer, Bolt.new allows you to build production-grade full-stack applications with ease.
## Tips and Tricks

For developers interested in building their own AI-powered development tools with WebContainers, check out the open-source Bolt codebase in this repo!
- **Be specific about your stack**: Mention frameworks/libraries in your initial prompt
- **Use the enhance prompt icon**: Refine your prompt with AI assistance before submitting
- **Scaffold basics first**: Establish the foundation before adding advanced features
- **Batch simple instructions**: Combine multiple simple tasks in one message

## Tips and Tricks
## Technical Notes

### MVP Publish (Cloudflare Pages)

X Builder includes an MVP publish feature that deploys projects directly to Cloudflare Pages.

**Components**:
- `app/lib/stores/publish.ts` - State management for publish status
- `app/routes/api.publish.ts` - API endpoint for Cloudflare Pages deployment
- `app/components/workbench/PublishButton.client.tsx` - UI button component

**Environment Variables** (for publish to work at runtime):
- `CLOUDFLARE_API_TOKEN` - API token with Pages permissions
- `CLOUDFLARE_ACCOUNT_ID` - Your Cloudflare account ID

> **TODO**: The Cloudflare Pages Direct Upload API implementation may need adjustment
> based on actual API requirements for production use.

### Cross-Origin Isolation

X Builder requires `crossOriginIsolated` to be enabled for WebContainers (SharedArrayBuffer). This is achieved via HTTP headers:

- `Cross-Origin-Opener-Policy: same-origin`
- `Cross-Origin-Embedder-Policy: credentialless`

These headers are set in:
- `public/_headers` - Cloudflare Pages static headers
- `app/entry.server.tsx` - Server-side rendering
- `functions/[[path]].ts` - Cloudflare Pages Functions
- `vite.config.ts` - Development server

To verify: Open DevTools console and check `self.crossOriginIsolated === true`

## Development

### Prerequisites

- Node.js 20.15.1+
- pnpm 9.4.0+

Here are some tips to get the most out of Bolt.new:
### Setup

- **Be specific about your stack**: If you want to use specific frameworks or libraries (like Astro, Tailwind, ShadCN, or any other popular JavaScript framework), mention them in your initial prompt to ensure Bolt scaffolds the project accordingly.
```bash
pnpm install
pnpm run dev
```

- **Use the enhance prompt icon**: Before sending your prompt, try clicking the 'enhance' icon to have the AI model help you refine your prompt, then edit the results before submitting.
### Scripts

- **Scaffold the basics first, then add features**: Make sure the basic structure of your application is in place before diving into more advanced functionality. This helps Bolt understand the foundation of your project and ensure everything is wired up right before building out more advanced functionality.
- `pnpm run dev` - Start development server
- `pnpm run build` - Build for production
- `pnpm run lint` - Run ESLint
- `pnpm run typecheck` - Run TypeScript checks
- `pnpm test` - Run tests

- **Batch simple instructions**: Save time by combining simple instructions into one message. For example, you can ask Bolt to change the color scheme, add mobile responsiveness, and restart the dev server, all in one go saving you time and reducing API credit consumption significantly.
### Deployment

## FAQs
Production deploys automatically from `main` branch via GitHub Actions to Cloudflare Pages.

**Where do I sign up for a paid plan?**
Bolt.new is free to get started. If you need more AI tokens or want private projects, you can purchase a paid subscription in your [Bolt.new](https://bolt.new) settings, in the lower-left hand corner of the application.
Required GitHub Secrets:
- `CLOUDFLARE_API_TOKEN` - Cloudflare API token with Pages edit permissions
- `CLOUDFLARE_ACCOUNT_ID` - Your Cloudflare account ID

**What happens if I hit the free usage limit?**
Once your free daily token limit is reached, AI interactions are paused until the next day or until you upgrade your plan.
### Release Process

**Is Bolt in beta?**
Yes, Bolt.new is in beta, and we are actively improving it based on feedback.
```
1. Create a Pull Request with your changes
2. CI runs automatically (lint, typecheck, tests)
3. CI must pass before merge is allowed
4. Merge PR to main
5. Auto-deploy to production (Cloudflare Pages)
```

**How can I report Bolt.new issues?**
Check out the [Issues section](https://github.com/stackblitz/bolt.new/issues) to report an issue or request a new feature. Please use the search feature to check if someone else has already submitted the same issue/request.
**Safeguards**:
- Branch protection requires PR reviews
- All CI checks must pass
- Direct pushes to `main` are blocked
- Linear history enforced

**What frameworks/libraries currently work on Bolt?**
Bolt.new supports most popular JavaScript frameworks and libraries. If it runs on StackBlitz, it will run on Bolt.new as well.
## Attribution

**How can I add make sure my framework/project works well in bolt?**
We are excited to work with the JavaScript ecosystem to improve functionality in Bolt. Reach out to us via [hello@stackblitz.com](mailto:hello@stackblitz.com) to discuss how we can partner!
This project is based on [Bolt.new](https://github.com/stackblitz/bolt.new) by [StackBlitz](https://stackblitz.com/), licensed under MIT.
2 changes: 1 addition & 1 deletion app/components/chat/BaseChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
minHeight: TEXTAREA_MIN_HEIGHT,
maxHeight: TEXTAREA_MAX_HEIGHT,
}}
placeholder="How can Bolt help you today?"
placeholder="How can X Builder help you today?"
translate="no"
/>
<ClientOnly>
Expand Down
2 changes: 1 addition & 1 deletion app/components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function Header() {
<div className="flex items-center gap-2 z-logo text-bolt-elements-textPrimary cursor-pointer">
<div className="i-ph:sidebar-simple-duotone text-xl" />
<a href="/" className="text-2xl font-semibold text-accent flex items-center">
<span className="i-bolt:logo-text?mask w-[46px] inline-block" />
X Builder
</a>
</div>
<span className="flex-1 px-4 truncate text-center text-bolt-elements-textPrimary">
Expand Down
1 change: 0 additions & 1 deletion app/components/sidebar/Menu.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { motion, type Variants } from 'framer-motion';
import { useCallback, useEffect, useRef, useState } from 'react';
import { toast } from 'react-toastify';
import { Dialog, DialogButton, DialogDescription, DialogRoot, DialogTitle } from '~/components/ui/Dialog';
import { IconButton } from '~/components/ui/IconButton';
import { ThemeSwitch } from '~/components/ui/ThemeSwitch';
import { db, deleteById, getAll, chatId, type ChatHistoryItem } from '~/lib/persistence';
import { cubicEasingFn } from '~/utils/easings';
Expand Down
Loading
Loading