bertui 1.1.2 β 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +214 -432
- package/package.json +1 -1
- package/src/build/compiler/file-transpiler.js +44 -48
- package/src/build/generators/html-generator.js +3 -3
- package/src/build.js +19 -28
- package/src/client/compiler.js +3 -9
- package/src/server/dev-server.js +184 -507
- package/src/utils/env.js +4 -5
- package/types/index.d.ts +65 -4
- package/types/react.d.ts +7 -4
package/README.md
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
# BertUI β‘ποΈ
|
|
2
2
|
|
|
3
|
-
**The fastest React framework
|
|
3
|
+
**The fastest React frontend framework.**
|
|
4
4
|
|
|
5
|
-
Zero configuration. 494ms dev server. 265ms builds. **Perfect SEO with Server Islands.**
|
|
5
|
+
Zero configuration. 494ms dev server. 265ms builds. **Perfect SEO with Server Islands.**
|
|
6
6
|
|
|
7
|
-
Powered by Bun and Elysia. **Built for
|
|
7
|
+
Powered by Bun and Elysia. **Built for developers who refuse to wait.**
|
|
8
8
|
|
|
9
9
|
[](https://github.com/BunElysiaReact/BERTUI)
|
|
10
10
|
[](https://www.npmjs.com/package/bertui)
|
|
11
11
|
[](https://bun.sh)
|
|
12
|
-
[](https://github.com/BunElysiaReact/BERTUI)
|
|
13
12
|
[](LICENSE)
|
|
14
13
|
|
|
15
14
|
```bash
|
|
@@ -19,575 +18,352 @@ bunx create-bertui my-app && cd my-app && bun run dev
|
|
|
19
18
|
|
|
20
19
|
---
|
|
21
20
|
|
|
22
|
-
##
|
|
21
|
+
## π― What BertUI Is
|
|
23
22
|
|
|
24
|
-
**
|
|
23
|
+
**A frontend framework that gives you everything React should have had from day one:**
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
- β‘ **Sub-500ms dev starts** - Faster than Vite, Next.js, and everything else
|
|
26
|
+
- ποΈ **Sub-300ms builds** - Production builds in the time others compile one file
|
|
27
|
+
- ποΈ **Server Islands** - Optional SSG for perfect SEO (one line of code)
|
|
28
|
+
- π **File-based routing** - Just create files in `pages/`, that's it
|
|
29
|
+
- πΊοΈ **Auto SEO** - Sitemap and robots.txt generated automatically
|
|
30
|
+
- π **TypeScript ready** - Full type definitions, zero setup required
|
|
31
|
+
- π¨ **CSS built-in** - Global styles with LightningCSS optimization
|
|
32
|
+
- π₯ **30ms HMR** - Instant hot reloading that actually works
|
|
27
33
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
32
|
-
β THE BERTUI SPEED STACK β
|
|
33
|
-
β β
|
|
34
|
-
β β‘ bertui-icons β Icons in Zig (10x faster) β
|
|
35
|
-
β π bertui-axios β HTTP in C++ (Coming Q1 2025) β
|
|
36
|
-
β π bertui-elyserver β Full-stack with Elysia (Coming Soon) β
|
|
37
|
-
β π¨ bertui-animation β GPU-accelerated (Coming Soon) β
|
|
38
|
-
β π bertui-charts β WebGL rendering (Coming Soon) β
|
|
39
|
-
β β
|
|
40
|
-
β "Not just a framework. An entire performance-first ecosystem." β
|
|
41
|
-
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
**Why BertUI-Exclusive Packages?**
|
|
45
|
-
|
|
46
|
-
1. **10-100x Performance Gains** - Native compiled code vs interpreted JavaScript
|
|
47
|
-
2. **Zero Compatibility Issues** - Built specifically for BertUI's architecture
|
|
48
|
-
3. **Unified DX** - Consistent APIs across all packages
|
|
49
|
-
4. **No Bloat** - Only what you need, nothing more
|
|
34
|
+
**No webpack config. No babel setup. No framework fatigue. Just React, done right.**
|
|
50
35
|
|
|
51
36
|
---
|
|
52
37
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
**We listened. We delivered. BertUI is now the complete SEO powerhouse.**
|
|
38
|
+
## β‘ Performance That Matters
|
|
56
39
|
|
|
57
|
-
|
|
40
|
+
**Real benchmarks on a 7-year-old laptop (Intel i3-2348M, 7.6GB RAM):**
|
|
58
41
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
| Metric | BertUI | Vite | Next.js | Your Gain |
|
|
43
|
+
|--------|--------|------|---------|-----------|
|
|
44
|
+
| Dev Server | **494ms** | 713ms | 2,100ms | 1.4-4.3x faster β‘ |
|
|
45
|
+
| Prod Build | **265ms** | 4,700ms | 8,400ms | 18-32x faster β‘ |
|
|
46
|
+
| Bundle Size | **100KB** | 220KB | 280KB | 2.2-2.8x smaller β‘ |
|
|
47
|
+
| HMR Speed | **30ms** | 85ms | 120ms | 2.8-4x faster β‘ |
|
|
64
48
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- **Instant SEO** - Add one line, get static HTML at build time
|
|
68
|
-
- **Still Lightning Fast** - 265ms builds haven't changed
|
|
69
|
-
- **Per-Page Control** - Choose what gets pre-rendered
|
|
70
|
-
- **Zero Complexity** - No SSR setup, no server infrastructure
|
|
71
|
-
|
|
72
|
-
```jsx
|
|
73
|
-
// The magic line that gives you perfect SEO
|
|
74
|
-
export const render = "server";
|
|
75
|
-
```
|
|
49
|
+
**If BertUI is this fast on old hardware, imagine what it does on yours.** π
|
|
76
50
|
|
|
77
|
-
|
|
51
|
+
> Full methodology and reproducible benchmarks: [PERFORMANCE.md](PERFORMANCE.md)
|
|
78
52
|
|
|
79
53
|
---
|
|
80
54
|
|
|
81
|
-
##
|
|
55
|
+
## ποΈ Server Islands: Perfect SEO, Zero Complexity
|
|
82
56
|
|
|
83
|
-
|
|
57
|
+
**The problem:** Every React framework makes you choose:
|
|
58
|
+
- β
Vite: Fast dev, β terrible SEO (client-only)
|
|
59
|
+
- β
Next.js: Good SEO, β slow builds + server required
|
|
60
|
+
- β
Gatsby: Perfect SEO, β 45-second builds
|
|
84
61
|
|
|
85
|
-
**BertUI
|
|
62
|
+
**BertUI's solution:** Server Islands (optional SSG)
|
|
86
63
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
| Dev Server Startup | **494ms** | 713ms | 2.1s | **BertUI (1.4-4.3x faster)** β‘ |
|
|
90
|
-
| Production Build | **265ms** | 4.70s | 8.4s | **BertUI (18-32x faster)** β‘ |
|
|
91
|
-
| Bundle Size | **100KB** | 220KB | 280KB | **BertUI (2.2-2.8x smaller)** β‘ |
|
|
92
|
-
| Install Time (warm) | **5.0s** | 35.3s | 55s | **BertUI (7-11x faster)** β‘ |
|
|
93
|
-
| SSG Support | **β
YES** | β NO | β
YES | **BertUI (simplest)** ποΈ |
|
|
94
|
-
| Auto SEO Files | **β
YES** | β NO | β οΈ Manual | **BertUI (exclusive)** π€ |
|
|
95
|
-
| TypeScript DX | **β
YES** | β
YES | β
YES | **BertUI (no setup)** π |
|
|
96
|
-
| Icon Performance | **10x faster** | Standard | Standard | **BertUI (Zig-powered)** β‘ |
|
|
97
|
-
|
|
98
|
-
> **"Your speeds are lies!"** β Skeptics (understandable)
|
|
99
|
-
> **Our response:** [Complete reproducible benchmarks](PERFORMANCE.md) with logs, methodology, and test scripts. Run them yourself. β±οΈ
|
|
64
|
+
```jsx
|
|
65
|
+
// src/pages/about.jsx
|
|
100
66
|
|
|
101
|
-
|
|
67
|
+
// ποΈ Add ONE line to enable static generation
|
|
68
|
+
export const render = "server";
|
|
102
69
|
|
|
103
|
-
|
|
70
|
+
// π― Optional: Add SEO metadata
|
|
71
|
+
export const meta = {
|
|
72
|
+
title: "About Us",
|
|
73
|
+
description: "Learn about our team",
|
|
74
|
+
keywords: "about, company, team"
|
|
75
|
+
};
|
|
104
76
|
|
|
105
|
-
|
|
77
|
+
// βοΈ Write normal React (no hooks, no event handlers)
|
|
78
|
+
export default function About() {
|
|
79
|
+
return (
|
|
80
|
+
<div>
|
|
81
|
+
<h1>About Us</h1>
|
|
82
|
+
<p>This page is pre-rendered as static HTML!</p>
|
|
83
|
+
<p>Search engines see everything instantly.</p>
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
```
|
|
106
88
|
|
|
107
|
-
|
|
89
|
+
**At build time:**
|
|
90
|
+
- β
Generates static HTML for instant loading
|
|
91
|
+
- β
Auto-adds to sitemap.xml
|
|
92
|
+
- β
Perfect SEO without SSR complexity
|
|
93
|
+
- β
Still builds in 265ms
|
|
108
94
|
|
|
109
|
-
|
|
110
|
-
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
111
|
-
β The Only Framework With: β
|
|
112
|
-
β β
|
|
113
|
-
β β‘ Sub-500ms dev starts ποΈ Optional SSG (Server Islands) β
|
|
114
|
-
β π¦ Sub-300ms builds π€ Auto robots.txt generation β
|
|
115
|
-
β πΊοΈ Auto sitemap.xml π Full TypeScript definitions β
|
|
116
|
-
β π― Zero config needed π File-based routing built-in β
|
|
117
|
-
β π₯ 30ms HMR updates π
Optimized CSS (LightningCSS) β
|
|
118
|
-
β π Deploy anywhere π¨ Modern CSS features β
|
|
119
|
-
β π Beautiful errors π Detailed build analytics β
|
|
120
|
-
β β‘ Zig-powered icons π Native performance libraries β
|
|
121
|
-
β β
|
|
122
|
-
β "The fastest React framework with perfect SEO, period." π₯ β
|
|
123
|
-
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
124
|
-
```
|
|
95
|
+
**[Complete Server Islands guide β](https://bertui-docswebsite.pages.dev/server-islands)**
|
|
125
96
|
|
|
126
97
|
---
|
|
127
98
|
|
|
128
|
-
##
|
|
129
|
-
|
|
130
|
-
### Create New App (30 seconds to first render)
|
|
99
|
+
## π¦ Installation
|
|
131
100
|
|
|
132
101
|
```bash
|
|
102
|
+
# Create new app
|
|
133
103
|
bunx create-bertui my-app
|
|
104
|
+
|
|
105
|
+
# Start development
|
|
134
106
|
cd my-app
|
|
135
107
|
bun run dev
|
|
108
|
+
|
|
109
|
+
# Build for production
|
|
110
|
+
bun run build
|
|
136
111
|
```
|
|
137
112
|
|
|
138
|
-
**
|
|
113
|
+
**30 seconds from zero to running. No configuration required.**
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## π Project Structure
|
|
139
118
|
|
|
140
|
-
**What you get:**
|
|
141
119
|
```
|
|
142
120
|
my-app/
|
|
143
121
|
βββ src/
|
|
144
122
|
β βββ pages/
|
|
145
|
-
β β
|
|
146
|
-
β βββ
|
|
147
|
-
β βββ
|
|
123
|
+
β β βββ index.jsx # Route: /
|
|
124
|
+
β β βββ about.jsx # Route: /about
|
|
125
|
+
β β βββ blog/
|
|
126
|
+
β β βββ index.jsx # Route: /blog
|
|
127
|
+
β β βββ [slug].jsx # Route: /blog/:slug (dynamic)
|
|
128
|
+
β βββ components/ # Your React components
|
|
129
|
+
β βββ styles/
|
|
130
|
+
β β βββ global.css # Automatically imported
|
|
131
|
+
β βββ images/ # Served at /images/*
|
|
148
132
|
βββ public/
|
|
149
133
|
β βββ favicon.svg # Static assets
|
|
150
134
|
βββ dist/ # Production build output
|
|
151
|
-
β βββ
|
|
152
|
-
β βββ
|
|
135
|
+
β βββ sitemap.xml # π Auto-generated
|
|
136
|
+
β βββ robots.txt # π Auto-generated
|
|
153
137
|
βββ package.json
|
|
154
138
|
```
|
|
155
139
|
|
|
156
|
-
**First install note:** Initial setup downloads Bun platform binaries (~154MB, one-time). Subsequent projects: ~5 seconds.
|
|
157
|
-
|
|
158
140
|
---
|
|
159
141
|
|
|
160
|
-
##
|
|
142
|
+
## π£οΈ File-Based Routing
|
|
161
143
|
|
|
162
|
-
|
|
144
|
+
**Just create files. BertUI handles the rest.**
|
|
163
145
|
|
|
164
|
-
```bash
|
|
165
|
-
bun add bertui-icons
|
|
166
146
|
```
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
function App() {
|
|
174
|
-
return (
|
|
175
|
-
<div>
|
|
176
|
-
{/* Basic usage */}
|
|
177
|
-
<span dangerouslySetInnerHTML={{ __html: ArrowRight() }} />
|
|
178
|
-
|
|
179
|
-
{/* With text overlay (unique to bertui-icons!) */}
|
|
180
|
-
<span dangerouslySetInnerHTML={{
|
|
181
|
-
__html: Activity({ children: '98', color: 'red' })
|
|
182
|
-
}} />
|
|
183
|
-
|
|
184
|
-
{/* Custom sizing */}
|
|
185
|
-
<span dangerouslySetInnerHTML={{
|
|
186
|
-
__html: User({ children: '5', size: 48 })
|
|
187
|
-
}} />
|
|
188
|
-
</div>
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### Why bertui-icons is 10x Faster
|
|
194
|
-
|
|
195
|
-
**Traditional Icon Libraries (React SVG):**
|
|
196
|
-
```
|
|
197
|
-
Request β Parse SVG string β Create React elements β Virtual DOM diff β Render
|
|
198
|
-
Total: ~15-20ms per icon
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
**bertui-icons (Zig + FFI):**
|
|
202
|
-
```
|
|
203
|
-
Request β FFI call to Zig β Pre-compiled SVG β Direct HTML injection
|
|
204
|
-
Total: ~1-2ms per icon
|
|
147
|
+
src/pages/index.jsx β /
|
|
148
|
+
src/pages/about.jsx β /about
|
|
149
|
+
src/pages/blog/index.jsx β /blog
|
|
150
|
+
src/pages/blog/[slug].jsx β /blog/:slug
|
|
151
|
+
src/pages/user/[id].jsx β /user/:id
|
|
205
152
|
```
|
|
206
153
|
|
|
207
|
-
|
|
208
|
-
- **lucide-react:** 15ms per icon render
|
|
209
|
-
- **react-icons:** 18ms per icon render
|
|
210
|
-
- **bertui-icons:** **1.5ms per icon render** β‘
|
|
211
|
-
|
|
212
|
-
**Features Exclusive to bertui-icons:**
|
|
213
|
-
- β
Text overlays (badges, labels)
|
|
214
|
-
- β
Dynamic positioning
|
|
215
|
-
- β
Compiled at build time
|
|
216
|
-
- β
Zero runtime overhead
|
|
217
|
-
- β
Unlimited imports (no bundle bloat)
|
|
218
|
-
|
|
219
|
-
**[Complete bertui-icons docs β](https://github.com/BunElysiaReact/bertui-icons)**
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## π The BertUI Ecosystem Roadmap
|
|
224
|
-
|
|
225
|
-
### π
Coming Soon
|
|
226
|
-
|
|
227
|
-
#### **Q1 2025: bertui-axios** π
|
|
228
|
-
**HTTP client rewritten in C++ with Bun FFI**
|
|
154
|
+
### Dynamic Routes
|
|
229
155
|
|
|
230
156
|
```jsx
|
|
231
|
-
|
|
157
|
+
// src/pages/blog/[slug].jsx
|
|
232
158
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
const response = await post('/api/login', { username, password });
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
**Features:**
|
|
239
|
-
- C++ compiled HTTP engine
|
|
240
|
-
- Automatic retries with exponential backoff
|
|
241
|
-
- Built-in caching layer
|
|
242
|
-
- Perfect TypeScript support
|
|
243
|
-
- 100% axios-compatible API
|
|
244
|
-
|
|
245
|
-
#### **Q1 2025: bertui-elyserver** π
|
|
246
|
-
**Full-stack framework with Elysia integration**
|
|
247
|
-
|
|
248
|
-
```jsx
|
|
249
|
-
// pages/api/users.js - API routes built-in!
|
|
250
|
-
export default function handler(req, res) {
|
|
251
|
-
return res.json({ users: [...] });
|
|
159
|
+
export default function BlogPost({ params }) {
|
|
160
|
+
return <h1>Post: {params.slug}</h1>;
|
|
252
161
|
}
|
|
253
162
|
|
|
254
|
-
//
|
|
255
|
-
// Zero backend setup required
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
**Features:**
|
|
259
|
-
- Elysia-powered backend
|
|
260
|
-
- Automatic API routing
|
|
261
|
-
- Built-in database adapters
|
|
262
|
-
- JWT auth out of the box
|
|
263
|
-
- WebSocket support
|
|
264
|
-
|
|
265
|
-
#### **Q2 2025: bertui-animation** π¨
|
|
266
|
-
**GPU-accelerated animations**
|
|
267
|
-
|
|
268
|
-
```jsx
|
|
269
|
-
import { animate } from 'bertui-animation';
|
|
270
|
-
|
|
271
|
-
// WebGL-powered, 60fps guaranteed
|
|
272
|
-
animate('.box', { x: 100, duration: 0.5 });
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
#### **Q2 2025: bertui-charts** π
|
|
276
|
-
**WebGL chart rendering**
|
|
277
|
-
|
|
278
|
-
```jsx
|
|
279
|
-
import { LineChart } from 'bertui-charts';
|
|
280
|
-
|
|
281
|
-
// 1M+ datapoints at 60fps
|
|
282
|
-
<LineChart data={millionPoints} />
|
|
163
|
+
// /blog/hello-world β params.slug = "hello-world"
|
|
283
164
|
```
|
|
284
165
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
## π― Full React Support Coming Soon
|
|
288
|
-
|
|
289
|
-
**BertUI is evolving into a complete full-stack framework.**
|
|
166
|
+
### Navigation
|
|
290
167
|
|
|
291
168
|
```jsx
|
|
292
|
-
|
|
293
|
-
import { useState } from 'react';
|
|
294
|
-
import { useQuery } from 'bertui-query'; // Coming Q1 2025
|
|
295
|
-
import { motion } from 'bertui-animation'; // Coming Q2 2025
|
|
296
|
-
import { Database } from 'bertui-db'; // Coming Q2 2025
|
|
169
|
+
import { Link, useRouter } from 'bertui/router';
|
|
297
170
|
|
|
298
|
-
function
|
|
299
|
-
const {
|
|
171
|
+
function Nav() {
|
|
172
|
+
const { navigate, pathname } = useRouter();
|
|
300
173
|
|
|
301
174
|
return (
|
|
302
|
-
<
|
|
303
|
-
<
|
|
304
|
-
|
|
175
|
+
<nav>
|
|
176
|
+
<Link to="/">Home</Link>
|
|
177
|
+
<Link to="/about">About</Link>
|
|
178
|
+
<button onClick={() => navigate('/blog')}>Blog</button>
|
|
179
|
+
|
|
180
|
+
<p>Current: {pathname}</p>
|
|
181
|
+
</nav>
|
|
305
182
|
);
|
|
306
183
|
}
|
|
307
184
|
```
|
|
308
185
|
|
|
309
|
-
**What's Coming:**
|
|
310
|
-
- β
Full React Hooks support
|
|
311
|
-
- β
Built-in state management (bertui-store)
|
|
312
|
-
- β
Database ORM (bertui-db)
|
|
313
|
-
- β
Authentication system (bertui-auth)
|
|
314
|
-
- β
Real-time updates (bertui-realtime)
|
|
315
|
-
|
|
316
|
-
**BertUI will be the ONLY framework where every package is:**
|
|
317
|
-
1. Rewritten in Zig/C++ for maximum speed
|
|
318
|
-
2. Perfectly integrated with the core
|
|
319
|
-
3. Zero-config out of the box
|
|
320
|
-
4. TypeScript-native
|
|
321
|
-
|
|
322
186
|
---
|
|
323
187
|
|
|
324
|
-
##
|
|
188
|
+
## βοΈ Configuration (Optional)
|
|
325
189
|
|
|
326
|
-
|
|
327
|
-
```
|
|
328
|
-
React App
|
|
329
|
-
β
|
|
330
|
-
Uses: axios (JavaScript)
|
|
331
|
-
Uses: lucide-react (JavaScript)
|
|
332
|
-
Uses: framer-motion (JavaScript)
|
|
333
|
-
Uses: random npm packages (pray they work)
|
|
334
|
-
|
|
335
|
-
Result: Slow, bloated, compatibility issues
|
|
336
|
-
```
|
|
190
|
+
**BertUI works with zero config, but you can customize:**
|
|
337
191
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
192
|
+
```javascript
|
|
193
|
+
// bertui.config.js (optional)
|
|
194
|
+
|
|
195
|
+
export default {
|
|
196
|
+
siteName: "My Awesome Site",
|
|
197
|
+
baseUrl: "https://example.com",
|
|
198
|
+
|
|
199
|
+
meta: {
|
|
200
|
+
title: "My Site - Built with BertUI",
|
|
201
|
+
description: "Lightning-fast React app",
|
|
202
|
+
keywords: "react, fast, bertui",
|
|
203
|
+
author: "Your Name"
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
robots: {
|
|
207
|
+
disallow: ["/admin", "/api"], // Block from search engines
|
|
208
|
+
crawlDelay: 1 // Seconds between crawls
|
|
209
|
+
}
|
|
210
|
+
};
|
|
348
211
|
```
|
|
349
212
|
|
|
350
213
|
---
|
|
351
214
|
|
|
352
|
-
##
|
|
215
|
+
## π¨ Styling
|
|
353
216
|
|
|
354
|
-
|
|
217
|
+
### Global CSS
|
|
355
218
|
|
|
356
|
-
|
|
219
|
+
```css
|
|
220
|
+
/* src/styles/global.css */
|
|
357
221
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
222
|
+
* {
|
|
223
|
+
margin: 0;
|
|
224
|
+
padding: 0;
|
|
225
|
+
box-sizing: border-box;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
body {
|
|
229
|
+
font-family: system-ui;
|
|
230
|
+
line-height: 1.5;
|
|
231
|
+
}
|
|
364
232
|
```
|
|
365
233
|
|
|
366
|
-
|
|
234
|
+
**Automatically imported and optimized with LightningCSS.**
|
|
367
235
|
|
|
368
|
-
|
|
369
|
-
src/pages/user/[id].jsx β /user/:id
|
|
370
|
-
src/pages/blog/[slug].jsx β /blog/:slug
|
|
371
|
-
src/pages/shop/[category]/[item].jsx β /shop/:category/:item
|
|
372
|
-
```
|
|
236
|
+
### CSS Modules (coming soon)
|
|
373
237
|
|
|
374
|
-
**Example:**
|
|
375
238
|
```jsx
|
|
376
|
-
|
|
239
|
+
import styles from './Button.module.css';
|
|
377
240
|
|
|
378
|
-
export default function
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
return (
|
|
382
|
-
<div>
|
|
383
|
-
<h1>User Profile</h1>
|
|
384
|
-
<p>Viewing user: {userId}</p>
|
|
385
|
-
</div>
|
|
386
|
-
);
|
|
241
|
+
export default function Button() {
|
|
242
|
+
return <button className={styles.primary}>Click</button>;
|
|
387
243
|
}
|
|
388
244
|
```
|
|
389
245
|
|
|
390
246
|
---
|
|
391
247
|
|
|
392
|
-
##
|
|
248
|
+
## π Official Packages
|
|
393
249
|
|
|
394
|
-
###
|
|
250
|
+
### bertui-icons (Available Now)
|
|
395
251
|
|
|
396
|
-
**
|
|
397
|
-
- β Vite = Fast dev, **terrible SEO** (client-only)
|
|
398
|
-
- β Next.js = Good SEO, **slow builds** + complex setup
|
|
399
|
-
- β
**BertUI = Fast dev + Fast builds + Perfect SEO + Zero config**
|
|
252
|
+
**10x faster icon library powered by Zig.**
|
|
400
253
|
|
|
401
|
-
|
|
254
|
+
```bash
|
|
255
|
+
bun add bertui-icons
|
|
256
|
+
```
|
|
402
257
|
|
|
403
258
|
```jsx
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
// ποΈ Add ONE line to enable Server Islands
|
|
407
|
-
export const render = "server";
|
|
408
|
-
|
|
409
|
-
// π― Optional: Add metadata for SEO
|
|
410
|
-
export const meta = {
|
|
411
|
-
title: "About Us - Best Company Ever",
|
|
412
|
-
description: "Learn about our amazing team and mission",
|
|
413
|
-
keywords: "about, company, team"
|
|
414
|
-
};
|
|
259
|
+
import { ArrowRight, Bell, User } from 'bertui-icons';
|
|
415
260
|
|
|
416
|
-
|
|
417
|
-
export default function About() {
|
|
261
|
+
function App() {
|
|
418
262
|
return (
|
|
419
263
|
<div>
|
|
420
|
-
|
|
421
|
-
<
|
|
264
|
+
{/* Basic icon */}
|
|
265
|
+
<ArrowRight size={24} />
|
|
266
|
+
|
|
267
|
+
{/* Icon with text overlay (exclusive!) */}
|
|
268
|
+
<Bell color="red">{notificationCount}</Bell>
|
|
269
|
+
|
|
270
|
+
{/* Custom positioning */}
|
|
271
|
+
<User x={20} y={15} fontSize={10}>VIP</User>
|
|
422
272
|
</div>
|
|
423
273
|
);
|
|
424
274
|
}
|
|
425
275
|
```
|
|
426
276
|
|
|
427
|
-
**
|
|
428
|
-
```html
|
|
429
|
-
<!-- dist/about/index.html - Generated automatically! -->
|
|
430
|
-
<!DOCTYPE html>
|
|
431
|
-
<html>
|
|
432
|
-
<head>
|
|
433
|
-
<title>About Us - Best Company Ever</title>
|
|
434
|
-
<meta name="description" content="Learn about our amazing team...">
|
|
435
|
-
</head>
|
|
436
|
-
<body>
|
|
437
|
-
<div id="root">
|
|
438
|
-
<!-- β‘ Full HTML content here! Search engines see everything! -->
|
|
439
|
-
<div>
|
|
440
|
-
<h1>About Us</h1>
|
|
441
|
-
<p>Pre-rendered as static HTML at build time!</p>
|
|
442
|
-
</div>
|
|
443
|
-
</div>
|
|
444
|
-
<script src="/bundle.js"></script>
|
|
445
|
-
</body>
|
|
446
|
-
</html>
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
**[Complete Server Islands guide β](https://bertui-docswebsite.vercel.app/server-islands)**
|
|
277
|
+
**[bertui-icons documentation β](https://github.com/BunElysiaReact/bertui-icons)**
|
|
450
278
|
|
|
451
279
|
---
|
|
452
280
|
|
|
453
|
-
##
|
|
454
|
-
|
|
455
|
-
### The BertUI Mission
|
|
456
|
-
|
|
457
|
-
**"Don't settle for slow JavaScript implementations when faster alternatives exist."**
|
|
458
|
-
|
|
459
|
-
We're not just building a React framework. We're building a complete ecosystem where:
|
|
281
|
+
## π Coming Soon
|
|
460
282
|
|
|
461
|
-
|
|
462
|
-
2. **Zero configuration is non-negotiable** (it just works)
|
|
463
|
-
3. **Performance is the default** (not an afterthought)
|
|
464
|
-
4. **Developer experience is paramount** (beautiful errors, instant feedback)
|
|
283
|
+
**Future packages (not available yet):**
|
|
465
284
|
|
|
466
|
-
|
|
285
|
+
- π **bertui-elysia** - Full-stack addon (API routes, auth, database)
|
|
286
|
+
- π¨ **bertui-animation** - GPU-accelerated animations
|
|
287
|
+
- π **bertui-charts** - High-performance charts
|
|
467
288
|
|
|
468
|
-
**
|
|
469
|
-
|
|
470
|
-
β
**Perfect Integration** - No compatibility issues, ever
|
|
471
|
-
β
**Optimized Performance** - Built specifically for BertUI's architecture
|
|
472
|
-
β
**Unified DX** - Consistent APIs, patterns, and conventions
|
|
473
|
-
β
**Guaranteed Support** - We test and maintain everything
|
|
474
|
-
β
**No Bloat** - Only what you need, perfectly tuned
|
|
475
|
-
|
|
476
|
-
**Other frameworks try to support everything and end up slow.**
|
|
477
|
-
**BertUI supports the best and makes it blazing fast.**
|
|
289
|
+
**Why wait?** We're building these in native code (Zig/C++) for maximum performance.
|
|
478
290
|
|
|
479
291
|
---
|
|
480
292
|
|
|
481
|
-
## π
|
|
482
|
-
|
|
483
|
-
### Supported Platforms (All Zero Config)
|
|
293
|
+
## π Deployment
|
|
484
294
|
|
|
485
|
-
|
|
486
|
-
- β
**Netlify** - Works out of the box
|
|
487
|
-
- β
**Cloudflare Pages** - Instant edge deploys
|
|
488
|
-
- β
**GitHub Pages** - Free static hosting
|
|
489
|
-
- β
**Any static host** - Nginx, Apache, S3, Firebase, Surge, etc.
|
|
490
|
-
|
|
491
|
-
### Vercel Deployment (Fastest)
|
|
295
|
+
### Vercel (Recommended)
|
|
492
296
|
|
|
493
297
|
```bash
|
|
494
298
|
# 1. Push to GitHub
|
|
495
299
|
# 2. Import to Vercel
|
|
496
300
|
# 3. Deploy
|
|
497
301
|
|
|
498
|
-
# Done!
|
|
302
|
+
# Done! π
|
|
499
303
|
```
|
|
500
304
|
|
|
501
|
-
|
|
305
|
+
### Other Platforms
|
|
502
306
|
|
|
503
|
-
|
|
307
|
+
**All of these work with zero config:**
|
|
308
|
+
- β
Netlify
|
|
309
|
+
- β
Cloudflare Pages
|
|
310
|
+
- β
GitHub Pages
|
|
311
|
+
- β
Any static host (Nginx, Apache, S3)
|
|
504
312
|
|
|
505
|
-
|
|
313
|
+
**[Deployment guide β](https://bertui-docswebsite.pages.dev/deployment)**
|
|
506
314
|
|
|
507
|
-
|
|
508
|
-
- **Homepage:** https://bertui-docswebsite.vercel.app/
|
|
509
|
-
- **Getting Started:** https://bertui-docswebsite.vercel.app/getstarted
|
|
510
|
-
- **Server Islands Guide:** https://bertui-docswebsite.vercel.app/server-islands
|
|
511
|
-
- **BertUI Icons:** https://github.com/BunElysiaReact/bertui-icons
|
|
512
|
-
- **Deployment Guide:** https://bertui-docswebsite.vercel.app/deployment
|
|
315
|
+
---
|
|
513
316
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
317
|
+
## π Comparison
|
|
318
|
+
|
|
319
|
+
| Feature | BertUI | Next.js | Vite | Remix |
|
|
320
|
+
|---------|--------|---------|------|-------|
|
|
321
|
+
| Dev Server | 494ms | 2.1s | 713ms | 1.8s |
|
|
322
|
+
| Prod Build | 265ms | 8.4s | 4.7s | 6.2s |
|
|
323
|
+
| Bundle Size | 100KB | 280KB | 220KB | 250KB |
|
|
324
|
+
| Server Islands | β
Built-in | β No | β No | β No |
|
|
325
|
+
| Auto SEO | β
Yes | β οΈ Manual | β No | β οΈ Manual |
|
|
326
|
+
| Zero Config | β
True | β οΈ Some | β οΈ Some | β οΈ Some |
|
|
327
|
+
| TypeScript | β
No setup | β
Config needed | β
Config needed | β
Config needed |
|
|
518
328
|
|
|
519
329
|
---
|
|
520
330
|
|
|
521
|
-
## π οΈ Commands
|
|
331
|
+
## π οΈ Commands
|
|
522
332
|
|
|
523
333
|
```bash
|
|
524
334
|
# Development
|
|
525
|
-
bun run dev # Start dev server (494ms
|
|
335
|
+
bun run dev # Start dev server (494ms)
|
|
526
336
|
|
|
527
337
|
# Production
|
|
528
|
-
bun run build # Build for production (265ms
|
|
338
|
+
bun run build # Build for production (265ms)
|
|
529
339
|
bun run preview # Preview production build
|
|
530
340
|
|
|
531
|
-
#
|
|
532
|
-
bunx create-bertui my-app # Create new BertUI app
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
---
|
|
536
|
-
|
|
537
|
-
## π The Future is Fast
|
|
538
|
-
|
|
539
|
-
**BertUI isn't just another React framework.**
|
|
540
|
-
|
|
541
|
-
It's a **complete reimagining** of what web development should be:
|
|
542
|
-
- β‘ **Native-speed libraries** (Zig, C++, WebGL)
|
|
543
|
-
- π― **Zero-config everything** (it just works)
|
|
544
|
-
- ποΈ **Perfect SEO** (Server Islands)
|
|
545
|
-
- π¦ **Tiny bundles** (sub-100KB apps)
|
|
546
|
-
- π₯ **Instant feedback** (30ms HMR)
|
|
547
|
-
|
|
548
|
-
**Join us in building the fastest web framework ever created.**
|
|
549
|
-
|
|
550
|
-
```bash
|
|
341
|
+
# Create new app
|
|
551
342
|
bunx create-bertui my-app
|
|
552
|
-
cd my-app
|
|
553
|
-
bun run dev
|
|
554
|
-
|
|
555
|
-
# Welcome to the future. β‘
|
|
556
343
|
```
|
|
557
344
|
|
|
558
345
|
---
|
|
559
346
|
|
|
560
|
-
##
|
|
347
|
+
## π Documentation
|
|
561
348
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
| **Bundle Size** | 100KB | 280KB | 220KB | 250KB |
|
|
567
|
-
| **HMR Speed** | 30ms | 120ms | 85ms | 110ms |
|
|
568
|
-
| **Server Islands** | β
Built-in | β No | β No | β
Complex |
|
|
569
|
-
| **Auto SEO Files** | β
Yes | β οΈ Manual | β No | β οΈ Manual |
|
|
570
|
-
| **TypeScript DX** | β
Zero config | β
Config needed | β
Config needed | β
Config needed |
|
|
571
|
-
| **Icon Library** | β‘ 10x faster | Standard | Standard | Standard |
|
|
572
|
-
| **File-based Routing** | β
Built-in | β
Built-in | β Plugin | β
Built-in |
|
|
573
|
-
| **Native Libraries** | β
Zig/C++ | β No | β No | β No |
|
|
349
|
+
- **Website:** https://bertui-docswebsite.pages.dev/
|
|
350
|
+
- **Getting Started:** https://bertui-docswebsite.pages.dev/getstarted
|
|
351
|
+
- **Server Islands:** https://bertui-docswebsite.pages.dev/server-islands
|
|
352
|
+
- **GitHub:** https://github.com/BunElysiaReact/BERTUI
|
|
574
353
|
|
|
575
354
|
---
|
|
576
355
|
|
|
577
|
-
##
|
|
356
|
+
## π¬ Community
|
|
578
357
|
|
|
579
|
-
-
|
|
580
|
-
-
|
|
581
|
-
-
|
|
582
|
-
- π **BertUI Analytics** - Built-in analytics
|
|
583
|
-
- π **BertUI i18n** - Internationalization
|
|
584
|
-
- π― **BertUI SEO** - Advanced SEO tools
|
|
358
|
+
- **GitHub Discussions:** https://github.com/BunElysiaReact/BERTUI/discussions
|
|
359
|
+
- **Issues:** https://github.com/BunElysiaReact/BERTUI/issues
|
|
360
|
+
- **Discord:** https://discord.gg/x8JXvHKd
|
|
585
361
|
|
|
586
362
|
---
|
|
587
363
|
|
|
588
|
-
## β
|
|
364
|
+
## β Support the Project
|
|
589
365
|
|
|
590
|
-
If BertUI makes your development faster,
|
|
366
|
+
If BertUI makes your React development faster, give us a star! β
|
|
591
367
|
|
|
592
368
|
**[github.com/BunElysiaReact/BERTUI](https://github.com/BunElysiaReact/BERTUI)**
|
|
593
369
|
|
|
@@ -601,13 +377,19 @@ MIT License - see [LICENSE](LICENSE) for details
|
|
|
601
377
|
|
|
602
378
|
## π Credits
|
|
603
379
|
|
|
604
|
-
-
|
|
605
|
-
-
|
|
606
|
-
-
|
|
607
|
-
-
|
|
380
|
+
- **Runtime:** [Bun](https://bun.sh/) - The fastest JavaScript runtime
|
|
381
|
+
- **Server:** [Elysia](https://elysiajs.com/) - Fast and elegant web framework
|
|
382
|
+
- **CSS:** [LightningCSS](https://lightningcss.dev/) - Lightning-fast CSS processing
|
|
383
|
+
- **Icons:** [Lucide](https://lucide.dev/) - Beautiful icon set
|
|
608
384
|
|
|
609
385
|
---
|
|
610
386
|
|
|
387
|
+
<div align="center">
|
|
388
|
+
|
|
611
389
|
**Made with β‘ by the BertUI team**
|
|
612
390
|
|
|
613
|
-
*"
|
|
391
|
+
*"The fastest React framework. Everything React should have been."*
|
|
392
|
+
|
|
393
|
+
[Website](https://bertui-docswebsite.pages.dev) β’ [GitHub](https://github.com/BunElysiaReact/BERTUI) β’ [npm](https://www.npmjs.com/package/bertui)
|
|
394
|
+
|
|
395
|
+
</div>
|