@front.js/core
v0.0.2
Published
A lightweight (<5KB) secure-by-default JavaScript micro-framework enforcing Islands Architecture
Maintainers
Readme
@frontjs/core
The secure-by-default, islands-first micro-framework.
🌐 Website | 📚 Documentation | 💻 Examples
Install
npm install @frontjs/core uhtmlQuick Start
import { html, val, register, hydrate } from '@frontjs/core';
function Counter(props) {
const count = val(props.start || 0);
return () => html`
<div>
<button onclick=${() => count(count() - 1)}>-</button>
<span>Count: ${count()}</span>
<button onclick=${() => count(count() + 1)}>+</button>
</div>
`;
}
register('Counter', Counter);
hydrate();Features
- 🏝 Islands Architecture: Hydrate only what needs interaction
- 🔒 Secure by Default: Data flows via JSON only. No server closures
- ⚡ Tiny Runtime: <5KB gzipped. No build step required
- 🛡 Sanitized Rendering: Powered by
uhtmlto prevent XSS - 🎯 Fine-Grained Reactivity: Value-based state management (val/run/calc)
Documentation
See the main repository for complete documentation, examples, and API reference.
Part of the frontjs Ecosystem
- @frontjs/core - This package
- @frontjs/actions - Type-safe RPC layer
License
ISC
