Build web applications with Bini.js - the default platform target.
Web is the default platform target in Bini.js. It is a standard Vite + React app with file-based routing, full static pre-rendering, and a Hono API layer. Your application runs in the browser and can be deployed to any hosting platform.
Pre-rendered static HTML with zero-JS-lag client hydration
Hono-powered routes compiled to a single dist/api bundle
Vite + Rolldown, Oxlint, and Oxfmt for instant builds
create-bini-app without a --platform flag, the CLI enters interactive mode with Web pre-selected. To skip the prompt entirely, pass --platform web explicitly.Web apps are pure JavaScript/TypeScript. The only prerequisites are Node.js and Git. The setup is identical on Windows, macOS, and Linux.
sudo apt install git on Linux, and winget install --id Git.Git on Windows.Create a new Bini.js project targeting Web and install its dependencies:
If you omit the --platform flag, the CLI drops into an interactive prompt with Web Application pre-selected. It does not silently scaffold a Web project without the flag:
Start the development server with HMR (Hot Module Replacement). This command is the same on every OS:
The dev server provides:
/api/*.env filesbini-overlayBuild and serve your application in production mode:
bini-server is a zero-dependency production server that includes:
dist/api/index.mjs (compiled during build)Every route is pre-rendered to static HTML during npm run build. There is no separate export command or export mode - bini-ssg drives pre-rendering as part of the same Vite build.
Bini.js includes advanced SEO and performance features out of the box:
bini-ssg automatically discovers every route from bini-router and pre-renders it to a real HTML file.<a href> links found in rendered HTML are followed and pre-rendered automatically. There is no depth limit.export const metadata and injected into the <head> of every page.<title>, <meta>, or <link> tags rendered by your React components are automatically hoisted into the document <head>.bini-router. No React.lazy() boilerplate is needed.npm run build runs vite build. The bini-ssg plugin drives pre-rendering as part of that same build:
/, /about) are rendered to real server-rendered HTML./blog/:slug) get a real HTML page if listed in staticParams, or a shell page for client-side hydration.renderToPipeableStream is used for server rendering.The output is real server-rendered markup. The client then hydrates it with hydrateRoot on load.
Each route gets its own index.html in dist/:
/ and /about/blog/:slug and /docs/* are shell pages (unless listed in staticParams)api/index.mjs is the compiled API bundle for bini-server or edge hosts.bini-deploy is bundled into every scaffold and exposed as npm run deploy. For web, it prompts for a hosting target and generates the appropriate configuration and entry files.
Before deploying, ensure you have a GitHub repository and the required credentials for your chosen hosting provider.
https://github.com/you/my-app).The target you choose determines what bini-deploy creates:
bini-server reads dist/api/ directly)netlify/edge-functions/api.ts + netlify.tomlapi/index.ts + vercel.jsonworker.ts + wrangler.tomlserver/index.tsnpm run build (generates static HTML via SSG), serve with npm run start to run the bini-server and handle API routes dynamically (requires Node.js).npm run build, deploy the dist/ folder to any static hosting (Netlify, Vercel, Cloudflare Pages, S3). Note: This serves the pre-rendered pages and client-side hydration, but your API routes will not work unless you use an edge adapter.npm run deploy to generate platform-specific entry files for Vercel, Netlify, Cloudflare, or Deno, which serve the static HTML and run your Hono API at the edge.For Node.js hosts (Railway, Render, Fly.io, a VPS):
bini-server reads the compiled API bundle from dist/api/index.mjs, so deploy the whole project - not just dist/. Use pm2 on a bare VPS.
bini-deploy does not automate GitHub Pages. You must set the subpath manually, build, and upload the static files yourself:
base: '/my-repo/' in vite.config.ts.npm run build to generate a subpath-aware dist/ folder.dist/ folder to your GitHub Pages branch (e.g., gh-pages) manually or using a tool like gh-pages.Build a native Windows app with Authenticode signing and NSIS/MSI installers.
Build a native macOS app with Developer ID signing and notarization.
Build a native Linux app with AppImage, .deb, and .rpm bundles.
Build a native Android app with keystore signing and Play Store support.
Build web applications with Bini.js - the default platform target.
Web is the default platform target in Bini.js. It is a standard Vite + React app with file-based routing, full static pre-rendering, and a Hono API layer. Your application runs in the browser and can be deployed to any hosting platform.
Pre-rendered static HTML with zero-JS-lag client hydration
Hono-powered routes compiled to a single dist/api bundle
Vite + Rolldown, Oxlint, and Oxfmt for instant builds
create-bini-app without a --platform flag, the CLI enters interactive mode with Web pre-selected. To skip the prompt entirely, pass --platform web explicitly.Web apps are pure JavaScript/TypeScript. The only prerequisites are Node.js and Git. The setup is identical on Windows, macOS, and Linux.
sudo apt install git on Linux, and winget install --id Git.Git on Windows.Create a new Bini.js project targeting Web and install its dependencies:
If you omit the --platform flag, the CLI drops into an interactive prompt with Web Application pre-selected. It does not silently scaffold a Web project without the flag:
Start the development server with HMR (Hot Module Replacement). This command is the same on every OS:
The dev server provides:
/api/*.env filesbini-overlayBuild and serve your application in production mode:
bini-server is a zero-dependency production server that includes:
dist/api/index.mjs (compiled during build)Every route is pre-rendered to static HTML during npm run build. There is no separate export command or export mode - bini-ssg drives pre-rendering as part of the same Vite build.
Bini.js includes advanced SEO and performance features out of the box:
bini-ssg automatically discovers every route from bini-router and pre-renders it to a real HTML file.<a href> links found in rendered HTML are followed and pre-rendered automatically. There is no depth limit.export const metadata and injected into the <head> of every page.<title>, <meta>, or <link> tags rendered by your React components are automatically hoisted into the document <head>.bini-router. No React.lazy() boilerplate is needed.npm run build runs vite build. The bini-ssg plugin drives pre-rendering as part of that same build:
/, /about) are rendered to real server-rendered HTML./blog/:slug) get a real HTML page if listed in staticParams, or a shell page for client-side hydration.renderToPipeableStream is used for server rendering.The output is real server-rendered markup. The client then hydrates it with hydrateRoot on load.
Each route gets its own index.html in dist/:
/ and /about/blog/:slug and /docs/* are shell pages (unless listed in staticParams)api/index.mjs is the compiled API bundle for bini-server or edge hosts.bini-deploy is bundled into every scaffold and exposed as npm run deploy. For web, it prompts for a hosting target and generates the appropriate configuration and entry files.
Before deploying, ensure you have a GitHub repository and the required credentials for your chosen hosting provider.
https://github.com/you/my-app).The target you choose determines what bini-deploy creates:
bini-server reads dist/api/ directly)netlify/edge-functions/api.ts + netlify.tomlapi/index.ts + vercel.jsonworker.ts + wrangler.tomlserver/index.tsnpm run build (generates static HTML via SSG), serve with npm run start to run the bini-server and handle API routes dynamically (requires Node.js).npm run build, deploy the dist/ folder to any static hosting (Netlify, Vercel, Cloudflare Pages, S3). Note: This serves the pre-rendered pages and client-side hydration, but your API routes will not work unless you use an edge adapter.npm run deploy to generate platform-specific entry files for Vercel, Netlify, Cloudflare, or Deno, which serve the static HTML and run your Hono API at the edge.For Node.js hosts (Railway, Render, Fly.io, a VPS):
bini-server reads the compiled API bundle from dist/api/index.mjs, so deploy the whole project - not just dist/. Use pm2 on a bare VPS.
bini-deploy does not automate GitHub Pages. You must set the subpath manually, build, and upload the static files yourself:
base: '/my-repo/' in vite.config.ts.npm run build to generate a subpath-aware dist/ folder.dist/ folder to your GitHub Pages branch (e.g., gh-pages) manually or using a tool like gh-pages.Build a native Windows app with Authenticode signing and NSIS/MSI installers.
Build a native macOS app with Developer ID signing and notarization.
Build a native Linux app with AppImage, .deb, and .rpm bundles.
Build a native Android app with keystore signing and Play Store support.