BareMetal.js

BareMetal.js:
The Web, Unchained.

A dependency-free Vanilla JavaScript SPA engine. Get the blistering speed and state management of React, while writing 100% pure, uncompiled Vanilla JS.

⚡ Fun fact: This very page is powered by BareMetal.js!

Null | 0 Dependencies
expand_more

Why BareMetal?

Architecture principles.

layers_clear

Zero Dependencies

No NPM hell. No node_modules black hole. Just pure, native JavaScript executing directly in the V8 engine as intended.

lock_open

No Vendor Lock-In

Your code is your code. BareMetal augments standard DOM APIs rather than wrapping them in proprietary synthetic events.

speed

Unapologetic Performance

Bypass the Virtual DOM overhead. Direct surgical DOM updates yield 60fps animations and near-zero latency interactions.

Initialization

Drop it in via CDN or install via NPM. No build step required. No Webpack config. Just raw execution.

  • > Global Namespace Ready
  • > ES Module Support
  • > 4.2kb Payload
bash -- root@baremetal
# Option A: NPM Installation npm install @baremetaljs/core # Option B: Direct CDN Import <script type="module"> import { BareMetal, loader } from 'https://cdn.jsdelivr.net/npm/baremetal.js/src/index.min.js'; </script>

Core Engine Features

Systems level capabilities.

0ms Hover Pre-fetching

Anticipates user intent. Assets and JSON payloads are aggressively fetched on mouse-enter, guaranteeing instantaneous perceived load times on click.

Smart DOM Keep-Alive

Inactive views are detached and cached in memory, not destroyed. Returning to a previous route restores scroll position and state immediately.

State Hydration

A reactive signals-based store that automatically binds to DOM nodes. Update the state, and only the bound text nodes or attributes mutate.

Component Lazy Loading

Define components as async closures. BareMetal orchestrates the dynamic import of CSS and JS only when the component enters the viewport.

Syntax Showcase

No compiler. Just JS.

1. Initialize the Engine COPY
BareMetal.init({ hoverPrefetch: true, persistState: true, virtualizeDom: true });
2. Load Modules on the Fly COPY
<script type="module"> import { loader } from './baremetal.min.js'; loader({ sharedSidebar: "/js/sidebar.js", heavyChart: { path: "/js/chart.js", lazy: "#chart-container" } }); </script>