-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Fix/publish api manifest #11142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Fix/publish api manifest #11142
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4a2ecf2
chore: rebrand to X Builder
bc388eb
ci: add GitHub Actions workflow for lint, typecheck, and tests
1ada9e3
fix: remove unused IconButton import
9e17b79
ci: add staging deployment workflow and update README (#1)
yosiwizman 4e54ce3
docs: update README with production status and release process (#2)
yosiwizman aa97d74
fix: enable crossOriginIsolated for WebContainers (COOP/COEP) (#3)
yosiwizman 98818e9
feat: MVP publish project to Cloudflare Pages (#4)
yosiwizman 262f7fa
fix: correct Cloudflare Pages Direct Upload manifest format
1af7839
fix: correct Cloudflare Pages Direct Upload manifest format (#5)
yosiwizman f70d676
chore: add smoke:publish script
53f6773
Merge branch 'main' into fix/publish-api-manifest
yosiwizman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: [] | ||
|
|
||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,54 +1,119 @@ | ||
| [](https://bolt.new) | ||
| # X Builder | ||
|
|
||
| # Bolt.new: AI-Powered Full-Stack Web Development in the Browser | ||
| [](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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.