bolt diy to buildify.

This commit is contained in:
Nirmal Arya 2025-05-31 13:09:11 -04:00
parent e40264ea5e
commit a4a398fe71
27 changed files with 446 additions and 453 deletions

View File

@ -1,27 +0,0 @@
name: CI/CD
on:
push:
branches:
- master
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup and Build
uses: ./.github/actions/setup-and-build
- name: Run type check
run: pnpm run typecheck
# - name: Run ESLint
# run: pnpm run lint
- name: Run tests
run: pnpm run test

View File

@ -1,62 +0,0 @@
name: Docker Publish
on:
push:
branches: [main, stable]
tags: ['v*', '*.*.*']
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
packages: write
contents: read
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
docker-build-publish:
runs-on: ubuntu-latest
# timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker image
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=stable,enable=${{ github.ref == 'refs/heads/stable' }}
type=ref,event=tag
type=sha,format=short
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/stable' }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
target: bolt-ai-production
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Check manifest
run: docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}

View File

@ -1,35 +0,0 @@
name: Docs CI/CD
on:
push:
branches:
- main
paths:
- 'docs/**' # This will only trigger the workflow when files in docs directory change
permissions:
contents: write
jobs:
build_docs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force

238
.github/workflows/ecr-deploy.yaml vendored Normal file
View File

