DocsPluginsShowcaseReleases
npmStar us on GitHub

Getting Started

IntroductionInstallationProject StructureLayouts and PagesLinking and Navigating

Routing

Folder-Based RoutingFile-Based RoutingDynamic RoutesParallel RoutesIntercepting RoutesCatch-All RoutesMDX & Markdown Pages

Special Files

Loading UIError BoundariesTemplateDefaultNot Found

Data Fetching

LoadersActionsAccessing Route Data

Metadata

Metadata & SEOOpen Graph & TwitterIcons & Favicons

API Routes

API Routes OverviewPlain Function HandlersHono IntegrationDynamic API Routes

Environment Variables

OverviewPrefixes & Client ExposureUsing in API Routes

Styling

CSS OverviewTailwind CSSCSS Modules

Platforms

WebWindowsmacOSLinuxAndroidiOS

Deployment

Deployment OverviewProduction ServerStatic ExportHosting Providers

A native React framework for building cross-platform applications from a single codebase.

Resources

  • Documentation
  • Plugins
  • Showcase
  • Releases

Community

  • GitHub Discussions
  • Reddit
  • Discord
  • LinkedIn

More

  • npm
  • GitHub
  • Issues
  • License

© 2026 Bini Cooperation.

Installation

Create a new Bini.js application and run it locally.

Quick start

The quickest way to create a new Bini.js app is using create-bini-app, which sets up everything automatically.

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

On installation, you'll see the following prompts:

