@bunelysiareact/create-bert
v1.0.0-rc2
Published
The fastest full-stack React framework built on Bun runtime
Maintainers
Readme
B.E.R.T. Framework
Bun + Elysia + React + Template
The fastest full-stack React framework built on Bun runtime. A lightweight, high-performance alternative to Next.js with zero configuration required.
⚠️ Early Stage Warning: B.E.R.T. is in very early stages of development (v1.0.0-rc1). We're not as feature-complete as Next.js yet, but we're actively working towards it. Expect breaking changes, missing features, and bugs. Use in production at your own risk. Contributions and feedback are highly appreciated!
⚡ Features
- Lightning Fast SSR - Server-side rendering powered by Bun's blazing-fast runtime
- File-System Routing - Automatic routing based on your file structure
- Dynamic Routes - Support for parameterized routes like
/blog/[id] - Type-Safe APIs - Built-in ElysiaJS integration for ultra-fast API routes
- CSS Support - Import CSS directly in your components
- Zero Config - Works out of the box with sensible defaults
- Client Hydration - Full React interactivity on the client side
🚀 Quick Start
Create a new B.E.R.T. app
bun create @bunelysiareact/bert-app my-app
cd my-app
bun devYour app will be running at http://localhost:3000
📁 Project Structure
my-app/
├── pages/ # Your React pages (file-system routing)
│ ├── index.jsx # Home page (/)
│ └── blog/
│ └── [id].jsx # Dynamic route (/blog/123)
├── api/ # API routes powered by ElysiaJS
│ └── hello.js # API endpoint (/api/hello)
├── styles/ # Global stylesheets
│ └── global.css
├── static/ # Static assets (images, fonts, etc)
├── deps/ # B.E.R.T. dependencies
└── @bunelysiareact/bert.config.js # Configuration file📝 Creating Pages
Create a new file in the pages/ directory:
// pages/about.jsx
import React from 'react';
import Head from '../deps/Head';
import '../styles/global.css';
export default function About() {
return (
<div>
<Head>
<title>About - My App</title>
<meta name="description" content="About my awesome app" />
</Head>
<h1>About Page</h1>
<p>Built with B.E.R.T. Framework</p>
</div>
);
}This automatically creates a route at /about.
🔗 Dynamic Routes
Create parameterized routes using bracket notation:
// pages/blog/[id].jsx
import React from 'react';
export default function BlogPost({ params }) {
return (
<div>
<h1>Blog Post: {params.id}</h1>
<p>You're viewing post ID: {params.id}</p>
</div>
);
}Access via /blog/123, /blog/hello, etc.
🌐 API Routes
Create API endpoints in the api/ directory:
// api/users.js
export default () => {
return {
users: [
{ id: 1, name: 'Alice' },
{ id: 2, name: 'Bob' }
]
};
}Access via /api/users.
🎨 Styling
Import CSS directly in your components:
import '../styles/global.css';CSS files are automatically bundled and loaded.
⚙️ Configuration
Customize B.E.R.T. by editing @bunelysiareact/bert.config.js:
export default {
port: 3000,
hostname: 'localhost',
build: {
outdir: './.@bunelysiareact/bert',
minify: true,
},
};🔧 Development
bun dev # Start development server📦 Building for Production
bun run server.js # Runs with optimized production builds🚧 Current Limitations
B.E.R.T. is in active development. Here's what we're working on:
- [ ] Image optimization
- [ ] Middleware support
- [ ] API route methods (POST, PUT, DELETE)
- [ ] Environment variables handling
- [ ] Production build optimization
- [ ] Static site generation (SSG)
- [ ] Incremental static regeneration (ISR)
- [ ] Better error pages
- [ ] TypeScript configuration
- [ ] Plugin system
We're committed to rapid development and will be adding features regularly. Star the repo to follow our progress!
🤝 Why B.E.R.T.
- Faster than Next.js - Built on Bun, the fastest JavaScript runtime
- Simpler - Zero configuration, no complex setup
- Type-Safe APIs - ElysiaJS provides excellent TypeScript support
- Lightweight - Minimal dependencies, maximum performance
📄 License
MIT
🌟 Contributing
Contributions are highly encouraged! This is v1.0.0-rc1 and we need your help to make B.E.R.T. production-ready.
Ways to contribute:
- Report bugs and issues
- Suggest new features
- Submit pull requests
- Improve documentation
- Share your experience using B.E.R.T.
Together, we'll build a framework that rivals Next.js in features while maintaining Bun's incredible speed.
Built with ❤️ using Bun
