diff --git a/.env.example b/.env.example index 599da072..9b2c166a 100644 --- a/.env.example +++ b/.env.example @@ -1,110 +1,8 @@ -# Rename this file to .env once you have filled in the below environment variables! - -# Get your GROQ API Key here - -# https://console.groq.com/keys -# You only need this environment variable set if you want to use Groq models -GROQ_API_KEY= - -# Get your HuggingFace API Key here - -# https://huggingface.co/settings/tokens -# You only need this environment variable set if you want to use HuggingFace models -HuggingFace_API_KEY= - - -# Get your Open AI API Key by following these instructions - -# https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key -# You only need this environment variable set if you want to use GPT models -OPENAI_API_KEY= - -# Get your Anthropic API Key in your account settings - -# https://console.anthropic.com/settings/keys -# You only need this environment variable set if you want to use Claude models -ANTHROPIC_API_KEY= - -# Get your OpenRouter API Key in your account settings - -# https://openrouter.ai/settings/keys -# You only need this environment variable set if you want to use OpenRouter models -OPEN_ROUTER_API_KEY= - -# Get your Google Generative AI API Key by following these instructions - -# https://console.cloud.google.com/apis/credentials -# You only need this environment variable set if you want to use Google Generative AI models -GOOGLE_GENERATIVE_AI_API_KEY= - -# You only need this environment variable set if you want to use oLLAMA models -# DONT USE http://localhost:11434 due to IPV6 issues -# USE EXAMPLE http://127.0.0.1:11434 -OLLAMA_API_BASE_URL= - -# You only need this environment variable set if you want to use OpenAI Like models -OPENAI_LIKE_API_BASE_URL= - -# You only need this environment variable set if you want to use Together AI models -TOGETHER_API_BASE_URL= - -# You only need this environment variable set if you want to use DeepSeek models through their API -DEEPSEEK_API_KEY= - -# Get your OpenAI Like API Key -OPENAI_LIKE_API_KEY= - -# Get your Together API Key -TOGETHER_API_KEY= - -# You only need this environment variable set if you want to use Hyperbolic models -#Get your Hyperbolics API Key at https://app.hyperbolic.xyz/settings -#baseURL="https://api.hyperbolic.xyz/v1/chat/completions" -HYPERBOLIC_API_KEY= -HYPERBOLIC_API_BASE_URL= - -# Get your Mistral API Key by following these instructions - -# https://console.mistral.ai/api-keys/ -# You only need this environment variable set if you want to use Mistral models -MISTRAL_API_KEY= - -# Get the Cohere Api key by following these instructions - -# https://dashboard.cohere.com/api-keys -# You only need this environment variable set if you want to use Cohere models -COHERE_API_KEY= - -# Get LMStudio Base URL from LM Studio Developer Console -# Make sure to enable CORS -# DONT USE http://localhost:1234 due to IPV6 issues -# Example: http://127.0.0.1:1234 -LMSTUDIO_API_BASE_URL= - -# Get your xAI API key -# https://x.ai/api -# You only need this environment variable set if you want to use xAI models -XAI_API_KEY= - -# Get your Perplexity API Key here - -# https://www.perplexity.ai/settings/api -# You only need this environment variable set if you want to use Perplexity models -PERPLEXITY_API_KEY= - -# Get your AWS configuration -# https://console.aws.amazon.com/iam/home -# The JSON should include the following keys: -# - region: The AWS region where Bedrock is available. -# - accessKeyId: Your AWS access key ID. -# - secretAccessKey: Your AWS secret access key. -# - sessionToken (optional): Temporary session token if using an IAM role or temporary credentials. -# Example JSON: -# {"region": "us-east-1", "accessKeyId": "yourAccessKeyId", "secretAccessKey": "yourSecretAccessKey", "sessionToken": "yourSessionToken"} -AWS_BEDROCK_CONFIG= +# Copy this file to .env once you have filled in the below environment variables! # Include this environment variable if you want more logging for debugging locally VITE_LOG_LEVEL=debug -# Example Context Values for qwen2.5-coder:32b -# -# DEFAULT_NUM_CTX=32768 # Consumes 36GB of VRAM -# DEFAULT_NUM_CTX=24576 # Consumes 32GB of VRAM -# DEFAULT_NUM_CTX=12288 # Consumes 26GB of VRAM -# DEFAULT_NUM_CTX=6144 # Consumes 24GB of VRAM -DEFAULT_NUM_CTX= - # set these to enable opentelemetry HONEYCOMB_API_KEY= HONEYCOMB_DATASET= @@ -113,9 +11,5 @@ HONEYCOMB_DATASET= SENTRY_AUTH_TOKEN= # Supabase Configuration -# Get your Supabase URL and anon key from your project settings -> API -# https://app.supabase.com/project/_/settings/api -SUPABASE_URL=your_supabase_project_url -SUPABASE_ANON_KEY=your_supabase_anon_key -USE_SUPABASE=false - +SUPABASE_URL=https://zbkcavxidjyslqmnbfux.supabase.co +SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inpia2NhdnhpZGp5c2xxbW5iZnV4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDAwMDU0MjAsImV4cCI6MjA1NTU4MTQyMH0.xHKTareBFW0LW0AmYXH0vOvU3mLB3jkQGwhoNWqpnTw diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 6341b151..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,150 +0,0 @@ -# Contribution Guidelines - -Welcome! This guide provides all the details you need to contribute effectively to the project. Thank you for helping us make **bolt.diy** a better tool for developers worldwide. 💡 - ---- - -## 📋 Table of Contents - -1. [Code of Conduct](#code-of-conduct) -2. [How Can I Contribute?](#how-can-i-contribute) -3. [Pull Request Guidelines](#pull-request-guidelines) -4. [Coding Standards](#coding-standards) -5. [Development Setup](#development-setup) -6. [Testing](#testing) -7. [Deployment](#deployment) -8. [Docker Deployment](#docker-deployment) -9. [VS Code Dev Containers Integration](#vs-code-dev-containers-integration) - ---- - -## 🛡️ Code of Conduct - -This project is governed by our **Code of Conduct**. By participating, you agree to uphold this code. Report unacceptable behavior to the project maintainers. - ---- - -## 🛠️ How Can I Contribute? - -### 1️⃣ Reporting Bugs or Feature Requests -- Check the [issue tracker](#) to avoid duplicates. -- Use issue templates (if available). -- Provide detailed, relevant information and steps to reproduce bugs. - -### 2️⃣ Code Contributions -1. Fork the repository. -2. Create a feature or fix branch. -3. Write and test your code. -4. Submit a pull request (PR). - -### 3️⃣ Join as a Core Contributor -Interested in maintaining and growing the project? Fill out our [Contributor Application Form](https://forms.gle/TBSteXSDCtBDwr5m7). - ---- - -## ✅ Pull Request Guidelines - -### PR Checklist -- Branch from the **main** branch. -- Update documentation, if needed. -- Test all functionality manually. -- Focus on one feature/bug per PR. - -### Review Process -1. Manual testing by reviewers. -2. At least one maintainer review required. -3. Address review comments. -4. Maintain a clean commit history. - ---- - -## 📏 Coding Standards - -### General Guidelines -- Follow existing code style. -- Comment complex logic. -- Keep functions small and focused. -- Use meaningful variable names. - ---- - -## 🖥️ Development Setup - -### 1️⃣ Initial Setup -- Clone the repository: - ```bash - git clone https://github.com/stackblitz-labs/bolt.diy.git - ``` -- Install dependencies: - ```bash - pnpm install - ``` -- Set up environment variables: - 1. Rename `.env.example` to `.env.local`. - 2. Add your API keys: - ```bash - GROQ_API_KEY=XXX - HuggingFace_API_KEY=XXX - OPENAI_API_KEY=XXX - ... - ``` - 3. Optionally set: - - Debug level: `VITE_LOG_LEVEL=debug` - - Context size: `DEFAULT_NUM_CTX=32768` - -**Note**: Never commit your `.env.local` file to version control. It’s already in `.gitignore`. - -### 2️⃣ Run Development Server -```bash -pnpm run dev -``` -**Tip**: Use **Google Chrome Canary** for local testing. - ---- - -## 🧪 Testing - -Run the test suite with: -```bash -pnpm test -``` - - ---- - -### Coolify Deployment - -For an easy deployment process, use [Coolify](https://github.com/coollabsio/coolify): -1. Import your Git repository into Coolify. -2. Choose **Docker Compose** as the build pack. -3. Configure environment variables (e.g., API keys). -4. Set the start command: - ```bash - docker compose --profile production up - ``` - ---- - -## 🛠️ VS Code Dev Containers Integration - -The `docker-compose.yaml` configuration is compatible with **VS Code Dev Containers**, making it easy to set up a development environment directly in Visual Studio Code. - -### Steps to Use Dev Containers - -1. Open the command palette in VS Code (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS). -2. Select **Dev Containers: Reopen in Container**. -3. Choose the **development** profile when prompted. -4. VS Code will rebuild the container and open it with the pre-configured environment. - ---- - -## 🔑 Environment Variables - -Ensure `.env.local` is configured correctly with: -- API keys. -- Context-specific configurations. - -Example for the `DEFAULT_NUM_CTX` variable: -```bash -DEFAULT_NUM_CTX=24576 # Uses 32GB VRAM -``` \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index d287d407..00000000 --- a/Dockerfile +++ /dev/null @@ -1,92 +0,0 @@ -ARG BASE=node:20.18.0 -FROM ${BASE} AS base - -WORKDIR /app - -# Install dependencies (this step is cached as long as the dependencies don't change) -COPY package.json pnpm-lock.yaml ./ - -RUN corepack enable pnpm && pnpm install - -# Copy the rest of your app's source code -COPY . . - -# Expose the port the app runs on -EXPOSE 5173 - -# Production image -FROM base AS bolt-ai-production - -# Define environment variables with default values or let them be overridden -ARG GROQ_API_KEY -ARG HuggingFace_API_KEY -ARG OPENAI_API_KEY -ARG ANTHROPIC_API_KEY -ARG OPEN_ROUTER_API_KEY -ARG GOOGLE_GENERATIVE_AI_API_KEY -ARG OLLAMA_API_BASE_URL -ARG XAI_API_KEY -ARG TOGETHER_API_KEY -ARG TOGETHER_API_BASE_URL -ARG AWS_BEDROCK_CONFIG -ARG VITE_LOG_LEVEL=debug -ARG DEFAULT_NUM_CTX - -ENV WRANGLER_SEND_METRICS=false \ - GROQ_API_KEY=${GROQ_API_KEY} \ - HuggingFace_KEY=${HuggingFace_API_KEY} \ - OPENAI_API_KEY=${OPENAI_API_KEY} \ - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} \ - OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \ - GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \ - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \ - XAI_API_KEY=${XAI_API_KEY} \ - TOGETHER_API_KEY=${TOGETHER_API_KEY} \ - TOGETHER_API_BASE_URL=${TOGETHER_API_BASE_URL} \ - AWS_BEDROCK_CONFIG=${AWS_BEDROCK_CONFIG} \ - VITE_LOG_LEVEL=${VITE_LOG_LEVEL} \ - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX}\ - RUNNING_IN_DOCKER=true - -# Pre-configure wrangler to disable metrics -RUN mkdir -p /root/.config/.wrangler && \ - echo '{"enabled":false}' > /root/.config/.wrangler/metrics.json - -RUN pnpm run build - -CMD [ "pnpm", "run", "dockerstart"] - -# Development image -FROM base AS bolt-ai-development - -# Define the same environment variables for development -ARG GROQ_API_KEY -ARG HuggingFace -ARG OPENAI_API_KEY -ARG ANTHROPIC_API_KEY -ARG OPEN_ROUTER_API_KEY -ARG GOOGLE_GENERATIVE_AI_API_KEY -ARG OLLAMA_API_BASE_URL -ARG XAI_API_KEY -ARG TOGETHER_API_KEY -ARG TOGETHER_API_BASE_URL -ARG VITE_LOG_LEVEL=debug -ARG DEFAULT_NUM_CTX - -ENV GROQ_API_KEY=${GROQ_API_KEY} \ - HuggingFace_API_KEY=${HuggingFace_API_KEY} \ - OPENAI_API_KEY=${OPENAI_API_KEY} \ - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} \ - OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \ - GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \ - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \ - XAI_API_KEY=${XAI_API_KEY} \ - TOGETHER_API_KEY=${TOGETHER_API_KEY} \ - TOGETHER_API_BASE_URL=${TOGETHER_API_BASE_URL} \ - AWS_BEDROCK_CONFIG=${AWS_BEDROCK_CONFIG} \ - VITE_LOG_LEVEL=${VITE_LOG_LEVEL} \ - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX}\ - RUNNING_IN_DOCKER=true - -RUN mkdir -p ${WORKDIR}/run -CMD pnpm run dev --host diff --git a/FAQ.md b/FAQ.md deleted file mode 100644 index a09fae88..00000000 --- a/FAQ.md +++ /dev/null @@ -1,91 +0,0 @@ -# Frequently Asked Questions (FAQ) - -
-What are the best models for bolt.diy? - -For the best experience with bolt.diy, we recommend using the following models: - -- **Claude 3.5 Sonnet (old)**: Best overall coder, providing excellent results across all use cases -- **Gemini 2.0 Flash**: Exceptional speed while maintaining good performance -- **GPT-4o**: Strong alternative to Claude 3.5 Sonnet with comparable capabilities -- **DeepSeekCoder V2 236b**: Best open source model (available through OpenRouter, DeepSeek API, or self-hosted) -- **Qwen 2.5 Coder 32b**: Best model for self-hosting with reasonable hardware requirements - -**Note**: Models with less than 7b parameters typically lack the capability to properly interact with bolt! -
- -
-How do I get the best results with bolt.diy? - -- **Be specific about your stack**: - Mention the frameworks or libraries you want to use (e.g., Astro, Tailwind, ShadCN) in your initial prompt. This ensures that bolt.diy scaffolds the project according to your preferences. - -- **Use the enhance prompt icon**: - Before sending your prompt, click the *enhance* icon to let the AI refine your prompt. You can edit the suggested improvements before submitting. - -- **Scaffold the basics first, then add features**: - Ensure the foundational structure of your application is in place before introducing advanced functionality. This helps bolt.diy establish a solid base to build on. - -- **Batch simple instructions**: - Combine simple tasks into a single prompt to save time and reduce API credit consumption. For example: - *"Change the color scheme, add mobile responsiveness, and restart the dev server."* -
- -
-How do I contribute to bolt.diy? - -Check out our [Contribution Guide](CONTRIBUTING.md) for more details on how to get involved! -
- -
-What are the future plans for bolt.diy? - -Visit our [Roadmap](https://roadmap.sh/r/ottodev-roadmap-2ovzo) for the latest updates. -New features and improvements are on the way! -
- -
-Why are there so many open issues/pull requests? - -bolt.diy began as a small showcase project on @ColeMedin's YouTube channel to explore editing open-source projects with local LLMs. However, it quickly grew into a massive community effort! - -We're forming a team of maintainers to manage demand and streamline issue resolution. The maintainers are rockstars, and we're also exploring partnerships to help the project thrive. -
- -
-How do local LLMs compare to larger models like Claude 3.5 Sonnet for bolt.diy? - -While local LLMs are improving rapidly, larger models like GPT-4o, Claude 3.5 Sonnet, and DeepSeek Coder V2 236b still offer the best results for complex applications. Our ongoing focus is to improve prompts, agents, and the platform to better support smaller local LLMs. -
- -
-Common Errors and Troubleshooting - -### **"There was an error processing this request"** -This generic error message means something went wrong. Check both: -- The terminal (if you started the app with Docker or `pnpm`). -- The developer console in your browser (press `F12` or right-click > *Inspect*, then go to the *Console* tab). - -### **"x-api-key header missing"** -This error is sometimes resolved by restarting the Docker container. -If that doesn't work, try switching from Docker to `pnpm` or vice versa. We're actively investigating this issue. - -### **Blank preview when running the app** -A blank preview often occurs due to hallucinated bad code or incorrect commands. -To troubleshoot: -- Check the developer console for errors. -- Remember, previews are core functionality, so the app isn't broken! We're working on making these errors more transparent. - -### **"Everything works, but the results are bad"** -Local LLMs like Qwen-2.5-Coder are powerful for small applications but still experimental for larger projects. For better results, consider using larger models like GPT-4o, Claude 3.5 Sonnet, or DeepSeek Coder V2 236b. - -### **"Received structured exception #0xc0000005: access violation"** -If you are getting this, you are probably on Windows. The fix is generally to update the [Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170) - -### **"Miniflare or Wrangler errors in Windows"** -You will need to make sure you have the latest version of Visual Studio C++ installed (14.40.33816), more information here https://github.com/stackblitz-labs/bolt.diy/issues/19. -
- ---- - -Got more questions? Feel free to reach out or open an issue in our GitHub repo! diff --git a/LICENSE b/LICENSE index 8fb312e9..22c07f48 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 StackBlitz, Inc. and bolt.diy contributors +Copyright (c) 2024 StackBlitz, Inc., bolt.diy contributors, and Record Replay Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/PROJECT.md b/PROJECT.md deleted file mode 100644 index 33e697ef..00000000 --- a/PROJECT.md +++ /dev/null @@ -1,57 +0,0 @@ -# Project management of bolt.diy - -First off: this sounds funny, we know. "Project management" comes from a world of enterprise stuff and this project is -far from being enterprisy- it's still anarchy all over the place 😉 - -But we need to organize ourselves somehow, right? - -> tl;dr: We've got a project board with epics and features. We use PRs as change log and as materialized features. Find it [here](https://github.com/orgs/stackblitz-labs/projects/4). - -Here's how we structure long-term vision, mid-term capabilities of the software and short term improvements. - -## Strategic epics (long-term) - -Strategic epics define areas in which the product evolves. Usually, these epics don’t overlap. They shall allow the core -team to define what they believe is most important and should be worked on with the highest priority. - -You can find the [epics as issues](https://github.com/stackblitz-labs/bolt.diy/labels/epic) which are probably never -going to be closed. - -What's the benefit / purpose of epics? - -1. Prioritization - -E. g. we could say “managing files is currently more important that quality”. Then, we could thing about which features -would bring “managing files” forward. It may be different features, such as “upload local files”, “import from a repo” -or also undo/redo/commit. - -In a more-or-less regular meeting dedicated for that, the core team discusses which epics matter most, sketch features -and then check who can work on them. After the meeting, they update the roadmap (at least for the next development turn) -and this way communicate where the focus currently is. - -2. Grouping of features - -By linking features with epics, we can keep them together and document *why* we invest work into a particular thing. - -## Features (mid-term) - -We all know probably a dozen of methodologies following which features are being described (User story, business -function, you name it). - -However, we intentionally describe features in a more vague manner. Why? Everybody loves crisp, well-defined -acceptance-criteria, no? Well, every product owner loves it. because he knows what he’ll get once it’s done. - -But: **here is no owner of this product**. Therefore, we grant *maximum flexibility to the developer contributing a feature* – so that he can bring in his ideas and have most fun implementing it. - -The feature therefore tries to describe *what* should be improved but not in detail *how*. - -## PRs as materialized features (short-term) - -Once a developer starts working on a feature, a draft-PR *can* be opened asap to share, describe and discuss, how the feature shall be implemented. But: this is not a must. It just helps to get early feedback and get other developers involved. Sometimes, the developer just wants to get started and then open a PR later. - -In a loosely organized project, it may as well happen that multiple PRs are opened for the same feature. This is no real issue: Usually, peoply being passionate about a solution are willing to join forces and get it done together. And if a second developer was just faster getting the same feature realized: Be happy that it's been done, close the PR and look out for the next feature to implement 🤓 - -## PRs as change log - -Once a PR is merged, a squashed commit contains the whole PR description which allows for a good change log. -All authors of commits in the PR are mentioned in the squashed commit message and become contributors 🙌 diff --git a/app/components/auth/ClientAuth.tsx b/app/components/auth/ClientAuth.tsx index 1ea6395b..88df0995 100644 --- a/app/components/auth/ClientAuth.tsx +++ b/app/components/auth/ClientAuth.tsx @@ -85,19 +85,29 @@ export function ClientAuth() { toast.success('Signed out successfully'); }; + const handleGoogleSignIn = async () => { + const { error } = await getSupabase().auth.signInWithOAuth({ + provider: 'google', + }); + console.log('GoogleSignIn', error); + }; + if (loading) { return
; } + // Avatar URLs are disabled due to broken links from CORS issues. + const useAvatarURL = false; + return ( <> {user ? (
@@ -141,6 +151,14 @@ export function ClientAuth() { onClick={(e) => e.stopPropagation()} >

Sign In

+