>_Terminal
◇
Project name?
my-bini-app
◇
Use TypeScript?
● Yes / ○ No
↑/↓ to navigate • Enter: confirm
◇
Styling solution?
● Tailwind CSS
○ CSS Modules
○ None
↑/↓ to navigate • Enter: confirm
◆
Platforms?
◼ Web
◻ Desktop (Windows, macOS, Linux)
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
After the prompts, create-bini-app creates a folder with your project name, installs the required dependencies, and enables TypeScript, Tailwind CSS, Oxlint, and the @/* import alias by default.

CLI flags

Skip prompts by passing flags directly:

FlagDescription
--typescriptUse TypeScript (default)
--javascriptUse JavaScript
--tailwindUse Tailwind CSS (default)
--css-modulesUse CSS Modules
--noneNo styling
--platform <targets>web · desktop · android · ios (comma-separated)
--app-name <name>Display name for desktop / mobile apps
--org <domain>Bundle ID prefix (reverse domain)
--sign / --nosignCode-signing setup
--npm / --pnpm / --yarn / --bunForce a specific package manager
--no-installSkip dependency installation
--forceOverwrite existing directory
--yes, -yAccept all defaults, no prompts
--version, -vPrint CLI version
--help, -hShow help

System requirements

Before you begin, make sure your development environment meets the following requirements:

  • Minimum Node.js version: 20.19.0
  • Operating systems: macOS, Windows, and Linux.
  • For desktop builds: Windows (C++ Build Tools), macOS (Xcode CLT), Linux (WebKitGTK).
  • For mobile builds: Android (JDK 17, Android Studio), iOS (Xcode, CocoaPods).

Supported browsers

Bini.js supports modern browsers with zero configuration.

  • Chrome 111+
  • Edge 111+
  • Firefox 111+
  • Safari 16.4+

Native platform support

Bini.js builds for multiple platforms from a single codebase. Use the --platform flag to target a specific platform:

>_Terminal
$ npx create-bini-app@latest my-app --platform desktop
$ npx create-bini-app@latest my-app --platform android --app-name "My App" --nosign
$ npx create-bini-app@latest my-app --platform web,android

Every platform gets the full framework - routing, layouts, API routes, SSG, the overlay, and the rest. The --platform flag only decides what the build targets.

PlatformBuilds
webWeb app
desktopNative desktop binaries (Windows, macOS, Linux)
android · iosNative mobile apps
desktop covers Windows, macOS, and Linux from one shared src-tauri/. Use web,desktop (comma-separated) to scaffold multiple targets at once.

Add or remove platforms

You don't have to decide up front. Web is always included, and any native target can be added later from inside the project without touching your vite.config or src/app.

Add a target

>_Terminal
$ npx create-bini-app@latest add
$ npx create-bini-app@latest add desktop android
$ npx create-bini-app@latest add ios --sign

With no target, the CLI shows a Clack-style checklist of platforms that are not yet added:

>_Terminal
◇
Add platforms?
◼ Desktop (Windows, macOS, Linux)
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
App name?
Newapp
◇
Organization (bundle ID prefix)?
com.bini
◆
Set up windows signing now?
○ Yes / ● No
↑/↓ to navigate • Enter: confirm

The first native target adds the shared src-tauri/ setup, the Tauri packages, and every native script. Desktop operating systems share one src-tauri/, so adding desktop again only offers code signing. Re-running is safe - anything already configured is skipped.

Run the command from inside the project. iOS is only offered on macOS; on Windows and Linux, add ios prints how to build iOS in CI instead.

Remove a target

>_Terminal
$ npx create-bini-app@latest remove
$ npx create-bini-app@latest remove android
$ npx create-bini-app@latest remove desktop android ios

remove lists what it will delete and asks for confirmation. With no target, it shows a Clack-style checklist of platforms that are present:

>_Terminal
◆
Remove platforms?
◼ Desktop (Windows, macOS, Linux)
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm

Web cannot be removed. Desktop shares src-tauri/ with mobile, so it can only be removed together with all of them.

Removing a mobile target deletes its generated project (including the keystore copy written by sign). Keep your original keystore and password backed up - every store update must be signed with the same key.

Rename the app or change the bundle ID

The native app name and bundle identifier live in src-tauri/tauri.conf.json. To change them after the project is created, run one of these from inside the project:

>_Terminal
$ npx create-bini-app@latest --app-name
$ npx create-bini-app@latest --org
$ npx create-bini-app@latest --app-name "My App" --org com.acme
>_Terminal
◇
New app name?
My App
◇
Bundle ID prefix (reverse domain)?
com.acme
◆
Changing the identifier makes stores treat this as a new app. Continue?
● Yes / ○ No
↑/↓ to navigate • Enter: confirm
  • --app-name updates productName and the window title.
  • --org rebuilds the identifier as <org>.<project>.
  • Generated Android and iOS projects keep their old values. Remove and re-add the platform to regenerate them, or edit them by hand.

Run the development server

Each platform has its own dev command. Run the one that matches the platform you scaffolded.

Web

>_Terminal
$ npm run dev

Starts the Vite dev server and opens your browser automatically.

Desktop

>_Terminal
$ npm run tauri:dev

Launches the app in a native desktop window (Windows, macOS, or Linux) with full HMR.

Android

>_Terminal
$ npm run android

Runs the app on a connected Android device or emulator.

iOS

>_Terminal
$ npm run ios

Runs the app on a connected iOS device or simulator. macOS only.

Maintenance commands

Every project ships with a few maintenance commands. None of them asks for confirmation.

Check your toolchain

>_Terminal
$ npx create-bini-app@latest doctor

Runs tauri info to check Rust, the platform toolchains, and versions. In a project without a native target, it just tells you how to add one.

Delete build output

>_Terminal
$ npx create-bini-app@latest clean

Deletes dist/, the generated native build folders, and the Rust build cache. node_modules is kept.

Upgrade the project

>_Terminal
$ npx create-bini-app@latest upgrade

Brings the project up to date with the latest Bini.js release - dependencies, tooling, and template files.

Your code is never touched. src/, package.json, and vite.config.* stay as they are. Commit first, then review the diff after running it.

Set up TypeScript

Bini.js supports TypeScript out of the box. Just pick TypeScript in create-bini-app or use the --typescript flag, and the CLI sets everything up for you.

Set up linting

Bini.js uses Oxlint for linting and Oxfmt for formatting - pre-configured and ready to use.

{}package.json
{
  "scripts": {
    "lint": "oxlint",
    "format": "oxfmt",
    "check": "npm run lint && npm run format"
  }
}

These scripts refer to the different stages of developing an application:

  • npm run lint - runs Oxlint.
  • npm run format - runs Oxfmt.
  • npm run check - runs both lint and format.

Set up absolute imports and module path aliases

Bini.js has built-in support for path aliases using the "paths" option in tsconfig.json. These options let you alias project directories to absolute paths, making imports easier to read and refactor:

// Before
import { Button } from '../../../components/button'

// After
import { Button } from '@/components/button'

Path aliases are configured by default:

tsconfig.json
{
  "compilerOptions": {
    "paths": {
      "@/*": ["./src/*"]
    }
  }
}
Vite resolves the @ alias to the src directory through the resolve.alias entry in vite.config.ts.
vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [
    react(),
    // ...your other plugins
  ],
  resolve: {
    alias: { '@': '/src' },
  },
})

Project Structure

Learn how a Bini.js project is organized and what each folder contains.

Layouts and Pages

Create your first pages and wrap them in shared layouts.

Routing

Define routes from the filesystem with folder-based and file-based conventions.

API Routes

Add backend endpoints with plain functions or a full Hono app.

Deployment

Deploy to Node, Vercel, Netlify, Cloudflare, or Deno, or build native apps in CI.

Platforms

Build for web, Windows, macOS, Linux, Android, or iOS from one codebase.

Was this helpful?
PreviousGetting Started
NextProject Structure

On this page

  • Quick start
  • CLI flags
  • System requirements
  • Supported browsers
  • Native platform support
  • Add or remove platforms
  • Run the development server
  • Maintenance commands
  • Set up TypeScript
  • Set up linting
  • Set up absolute imports
Edit this page on GitHub

Installation

Create a new Bini.js application and run it locally.

Quick start

The quickest way to create a new Bini.js app is using create-bini-app, which sets up everything automatically.

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

On installation, you'll see the following prompts:

>_Terminal
◇
Project name?
my-bini-app
◇
Use TypeScript?
● Yes / ○ No
↑/↓ to navigate • Enter: confirm
◇
Styling solution?
● Tailwind CSS
○ CSS Modules
○ None
↑/↓ to navigate • Enter: confirm
◆
Platforms?
◼ Web
◻ Desktop (Windows, macOS, Linux)
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
After the prompts, create-bini-app creates a folder with your project name, installs the required dependencies, and enables TypeScript, Tailwind CSS, Oxlint, and the @/* import alias by default.

CLI flags

Skip prompts by passing flags directly:

FlagDescription
--typescriptUse TypeScript (default)
--javascriptUse JavaScript
--tailwindUse Tailwind CSS (default)
--css-modulesUse CSS Modules
--noneNo styling
--platform <targets>web · desktop · android · ios (comma-separated)
--app-name <name>Display name for desktop / mobile apps
--org <domain>Bundle ID prefix (reverse domain)
--sign / --nosignCode-signing setup
--npm / --pnpm / --yarn / --bunForce a specific package manager
--no-installSkip dependency installation
--forceOverwrite existing directory
--yes, -yAccept all defaults, no prompts
--version, -vPrint CLI version
--help, -hShow help

System requirements

Before you begin, make sure your development environment meets the following requirements:

  • Minimum Node.js version: 20.19.0
  • Operating systems: macOS, Windows, and Linux.
  • For desktop builds: Windows (C++ Build Tools), macOS (Xcode CLT), Linux (WebKitGTK).
  • For mobile builds: Android (JDK 17, Android Studio), iOS (Xcode, CocoaPods).

Supported browsers

Bini.js supports modern browsers with zero configuration.

  • Chrome 111+
  • Edge 111+
  • Firefox 111+
  • Safari 16.4+

Native platform support

Bini.js builds for multiple platforms from a single codebase. Use the --platform flag to target a specific platform:

>_Terminal
$ npx create-bini-app@latest my-app --platform desktop
$ npx create-bini-app@latest my-app --platform android --app-name "My App" --nosign
$ npx create-bini-app@latest my-app --platform web,android

Every platform gets the full framework - routing, layouts, API routes, SSG, the overlay, and the rest. The --platform flag only decides what the build targets.

PlatformBuilds
webWeb app
desktopNative desktop binaries (Windows, macOS, Linux)
android · iosNative mobile apps
desktop covers Windows, macOS, and Linux from one shared src-tauri/. Use web,desktop (comma-separated) to scaffold multiple targets at once.

Add or remove platforms

You don't have to decide up front. Web is always included, and any native target can be added later from inside the project without touching your vite.config or src/app.

Add a target

>_Terminal
$ npx create-bini-app@latest add
$ npx create-bini-app@latest add desktop android
$ npx create-bini-app@latest add ios --sign

With no target, the CLI shows a Clack-style checklist of platforms that are not yet added:

>_Terminal
◇
Add platforms?
◼ Desktop (Windows, macOS, Linux)
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
App name?
Newapp
◇
Organization (bundle ID prefix)?
com.bini
◆
Set up windows signing now?
○ Yes / ● No
↑/↓ to navigate • Enter: confirm

The first native target adds the shared src-tauri/ setup, the Tauri packages, and every native script. Desktop operating systems share one src-tauri/, so adding desktop again only offers code signing. Re-running is safe - anything already configured is skipped.

Run the command from inside the project. iOS is only offered on macOS; on Windows and Linux, add ios prints how to build iOS in CI instead.

Remove a target

>_Terminal
$ npx create-bini-app@latest remove
$ npx create-bini-app@latest remove android
$ npx create-bini-app@latest remove desktop android ios

remove lists what it will delete and asks for confirmation. With no target, it shows a Clack-style checklist of platforms that are present:

>_Terminal
◆
Remove platforms?
◼ Desktop (Windows, macOS, Linux)
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm

Web cannot be removed. Desktop shares src-tauri/ with mobile, so it can only be removed together with all of them.

Removing a mobile target deletes its generated project (including the keystore copy written by sign). Keep your original keystore and password backed up - every store update must be signed with the same key.

Rename the app or change the bundle ID

The native app name and bundle identifier live in src-tauri/tauri.conf.json. To change them after the project is created, run one of these from inside the project:

>_Terminal
$ npx create-bini-app@latest --app-name
$ npx create-bini-app@latest --org
$ npx create-bini-app@latest --app-name "My App" --org com.acme
>_Terminal
◇
New app name?
My App
◇
Bundle ID prefix (reverse domain)?
com.acme
◆
Changing the identifier makes stores treat this as a new app. Continue?
● Yes / ○ No
↑/↓ to navigate • Enter: confirm
  • --app-name updates productName and the window title.
  • --org rebuilds the identifier as <org>.<project>.
  • Generated Android and iOS projects keep their old values. Remove and re-add the platform to regenerate them, or edit them by hand.

Run the development server

Each platform has its own dev command. Run the one that matches the platform you scaffolded.

Web

>_Terminal
$ npm run dev

Starts the Vite dev server and opens your browser automatically.

Desktop

>_Terminal
$ npm run tauri:dev

Launches the app in a native desktop window (Windows, macOS, or Linux) with full HMR.

Android

>_Terminal
$ npm run android

Runs the app on a connected Android device or emulator.

iOS

>_Terminal
$ npm run ios

Runs the app on a connected iOS device or simulator. macOS only.

Maintenance commands

Every project ships with a few maintenance commands. None of them asks for confirmation.

Check your toolchain

>_Terminal
$ npx create-bini-app@latest doctor

Runs tauri info to check Rust, the platform toolchains, and versions. In a project without a native target, it just tells you how to add one.

Delete build output

>_Terminal
$ npx create-bini-app@latest clean

Deletes dist/, the generated native build folders, and the Rust build cache. node_modules is kept.

Upgrade the project

>_Terminal
$ npx create-bini-app@latest upgrade

Brings the project up to date with the latest Bini.js release - dependencies, tooling, and template files.

Your code is never touched. src/, package.json, and vite.config.* stay as they are. Commit first, then review the diff after running it.

Set up TypeScript

Bini.js supports TypeScript out of the box. Just pick TypeScript in create-bini-app or use the --typescript flag, and the CLI sets everything up for you.

Set up linting

Bini.js uses Oxlint for linting and Oxfmt for formatting - pre-configured and ready to use.

{}package.json
{
  "scripts": {
    "lint": "oxlint",
    "format": "oxfmt",
    "check": "npm run lint && npm run format"
  }
}

These scripts refer to the different stages of developing an application:

  • npm run lint - runs Oxlint.
  • npm run format - runs Oxfmt.
  • npm run check - runs both lint and format.

Set up absolute imports and module path aliases

Bini.js has built-in support for path aliases using the "paths" option in tsconfig.json. These options let you alias project directories to absolute paths, making imports easier to read and refactor:

// Before
import { Button } from '../../../components/button'

// After
import { Button } from '@/components/button'

Path aliases are configured by default:

tsconfig.json
{
  "compilerOptions": {
    "paths": {
      "@/*": ["./src/*"]
    }
  }
}
Vite resolves the @ alias to the src directory through the resolve.alias entry in vite.config.ts.
vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [
    react(),
    // ...your other plugins
  ],
  resolve: {
    alias: { '@': '/src' },
  },
})

Project Structure

Learn how a Bini.js project is organized and what each folder contains.

Layouts and Pages

Create your first pages and wrap them in shared layouts.

Routing

Define routes from the filesystem with folder-based and file-based conventions.

API Routes

Add backend endpoints with plain functions or a full Hono app.

Deployment

Deploy to Node, Vercel, Netlify, Cloudflare, or Deno, or build native apps in CI.

Platforms

Build for web, Windows, macOS, Linux, Android, or iOS from one codebase.

Was this helpful?
PreviousGetting Started
NextProject Structure

On this page

  • Quick start
  • CLI flags
  • System requirements
  • Supported browsers
  • Native platform support
  • Add or remove platforms
  • Run the development server
  • Maintenance commands
  • Set up TypeScript
  • Set up linting
  • Set up absolute imports
Edit this page on GitHub