@lucianofpereira/meat

1.0.2 • Public • Published

🥩 MEAT

Mitt Enhanced Application Toolkit

MEAT Mascot

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.

Version Open Source Code Size Contributions Author 📘 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
Download 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

npm install @lucianofpereira/meat
# or
yarn add @lucianofpereira/meat

Basic usage:

import meat from 'meat';
meat.set('theme', 'dark');

🔌 Plugin Support

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:

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:

import { MeatChronicle } from './plugins/chronicle.js';
meat.use(MeatChronicle);

📚 Docs Overview

Page Description
README Feature overview
Getting Started Setup tutorial
Architecture Internal design flow
Plugins Writing MEAT plugins
MeatChronicle Plugin architecture and API

🔧 Framework Integrations

Page Framework
Alpine Alpine.js
Angular Angular
Astro Astro
Nuxt Nuxt
Next Next.js
React React
Qwik Qwik
Solid Solid
Svelte Svelte
Vue Vue
Laravel 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.

@meatHydrate($state)
@meatSync('message')
@meatSyncEvent('message', \App\Events\PayloadSynced::class)

🧪 Examples & Tests

  • examples/ — MEAT demos for every framework
  • test/ — Unit tests for all plugin integrations

🧪 Testing

npm test

Covers:

  • Core event bus
  • Plugin usage
  • Vue reactivity

🛠 Contributing

Fork → branch → build → PR.
See CONTRIBUTING.md for setup tips and code style.


💬 Contact

Author: Luciano Federico Pereira
💼 LinkedIn
🐛 GitHub Issues


📜 License

Licensed under the MIT License © 2025 Luciano Federico Pereira


MEAT is hot, readable, and ready for your plate.


💛 Support MEAT

MEAT is maintained by Luciano Federico Pereira.
If you find it useful, consider sponsoring via:

Your support fuels open-source tools that are lean, clean, and reactive-driven. 🐮🔥

Package Sidebar

Install

npm i @lucianofpereira/meat

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

38.1 kB

Total Files

39

Last publish

Collaborators

  • lucianofpereira