create-bini-app

Official

Build 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.

One codebase, every target. The same routes, API handlers, and components compile to web, desktop binary, or mobile app. Real Tauri apps, not wrapped web views.

Quick Start

The fastest way to scaffold a new Bini.js app:

>_Terminal
$ npx create-bini-app@latest my-app
$ cd my-app
$ npm install
$ npm run dev

On installation, you'll see the following prompts:

>_Terminal
? Project name? (my-app)
 
? Use TypeScript?
> Yes
No
↑↓ navigate • ⏎ select
 
? Styling solution?
> Tailwind CSS
CSS Modules
None
↑↓ navigate • ⏎ select
 
? Which platform would you like to target?
> Web Application
Windows Desktop
Linux Desktop
macOS Desktop
Android
iOS
↑↓ 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 in src/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:

FlagDescription
--typescript / --javascriptLanguage
--tailwind / --css-modules / --noneStyling
--platform <target>web · windows · macos · linux · android · ios
--app-name <name>Display name for desktop / mobile
--sign / --nosignCode-signing setup
--npm / --pnpm / --yarn / --bunForce a specific package manager
--install / --no-installInstall dependencies
--forceOverwrite existing directory
>_Terminal
$ 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

my-app
src
app
api
ƒhello.ts
layout.tsx
page.tsx
not-found.tsx
loading.tsx
error.tsx
globals.css
main.tsx
App.tsx
public
favicon.ico
logo.png
vite.config.ts
package.json

Scripts

CommandDescription
devStart Vite dev server with HMR
buildType-check, then bundle and pre-render every route
previewPreview the production build
deployRun bini-deploy - hosting config + push to GitHub
startWeb only - serve via bini-server
tauri:dev / tauri:buildDesktop - run or build binary
android / iosMobile - run on device/emulator
Was this helpful?