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.

Getting Started

Welcome to the Bini.js documentation.

What is Bini.js?

Bini.js is a full-stack React framework for building web, desktop, and mobile apps from a single codebase.

Web routes are pre-rendered to static HTML at build time, delivering the same SEO and first-paint guarantees you expect from a modern web framework. Desktop and mobile targets compile to native binaries through Tauri, using the operating system's built-in WebView rather than bundling a separate browser engine.

Routing, API routes, metadata, environment handling, and a production server work out of the box. Styling is your choice. The same routes and components ship to every target, with each platform compiled and packaged for distribution.

Native Apps from a Single Codebase

Bini.js does not stop at the browser. Every project that adds a desktop or mobile target produces a real, distributable native application - compiled, signed, and packaged for its platform - from the same routes and components you already wrote for the web. The UI renders through the operating system's built-in WebView, and native capabilities are served by a Rust backend rather than a bundled browser runtime.

Desktop

Windows, macOS, and Linux builds share one project and one native configuration. Windows apps run in WebView2 and ship as NSIS or MSI installers with Authenticode signing. macOS apps run in WKWebView, signed with a Developer ID and notarized. Linux apps run in WebKitGTK and ship as AppImage, .deb, and .rpm bundles.

Mobile

Android and iOS builds are generated from the same project. Android produces a native APK or AAB with keystore signing and Play Store support, running in the system WebView. iOS runs in WKWebView and distributes through the App Store and TestFlight. Both use Tauri's official backends and compile to native binaries with a Rust core.

Native capabilities

Clipboard, notifications, geolocation, filesystem, and other native APIs are detected from your code and wired automatically during development. You do not hand-edit Rust manifests or maintain a parallel native codebase.

Build and CI

Each native target is compiled and packaged with its own build step, so desktop and mobile distributions are produced by their platform toolchains. A single command can also generate a GitHub Actions workflow that builds every target on its own runner and uploads signed installers as build artifacts. Code signing is configured once, locally or through CI secrets, and reused on every build.

Static Generation & SSR

The production build compiles the client, builds the server bundle, compiles API routes, and pre-renders every route to static HTML in a single pass. Static routes are discovered from the filesystem; dynamic routes are expanded through a staticParams export and by crawling internal links.

  • Static routes are pre-rendered to <route>/index.html at build time. The client hydrates the markup on load with no blank-screen flicker.
  • Dynamic routes export staticParams to list the URLs to pre-render, or are discovered automatically when a rendered page links to them.
  • Opting out is one line: export const prerender = false. A shell page is written instead and the route renders entirely on the client.
  • Development SSR renders every HTML navigation on the server through the same entry, with a 15-second render timeout.

Routes with data exports (loader, action, and related APIs) are client-only and receive a shell page automatically. See the Static Export documentation for the full model.

How to use the docs

The documentation is organized into ten sections:

  • Getting Started: Installation, project structure, layouts and pages, and navigation between routes
  • Routing: Folder-based and file-based routing, dynamic routes, parallel routes, intercepting routes, catch-all routes, and MDX & Markdown pages
  • Special Files: Loading UI, error boundaries, templates, default fallbacks, and not-found pages
  • Data Fetching: Loaders, actions, and accessing route data
  • Metadata: Metadata and SEO, Open Graph and Twitter cards, icons and favicons
  • API Routes: Build backend endpoints with plain function handlers or Hono, including dynamic routes
  • Environment Variables: How they work, prefixes and client exposure, and using them in API routes
  • Styling: Style your app with plain CSS, Tailwind CSS, or CSS Modules
  • Platforms: Build for web, Windows, macOS, Linux, Android, and iOS
  • Deployment: The production server, static export, hosting providers, and one-command deploys

Bini.js Router

Bini.js uses a file-system router built on folder and file conventions:

  • Folder-based routing maps folders to URL segments. Nesting folders creates nested routes automatically. Dynamic segments use [id], catch-alls use [...slug], and optional catch-alls use [[...slug]].
  • File-based routing defines UI through special files: page.tsx, layout.tsx, loading.tsx, error.tsx, and not-found.tsx. .mdx and .md pages are supported out of the box.
  • Composition is built in: route groups (group), parallel routes @slot, and intercepting routes (.), (..), and (...).
  • Code splitting and pre-rendering happen per route automatically. There is no React.lazy() boilerplate and no manual export step.
  • API routes live in src/app/api/. A file can export a plain function, per-method handlers, or a Hono app, and runs identically in development, production, and on the edge.

Start with the Routing documentation for the full guide.

Pre-requisite knowledge

The documentation assumes familiarity with web development. Before getting started, you should be comfortable with:

  • HTML
  • CSS
  • JavaScript
  • React

If you are new to React or need a refresher, start with the React documentation.

Join our Community

If you have questions about anything related to Bini.js, our community is available on:

GitHubLinkedInRedditDiscord
Was this helpful?
NextInstallation

On this page

  • What is Bini.js?
  • Native Apps from a Single Codebase
  • Static Generation & SSR
  • How to use the docs
  • Bini.js Router
  • Pre-requisite knowledge
Edit this page on GitHub

