An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# ๐Ÿฅฉ MEAT

**Mitt Enhanced Application Toolkit**

![MEAT Mascot](./assets/a1.png)

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](https://img.shields.io/badge/version-1.B0-ribwich)
![Open Source](https://img.shields.io/badge/license-MIT-blue)
![Code Size](https://img.shields.io/github/languages/code-size/lucianofedericopereira/meat)
![Contributions](https://img.shields.io/badge/contributions-open-brightgreen)
![Author](https://img.shields.io/badge/made%20by-Luciano%20Federico%20Pereira-blue)
[๐Ÿ“˜ 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. ๐Ÿฎ๐Ÿ”ฅ