@ -0,0 +1,238 @@
name: Build and Deploy to Amazon ECR
on:
push:
branches: [main, dev]
tags: ['v*', '*.*.*']
paths-ignore:
- 'k8s/**'
workflow_dispatch: # Allows manual triggering
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write # Need write permission to create branch and PR
pull-requests: write # Need permission to create PR
id-token: write # Required for OIDC authentication
env:
AWS_REGION: us-east-1 # Change to your AWS region
ECR_REPOSITORY_NAME: buildify # ECR repository name
jobs:
build-and-deploy:
name: Build and Deploy to ECR
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
# Enable BuildKit features with optimized memory usage
buildkitd-flags: --allow-insecure-entitlement=network.host
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }} # The ARN of the IAM role to assume
aws-region: ${{ env.AWS_REGION }}
- name: Check if ECR repository exists and create if needed
run: |
if ! aws ecr describe-repositories --repository-names ${{ env.ECR_REPOSITORY_NAME }} 2>/dev/null; then
echo "Creating ECR repository: ${{ env.ECR_REPOSITORY_NAME }}"
aws ecr create-repository --repository-name ${{ env.ECR_REPOSITORY_NAME }} \
--image-scanning-configuration scanOnPush=true \
--encryption-configuration encryptionType=AES256
else
echo "ECR repository ${{ env.ECR_REPOSITORY_NAME }} already exists, skipping creation"
fi
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Get ECR registry URL
id: ecr-registry
run: |
echo "registry=$(aws ecr describe-repositories --repository-names ${{ env.ECR_REPOSITORY_NAME }} --query 'repositories[0].repositoryUri' --output text)" >> $GITHUB_OUTPUT
- name: Extract metadata for Docker image
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ steps.ecr-registry.outputs.registry }}
tags: |
type=raw,value=${{ github.ref_name }}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }}
type=ref,event=tag
type=sha,format=short
- name: Debug tags to be created
run: |
echo "Current GitHub ref: ${{ github.ref }}"
echo "Tags to be created: ${{ steps.meta.outputs.tags }}"
# Set up cache for Docker layers
- name: Set up Docker layer caching
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
# Pull previous image for cache if it exists
- name: Pull previous image for cache
run: |
TAG="dev"
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
TAG="latest"
fi
docker pull ${{ steps.ecr-registry.outputs.registry }}:$TAG || true
continue-on-error: true
# Set NODE_OPTIONS environment variable to increase memory limit
- name: Set Node.js memory parameters
run: |
echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
target: buildify-production
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VITE_LOG_LEVEL=info
DEFAULT_NUM_CTX=32768
NODE_OPTIONS=--max_old_space_size=4096
# Enable layer caching
cache-from: |
type=local,src=/tmp/.buildx-cache
type=registry,ref=${{ steps.ecr-registry.outputs.registry }}:buildcache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Increase resource allocation for build
outputs: type=image
allow: |
network.host
provenance: false
# Ensure dev tag is applied for dev branch
- name: Ensure branch-specific tag
if: ${{ github.ref == 'refs/heads/dev' }}
run: |
echo "Ensuring dev tag exists..."
docker buildx imagetools create \
-t ${{ steps.ecr-registry.outputs.registry }}:dev \
${{ steps.ecr-registry.outputs.registry }}:sha-$(echo ${{ github.sha }} | cut -c1-7)
# Simple cache management
- name: Manage cache
if: always()
run: |
if [ -d "/tmp/.buildx-cache-new" ]; then
echo "Moving cache to maintain build efficiency"
else
echo "No cache directory found"
fi
# Move cache to prevent it from growing indefinitely
- name: Move cache
if: always()
run: |
if [ -d "/tmp/.buildx-cache-new" ]; then
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
echo "Cache moved successfully"
else
echo "No new cache to move"
fi
- name: Verify image pushed
run: |
# Determine which tag to check based on the ref
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
TAG="latest"
elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
TAG="dev"
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
TAG="${{ github.ref_name }}"
else
# Use short SHA for other branches
TAG=$(echo ${{ github.sha }} | cut -c1-7)
fi
echo "Image pushed successfully: ${{ steps.ecr-registry.outputs.registry }}:$TAG"
# Create PR for Kubernetes manifests update (only for main branch)
- name: Create PR for Kubernetes updates
if: github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Set Git user
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
# Create a new branch with a unique name
BRANCH_NAME="deploy/update-k8s-$(date +%Y%m%d-%H%M%S)-${GITHUB_SHA:0:7}"
git checkout -b $BRANCH_NAME
# Update deployment file with new image tag
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
# For tagged releases, use the tag name
IMAGE_TAG="${{ github.ref_name }}"
sed -i "s|891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:dev|891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:$IMAGE_TAG|g" k8s/deployment.yaml
elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
# For main branch, use 'latest'
IMAGE_TAG="latest"
sed -i "s|891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:dev|891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:$IMAGE_TAG|g" k8s/deployment.yaml
elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
# For dev branch, use 'dev'
# No need to change as dev is already set as the default tag in deployment.yaml
IMAGE_TAG="dev"
echo "Using dev tag for dev branch - no change needed to deployment.yaml"
else
# For other branches/PRs, use the short SHA
IMAGE_TAG="${GITHUB_SHA:0:7}"
sed -i "s|891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:dev|891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:$IMAGE_TAG|g" k8s/deployment.yaml
fi
# Show changes for logging
echo "Modified deployment manifest:"
cat k8s/deployment.yaml
# Commit changes
git add k8s/deployment.yaml
git commit -m "Update Kubernetes deployment to image ${{ steps.ecr-registry.outputs.registry }}:$IMAGE_TAG"
# Push the branch
git push origin $BRANCH_NAME
# Create PR
PR_TITLE="Update Kubernetes deployment to new image"
PR_BODY="This PR updates the Kubernetes deployment to use the latest image built from commit ${GITHUB_SHA}.
Image: ${{ steps.ecr-registry.outputs.registry }}:$IMAGE_TAG
This PR was automatically generated by the CI/CD pipeline."
gh pr create --base main --head $BRANCH_NAME --title "$PR_TITLE" --body "$PR_BODY" --label "deployment" || echo "PR already exists or couldn't be created"
# Note about automatic scanning
- name: Note about image scanning
if: success()
run: |
echo "✅ Image successfully pushed to ECR"
echo "Note: ECR automatically scans images (scan-on-push is enabled)"
echo "Check the AWS ECR console for vulnerability scan results"

View File

