https://github.com/lucianofedericopereira/meat
๐ฅฉ MEAT- Mitt Enhanced Application Toolkit
https://github.com/lucianofedericopereira/meat
dom-binding dom-sync dom-updates event-bus framework-agnostic frontend-utils html-integration javascript-library localstorage plugin-system reactivity state-management vanilla-js vue-composables vue3
Last synced: 10 months ago
JSON representation
๐ฅฉ MEAT- Mitt Enhanced Application Toolkit
- Host: GitHub
- URL: https://github.com/lucianofedericopereira/meat
- Owner: lucianofedericopereira
- License: mit
- Created: 2025-07-10T17:05:29.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-14T23:38:09.000Z (11 months ago)
- Last Synced: 2025-08-14T18:37:07.953Z (10 months ago)
- Topics: dom-binding, dom-sync, dom-updates, event-bus, framework-agnostic, frontend-utils, html-integration, javascript-library, localstorage, plugin-system, reactivity, state-management, vanilla-js, vue-composables, vue3
- Language: PHP
- Homepage: https://lucianofedericopereira.github.io/meat/
- Size: 490 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ๐ฅฉ MEAT
**Mitt Enhanced Application Toolkit**

Minimal reactive state system with plugin support, Vue composables, and zero dependencies.
One API, ten frameworks, zero stress. MEAT plugs into Alpine, Angular, Astro, Nuxt, Next.js, React, Qwik, Solid, Svelte, and Vue โ saving your bacon across the board.





[๐ MEAT Handbook](https://lucianofedericopereira.github.io/the-meat-handbook/)
## ๐ Handbook
For deep dives into MEATโs architecture, patterns, and plugin system, see:
**๐ง The MEAT Handbook**
A signal-first architecture reference by Luciano F. Pereira.
โ [Download PDF](https://github.com/lucianofedericopereira/the-meat-handbook/raw/main/export/v1/the-meat-handbook.pdf)
โ [Download EPUB](https://github.com/lucianofedericopereira/the-meat-handbook/raw/main/export/v1/the-meat-handbook.epub)
---
**1.B1 โ Bugfix Release**
- Persistence plugin now only wraps the **public** methods (`meat.set` / `meat.setState`) โ no more โinvalid assignment to constโ errors.
- `use()` warnings only fire on *actual* method overwrites (no more PLUGIN_CLASH spam).
- Restored aliases and APIs for backwards-compat:
- `meat.bindToGlobal()`
- `meat.signal()`
- `meat.listen()`
- `meat.logState()`
- `meat.chronicle()`
๐ Core Features (Ribwich Edition)
- โ
Reactive state engine with set(), get(), and setState()
- ๐ง Per-key mutation history via MeatChronicle
- โช Undo / rollback / safe execution with undo(), rollbackAll(), and safe(fn)
- ๐ Runtime introspection (dump(), find(), changedKeys(), lastModified())
- ๐งช Temporal snapshotting with historySnapshot()
- ๐ DOM binding via linkToDOM() โ usable across Alpine, Svelte, Astro
- ๐งฉ Plugin architecture with .use() for extensions
- ๐๏ธ LocalStorage support via persist() and load()
- โ๏ธ Framework adapters for Vue, Laravel, React, Nuxt, and more
---
## ๐ Features
- Reactive state via `meat.set()` / `meat.get()`
- Scoped listeners and wildcard events
- DOM syncing with `linkToDOM()`
- Zero dependencies
- Plugin architecture via `.use()`
- Vue 3 composables
- LocalStorage persistence
---
## ๐ฆ Install
```bash
npm install @lucianofpereira/meat
# or
yarn add @lucianofpereira/meat
```
Basic usage:
```ts
import meat from 'meat';
meat.set('theme', 'dark');
```
---
## ๐ Plugin Support
```ts
meat.use(pluginFn); // Load MEAT-enhancing logic
```
Examples:
- `logState.js` adds `meat.logState()` using `console.table()`
- `meatVuePlugin.js` enables `$meat` globally in Vue apps
Composables:
```ts
const theme = useMeat('theme'); // Vue reactive ref
```
### ๐ง Included Plugins
MEAT ships with **MeatChronicle**, a single all-in-one runtime plugin providing:
- per-key mutation logs
- `undo()` and `rollback()` capabilities
- `safe(fn)` execution guards
- temporal snapshots via `historySnapshot()`
- `logMessage()` with scoped tracing
Activate with:
```js
import { MeatChronicle } from './plugins/chronicle.js';
meat.use(MeatChronicle);
```
---
## ๐ Docs Overview
| Page | Description |
|------|-------------|
| [README](./docs/README.md) | Feature overview |
| [Getting Started](./docs/Getting-Started.md) | Setup tutorial |
| [Architecture](./docs/architecture.md) | Internal design flow |
| [Plugins](./docs/plugins.md) | Writing MEAT plugins |
| [MeatChronicle](./docs/chronicle.md) | Plugin architecture and API |
### ๐ง Framework Integrations
| Page | Framework |
|------|-----------|
| [Alpine](./docs/alpine.md) | Alpine.js |
| [Angular](./docs/angular.md) | Angular |
| [Astro](./docs/astro.md) | Astro |
| [Nuxt](./docs/nuxt.md) | Nuxt |
| [Next](./docs/next.md) | Next.js |
| [React](./docs/react.md) | React |
| [Qwik](./docs/qwik.md) | Qwik |
| [Solid](./docs/solid.md) | Solid |
| [Svelte](./docs/svelte.md) | Svelte |
| [Vue](./docs/vue.md) | Vue |
| [Laravel](./docs/laravel.md) | Blade macros, middleware, event syncing |
---
## ๐ Laravel Integration
MEAT includes first-class support for Laravel with Blade directives, hydration macros, hashed syncing, and event-binding middleware.
```blade
@meatHydrate($state)
@meatSync('message')
@meatSyncEvent('message', \App\Events\PayloadSynced::class)
```
### ๐งช Examples & Tests
- [`examples/`](./examples/) โ MEAT demos for every framework
- [`test/`](./test/) โ Unit tests for all plugin integrations
---
## ๐งช Testing
```bash
npm test
```
Covers:
- Core event bus
- Plugin usage
- Vue reactivity
---
## ๐ Contributing
Fork โ branch โ build โ PR.
See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for setup tips and code style.
---
## ๐ฌ Contact
**Author**: Luciano Federico Pereira
๐ผ [LinkedIn](https://www.linkedin.com/in/lucianofedericopereira/)
๐ [GitHub Issues](https://github.com/lucianofedericopereira/meat/issues)
---
## ๐ License
Licensed under the [MIT License](./LICENSE) ยฉ 2025 Luciano Federico Pereira
---
> MEAT is hot, readable, and ready for your plate.
---
## ๐ Support MEAT
MEAT is maintained by [Luciano Federico Pereira](https://github.com/lucianofedericopereira).
If you find it useful, consider sponsoring via:
- [Ko-fi](https://ko-fi.com/lucianofedericopereira)
- [Liberapay](https://liberapay.com/lucianofedericopereira)
Your support fuels open-source tools that are lean, clean, and reactive-driven. ๐ฎ๐ฅ