create-bini-app
OfficialBuild full-stack React apps for web, desktop, and mobile - from one codebase. Scaffolds a complete Vite + React + Hono project.
Overview
create-bini-app is the official scaffolder for Bini.js. It creates a production-ready project with file-based routing, API routes, environment handling, native app wiring, and deployment CLI - all configured correctly from the first commit.
Quick Start
The fastest way to scaffold a new Bini.js app:
$ npx create-bini-app@latest my-app $ cd my-app $ npm install $ npm run dev
On installation, you'll see the following prompts:
? Project name? (my-app)? Use TypeScript?> YesNo↑↓ navigate • ⏎ select? Styling solution?> Tailwind CSSCSS ModulesNone↑↓ navigate • ⏎ select? Which platform would you like to target?> Web ApplicationWindows DesktopLinux DesktopmacOS DesktopAndroidiOS↑↓ navigate • ⏎ select
Why Bini.js
Most React starters give you a bundler and call it a day. Bini.js gives you a framework: file-based routing, a backend, environment handling, a native app story, and a deployment CLI, wired together from day one.
- One codebase, every target. Same routes and API handlers compile to web, desktop, or mobile.
- Convention over configuration. Drop a file in
src/app/, get a route. Drop insrc/app/api/, get an endpoint. - Fast by default. Vite + Rolldown, Oxlint + Oxfmt - all Rust-based, pre-configured.
Features
Framework
- - File-based routing with nested layouts
- - MDX and Markdown pages out of the box
- - Folder-scoped loading.tsx / error.tsx / not-found.tsx
- - Automatic code splitting
- - Auto-imports for React and router hooks
Backend
- - API routes powered by Hono
- - One handler, every runtime
- - Env loading with startup banners
- - Works on Node, Bun, Deno, Edge
Native
- - Tauri desktop + mobile builds
- - Auto plugin wiring from web APIs
- - Code signing and bundle IDs at scaffold
- - Windows, macOS, Linux, Android, iOS
DX and Deploy
- - Animated dev overlay with Shiki
- - TS/JS + Tailwind / CSS Modules
- - bini-deploy CLI for hosting
- - bini-ssg pre-renders every route
Requirements
- Node.js >= 20.19.0 (required by Vite 8)
- Operating systems: macOS, Windows, and Linux
CLI flags
Skip prompts by passing flags directly:
| Flag | Description |
|---|---|
| --typescript / --javascript | Language |
| --tailwind / --css-modules / --none | Styling |
| --platform <target> | web · windows · macos · linux · android · ios |
| --app-name <name> | Display name for desktop / mobile |
| --sign / --nosign | Code-signing setup |
| --npm / --pnpm / --yarn / --bun | Force a specific package manager |
| --install / --no-install | Install dependencies |
| --force | Overwrite existing directory |
$ npx create-bini-app@latest my-app --typescript --tailwind --platform macos $ npx create-bini-app@latest my-app --platform android --app-name "My App" --nosign
Project Structure
Scripts
| Command | Description |
|---|---|
| dev | Start Vite dev server with HMR |
| build | Type-check, then bundle and pre-render every route |
| preview | Preview the production build |
| deploy | Run bini-deploy - hosting config + push to GitHub |
| start | Web only - serve via bini-server |
| tauri:dev / tauri:build | Desktop - run or build binary |
| android / ios | Mobile - run on device/emulator |