Skip to content

mamertofabian/bolt-to-github

Repository files navigation

Bolt to GitHub - Chrome Extension

A Chrome extension that automatically captures ZIP file downloads from bolt.new, extracts them, and pushes the contents to a specified GitHub repository. Built with Svelte, TypeScript, and TailwindCSS.

πŸ“¦ Installation Options

Stable Version (Chrome Web Store)

Install from Chrome Web Store

Latest stable version (v1.1.1) includes the following features:

  • πŸš€ Automatic ZIP file interception from bolt.new
  • πŸ“¦ In-browser ZIP file extraction
  • πŸ”„ Direct GitHub repository integration
  • πŸ”’ Secure credential storage
  • ⚑ Real-time processing status updates
  • 🎨 Clean, responsive UI with shadcn-svelte components
  • πŸ“± Modern, accessible interface
  • πŸ”„ Upload progress tracking
  • 🎯 Custom upload status alerts
  • ✨ Multi-repository support
  • πŸ“„ Follow .gitignore rules for file uploads
  • βš™οΈ Repo settings displayed in popup
  • βœ‰οΈ Custom commit messages
  • πŸ’Ύ Automatically save new project settings
  • πŸ“‹ Projects tab with quick access to all your Bolt projects:
    • View all pushed projects in one place
    • Open projects directly in Bolt
    • Access GitHub repositories
    • Import existing GitHub repos into Bolt

Best Practices

  1. Always verify your repository settings before syncing a new project
  2. Double-check the repository name and branch when switching between projects

Latest Version (GitHub)

To try the latest development version:

  1. Clone and install:

    git clone https://github.com/mamertofabian/bolt-to-github.git
    cd bolt-to-github
    npm install
  2. Build the extension:

    npm run build
  3. Load in Chrome:

    • Open Chrome and go to chrome://extensions/
    • Enable "Developer mode" (top right)
    • Click "Load unpacked"
    • Select the dist directory from your project folder

Note: The GitHub version contains the latest features but may be less stable than the Chrome Web Store version.


Supported Browsers

  • Chrome
  • Brave

Installation

πŸ‘‰ For Users

Get started in just 3 simple steps:

  1. Install from Chrome Web Store

  2. Configure the Extension

    • Make sure you have a Bolt.new project loaded
    • Click the extension icon in your Chrome toolbar
    • Enter your GitHub token (needs repo permissions)
    • Repository Owner
    • Repository Name
    • Branch Name (defaults to 'main')
    • Save your settings and you're ready to go!
  3. Load your Bolt.new Project

    • Click on the GitHub button in the Bolt.new project page at the top right
    • Confirm the popup that appears
    • Done!

🚨 New to GitHub?

Follow these steps to get started:

  1. Create a GitHub account
  2. Generate a personal access token (needs repo permissions)

Need help? Watch our Quick Start Video Tutorial

πŸ› οΈ For Developers (Contributing)

If you want to modify the extension or contribute to its development:

  1. Set up your development environment:

    # Make sure you have Node.js v16 or later installed
    node --version
  2. Clone and install:

    git clone https://github.com/mamertofabian/bolt-to-github.git
    cd bolt-to-github
    npm install
  3. Build for development:

    npm run watch   # For development with hot reload
    # OR
    npm run build  # For production build
  4. Load in Chrome:

    • Open Chrome and go to chrome://extensions/
    • Enable "Developer mode" (top right)
    • Click "Load unpacked"
    • Select the dist directory from your project folder

See our Contributing Guide for more details.

Project Structure