@ -1,98 +0,0 @@
name: Electron Build and Release
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for the release (e.g., v1.0.0). Leave empty if not applicable.'
required: false
push:
branches:
- electron
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest] # Use unsigned macOS builds for now
node-version: [18.18.0]
fail-fast: false
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9.14.4
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
# Install Linux dependencies
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y rpm
# Build
- name: Build Electron app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: "--max_old_space_size=4096"
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
pnpm run electron:build:win
elif [ "$RUNNER_OS" == "macOS" ]; then
pnpm run electron:build:mac
else
pnpm run electron:build:linux
fi
shell: bash
# Create Release
- name: Create Release
uses: softprops/action-gh-release@v2
with:
# Use the workflow_dispatch input tag if available, else use the Git ref name.
tag_name: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
# Only branch pushes remain drafts. For workflow_dispatch and tag pushes the release is published.
draft: ${{ github.event_name != 'workflow_dispatch' && github.ref_type == 'branch' }}
# For tag pushes, name the release as "Release <tagname>", otherwise "Electron Release".
name: ${{ (github.event_name == 'push' && github.ref_type == 'tag') && format('Release {0}', github.ref_name) || 'Electron Release' }}
files: |
dist/*.exe
dist/*.dmg
dist/*.deb
dist/*.AppImage
dist/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,31 +0,0 @@
name: PR Validation
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate PR Labels
run: |
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'stable-release') }}" == "true" ]]; then
echo "✓ PR has stable-release label"
# Check version bump labels
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'major') }}" == "true" ]]; then
echo "✓ Major version bump requested"
elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'minor') }}" == "true" ]]; then
echo "✓ Minor version bump requested"
else
echo "✓ Patch version bump will be applied"
fi
else
echo "This PR doesn't have the stable-release label. No release will be created."
fi

View File

@ -1,32 +0,0 @@
name: Semantic Pull Request
on:
pull_request_target:
types: [opened, reopened, edited, synchronize]
permissions:
pull-requests: read
jobs:
main:
name: Validate PR Title
runs-on: ubuntu-latest
steps:
# https://github.com/amannn/action-semantic-pull-request/releases/tag/v5.5.3
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
types: |
fix
feat
chore
build
ci
perf
docs
refactor
revert
test

View File

@ -1,25 +0,0 @@
name: Mark Stale Issues and Pull Requests
on:
schedule:
- cron: '0 2 * * *' # Runs daily at 2:00 AM UTC
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Mark stale issues and pull requests
uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been marked as stale due to inactivity. If no further activity occurs, it will be closed in 7 days.'
stale-pr-message: 'This pull request has been marked as stale due to inactivity. If no further activity occurs, it will be closed in 7 days.'
days-before-stale: 10 # Number of days before marking an issue or PR as stale
days-before-close: 4 # Number of days after being marked stale before closing
stale-issue-label: 'stale' # Label to apply to stale issues
stale-pr-label: 'stale' # Label to apply to stale pull requests
exempt-issue-labels: 'pinned,important' # Issues with these labels won't be marked stale
exempt-pr-labels: 'pinned,important' # PRs with these labels won't be marked stale
operations-per-run: 75 # Limits the number of actions per run to avoid API rate limits

View File

@ -1,127 +0,0 @@
name: Update Stable Branch
on:
push:
branches:
- main
permissions:
contents: write
jobs:
prepare-release:
if: contains(github.event.head_commit.message, '#release')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Get Current Version
id: current_version
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
- name: Install semver
run: pnpm add -g semver
- name: Determine Version Bump
id: version_bump
run: |
COMMIT_MSG="${{ github.event.head_commit.message }}"
if [[ $COMMIT_MSG =~ "#release:major" ]]; then
echo "bump=major" >> $GITHUB_OUTPUT
elif [[ $COMMIT_MSG =~ "#release:minor" ]]; then
echo "bump=minor" >> $GITHUB_OUTPUT
else
echo "bump=patch" >> $GITHUB_OUTPUT
fi
- name: Bump Version
id: bump_version
run: |
NEW_VERSION=$(semver -i ${{ steps.version_bump.outputs.bump }} ${{ steps.current_version.outputs.version }})
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Update Package.json
run: |
NEW_VERSION=${{ steps.bump_version.outputs.new_version }}
pnpm version $NEW_VERSION --no-git-tag-version --allow-same-version
- name: Prepare changelog script
run: chmod +x .github/scripts/generate-changelog.sh
- name: Generate Changelog
id: changelog
env:
NEW_VERSION: ${{ steps.bump_version.outputs.new_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: .github/scripts/generate-changelog.sh
- name: Get the latest commit hash and version tag
run: |
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "NEW_VERSION=${{ steps.bump_version.outputs.new_version }}" >> $GITHUB_ENV
- name: Commit and Tag Release
run: |
git pull
git add package.json pnpm-lock.yaml changelog.md
git commit -m "chore: release version ${{ steps.bump_version.outputs.new_version }}"
git tag "v${{ steps.bump_version.outputs.new_version }}"
git push
git push --tags
- name: Update Stable Branch
run: |
if ! git checkout stable 2>/dev/null; then
echo "Creating new stable branch..."
git checkout -b stable
fi
git merge main --no-ff -m "chore: release version ${{ steps.bump_version.outputs.new_version }}"
git push --set-upstream origin stable --force
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="v${{ steps.bump_version.outputs.new_version }}"
# Save changelog to a file
echo "${{ steps.changelog.outputs.content }}" > release_notes.md
gh release create "$VERSION" \
--title "Release $VERSION" \
--notes-file release_notes.md \
--target stable

View File

@ -18,7 +18,7 @@ COPY . .
EXPOSE 5173
# Production image
FROM base AS bolt-ai-production
FROM base AS buildify-production
# Define environment variables with default values or let them be overridden
ARG GROQ_API_KEY
@ -55,12 +55,15 @@ ENV WRANGLER_SEND_METRICS=false \
RUN mkdir -p /root/.config/.wrangler && \
echo '{"enabled":false}' > /root/.config/.wrangler/metrics.json
RUN pnpm run build
ENV NODE_OPTIONS="--max_old_space_size=4096"
# Change your build command to be more memory efficient
RUN NODE_OPTIONS="--max_old_space_size=4096" pnpm run build
CMD [ "pnpm", "run", "dockerstart"]
# Development image
FROM base AS bolt-ai-development
FROM base AS buildify-development
# Define the same environment variables for development
ARG GROQ_API_KEY

View File

@ -1,18 +1,18 @@
# bolt.diy
# Buildify
[![bolt.diy: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.jpg)](https://bolt.diy)
[![Buildify: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.png)](https://bolt.diy)
Welcome to bolt.diy, the official open source version of Bolt.new, which allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK! See the instructions below for running this locally and extending it to include more models.
Welcome to Buildify, the official open source version of Bolt.new, which allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK! See the instructions below for running this locally and extending it to include more models.
-----
Check the [bolt.diy Docs](https://stackblitz-labs.github.io/bolt.diy/) for more offical installation instructions and more informations.
Check the [Buildify Docs](https://stackblitz-labs.github.io/bolt.diy/) for more offical installation instructions and more informations.
-----
Also [this pinned post in our community](https://thinktank.ottomator.ai/t/videos-tutorial-helpful-content/3243) has a bunch of incredible resources for running and deploying bolt.diy yourself!
Also [this pinned post in our community](https://thinktank.ottomator.ai/t/videos-tutorial-helpful-content/3243) has a bunch of incredible resources for running and deploying Buildify yourself!
We have also launched an experimental agent called the "bolt.diy Expert" that can answer common questions about bolt.diy. Find it here on the [oTTomator Live Agent Studio](https://studio.ottomator.ai/).
We have also launched an experimental agent called the "Buildify Expert" that can answer common questions about Buildify. Find it here on the [oTTomator Live Agent Studio](https://studio.ottomator.ai/).
bolt.diy was originally started by [Cole Medin](https://www.youtube.com/@ColeMedin) but has quickly grown into a massive community effort to build the BEST open source AI coding assistant!
Buildify was originally started by [Cole Medin](https://www.youtube.com/@ColeMedin) but has quickly grown into a massive community effort to build the BEST open source AI coding assistant!
## Table of Contents
@ -84,11 +84,11 @@ project, please check the [project management guide](./PROJECT.md) to get starte
- ⬜ **HIGH PRIORITY** - Better prompting for smaller LLMs (code window sometimes doesn't start)
- ⬜ **HIGH PRIORITY** - Run agents in the backend as opposed to a single model call
- ✅ Deploy directly to Netlify (@xKevIsDev)
- ✅ Supabase Integration (@xKevIsDev)
- ⬜ Supabase Integration
- ⬜ Have LLM plan the project in a MD file for better results/transparency
- ⬜ VSCode Integration with git-like confirmations
- ⬜ Upload documents for knowledge - UI design templates, a code base to reference coding style, etc.
- Voice prompting
- Voice prompting
- ⬜ Azure Open AI API Integration
- ⬜ Vertex AI Integration
- ⬜ Granite Integration
@ -192,6 +192,37 @@ This option requires some familiarity with Docker but provides a more isolated e
docker compose --profile development up
```
### Option 3: Deploying to Amazon ECR with GitHub Actions and Kubernetes
This option allows you to build Docker images, deploy them to Amazon ECR using GitHub Actions, and deploy the application to Kubernetes using ArgoCD.
#### Prerequisites
- AWS account with GitHub OIDC integration
- Kubernetes cluster with ArgoCD installed
- GitHub repository with this codebase
#### Steps:
1. **Set up GitHub OIDC with AWS**:
- Create an IAM OIDC provider for GitHub Actions
- Create an IAM role with ECR permissions
- Add the role ARN as a GitHub variable: `AWS_ROLE_ARN`
2. **Push to your repository**:
The GitHub Actions workflow will automatically:
- Build the Docker image
- Create an ECR repository if it doesn't exist
- Push the image to ECR
- Update Kubernetes manifests with the correct image URL
3. **Deploy with ArgoCD**:
ArgoCD will detect changes to the Kubernetes manifests and automatically deploy the application to your cluster.
For detailed instructions, see:
- [ECR Deployment Guide](docs/ecr-deployment.md)
- [Kubernetes Deployment Guide](k8s/README.md)
## Configuring API Keys and Providers
### Adding Your API Keys

View File

@ -1,10 +1,10 @@
services:
app-prod:
image: bolt-ai:production
image: buildify:production
build:
context: .
dockerfile: Dockerfile
target: bolt-ai-production
target: buildify-production
ports:
- '5173:5173'
env_file: '.env.local'
@ -34,9 +34,9 @@ services:
- production
app-dev:
image: bolt-ai:development
image: buildify:development
build:
target: bolt-ai-development
target: buildify-development
env_file: '.env.local'
environment:
- NODE_ENV=development

View File

@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: buildify
namespace: argocd # The namespace where ArgoCD is installed
spec:
project: default
source:
repoURL: https://github.com/bayer-int/buildify.git # Use SSH URL format
targetRevision: HEAD
path: k8s
destination:
server: https://kubernetes.default.svc
namespace: buildify # The namespace where the application will be deployed
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

17
k8s/backup/secret.yaml Normal file
View File

@ -0,0 +1,17 @@
# filepath: /Users/nirmalarya/Workspace/buildify/k8s/backup/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: buildify-secrets
namespace: buildify
type: Opaque
data:
# These are placeholders. In a real environment, replace with actual base64-encoded values
# or use a secret management solution like Sealed Secrets, Vault, or AWS Secrets Manager
# Example: echo -n "your-api-key" | base64
GROQ_API_KEY: ""
OPENAI_API_KEY: ""
ANTHROPIC_API_KEY: ""
GOOGLE_GENERATIVE_AI_API_KEY: ""
TOGETHER_API_KEY: ""
AWS_BEDROCK_CONFIG: ""

9
k8s/configmap.yaml Normal file
View File

@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: buildify-config
namespace: buildify
data:
RUNNING_IN_DOCKER: "true"
VITE_LOG_LEVEL: "info"
# Add other non-sensitive configuration here

55
k8s/deployment.yaml Normal file
View File

@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: buildify
labels:
app: buildify
annotations:
# Image versioning notes:
# The CI/CD pipeline will create a PR to update this deployment with specific image tags
# For tagged releases: 891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:v1.0.0
# For main branch: 891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:<short-sha>
# For dev branch: 891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:dev
spec:
replicas: 3
selector:
matchLabels:
app: buildify
template:
metadata:
labels:
app: buildify
spec:
serviceAccountName: ecr-service-account # Service account with access to read ECR images
containers:
-
name: buildify
image: 891377135844.dkr.ecr.us-east-1.amazonaws.com/buildify:sha-451b7f5 # Using dev tag as the default for development
imagePullPolicy: Always
ports:
-
containerPort: 5173
name: http
resources:
requests:
cpu: "750m"
memory: "768Mi"
limits:
cpu: "1500m"
memory: "1.5Gi"
envFrom:
-
configMapRef:
name: buildify-config
livenessProbe:
httpGet:
path: /
port: 5173
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: 5173
initialDelaySeconds: 5
periodSeconds: 5

30
k8s/ingress.yaml Normal file
View File

@ -0,0 +1,30 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: buildify-ingress
namespace: buildify
annotations:
external-dns.alpha.kubernetes.io/hostname: buildify.phexhub-np.int.bayer.com
cert-manager.io/cluster-issuer: letsencrypt-production
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: basic-auth
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: nginx
rules:
- host: buildify.phexhub-np.int.bayer.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: buildify
port:
number: 80
tls:
- hosts:
- buildify.phexhub-np.int.bayer.com
secretName: buildify-phexhub-dev-cluster-tls

View File

@ -0,0 +1,8 @@
# irsa-serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: ecr-service-account
namespace: buildify
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::891377135844:role/phexhub-dev-cluster-ecr-service-account-role

4
k8s/namespace.yaml Normal file
View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: buildify

15
k8s/service.yaml Normal file
View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: buildify
labels:
app: buildify
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 5173
protocol: TCP
name: http
selector:
app: buildify

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB