Router + State + Hooks + i18n + PWA + API Mocking + IndexedDB + more

20 packages.
One simple script tag.
11KB gzipped.

Other frameworks give you rendering. You still need to npm install a router, a state manager, an HTTP client, i18n, mocking, PWA tooling...
Aura.js ships all 20 — with zero dependencies and zero build step.

11
KB gzipped
20
Built-in modules
10
npm packages replaced
0
Dependencies
What's inside 11KB?

20 modules. Zero npm installs.

React needs react-router + zustand + axios + react-intl + MSW to match this. Aura ships it all.

Router

SPA routing with dynamic params, wildcards, groups, named routes, middlewares, guards, and full browser history support.

16 features
Replaces react-router (16KB)

State

Reactive state with subscriptions, computed properties, batch updates, actions, persistence, and the selector pattern.

13 features
Replaces zustand / redux (3-14KB)

Events

Pub/sub with wildcard namespaces, priority ordering, batch operations, and auto-unsubscribe returns.

10 features
🗎

Template

Handlebars-style templating with #if/#each/#unless, partials, auto-escaping, caching, and i18n integration.

12 features
🌐

API Client

Full HTTP client with interceptors, timeout, retry with backoff, abort support, file upload with progress tracking.

14 features
Replaces axios (14KB)
🇧

i18n

Full internationalization with pluralization, fallback languages, Intl formatting, RTL detection, and DOM translation.

14 features
Replaces react-intl / vue-i18n (40KB)
🛰

Mock API

Intercept fetch with zero dependencies. Register routes with inline JSON or local files, persist to localStorage, share between devs.

New 12 features
Replaces MSW (36KB)
🗂

IndexedDB

Promise-based IndexedDB wrapper. Stores, indexes, cursors, queries — all the power without the ugly callback API.

New 11 features
Replaces dexie / idb (12KB)
📝

Logger

Structured logging with levels, tagged loggers, custom transports, history, and auto-emit to the Events system.

New 10 features
Replaces loglevel / winston
🔌

Hooks

Composable hooks like React — useState, useEvent, useFetch, useStorage, useComputed — wired into Aura's core.

New 9 hooks
💪

tryThis

Kill try/catch boilerplate. Wrap any sync or async operation and get a clean [error, result] tuple back.

New Zero overhead
📷

PWA + Service Worker

Register SW, handle install prompts, cache strategies (cache-first, network-first, stale-while-revalidate), offline support.

New Offline ready
Replaces workbox (20KB)

Replace 10 npm packages
with one script tag.

Router, state manager, HTTP client, i18n, API mocking, IndexedDB, PWA, hooks, logging, error handling — other frameworks need a dozen packages for this. Aura ships it all in 11KB gzipped. No Node. No build step. No config.

STEP 1

Add one script tag

<script src="aura.js">
STEP 2

Register routes & state

Aura.route('/', handler)
STEP 3

Call init. You're done.

Aura.init()
✕ No react-router ✕ No zustand / redux ✕ No axios ✕ No react-intl ✕ No MSW ✕ No workbox ✕ No Node.js ✓ All built in ✓ 11KB gzipped ✓ Zero config
The real comparison

They give you a view layer.
We give you the whole stack.

React = 46KB for rendering. Add react-router (16KB), zustand (3KB), axios (14KB), react-intl (40KB), MSW (36KB)... or just use Aura at 11KB total.

They ship a view layer. This is Aura with everything.

Bundle size (min+gzip) — remember, Aura includes router, state, hooks, i18n, PWA, mocking, IndexedDB...

~11KB
Aura.js
44KB
Vue 3
46KB
React + ReactDOM
90KB
Angular
143KB
Next.js runtime
Feature Aura.js React Vue 3 Svelte
No Build Step Required CDN only
No Node.js Required CDN only
Built-in Router
Built-in State Management
Built-in HTTP Client
Built-in i18n
Built-in Templating JSX
Device Detection
Geolocation
Performance Monitoring DevTools DevTools
Built-in API Mocking MSW (36KB)
Built-in IndexedDB
Composable Hooks Composition API
PWA + Service Worker
Zero Dependencies
Bundle Size (min+gzip) ~11KB ~46KB ~44KB ~4KB*
Real cost for equivalent features 11KB (done) ~155KB** ~90KB** ~80KB**
npm packages needed 0 6+ 5+ 5+
Setup Time 10 seconds ~5 minutes ~5 minutes ~5 minutes

*Svelte compiles away, but requires a build step and Node.js
**React + react-router + zustand + axios + react-intl + MSW. Vue + vue-router + pinia + vue-i18n. Svelte + svelte-routing + svelte-i18n.

What's inside

Each module replaces a package.

React-router, zustand, axios, react-intl — all replaced. See the APIs.

☉ Routing

Register routes with dynamic segments, group them under prefixes, add global middleware, and navigate seamlessly — all without page reloads.

  • Dynamic Params
  • Wildcards
  • Named Routes
  • Groups
  • Middleware
  • beforeLeave
  • Link Intercept
  • History API
router.js
// Register routes with dynamic params
Aura.route('/', (ctx) => {
  Aura.template.renderTo('home');
});

Aura.route('/users/:id', (ctx) => {
  console.log(ctx.params.id);  // "42"
});

// Group routes under a prefix
Aura.group('/admin', (r) => {
  r.route('/dashboard', handler);
  r.route('/settings', handler);
});

// Global auth middleware
Aura.middleware((ctx) => {
  return isLoggedIn();
});

// Catch-all wildcard route
Aura.route('/files/*', (ctx) => {
  console.log(ctx.params.wildcard);
});

⚙ State Management

Initialize, read, and update state with automatic change notifications. Use computed properties, batch updates, and persist to localStorage.

  • Reactive
  • Computed
  • Batch
  • Persist
  • Actions
  • Selectors
  • Reset
state.js
// Initialize with defaults
Aura.state.init({ count: 0, user: null });

// Reactive subscriptions
Aura.state.subscribe('count', (val) => {
  document.querySelector('#count')
    .textContent = val;
});

// Computed properties
Aura.state.computed('doubled', (s) => s.count * 2);

// Batch multiple updates (single emit)
Aura.state.batch(() => {
  Aura.state.set('count', 10);
  Aura.state.set('user', { name: 'Alex' });
});

// Persist to localStorage
Aura.state.persist();

⚡ API Client

A batteries-included HTTP client with named interceptors, automatic retry, timeout, abort controller, and file upload with progress tracking.

  • GET/POST/PUT/PATCH/DELETE
  • Interceptors
  • Timeout
  • Retry
  • Abort
  • Upload
api.js
// Configure base URL & defaults
Aura.api.configure({
  baseURL: 'https://api.example.com',
  timeout: 5000,
  retry:   3,
});

// Named auth interceptor
Aura.api.addInterceptor('auth', (cfg) => {
  cfg.headers['Authorization']
    = `Bearer ${token}`;
  return cfg;
});

// Fetch with abort support
const ctrl = Aura.api.createAbortController();
const users = await Aura.api.get('/users', {
  signal: ctrl.signal,
  params: { page: 1 }
});

// Upload with progress
await Aura.api.upload('/files', formData, {
  onProgress: (pct) => console.log(`${pct}%`)
});

🗎 Templating

Handlebars-inspired syntax with conditionals, loops, partials, and automatic HTML escaping. Templates are fetched, cached, and translated.

  • {{var}}
  • {{{raw}}}
  • #if / #else
  • #each
  • #unless
  • {{> partial}}
  • Cache
  • Auto i18n
template.html + render.js
<!-- template: user-card.html -->
<div>
  {{#if premium}}
    <span>{{name}}</span>
  {{else}}
    <span>{{name}}</span>
  {{/if}}

  {{#each skills}}
    <span class="tag">{{.}}</span>
  {{/each}}
</div>

// Render with data
Aura.template.renderString(tpl, {
  name: 'Alex',
  premium: true,
  skills: ['JS', 'TS', 'Rust']
});

🇧 Internationalization

Load language files on demand, translate with dot-notation keys and placeholders, handle pluralization, format numbers and dates with Intl.

  • Dot Keys
  • Pluralization
  • Fallback Lang
  • Number Format
  • Date Format
  • Relative Time
  • RTL Detection
  • DOM Translate
i18n.js
await Aura.i18n.load('en');

// Dot-notation keys
Aura.i18n.t('hero.title');
// => "Build Beautiful Apps"

// Placeholders
Aura.i18n.t('greeting', { name: 'Alex' });
// => "Hello, Alex"

// Pluralization
Aura.i18n.plural('items', 0);  // "No items"
Aura.i18n.plural('items', 1);  // "1 item"
Aura.i18n.plural('items', 42); // "42 items"

// Intl formatting
Aura.i18n.formatNumber(1234567.89);
// => "1,234,567.89"

Aura.i18n.formatDate(new Date());
// => "3/17/2026"

Aura.i18n.formatRelative(Date.now() - 3600000);
// => "1 hour ago"

🔈 Events

A lightweight pub/sub system with wildcard namespaces, priority ordering, and auto-unsubscribe returns. The backbone of the framework.

  • on / off / emit
  • once
  • Wildcard *
  • Priority
  • Batch
  • Auto Unsub
events.js
// Subscribe — returns unsubscribe function
const unsub = Aura.on('user:login', (user) => {
  console.log('Welcome', user.name);
});

// Wildcard — catches all user:* events
Aura.on('user:*', (data) => {
  analytics(data);
});

// Priority — higher runs first
Aura.on('order:placed', validate, 10);
Aura.on('order:placed', sendEmail, 5);

// One-time listener
Aura.once('app:ready', () => bootstrap());

// Emit
Aura.emit('user:login', { name: 'Alex' });

// Clean up later
unsub();
Replaces MSW (36KB)

Mock API. Built in.

Frontend doesn't wait for backend. Mock any route, from inline data or local JSON files. Already inside Aura — no extra install.

🛰 Mock API

Intercept fetch() globally. Register mock routes with method + URL pattern matching, simulated delays, custom status codes. Persist mocks in localStorage, export/import between devs.

  • Fetch Intercept
  • :params
  • JSON Files
  • Delay
  • Status Codes
  • Passthrough
  • localStorage
  • Export / Import
  • Request Log
mock.js
// Inline mock
Aura.mock.register('GET', '/api/users', {
  body: [{ id: 1, name: 'Alex' }],
  delay: 300
});

// Or point to a local JSON file
Aura.mock.register('GET', '/api/products',
  '/mocks/products.json'
);

// Bulk load — mix inline + files
Aura.mock.load({
  'GET /api/users/:id': {
    body: { id: 1, name: 'Alex' }
  },
  'POST /api/users': {
    status: 201,
    body: { id: 2 }
  },
  'DELETE /api/users/:id': {
    status: 204
  },
});

// Enable — intercepts window.fetch
Aura.mock.enable();

// Now any fetch() hits the mock
const res = await fetch('/api/users');
// => [{ id: 1, name: 'Alex' }]

// Persist for next page load
Aura.mock.save();

// Share with teammates
const json = Aura.mock.export();
Still just 11KB gzipped

Hooks. PWA. IndexedDB.
All included.

Features that would add 50KB+ of npm packages to a React app — Aura includes them at zero extra cost.

🔌 Hooks

Composable, React-inspired hooks that wire directly into Aura's state, events, API, and storage. Use built-in hooks or register your own.

  • useState
  • useEvent
  • useFetch
  • useStorage
  • useComputed
  • useWatch
  • useSetup
  • useI18n
  • Custom Hooks
hooks.js
// Reactive state — returns [getter, setter]
const [count, setCount] = Aura.hooks.useState('count', 0);
setCount(5);
console.log(count()); // 5

// Auto-fetch with loading state
const { data, loading, error, refetch }
  = Aura.hooks.useFetch('/api/users');

// localStorage-backed state
const [theme, setTheme] = Aura.hooks.useStorage(
  'theme', 'dark'
);

// Setup with auto-cleanup
const teardown = Aura.hooks.useSetup(() => {
  Aura.hooks.useEvent('resize', handler);
  Aura.hooks.useWatch('user', updateUI);
});
teardown(); // cleans up all listeners

💪 tryThis

Kill try/catch boilerplate forever. Wrap any sync or async operation and get a clean [error, result] tuple. Works with functions, promises, and async functions.

  • Sync
  • Async
  • Promises
  • Zero overhead
  • Type-safe
try.js
// Sync — no more try/catch
const [err, data] = Aura.tryThis(
  () => JSON.parse(rawInput)
);
if (err) Aura.log.error('Bad JSON', err);

// Async — just add await
const [err, users] = await Aura.tryThis(
  () => Aura.api.get('/users')
);

// Direct promise
const [err, res] = await Aura.tryThis(
  fetch('/api/health')
);

// Chain with Logger
if (err) Aura.log.error('Failed', err);
else Aura.log.info('OK', res);

📝 Logger

Structured logging with debug/info/warn/error levels, tagged loggers for namespacing, custom transports, history export, and auto-emit through Aura Events.

  • Levels
  • Tagged
  • Transports
  • History
  • Export
  • Events
logger.js
Aura.log.info('App started');
Aura.log.warn('Slow query', { ms: 1200 });
Aura.log.error('Failed', err);

// Tagged loggers for namespacing
const auth = Aura.log.tag('Auth');
auth.info('User logged in');
// => [INFO][Auth] User logged in

// Custom transport (e.g. send to server)
Aura.log.addTransport((entry) => {
  if (entry.level === 'error')
    sendToServer(entry);
});

// Listen via Events system
Aura.on('log:error', showToast);

// Export history as JSON
const json = Aura.log.export('error');

🗂 IndexedDB

Promise-based wrapper around the browser's IndexedDB. Define stores with indexes, then get/set/query/iterate with clean async APIs. Perfect for offline data.

  • Promise API
  • Stores
  • Indexes
  • Queries
  • Cursors
  • Batch
idb.js
// Open DB with stores
await Aura.idb.open('myApp', 1, [{
  name: 'users',
  keyPath: 'id',
  indexes: [
    { name: 'email', keyPath: 'email', unique: true }
  ]
}]);

// CRUD
await Aura.idb.set('users', {
  id: 1, name: 'Alex', email: 'a@b.com'
});

const user = await Aura.idb.get('users', 1);
const all = await Aura.idb.getAll('users');

// Query by index
const found = await Aura.idb.query('users',
  'email', 'a@b.com'
);

📷 PWA + Service Worker

Turn any Aura app into a PWA. Register a service worker, handle install prompts, define caching strategies, precache assets, and go offline — all from JavaScript.

  • SW Register
  • Install Prompt
  • Cache Strategies
  • Precache
  • Offline
  • Auto Update
pwa.js
// Register service worker
await Aura.pwa.register('/aura-sw.js');

// Cache images aggressively
Aura.pwa.addStrategy({
  name: 'images',
  strategy: 'cache-first',
  match: /\.(png|jpg|svg)$/,
  maxAge: 7 * 24 * 3600000
});

// API calls — network first, cache fallback
Aura.pwa.addStrategy({
  name: 'api',
  strategy: 'network-first',
  match: '/api/'
});

// Precache critical assets
Aura.pwa.precache([
  '/', '/app.js', '/styles.css'
]);

// Handle install prompt
Aura.pwa.onInstallPrompt(() => {
  showInstallBanner();
});
Interactive

Try it live.

Every demo below is running real Aura.js code — right here in your browser.

🔈 Events Pub/Sub
Emit an Event
Click "Subscribe" then "Emit"
⚙ State Reactive
Counter with Computed
count: 0 | doubled: 0
🗎 Template Render
Live Template Rendering
🇧 i18n Translation
Switch Language
Loading...
🔧 Utils Utilities
Transform Text
🗃 Storage Persist
Namespaced Storage
Detection

Know your user.

Real-time device, browser, network, and capability detection.

Device Type
OS
Screen
Network
🔎 Device Details
Detecting...
🔐 Fingerprint & Perf
Click to generate
And More

Every tool you need.

🌏

Geolocation

Browser GPS with IP fallback, Haversine distance calculation, live position watching, and permission-aware detection.

const loc = await Aura.geo.detect();
// { latitude, longitude, source }

const km = Aura.geo.distance(
  40.7, -74.0, 51.5, -0.1
); // => 5570

Performance

Measure any sync/async operation, set threshold filters, auto-report via events, and access memory heap info.

Aura.perf.start('api-call');
await fetchData();
Aura.perf.end('api-call');

// Or measure async directly
await Aura.perf.measure('task',
  async () => heavyWork()
);
👉

Event Delegation

Efficient container-based event delegation with CSS selectors. Works with dynamically added elements.

// Delegate on the app container
Aura.delegate.on('click',
  '.btn-delete',
  (e, el) => remove(el.dataset.id)
);

// One-time delegation
Aura.delegate.once('click',
  '.onboard-btn', handler
);