andrecorugda/synapse
Composer 安装命令:
composer require andrecorugda/synapse
包简介
AI-powered low-code app builder for Laravel + Filament: visual pages, database collections, an n8n-style flow engine, end-user auth, and AI that builds whole apps. Self-hosted.
关键字:
README 文档
README
Synapse — App Builder
Describe an app. Watch it get built. Then refine it by chatting.
A full-stack, low-code app builder for Laravel + Filament — pages, real data, automations, auth and live UI — with AI as your companion. Free, open, and entirely self-hosted.
Quick start · Documentation · What you can build · The AI layer
Why Synapse
Building an internal tool, a SaaS UI, or a marketing site usually means stitching together a CMS, a database admin, a workflow tool, an auth system and a front-end — then wiring them all up by hand.
Synapse is all of that, in one package, inside the Laravel + Filament admin you already run. Drag pages together, define your own data tables, wire automations that react to clicks and data changes, gate it behind your own users and roles — and when you'd rather just say what you want, the built-in AI generates the whole thing and keeps refining it as you chat.
Nothing leaves your server. There's no SaaS, no per-seat pricing, no lock-in. It's MIT-licensed and yours.
You bring the idea. Synapse brings the pages, the database, the logic, the login screen — and an AI that builds alongside you.
What's inside
| Pillar | What it gives you |
|---|---|
| 🧩 Pages & components | A GrapesJS visual builder + a real UI kit (cards, modals, drawers, tabs, forms, data tables), per-page CSS/JS, SEO, a cached public render route, and a pickable home page. |
| 🗄️ Collections (data) | Define your own models → real database tables (pb_<key>, Directus-style) with typed fields, schema sync, an instant REST API (filter/sort/search/paginate) and a records browser. |
| ⚡ Flows (the brain) | An n8n-style visual canvas. Triggers (a click, a record event, cron, an API call) run nodes: CRUD, HTTP, AI invoke, functions, conditions, set-state, send email, page actions. |
| ƒ Functions & States | Reusable logic (expression / callable / PHP) and a persistent, app-wide reactive store that components bind to and flows update live. |
| 🔐 Auth & permissions | The built app's own users, roles and permissions — a static login, per-page gating, opt-in per-collection CRUD rules, row-level security, and component visibility by role. Optional: a public site ignores it entirely. |
An isolated SMTP transport (configured in Settings) + a send_email flow node that uses any page as an interpolated email template. |
|
| ✦ AI generation | Describe an app in plain language → review a validated plan → apply it. A floating chat follows you across the admin to refine what you've built. Powered by the AI OpenRouter Gateway. |
See it
Everything below was built with the package itself — run php artisan ai-page-builder:install-demo to get these two apps.
| A designed marketing site | A role-gated Inventory app |
|---|---|
![]() |
![]() |
| Chat to build & refine (Ask / Plan / Build) | An automation flow (fan-out + branches) |
|---|---|
![]() |
![]() |
What you can build
- An internal CRUD tool — define collections, drop a form + a data table, gate it behind a login with per-role, row-level access (users see only their own rows).
- A lead-capture or feedback site — a public page whose form writes straight into a collection, with a flow that emails a templated confirmation on every submission.
- A reactive dashboard — components bound to live state, updated by flows as data changes, no page reload.
- A marketing site — pick a home page, design freely, publish to a cached route.
- …or just describe it — "a waitlist app that emails a welcome on signup and has a landing page" → Synapse builds the collection, the page, the email template and the flow, and you tweak it from the chat.
How it fits together
The loop in one line: event → flow → read/write data + set state → bound components re-render — and AI can build or change any of it.
Quick start
Requirements: PHP 8.2+ · Laravel 11/12/13 · Filament 4/5
composer require andrecorugda/synapse
php artisan vendor:publish --tag="ai-page-builder-migrations"
php artisan migrate
Register the plugin on your Filament panel:
use Andre\AiPageBuilder\Filament\AiPageBuilderPlugin; public function panel(Panel $panel): Panel { return $panel->plugin(AiPageBuilderPlugin::make()); }
A Content group appears with Pages, Media, Flows, Functions, Collections, States, App Users, Roles and Settings. Create a collection, build a page, wire a flow, publish.
To unlock AI generation, install the gateway and add your OpenRouter key — the app_builder integration self-seeds:
composer require andrecorugda/ai-openrouter-gateway
# set OPENROUTER_INTEGRATION_KEY (or OPENROUTER_API_KEY) in .env
Then tap the ✦ chat orb on any admin page and just talk to it.
Want a guided tour? Install two ready-made apps (a marketing site + a role-gated Inventory CRUD app) built entirely from the package:
php artisan ai-page-builder:install-demo
📖 Full documentation: docs/ — installation, architecture, every subsystem, and the complete config reference.
The AI layer
AI is optional and additive — the builder is fully usable by hand. When the AI OpenRouter Gateway is installed:
- A real conversation, with modes. The floating chat talks like a teammate — Auto infers what you want, Ask answers only, Plan designs it with you, Build ships it. Greetings and questions get replies, not plans.
- You describe; it plans — visibly. When you ask for a change, it returns a structured Build Plan shown in full (each collection + its fields, pages, flows, settings) for review — never opaque files.
- Applied as data. A deterministic, idempotent engine writes the plan through the same services the admin uses, so AI-built artifacts behave exactly like hand-built ones — and "refine" just means re-applying a plan that references existing items.
- A companion, not a wizard. The chat is thread-aware and context-aware (it knows your collections, pages and flows); build on one page, refine on another.
- Safe by construction. AI-authored HTML is sanitized (declarative bindings kept, executable directives stripped); applying is always human-in-the-loop; generation is metered and cost-capped by the gateway.
Self-hosting front-end assets (offline / air-gapped)
The editor loads GrapesJS, Drawflow, Alpine and Ace from a CDN by default (zero-config). For offline / strict-CSP installs, vendored copies ship in the box:
php artisan vendor:publish --tag="ai-page-builder-assets" # → public/vendor/ai-page-builder/{grapesjs,drawflow,alpine,ace}/
Point the asset env vars at the published copies (see docs/installation.md). AI_PAGE_BUILDER_ACE_BASE must stay a directory.
Testing & quality
composer test # Pest composer lint # Pint composer analyse # PHPStan (larastan)
License
MIT © Andre Corugda. See LICENSE.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-29





