Bini.js v9.2.3Production-Ready React Framework

Build lightning-fast, source-protected React apps with file-based routing, built-in API routes, and zero-config deployment to any Node.js server.

89KB
Bundle Size
100%
Universal
0
Config
Platforms

What's New in v9.2.3

Revolutionary features that redefine React development

NEW

Standard Build Output

Industry-standard dist/ folder instead of .bini/dist. Works with all CI/CD pipelines and major hosting platforms.

NEW

Advanced File-Based Routing

File-based routes take precedence over folder-based. Support for admin.tsx → /admin and admin/page.tsx → /admin patterns.

NEW

Universal Deployment

Works on all Node.js servers - Vercel, Netlify, Heroku, Railway, Render, and traditional VPS. Zero config required.

IMPROVED

Fastify Production Server

2x faster than Express with built-in security, rate limiting, and auto-opening browser for dev, preview, and start commands.

IMPROVED

Priority Routing System

File-based routes win when both file-based and folder-based routes exist. Complete flexibility for your routing needs.

CORE

Zero Configuration

Sensible defaults for TypeScript, routing, and modern tooling. Works out of the box with all major platforms.

89KB
Bundle Size (gzipped)
2x
Faster than Express
<10s
Build Time
<100ms
HMR Updates

Standard Project Structure

Next.js-compatible organization with industry-standard output

my-app/
├── src/
├── app/ # App Router (Next.js style)
├── layout.tsx # Root layout
├── page.tsx # / (home)
├── admin.tsx ★ File-based route
├── dashboard.tsx ★ File-based route
├── products/
├── page.tsx # /products
└── [id]/
└── page.tsx # /products/:id
├── api/
├── hello.ts ★ POST /api/hello
└── users/[id].ts ★ GET /api/users/:id
├── not-found.tsx # 404 page
└── globals.css
├── components/
├── App.tsx # Auto-generated
└── main.tsx
├── public/ # Static files
├── dist/ ⭐ NEW! Standard build output
├── bini/ # Framework internals
├── api-server.js # Fastify production server
└── package.json

Auto-Discovered Routes

All routes automatically discovered and compiled at startup with priority system

Hot Reload

Instant updates in development with sub-100ms HMR and auto-opening browser

Flexible Routing

Choose between file-based or folder-based routing per route with automatic precedence

Production Ready

Fastify server with security, rate limiting, and graceful shutdown included

Advanced File-Based Routing

Two routing patterns with intelligent priority system

File-Based Routing

Simple single-file routes for quick development and less boilerplate.

src/app/ ├── admin.tsx # /admin ├── settings.tsx # /settings └── profile.tsx # /profile

Folder-Based Routing

Traditional Next.js structure for complex layouts and better organization.

src/app/ ├── admin/page.tsx # /admin ├── settings/page.tsx # /settings └── profile/page.tsx # /profile

Priority System

When both exist, file-based wins. Complete flexibility for your routing needs.

src/app/ ├── admin.tsx ✅ WINS → /admin ├── admin/page.tsx ❌ IGNORED

Dynamic Routes

Support for [id], [...slug] patterns with full type safety and parameter validation

Custom 404 Pages

Create beautiful not-found.tsx pages that work in dev, preview, and production

Layout Support

Nested layouts with proper hierarchy and persistent state across navigation

Automatic Optimization

Lazy-loaded routes with 64% smaller initial bundles and automatic code splitting

Type-Safe API Routes

Create powerful endpoints with zero boilerplate

Basic TypeScript API

Simple endpoints with automatic JSON serialization and type safety.

// src/app/api/hello.ts export default function handler(req: any, res: any) { return { message: 'Hello from Bini.js!', method: req.method, timestamp: new Date().toISOString() }; }

Dynamic Routes

URL parameters with full type safety. Supports [id] and [...slug].

// src/app/api/users/[id].ts export default function handler(req: any, res: any) { const { id } = req.params; if (req.method === 'GET') { return { id, name: `User ${id}` }; } res.status(405); return { error: 'Method not allowed' }; }

Request Methods

Full REST support with GET, POST, PUT, DELETE, PATCH.

// src/app/api/users.ts export default function handler(req, res) { switch (req.method) { case 'GET': return { users: [] } case 'POST': res.status(201) return { created: true } default: res.status(405) return { error: 'Method not allowed' } } }

Built-in Security

Helmet.js security headers, rate limiting, CORS protection, and XSS prevention.

X-RateLimit-Limit: 100 X-RateLimit-Remaining: 87 X-RateLimit-Reset: 1730396400 // Automatic in all responses

Auto Sanitization

Input validation and path traversal prevention built-in.

// src/app/api/search.ts export default function handler(req, res) { const { q, limit = '10' } = req.query // Auto-sanitized ✓ return { query: q, results: [] } }

Production Features

Everything needed for enterprise APIs with Fastify performance.

30s timeout
1MB body limit
Auto JSON
2x faster
Sanitized
Production

Universal Deployment

Deploy your Bini.js apps anywhere with zero configuration

All Node.js Servers

Works on any platform with Node.js runtime support:

npm run build npm run start

Perfect for Heroku, Railway, Render, AWS, Google Cloud, and traditional VPS.

Auto-opening browser for dev, preview, and start commands.

Vercel Deployment

Zero configuration deployment with automatic detection:

# Push to GitHub git push origin main # Vercel auto-detects and deploys

Automatic deployments on every push with proper configuration.

Netlify Deployment

Deploy with Node.js runtime in minutes:

# Build command: npm run build # Publish directory: dist
Enable Node.js runtime in Netlify settings for full functionality.

Railway Deployment

Automatic deployment with zero configuration:

# Connect GitHub repo # Railway auto-detects Node.js # Sets PORT automatically

Perfect for continuous deployment with automatic branch deployments.

Heroku Deployment

Traditional deployment made simple:

heroku create my-bini-app git push heroku main

Works out of the box with proper Procfile and build configuration.

Development Everywhere

Full development experience on all platforms:

  • ✅ GitHub Codespaces
  • ✅ CodeSandbox
  • ✅ GitPod
  • ✅ Local development
Hot reload works everywhere with consistent behavior.

Deployment Compatibility

Vercel ✅ Full
Netlify ✅ Full
Heroku ✅ Full
Railway ✅ Full
Render ✅ Full
GitHub Pages ❌ No

Why Choose Bini.js?

Everything you need for production applications

Source Code Protection

Advanced obfuscation and minification. Your code stays protected from reverse engineering.

Lightning-Fast Builds

Vite-powered with sub-100ms HMR. Production builds under 10 seconds.

Enterprise Security

Helmet headers, CORS, rate limiting (100 req/15 min), and graceful shutdown out of the box.

Flexible Routing

File-based and folder-based routing with intelligent priority system.

Performance Optimized

Fastify server (2x faster than Express) with automatic code splitting and lazy loading.

Universal Deployment

Works on all Node.js servers with zero configuration. No platform lock-in.

Zero Configuration

TypeScript and modern tooling pre-configured. Start coding immediately.

TypeScript Native

Full TypeScript throughout. Type-safe pages, components, and APIs.

Get Started in Seconds

Create your first app with a single command

# Create new project npx create-bini-app@latest my-app # Install dependencies cd my-app npm install # Start development server (auto-opens browser) npm run dev # Your app opens at http://localhost:3000

TypeScript + Tailwind

--typescript --tailwind

Team Ready

--git --readme

Custom Config

--force --skip-install

Frequently Asked Questions

Everything you need to know about Bini.js

What's new in v9.2.3?

Major features released in v9.2.3:

  • Standard Build Output – dist/ folder instead of .bini/dist
  • Advanced File-Based Routing – File-based routes take precedence
  • Universal Deployment – Works on all Node.js servers
  • Fastify Production Server – 2x faster than Express
  • Priority Routing System – File-based wins over folder-based
  • Zero Config Deployment – Works on Vercel, Netlify, Heroku, Railway
Where can I deploy Bini.js applications?

Bini.js works on all Node.js platforms:

  • ✅ All Node.js Servers: Vercel, Netlify, Heroku, Railway, Render, Fly.io
  • ✅ Development Platforms: GitHub Codespaces, CodeSandbox, GitPod
  • ✅ Traditional VPS: Ubuntu, CentOS, AWS, Google Cloud, Azure
  • ❌ Static Hosting: GitHub Pages, Netlify Static, AWS S3 (requires Node.js runtime)

Note: Bini.js requires Node.js runtime for API routes and full functionality.

How does the routing priority system work?

Bini.js supports two routing patterns with intelligent precedence:

src/app/ ├── admin.tsx ✅ WINS → /admin ├── admin/page.tsx ❌ IGNORED ├── settings/page.tsx ✅ USED → /settings └── dashboard.tsx ✅ USED → /dashboard

This gives you complete flexibility to choose the right pattern for each route.

What's the difference between file-based and folder-based routing?

File-based routing:

  • Simple single-file routes
  • Less boilerplate
  • Perfect for simple pages
  • Example: admin.tsx/admin

Folder-based routing:

  • Traditional Next.js structure
  • Better organization
  • Perfect for complex layouts
  • Example: admin/page.tsx/admin

You can mix and match both patterns in the same project.

Is Bini.js production-ready?

Absolutely! Bini.js includes everything for production:

  • Source code protection & obfuscation
  • Optimized builds with code splitting
  • Rate limiting & security headers
  • Health checks & monitoring
  • Graceful shutdown handling
  • Fastify performance (2x faster than Express)

Deploy to any Node.js platform with zero configuration.

What security features are included?

Production-grade security built-in:

  • Rate Limiting - 100 req/15min per IP
  • Helmet Headers - CSP, HSTS, X-Frame-Options
  • Input Sanitization - Deep traversal checks
  • Path Validation - Traversal prevention
  • CORS Protection - Cross-origin security
  • XSS Prevention - Automatic sanitization
  • Graceful Shutdown - 30s timeout

Ready to Build Something Amazing?

Join developers building faster, more secure React applications with Bini.js. Get started in seconds with zero configuration.