Getting Started

Welcome to the Bini.js documentation.

What is Bini.js?

Bini.js is a full-stack React framework for building web, desktop, and mobile apps from a single codebase.

Web routes are pre-rendered to static HTML at build time, delivering the same SEO and first-paint guarantees you expect from a modern web framework. Desktop and mobile targets compile to native binaries through Tauri, using the operating system's built-in WebView rather than bundling a separate browser engine.

Routing, API routes, metadata, environment handling, and a production server work out of the box. Styling is your choice. The same routes and components ship to every target, with each platform compiled and packaged for distribution.

Native Apps from a Single Codebase

Bini.js does not stop at the browser. Every project that adds a desktop or mobile target produces a real, distributable native application - compiled, signed, and packaged for its platform - from the same routes and components you already wrote for the web. The UI renders through the operating system's built-in WebView, and native capabilities are served by a Rust backend rather than a bundled browser runtime.

Desktop

Windows, macOS, and Linux builds share one project and one native configuration. Windows apps run in WebView2 and ship as NSIS or MSI installers with Authenticode signing. macOS apps run in WKWebView, signed with a Developer ID and notarized. Linux apps run in WebKitGTK and ship as AppImage, .deb, and .rpm bundles.

Mobile

Android and iOS builds are generated from the same project. Android produces a native APK or AAB with keystore signing and Play Store support, running in the system WebView. iOS runs in WKWebView and distributes through the App Store and TestFlight. Both use Tauri's official backends and compile to native binaries with a Rust core.

Native capabilities

Clipboard, notifications, geolocation, filesystem, and other native APIs are detected from your code and wired automatically during development. You do not hand-edit Rust manifests or maintain a parallel native codebase.

Build and CI

Each native target is compiled and packaged with its own build step, so desktop and mobile distributions are produced by their platform toolchains. A single command can also generate a GitHub Actions workflow that builds every target on its own runner and uploads signed installers as build artifacts. Code signing is configured once, locally or through CI secrets, and reused on every build.

Static Generation & SSR

The production build compiles the client, builds the server bundle, compiles API routes, and pre-renders every route to static HTML in a single pass. Static routes are discovered from the filesystem; dynamic routes are expanded through a staticParams export and by crawling internal links.

  • Static routes are pre-rendered to <route>/index.html at build time. The client hydrates the markup on load with no blank-screen flicker.
  • Dynamic routes export staticParams to list the URLs to pre-render, or are discovered automatically when a rendered page links to them.
  • Opting out is one line: export const prerender = false. A shell page is written instead and the route renders entirely on the client.
  • Development SSR renders every HTML navigation on the server through the same entry, with a 15-second render timeout.

Routes with data exports (loader, action, and related APIs) are client-only and receive a shell page automatically. See the Static Export documentation for the full model.

How to use the docs

The documentation is organized into ten sections:

  • Getting Started: Installation, project structure, layouts and pages, and navigation between routes
  • Routing: Folder-based and file-based routing, dynamic routes, parallel routes, intercepting routes, catch-all routes, and MDX & Markdown pages
  • Special Files: Loading UI, error boundaries, templates, default fallbacks, and not-found pages
  • Data Fetching: Loaders, actions, and accessing route data
  • Metadata: Metadata and SEO, Open Graph and Twitter cards, icons and favicons
  • API Routes: Build backend endpoints with plain function handlers or Hono, including dynamic routes
  • Environment Variables: How they work, prefixes and client exposure, and using them in API routes
  • Styling: Style your app with plain CSS, Tailwind CSS, or CSS Modules
  • Platforms: Build for web, Windows, macOS, Linux, Android, and iOS
  • Deployment: The production server, static export, hosting providers, and one-command deploys

Bini.js Router

Bini.js uses a file-system router built on folder and file conventions:

  • Folder-based routing maps folders to URL segments. Nesting folders creates nested routes automatically. Dynamic segments use [id], catch-alls use [...slug], and optional catch-alls use [[...slug]].
  • File-based routing defines UI through special files: page.tsx, layout.tsx, loading.tsx, error.tsx, and not-found.tsx. .mdx and .md pages are supported out of the box.
  • Composition is built in: route groups (group), parallel routes @slot, and intercepting routes (.), (..), and (...).
  • Code splitting and pre-rendering happen per route automatically. There is no React.lazy() boilerplate and no manual export step.
  • API routes live in src/app/api/. A file can export a plain function, per-method handlers, or a Hono app, and runs identically in development, production, and on the edge.

Start with the Routing documentation for the full guide.

Pre-requisite knowledge

The documentation assumes familiarity with web development. Before getting started, you should be comfortable with:

  • HTML
  • CSS
  • JavaScript
  • React

If you are new to React or need a refresher, start with the React documentation.

Join our Community

If you have questions about anything related to Bini.js, our community is available on:

GitHubLinkedInRedditDiscord
Was this helpful?
NextInstallation

On this page

  • What is Bini.js?
  • Native Apps from a Single Codebase
  • Static Generation & SSR
  • How to use the docs
  • Bini.js Router
  • Pre-requisite knowledge
Edit this page on GitHub