.
β”œβ”€β”€ assets/                # Extension icons and assets
β”‚   └── icons/            # Extension icons in various sizes
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ background.ts     # Extension background service
β”‚   β”œβ”€β”€ content/          # Content scripts
β”‚   β”‚   β”œβ”€β”€ upload-status.ts
β”‚   β”‚   └── UploadStatus.svelte
β”‚   β”œβ”€β”€ lib/             # Core library and utilities
β”‚   β”‚   β”œβ”€β”€ common.ts    # Common utilities
β”‚   β”‚   β”œβ”€β”€ constants.ts # Application constants
β”‚   β”‚   β”œβ”€β”€ github.ts    # GitHub API integration
β”‚   β”‚   β”œβ”€β”€ utils.ts     # Utility functions
β”‚   β”‚   β”œβ”€β”€ zip.ts       # ZIP file processing
β”‚   β”‚   └── components/  # Reusable UI components
β”‚   β”‚       β”œβ”€β”€ ui/      # shadcn-svelte UI components
β”‚   β”‚       β”œβ”€β”€ Footer.svelte
β”‚   β”‚       β”œβ”€β”€ GitHubSettings.svelte
β”‚   β”‚       β”œβ”€β”€ Header.svelte
β”‚   β”‚       β”œβ”€β”€ NotBoltSite.svelte
β”‚   β”‚       β”œβ”€β”€ SocialLinks.svelte
β”‚   β”‚       β”œβ”€β”€ StatusAlert.svelte
β”‚   β”‚       └── UploadProgress.svelte
β”‚   β”œβ”€β”€ popup/           # Extension popup UI
β”‚   β”‚   β”œβ”€β”€ App.svelte   # Main popup component
β”‚   β”‚   β”œβ”€β”€ index.html   # Popup HTML template
β”‚   β”‚   └── main.ts      # Popup entry point
β”‚   β”œβ”€β”€ services/        # Service modules
β”‚   β”‚   β”œβ”€β”€ buttonInjector.ts
β”‚   β”‚   └── zipHandler.ts
β”‚   β”œβ”€β”€ styles/          # Global styles
β”‚   └── types/           # TypeScript type definitions
β”œβ”€β”€ manifest.json         # Chrome extension manifest
β”œβ”€β”€ package.json         # Project dependencies and scripts
β”œβ”€β”€ tailwind.config.js   # TailwindCSS configuration
β”œβ”€β”€ tsconfig.json        # TypeScript configuration
└── vite.config.ts       # Vite build configuration

Tech Stack

Security

  • GitHub tokens are stored securely using Chrome's storage API
  • All communication with GitHub uses HTTPS
  • ZIP file processing happens entirely in the browser

Support & Resources

Documentation & Tutorials

Professional Support

Report Issues

For bugs or feature requests, please open an issue on the GitHub repository.

Support the Project

If you find this extension helpful, you can support its development:

Buy Me A Coffee

Your support helps maintain and improve this extension!

Contributing

  1. Fork the repository
  2. Create a feature branch
git checkout -b feature/my-new-feature
  1. Commit your changes
git commit -am 'Add some feature'
  1. Push to the branch
git push origin feature/my-new-feature
  1. Create a Pull Request

License

MIT License - see LICENSE file for details

Permissions

This extension requires the following permissions:

  • webRequest: To intercept downloads
  • downloads: To manage downloads
  • storage: To store settings
  • scripting: To interact with bolt.new

FAQ

Q: Why does the extension need a GitHub token?
A: The token is required to authenticate with GitHub's API for pushing files to your repository.

Q: Is my GitHub token secure?
A: Yes, your token is stored securely in Chrome's storage system and is only used for GitHub API calls.

Q: Can I specify which files to push to GitHub?
A: Currently, the extension processes all files in the ZIP. File filtering may be added in future versions.

Troubleshooting

Common Issues

  1. Extension not intercepting downloads

    • Ensure you're on bolt.new
    • Check if the file is a ZIP
    • Verify permissions are enabled
  2. GitHub push fails

    • Verify your token has repo permissions
    • Check repository name and owner
    • Ensure branch exists
  3. ZIP processing errors

    • Check if the ZIP file is corrupted
    • Ensure file contents are text-based

Future Enhancements

  • Let me know if you have any ideas for additional features or improvements by opening an issue on GitHub.

Acknowledgments


Created by AI-Driven Coder | Powered by Codefrost | Maintained by Mamerto Fabian

YouTube β€’ Website β€’ GitHub

Project Features

Projects Management

The extension includes a dedicated Projects tab that helps you:

  • Keep track of all your Bolt projects pushed to GitHub
  • Quick-access buttons to:
    • Open projects directly in Bolt
    • View repositories on GitHub
    • Import repositories back into Bolt
  • View branch information and project details at a glance