Skip to content
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

fix: remove logout button #130

Merged
merged 44 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2806a65
Create bug_report.yml
apai4 Oct 3, 2024
4cf007b
fix: update README.md (#3)
samdenty Oct 3, 2024
dfebd40
Update README.md
kc0tlh Oct 3, 2024
3181d50
Update README.md
kc0tlh Oct 3, 2024
72df4b8
Update README.md
kc0tlh Oct 3, 2024
36f219f
Update README.md
kc0tlh Oct 3, 2024
84c5da8
Update README.md
kc0tlh Oct 3, 2024
dbef8c1
Create MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
efac3a7
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
bf65a7e
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
85d2b6f
feat: add readme image (#4)
samdenty Oct 3, 2024
5580ab9
fix: typo
samdenty Oct 3, 2024
14da2f0
fix: remove duplicated bug_report template
samdenty Oct 3, 2024
9a1ab23
fix: update links
samdenty Oct 3, 2024
8840d00
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
fc82dda
Rename README.md to CONTRIBUTING.md
kc0tlh Oct 3, 2024
292e923
Rename MAIN-FOLDER-README.md to README.md
kc0tlh Oct 3, 2024
c85fd80
Update README.md
kc0tlh Oct 3, 2024
506ed1d
Update CONTRIBUTING.md
kc0tlh Oct 3, 2024
aa6148f
Update CONTRIBUTING.md
kc0tlh Oct 3, 2024
537389e
Update README.md
kc0tlh Oct 3, 2024
6694e14
Update README.md (#7)
buntured Oct 3, 2024
f6d79c5
fix: add screen recordings section to bug_report.yml
samdenty Oct 3, 2024
6a9cb78
fix(browser-extensions): don't render directly in body
samdenty Oct 4, 2024
06cc7e6
fix: remove logout button
yoelcabo Oct 7, 2024
3e4ba87
Create MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
0ec2c5e
feat: add readme image (#4)
samdenty Oct 3, 2024
ddf568f
fix: typo
samdenty Oct 3, 2024
aea23d3
fix: remove duplicated bug_report template
samdenty Oct 3, 2024
146b57b
fix: update links
samdenty Oct 3, 2024
2463498
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
51928f6
Rename README.md to CONTRIBUTING.md
kc0tlh Oct 3, 2024
8dddc64
Rename MAIN-FOLDER-README.md to README.md
kc0tlh Oct 3, 2024
7908388
chore: update readme
kc0tlh Oct 3, 2024
34b3abb
chore: update contributing guide
kc0tlh Oct 3, 2024
4fcb108
chore: update contributing guide
kc0tlh Oct 3, 2024
a76dc50
chore: update readme
kc0tlh Oct 3, 2024
ec0d1f1
chore: update readme (#7)
buntured Oct 3, 2024
d656686
fix: add screen recordings section to bug_report.yml
samdenty Oct 3, 2024
3a0336e
fix(browser-extensions): don't render directly in body
samdenty Oct 4, 2024
f23e894
Merge branch 'main' into fix/remove-logout
d3lm Oct 7, 2024
f66de27
ci: remove deployment workflow
d3lm Oct 7, 2024
caf98fc
Merge branch 'main' into fix/remove-logout
d3lm Oct 7, 2024
38f34fd
Merge branch 'main' into fix/remove-logout
d3lm Oct 7, 2024
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
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ body:
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
label: Screen Recording / Screenshot
description: If applicable, **please include a screen recording** (preferably) or screenshot showcasing the issue. This will assist us in resolving your issue <u>quickly</u>.
- type: textarea
id: platform
attributes:
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,53 +25,3 @@ jobs:

- name: Run tests
run: pnpm run test

build-and-deploy:
name: Build and Deploy
needs: test
runs-on: ubuntu-latest
environment: ${{ github.ref_name == 'master' && 'production' || 'staging' }}
if: ${{ github.ref != 'refs/heads/master' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup and Build
uses: ./.github/actions/setup-and-build

- name: Deploy to Cloudflare
id: deploy
uses: cloudflare/wrangler-action@v3
with:
wranglerVersion: '* -w'
packageManager: pnpm
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy

- name: Deployment URL
env:
DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }}
run: echo $DEPLOYMENT_URL

- name: Comment on Commit
if: github.event_name == 'push'
uses: hasura/comment-progress@v2.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
id: deploy-preview-commit
commit-sha: ${{ github.sha }}
message: '${{ github.sha }} has been deployed to ${{ steps.deploy.outputs.deployment-url }} :rocket:'
recreate: true

- name: Comment on PR
if: github.event_name == 'pull_request'
uses: hasura/comment-progress@v2.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
id: deploy-preview-pr
number: ${{ github.event.number }}
message: '#${{ github.event.number }} has been deployed to ${{ steps.deploy.outputs.deployment-url }} :rocket:'
recreate: true
110 changes: 110 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
[![Bolt Open Source Codebase](./public/social_preview_index.jpg)](https://bolt.new)

> Welcome to the **Bolt** open-source codebase! This repo cpontains a simple example app using the core components from bolt.new to help you get started building **AI-powered software development tools** powered by StackBlitz’s **WebContainer API**.

### Why Build with Bolt + WebContainer API

By building with the Bolt + WebContainer API you can create browser-based applications that let users **prompt, run, edit, and deploy** full-stack web apps directly in the browser, without the need for virtual machines. With WebContainer API, you can build apps that give AI direct access and full control over a **Node.js server**, **filesystem**, **package manager** and **dev terminal** inside your users browser tab. This powerful combination allows you to create a new class of development tools that support all major javascript libraries and node packages right out of the box, all without remote environments or local installs.

### What’s the Difference Between Bolt (This Repo) and [Bolt.new](https://bolt.new)?

- **Bolt.new**: This is the **commercial product** from StackBlitz—a hosted, browser-based AI development tool that enables users to prompt, run, edit, and deploy full-stack web applications directly in the browser. Built on top of the [Bolt open-source repo](https://github.com/stackblitz/bolt.new) and powered by the StackBlitz **WebContainer API**.

- **Bolt (This Repo)**: This open-source repository provides the core components used to make **Bolt.new**. This repo contains the UI interface for Bolt as well as the server components, built using [Remix Run](https://remix.run/). By leveraging this repo and StackBlitz’s **WebContainer API**, you can create your own AI-powered development tools and full-stack applications that run entirely in the browser.

# Get Started Building with Bolt

Bolt combines the capabilities of AI with sandboxed development environments to create a collaborative experience where code can be developed by the assistant and the programmer together. Bolt combines [WebContainer API](https://webcontainers.io/api) with [Claude Sonnet 3.5](https://www.anthropic.com/news/claude-3-5-sonnet) using [Remix](https://remix.run/) and the [AI SDK](https://sdk.vercel.ai/).

### WebContainer API

Bolt uses [WebContainers](https://webcontainers.io/) to run generated code in the browser. WebContainers provide Bolt with a full-stack sandbox environment using [WebContainer API](https://webcontainers.io/api). WebContainers run full-stack applications directly in the browser without the cost and security concerns of cloud hosted AI agents. WebContainers are interactive and editable, and enables Bolt's AI to run code and understand any changes from the user.

The [WebContainer API](https://webcontainers.io) is free for personal and open source usage. If you're building an application for commercial usage, you can learn more about our [WebContainer API commercial usage pricing here](https://stackblitz.com/pricing#webcontainer-api).

### Remix App

Bolt is built with [Remix](https://remix.run/) and
deployed using [CloudFlare Pages](https://pages.cloudflare.com/) and
[CloudFlare Workers](https://workers.cloudflare.com/).

### AI SDK Integration

Bolt uses the [AI SDK](https://github.com/vercel/ai) to integrate with AI
models. At this time, Bolt supports using Anthropic's Claude Sonnet 3.5.
You can get an API key from the [Anthropic API Console](https://console.anthropic.com/) to use with Bolt.
Take a look at how [Bolt uses the AI SDK](https://github.com/stackblitz/bolt.new/tree/main/app/lib/.server/llm)

## Prerequisites

Before you begin, ensure you have the following installed:

- Node.js (v20.15.1)
- pnpm (v9.4.0)

## Setup

1. Clone the repository (if you haven't already):

```bash
git clone https://github.com/stackblitz/bolt.new.git
```

2. Install dependencies:

```bash
pnpm install
```

3. Create a `.env.local` file in the root directory and add your Anthropic API key:

```
ANTHROPIC_API_KEY=XXX
```

Optionally, you can set the debug level:

```
VITE_LOG_LEVEL=debug
```

**Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.

## Available Scripts

- `pnpm run dev`: Starts the development server.
- `pnpm run build`: Builds the project.
- `pnpm run start`: Runs the built application locally using Wrangler Pages. This script uses `bindings.sh` to set up necessary bindings so you don't have to duplicate environment variables.
- `pnpm run preview`: Builds the project and then starts it locally, useful for testing the production build. Note, HTTP streaming currently doesn't work as expected with `wrangler pages dev`.
- `pnpm test:` Runs the test suite using Vitest.
- `pnpm run typecheck`: Runs TypeScript type checking.
- `pnpm run typegen`: Generates TypeScript types using Wrangler.
- `pnpm run deploy`: Builds the project and deploys it to Cloudflare Pages.

## Development

To start the development server:

```bash
pnpm run dev
```

This will start the Remix Vite development server.

## Testing

Run the test suite with:

```bash
pnpm test
```

## Deployment

To deploy the application to Cloudflare Pages:

```bash
pnpm run deploy
```

Make sure you have the necessary permissions and Wrangler is correctly configured for your Cloudflare account.
132 changes: 33 additions & 99 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,120 +1,54 @@
# Bolt Open Source Codebase
Welcome to the **Bolt** open-source codebase! This repo provides everything you need to start building **AI-powered software development tools** powered by StackBlitz’s **WebContainer API**.
[![Bolt.new: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.jpg)](https://bolt.new)

### Why Build with Bolt + WebContainer API
By building with the Bolt + WebContainer API you can create browser-based applications that let users **prompt, run, edit, and deploy** full-stack web apps directly in the browser, without the need for virtual machines. With WebContainer API, you can build apps that give AI direct access and full control over a **Node.js server**, **filesystem**, **package manager** and **dev terminal** inside your users browser tab. This powerful combination allows you to create a new class of development tools that support all major javascript libraries and node packages right out of the box, all without remote environments or local installs.
# Bolt.new: AI-Powered Full-Stack Web Development in the Browser

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)

### What’s the Difference Between Bolt (This Repo) and [Bolt.new](https://bolt.new)?
## What Makes Bolt.new Different

- **Bolt.new**: This is the **commercial product** from StackBlitz—a hosted, browser-based AI development tool that enables users to prompt, run, edit, and deploy full-stack web applications directly in the browser. Built on top of the [Bolt open-source repo](https://github.com/stackblitz/bolt) and powered by the StackBlitz **WebContainer API**, it offers non-technical users the ability to create production-grade apps using AI.
Claude, v0, etc are incredible- but you can't install packages, run backends or edit code. That’s where Bolt.new stands out:

- **Bolt (This Repo)**: This open-source repository provides the building blocks behind **Bolt.new**. This package contains the UI interface for Bolt as well as the server components, built using [Remix Run](https://remix.run/). By leveraging this repo and StackBlitz’s **WebContainer API**, you can create your own AI-powered development tools and full-stack applications that run entirely in the browser. This code allows you to customize and expand use cases, integrating AI and WebContainers into your own unique applications.
- **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)
- Run Node.js servers
- Interact with 3rd party APIs
- Deploy to production from chat
- Share your work via a URL

# Get Started Building with Bolt
- **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.

Bolt combines the capabilities of AI with sandboxed development environments
to create a collaborative experience where code can be developed by the
assistant and the programmer together. Bolt combines
[WebContainer API](https://webcontainers.io/api) with
[Claude Sonnet 3.5](https://www.anthropic.com/news/claude-3-5-sonnet)
using [Remix](https://remix.run/) and the [AI SDK](https://sdk.vercel.ai/).
Whether you’re an experienced developer, a PM or designer, Bolt.new allows you to build production-grade full-stack applications with ease.

### WebContainer API
For developers interested in building their own AI-powered development tools with WebContainers, check out the open-source Bolt codebase in this repo!

Bolt uses [WebContainers](https://webcontainers.io/) to run generated code in
the browser. WebContainers provide Bolt with a full-stack sandbox environment
using [WebContainer API](https://webcontainers.io/api). WebContainers run full-
stack applications directly in the browser without the cost and security
concerns of cloud hosted AI agents. WebContainers are interactive and editable,
and enables Bolt's AI to run code and understand any changes from the user.
## Tips and Tricks

The [WebContainer API](https://webcontainers.io) is free for personal and open source usage. If you're building an application for commercial usage, you can learn more about our [WebContainer API commercial usage pricing here](https://stackblitz.com/pricing#webcontainer-api).
Here are some tips to get the most out of Bolt.new:

### Remix App
- **Be specific about your stack**: If you want to use specific frameworks or libraries (like Astro, Tailwind, ShadCN, or any other popular Javacsript framework), mention them in your initial prompt to ensure Bolt scaffolds the project accordingly.

Bolt is built with [Remix](https://remix.run/) and
deployed using [CloudFlare Pages](https://pages.cloudflare.com/) and
[CloudFlare Workers](https://workers.cloudflare.com/).
- **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.

### AI SDK Integration
- **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 upu right before building out more advanced functionality.

Bolt uses the [AI SDK](https://github.com/vercel/ai) to integrate with AI
models. At this time, Bolt supports using Anthropic's Claude Sonnet 3.5.
You can get an API key from the [Anthropic API Console](https://console.anthropic.com/) to use with Bolt.
Take a look at how [Bolt uses the AI SDK](https://github.com/stackblitz/bolt-oss/tree/main/app/lib/.server/llm)
- **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.

## FAQs

## Prerequisites
**Where do 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.

Before you begin, ensure you have the following installed:
**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.

- Node.js (v20.15.1)
- pnpm (v9.4.0)
**Is Bolt in beta?**
Yes, Bolt.new is in beta, and we are actively improving it based on feedback.

## Setup
**How can I report Bolt.new issues?**
Check out the [Issues section](https://github.com/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.

1. Clone the repository (if you haven't already):
**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.

```bash
git clone https://github.com/stackblitz/bolt.new.git
```

2. Install dependencies:

```bash
pnpm install
```

3. Create a `.env.local` file in the root directory and add your Anthropic API key:

```
ANTHROPIC_API_KEY=XXX
```

Optionally, you an set the debug level:

```
VITE_LOG_LEVEL=debug
```

**Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.

## Available Scripts

- `pnpm run dev`: Starts the development server.
- `pnpm run build`: Builds the project.
- `pnpm run start`: Runs the built application locally using Wrangler Pages. This script uses `bindings.sh` to set up necessary bindings so you don't have to duplicate environment variables.
- `pnpm run preview`: Builds the project and then starts it locally, useful for testing the production build. Note, HTTP streaming currently doesn't work as expected with `wrangler pages dev`.
- `pnpm test:` Runs the test suite using Vitest.
- `pnpm run typecheck`: Runs TypeScript type checking.
- `pnpm run typegen`: Generates TypeScript types using Wrangler.
- `pnpm run deploy`: Builds the project and deploys it to Cloudflare Pages.

## Development

To start the development server:

```bash
pnpm run dev
```

This will start the Remix Vite development server.

## Testing

Run the test suite with:

```bash
pnpm test
```

## Deployment

To deploy the application to Cloudflare Pages:

```bash
pnpm run deploy
```

Make sure you have the necessary permissions and Wrangler is correctly configured for your Cloudflare account.
**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!
7 changes: 0 additions & 7 deletions app/components/sidebar/Menu.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@ export function Menu() {
</DialogRoot>
</div>
<div className="flex items-center border-t border-bolt-elements-borderColor p-4">
<a href="/logout">
<IconButton className="p-1.5 gap-1.5">
<>
Logout <span className="i-ph:sign-out text-lg" />
</>
</IconButton>
</a>
<ThemeSwitch className="ml-auto" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/entry.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { startTransition } from 'react';
import { hydrateRoot } from 'react-dom/client';

startTransition(() => {
hydrateRoot(document, <RemixBrowser />);
hydrateRoot(document.getElementById('root')!, <RemixBrowser />);
});
Loading