Skip to content

Commit

Permalink
Merge branch 'main' into docs/updated-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinwloring1988 authored Dec 20, 2024
2 parents ed5bad3 + 56edbc4 commit 6145c60
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 73 deletions.
229 changes: 157 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,119 +87,204 @@ bolt.diy was originally started by [Cole Medin](https://www.youtube.com/@ColeMed

If you're new to installing software from GitHub, don't worry! If you encounter any issues, feel free to submit an "issue" using the provided links or improve this documentation by forking the repository, editing the instructions, and submitting a pull request. The following instruction will help you get the stable branch up and running on your local machine in no time.

### Prerequisites
Let's get you up and running with the stable version of Bolt.DIY!

1. **Install Git**: [Download Git](https://git-scm.com/downloads)
2. **Install Node.js**: [Download Node.js](https://nodejs.org/en/download/)
## Quick Download

- After installation, the Node.js path is usually added to your system automatically. To verify:
- **Windows**: Search for "Edit the system environment variables," click "Environment Variables," and check if `Node.js` is in the `Path` variable.
- **Mac/Linux**: Open a terminal and run:
```bash
echo $PATH
```
Look for `/usr/local/bin` in the output.
[![Download Latest Release](https://img.shields.io/github/v/release/stackblitz-labs/bolt.diy?label=Download%20Bolt&sort=semver)](https://github.com/stackblitz-labs/bolt.diy/releases/latest/download/bolt.diy.zip) ← Click here to download the latest version!

### Clone the Repository

Alternatively, you can download the latest version of the project directly from the [Releases Page](https://github.com/stackblitz-labs/bolt.diy/releases/latest). Simply download the .zip file, extract it, and proceed with the setup instructions below. If you are comfertiable using git then run the command below.
## Prerequisites

Clone the repository using Git:
Before you begin, you'll need to install two important pieces of software:

```bash
git clone -b stable https://github.com/stackblitz-labs/bolt.diy
```
### Install Node.js

---
Node.js is required to run the application.

1. Visit the [Node.js Download Page](https://nodejs.org/en/download/)
2. Download the "LTS" (Long Term Support) version for your operating system
3. Run the installer, accepting the default settings
4. Verify Node.js is properly installed:
- **For Windows Users**:
1. Press `Windows + R`
2. Type "sysdm.cpl" and press Enter
3. Go to "Advanced" tab → "Environment Variables"
4. Check if `Node.js` appears in the "Path" variable
- **For Mac/Linux Users**:
1. Open Terminal
2. Type this command:
```bash
echo $PATH
```
3. Look for `/usr/local/bin` in the output

## Run the Application
## Running the Application

### Option 1: Without Docker
You have two options for running Bolt.DIY: directly on your machine or using Docker.

1. **Install Dependencies**:
```bash
pnpm install
```
If `pnpm` is not installed, install it using:
```bash
sudo npm install -g pnpm
```
### Option 1: Direct Installation (Recommended for Beginners)

2. **Start the Application**:
```bash
pnpm run dev
1. **Install Package Manager (pnpm)**:
```bash
npm install -g pnpm
```
This will start the Remix Vite development server. You will need Google Chrome Canary to run this locally if you use Chrome! It's an easy install and a good browser for web development anyway.

### Option 2: With Docker
2. **Install Project Dependencies**:
```bash
pnpm install
```

#### Prerequisites
- Ensure Git, Node.js, and Docker are installed: [Download Docker](https://www.docker.com/)
3. **Start the Application**:
```bash
pnpm run dev
```

#### Steps
**Important Note**: If you're using Google Chrome, you'll need Chrome Canary for local development. [Download it here](https://www.google.com/chrome/canary/)

1. **Build the Docker Image**:
### Option 2: Using Docker

Use the provided NPM scripts:
```bash
npm run dockerbuild
```
This option requires some familiarity with Docker but provides a more isolated environment.

Alternatively, use Docker commands directly:
```bash
#### Additional Prerequisite
- Install Docker: [Download Docker](https://www.docker.com/)

#### Steps:

1. **Build the Docker Image**:
```bash
# Using npm script:
npm run dockerbuild
# OR using direct Docker command:
docker build . --target bolt-ai-development
```
```

2. **Run the Container**:
Use Docker Compose profiles to manage environments:
```bash
docker-compose --profile development up
```
2. **Run the Container**:
```bash
docker-compose --profile development up
```

- With the development profile, changes to your code will automatically reflect in the running container (hot reloading).

---

### Entering API Keys

All of your API Keys can be configured directly in the application. Just selecte the provider you want from the dropdown and click the pencile icon to enter your API key.
## Configuring API Keys and Providers

---
### Adding Your API Keys

Setting up your API keys in Bolt.DIY is straightforward:

1. Open the home page (main interface)
2. Select your desired provider from the dropdown menu
3. Click the pencil (edit) icon
4. Enter your API key in the secure input field

![API Key Configuration Interface](./docs/images/api-key-ui-section.png)

### Configuring Custom Base URLs

For providers that support custom base URLs (such as Ollama or LM Studio), follow these steps:

### Update Your Local Version to the Latest
1. Click the settings icon in the sidebar to open the settings menu
![Settings Button Location](./docs/images/bolt-settings-button.png)

To keep your local version of bolt.diy up to date with the latest changes, follow these steps for your operating system:
2. Navigate to the "Providers" tab
3. Search for your provider using the search bar
4. Enter your custom base URL in the designated field
![Provider Base URL Configuration](./docs/images/provider-base-url.png)

#### 1. **Navigate to your project folder**
Navigate to the directory where you cloned the repository and open a terminal:
> **Note**: Custom base URLs are particularly useful when running local instances of AI models or using custom API endpoints.

#### 2. **Fetch the Latest Changes**
Use Git to pull the latest changes from the main repository:
### Supported Providers
- Ollama
- LM Studio
- OpenAILike

## Setup Using Git (For Developers only)

This method is recommended for developers who want to:
- Contribute to the project
- Stay updated with the latest changes
- Switch between different versions
- Create custom modifications

#### Prerequisites
1. Install Git: [Download Git](https://git-scm.com/downloads)

#### Initial Setup

1. **Clone the Repository**:
```bash
git pull origin main
# Using HTTPS
git clone https://github.com/stackblitz-labs/bolt.diy.git
```

2. **Navigate to Project Directory**:
```bash
cd bolt.diy
```

#### 3. **Update Dependencies**
After pulling the latest changes, update the project dependencies by running the following command:
3. **Switch to the Main Branch**:
```bash
git checkout main
```
4. **Install Dependencies**:
```bash
pnpm install
```

5. **Start the Development Server**:
```bash
pnpm run dev
```

#### Staying Updated

To get the latest changes from the repository:

1. **Save Your Local Changes** (if any):
```bash
git stash
```

2. **Pull Latest Updates**:
```bash
git pull origin main
```

3. **Update Dependencies**:
```bash
pnpm install
```

#### 4. **Rebuild and Start the Application**
4. **Restore Your Local Changes** (if any):
```bash
git stash pop
```

#### Troubleshooting Git Setup

If you encounter issues:

- **If using Docker**, ensure you rebuild the Docker image to avoid using a cached version:
```bash
docker-compose --profile development up --build
```
1. **Clean Installation**:
```bash
# Remove node modules and lock files
rm -rf node_modules pnpm-lock.yaml
# Clear pnpm cache
pnpm store prune
- **If not using Docker**, you can start the application as usual with:
```bash
pnpm run dev
```
# Reinstall dependencies
pnpm install
```

2. **Reset Local Changes**:
```bash
# Discard all local changes
git reset --hard origin/main
```

This ensures that you're running the latest version of bolt.diy and can take advantage of all the newest features and bug fixes.
Remember to always commit your local changes or stash them before pulling updates to avoid conflicts.

---

Expand Down
2 changes: 1 addition & 1 deletion app/commit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "commit": "636f87f568a368dadc5cf3c077284710951e2488", "version": "0.0.3" }
{ "commit": "ab5cde30a126f6540f0afb4d6d6e6be6a764ddca", "version": "0.0.3" }
Binary file added docs/images/api-key-ui-section.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/bolt-settings-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/provider-base-url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6145c60

Please sign in to comment.