npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

migrate-bertui

v1.1.0

Published

Migrate your React vite projects to BERTUI instantly

Readme

🚀 migrate-bertui

Lightning-fast migration tool to seamlessly move your React projects from Vite, Create React App, and other frameworks to BERTUI - the fastest React framework powered by Bun.

⚡ Why Migrate to BERTUI?

  • 10x Faster: Powered by Bun, leave slow build times behind
  • File-Based Routing: Intuitive, automatic routing with zero configuration
  • Zero Config: No webpack, no complex setup, just works
  • Modern: Built for the modern web with the latest standards
  • Lightweight: Minimal dependencies, maximum performance

📦 Installation & Usage

No installation needed! Use it directly with bunx:

cd your-project
bunx migrate-bertui

That's it! The tool will:

  1. ✅ Backup all your files to .bertmigrate/
  2. 🧹 Clean the current directory
  3. ⚡ Initialize a fresh BERTUI project
  4. 📝 Create a detailed migration guide

🎯 Supported Projects

  • ✅ Vite
  • ✅ Create React App (CRA)
  • ✅ Next.js
  • ✅ Remix
  • ✅ Any React-based project

🔥 Features

Safe Migration

  • Automatic Backup: All files backed up to .bertmigrate/ before any changes
  • No Data Loss: Your original code is preserved and easily accessible
  • Rollback Ready: Keep the backup until you're confident in the migration

Smart Detection

  • Automatically detects your current framework
  • Tailors migration guide to your specific setup
  • Handles different project structures intelligently

Comprehensive Guide

  • Creates MIGRATION_GUIDE.md with step-by-step instructions
  • Includes routing migration examples
  • Provides code snippets for common patterns

📖 How It Works

Before Migration

your-vite-app/
├── src/
│   ├── App.jsx
│   ├── main.jsx
│   └── components/
├── public/
├── vite.config.js
└── package.json

After Migration

your-vite-app/
├── .bertmigrate/          # 📦 Your original files (backup)
│   ├── src/
│   ├── public/
│   ├── vite.config.js
│   └── package.json
├── src/
│   ├── pages/              # ⚡ File-based routing!
│   │   └── index.jsx       # Home route (/)
│   ├── main.jsx
│   └── images/
├── public/
├── package.json
└── MIGRATION_GUIDE.md     # 📝 Your personal guide

🎨 File-Based Routing

One of BERTUI's best features - routing made simple:

src/pages/index.jsx                 → /
src/pages/about.jsx                 → /about
src/pages/blog/index.jsx            → /blog
src/pages/user/[id].jsx             → /user/:id (dynamic)
src/pages/shop/[cat]/[prod].jsx     → /shop/:cat/:prod

Dynamic Routes Example

// src/pages/user/[id].jsx
export default function UserProfile({ params }) {
  return (
    <div>
      <h1>User Profile</h1>
      <p>User ID: {params.id}</p>
    </div>
  );
}

Navigation

import { Link, useRouter } from 'bertui/router';

function Navigation() {
  const { navigate } = useRouter();
  
  return (
    <nav>
      <Link to="/about">About</Link>
      <button onClick={() => navigate('/dashboard')}>
        Dashboard
      </button>
    </nav>
  );
}

🛠️ CLI Options

bunx migrate-bertui          # Run migration
bunx migrate-bertui --help   # Show help
bunx migrate-bertui --version # Show version

📋 Step-by-Step Guide

1. Prepare Your Project

# Make sure you're in your project directory
cd my-vite-app

# Commit any changes (optional but recommended)
git add .
git commit -m "Before BERTUI migration"

2. Run Migration

bunx migrate-bertui

The tool will ask for confirmation before proceeding.

3. Review Changes

# Check the migration guide
cat MIGRATION_GUIDE.md

# Browse your backup
ls -la .bertmigrate/

# See the new structure
tree src/

4. Copy Your Code

# Copy components
cp -r .bertmigrate/src/components src/

# Copy styles
cp -r .bertmigrate/src/styles src/

# Update imports in your files

5. Test & Run

bun run dev      # Start development server
bun run build    # Build for production

6. Clean Up (when ready)

# Once everything works, remove the backup
rm -rf .bertmigrate/

🎯 Migration Checklist

After running migrate-bertui:

  • [ ] Read MIGRATION_GUIDE.md
  • [ ] Copy components from .bertmigrate/src/
  • [ ] Convert routes to file-based structure
  • [ ] Update imports (react-router-dombertui/router)
  • [ ] Test all routes and features
  • [ ] Build and preview production version
  • [ ] Delete .bertmigrate/ when confident

🚀 BERTUI Commands

bun run dev          # Development server (fast HMR!)
bun run build        # Production build
bun run preview      # Preview production build

💡 Common Migrations

From Vite

// Before (Vite + React Router)
import { BrowserRouter, Routes, Route } from 'react-router-dom'

function App() {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/" element={<Home />} />
        <Route path="/about" element={<About />} />
      </Routes>
    </BrowserRouter>
  )
}

// After (BERTUI) - Just create files!
// src/pages/index.jsx - automatically becomes "/"
// src/pages/about.jsx - automatically becomes "/about"

From Create React App

// Before (CRA)
// All routes in App.js with React Router

// After (BERTUI)
// Each page is its own file
// src/pages/index.jsx
// src/pages/dashboard.jsx
// etc.

🔧 Troubleshooting

"Command not found: bunx"

Solution: Install Bun first

curl -fsSL https://bun.sh/install | bash

"No package.json found"

Solution: Make sure you're in a Node.js project directory

cd path/to/your/project
bunx migrate-bertui

Rollback Migration

If something goes wrong:

# Remove new files
rm -rf src/ public/ package.json

# Restore from backup
cp -r .bertmigrate/* .
rm -rf .bertmigrate/

📚 Resources

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

git clone https://github.com/yourusername/migrate-bertui
cd migrate-bertui
bun install
bun run dev

📄 License

MIT License - see LICENSE file for details.

🙏 Credits

Built for the BERTUI community. Special thanks to all contributors!


Made with ⚡ by the BERTUI team

Questions? Open an issue