# Stellify Documentation > Build Production-ready Laravel applications. Every time. Generated: 2026-09-08T22:11:18+00:00 --- ## What Is Stellify Stellify is an AI-native development platform built around one workflow: connect the editor you already use, let AI wire proven, existing code into your project, and sync the result back to your repository. We call it **the Stellify development loop**. ## The Stellify Development Loop **1. Connect your editor.** Claude Code, Cursor, VS Code — any MCP-compatible agent connects to your Stellify project through the [MCP server](/stellify/documentation/mcp-server) with one config entry and an API token. **2. Find code, don't generate it.** Ask for a feature and your agent searches Stellify's curated library first — registration flows, payment integrations, CRUD stacks that already exist and already work. It [references](/stellify/documentation/code-reuse) what it finds into your project, wires it to your routes and models, and generates only the parts that are genuinely new. Then it verifies: running methods, applying migrations, executing tests. **3. Sync back or export.** The assembled feature leaves as standard Laravel — commit it to your GitHub repo with [Live Sync](/stellify/documentation/export), or export the whole project. Your repo stays the source of truth; Stellify is the workbench your code passes through. Then the next feature: same loop. Every pass through it is code you didn't have to prompt into existence line by line, reviewed once and reused everywhere — we've published a scoped benchmark of what that saves in [The Economics of Code Reuse](/stellify/economics-of-code-reuse). ## What Makes the Loop Possible Stellify stores code as structured data, not flat files. Files contain methods, methods contain statements, and every unit has a stable identity. That's what lets an agent find a single proven method and wire it in surgically — no syntax errors, no hallucinated glue, no rewriting whole files to change one function. ## Beyond the Loop **A full cloud editor** — Every project is also editable in the browser: a [method-level code editor](/stellify/documentation/code-editor), a visual [Interface Builder](/stellify/documentation/interface-builder) with live preview, and a built-in AI chat with the same tools your MCP agent uses. Refine by hand what the agent roughed in. **Import anything** — [Point the agent at an existing codebase](/stellify/documentation/importing-with-mcp) — Laravel, legacy PHP, or another stack entirely — and it rebuilds it in Stellify as structured, editable code. **Work as a team** — Invite [collaborators](/stellify/documentation/collaborators) with granular permissions. Simultaneous edits are caught at the field level by the [edit-conflict system](/stellify/documentation/edit-conflicts), and [branches](/stellify/documentation/version-control) give you isolated workspaces with entity-level diff and merge. **Feed the loop** — Publish your project to [Constellation](/stellify/documentation/constellation), Stellify's app store, [share live pages](/stellify/documentation/sharing), or submit your best units to the shared library so other builders can reference them — with attribution preserved through fork lineage. ## You Own Your Code There's a clear separation between Stellify and your business logic. Stellify handles routing, authentication, database connections, asset bundling, and hosting. You write the code that makes your application unique — and it leaves as clean, readable PHP and JavaScript whenever you want it to. No proprietary formats; adoption is reversible by design. ## Why This Beats File-Based AI Tools AI tools like Cursor and Windsurf read your code as plain text. They can't see where one method ends and another begins, or which files depend on each other. So when you ask for a small change, they rewrite entire files — and break things you didn't ask them to touch. **Scoped changes** — File-based tools can't prevent collateral damage. Stellify targets specific methods and statements. The blast radius is inherently smaller. **Reuse over regeneration** — Structured, addressable code makes a shared library possible: agents reference proven units instead of generating fresh ones. We published a scoped benchmark of the difference in [The Economics of Code Reuse](/stellify/economics-of-code-reuse). **Concurrent editing** — Multiple agents or agent+human editing creates constant merge conflicts in flat files. Stellify's UUID-per-statement architecture handles this natively, with field-level conflict detection when edits genuinely collide. **Verified output** — Agents don't just write code here; they run it. Methods execute in a sandboxed environment, migrations apply to your real database, and tests run with automatic rollback — all before you accept a change. **Production-safe output** — AI hallucinates bespoke patterns that fail under load. Stellify compiles to standard Laravel — battle-tested framework code. ## The Stack Stellify is built on Laravel, the most popular PHP framework, and produces standard Vue, React, and Svelte components on the frontend. The backend gives you Laravel's mature, well-documented patterns, and the frontend uses the framework conventions you already know. ## What's on the Roadmap Because code is stored relationally, we can keep building features that are impossible with flat files: **Impact analysis** — Before an edit happens, see exactly what it affects. "If you change this method, these 4 views and 2 API endpoints are affected." **Visual change summaries** — See what AI changed in plain English, not a wall of diff text. **Statement-level rollback** — Undo what AI did to one function without reverting the whole file. **Multi-agent orchestration** — Multiple agents working on the same app, coordinated by structure so they don't step on each other. **Confidence scoring** — Flag risky edits before they happen. "This touches your payment flow — want a human review?" --- ## Getting Started Visit [stellisoft.com/register](https://stellisoft.com/register) to register. A new account comes with a project ready to build in — the fastest way to see what Stellify is for is to run one pass of the development loop. ## Your First Loop **1. Connect your editor.** Grab an API token from [User Settings](/stellify/documentation/user-settings) → **API Tokens**, then add the MCP server to Claude Code, Cursor, or VS Code: ```json { "mcpServers": { "stellify": { "command": "npx", "args": ["@stellify/mcp"], "env": { "STELLIFY_API_URL": "https://api.stellisoft.com/api/v1", "STELLIFY_API_TOKEN": "your-api-token-here" } } } } ``` **2. Ask for a feature.** In your editor's chat: > Add user registration to my Stellify project — check the library for an existing flow first Watch what the agent does: it searches Stellify's shared library, finds a proven registration flow, **references it into your project** — routes, controller, validation, the lot — and wires it to your models. What doesn't exist yet it scaffolds. Then it runs the code and the tests to prove the feature works. That's the difference from a code generator: the agent's first move is to *find* working code, not to write plausible code. **3. Sync it back.** Connect a repository in **Project Settings → GitHub Integration** and commit the assembled feature to your repo — or [export](/stellify/documentation/export) the whole project as a standard Laravel app. Your repo stays the source of truth. Feature shipped. Run the loop again for the next one. The full tool reference is on [The MCP Server](/stellify/documentation/mcp-server) page. ## The Other Ways In **The cloud editor.** Everything the agent touches is also editable in the browser — the [Code Editor](/stellify/documentation/code-editor) for method-level PHP and JavaScript, the [Interface Builder](/stellify/documentation/interface-builder) for visual UI work, and a built-in AI chat with the same tools. Most people let the agent do the heavy lifting and use the editor to refine. Take the [tour](/stellify/documentation/tour) to get oriented. **Bring existing code.** Point the loop at what you already have: [import a codebase via MCP](/stellify/documentation/importing-with-mcp) (any framework — the agent converts it), connect a GitHub repo in [project settings](/stellify/documentation/project-settings), or parse a local Laravel project with the [Stellify Laravel package](https://github.com/Stellify-Software-Ltd/stellify-laravel). ## Before You Build in Earnest 1. **Connect a database** — bring your own MySQL/PostgreSQL or use the [Supabase wizard](/stellify/documentation/database-connection); migrations run against it from the editor or via the agent 2. **Enable capabilities** — auth, payments, mail: whatever your app depends on, switched on in [Project Settings](/stellify/documentation/project-settings) 3. **Invite your team** — [collaborators](/stellify/documentation/collaborators) with granular permissions, when you're ready --- ## How To Use The primary way to build in Stellify is the development loop: connect your editor over MCP, let AI find existing code and wire it into your project, sync back or export. But the loop isn't the only way in — you can also write code yourself in the cloud editor or import a codebase — and all three produce the same structured code, so you can mix them freely within one project. --- ## Starting a Project ### Import from GitHub Connect a repository in **Project Settings → GitHub Integration**, pick the repo, and import. Stellify parses controllers, models, routes, and Vue components into its structured format — after that they're editable like anything built natively, by you or by an agent.
Select a repository to import
my-laravel-app
username/my-laravel-app
Working from your own IDE instead? [Import via MCP](/stellify/documentation/importing-with-mcp) — the agent reads your local codebase and recreates it in Stellify, converting from other frameworks along the way if needed. ### Start Fresh Click **New Project**, name it, and you have an empty Laravel + Vue project. The fastest path from here is to hand the first pass to an agent — see below — and take over in the editor where it matters. --- ## Building with an Agent Open the AI chat in the editor (or connect your own agent via the [MCP server](/stellify/documentation/mcp-server)) and describe the feature:
AI Assistant
Create a blog posts feature with CRUD operations
I'll create a Post model, PostController, and API routes for you...
Ask anything...
The agent isn't generating a text diff for you to paste in. It works with the same objects you see in the editor: it scaffolds the Model/Controller/Service/Migration stack with one tool call, wires routes, edits individual methods, and builds UI elements — and it checks the [shared library](/stellify/documentation/code-reuse) first, so a feature that already exists gets referenced instead of regenerated. Changes land in your project as it works; run the code or the tests to verify before you move on. What to hand the agent, and what each prompt actually does: - **"Create a user registration form with email and password validation"** — a route, a controller method with the validation, and a Vue form component wired to post to it - **"Add a search method to UserController that filters by name or email"** — one new method added to the existing file; nothing else touched - **"Build a dashboard page showing recent orders and total revenue"** — the page route, the queries, and the UI elements to display them --- ## Writing Code Yourself Everything the agent can do, you can do by hand: - The [Code Editor](/stellify/documentation/code-editor) — method-level PHP and JavaScript editing with autocomplete and an in-editor run panel - The [Interface Builder](/stellify/documentation/interface-builder) — click-to-select visual UI editing on a live preview In practice the split is: agents for scaffolding and bulk work, the editor for the logic you care about getting exactly right. Both operate on the same structured code, so there's no handoff cost. --- ## Capabilities Your business logic runs on framework features — auth, payments, mail, storage — that Stellify manages as **capabilities**. Enable them in Project Settings; enabled capabilities become dependencies in your export's `composer.json`.
Authentication (Sanctum) Available
Payments (Stripe) Needs Config
Email (Mailgun) Enable
Two things worth knowing: **Agents check capabilities before building.** Ask for Stripe checkout and the agent verifies the Stripe capability is enabled and configured before writing code against it. Capabilities marked **Needs Config** want API keys saved in Project Settings first. **Missing capabilities become requests, not hallucinations.** If a feature needs framework-level support that doesn't exist yet, the agent logs a capability request instead of inventing infrastructure code. The Stellify team reviews requests, builds what's needed, and emails you when it's available. What you build directly shapes what the platform supports. --- ## A Typical Build One pass through the development loop, feature by feature: 1. **Find** — "Add user auth — check the library first"; existing units get [referenced in](/stellify/documentation/code-reuse), not regenerated 2. **Scaffold the gaps** — "Create a Post model with title, body, and author relationship, plus a PostController with CRUD" — one `create_resources` call 3. **Migrate** — apply the generated migration to your [connected database](/stellify/documentation/database-connection) 4. **Build the page** — describe the UI, or construct it in the Interface Builder; wire buttons and forms to controller methods 5. **Refine** — open the methods that matter and edit them directly 6. **Verify** — run methods with test input from the editor; run the test file 7. **Ship** — [sync to GitHub or export](/stellify/documentation/export) as a standard Laravel project --- ## Next Steps - [Tour of the Platform](/stellify/documentation/tour) - Where everything lives - [Code Editor](/stellify/documentation/code-editor) - Method-level editing - [Interface Builder](/stellify/documentation/interface-builder) - Visual UI construction - [The MCP Server](/stellify/documentation/mcp-server) - Connect your own agent --- ## Tour ## Video Tour ## The Editor at a Glance The whole platform is one screen: a canvas showing the page you're building, and a navigation bar across the top that selects what you're working on. There's no file tree taking up half the screen — you navigate by route, file, and method instead, which is how you actually think about a Laravel app. ### Navigation Bar
/
Project
/
Home
/
main
Local
M
The left side is a breadcrumb of what you're editing; the right side switches how you see it: 1. **Project** — switch between your projects (and any you collaborate on) 2. **Route** — pick the page or API endpoint to work on; the canvas follows 3. **Branch** — switch or create [branches](/stellify/documentation/version-control) 4. **Environment badge** — which environment you're viewing 5. **Interface / Code / Split** — visual builder, code editor, or both side by side 6. **Settings** — [project configuration](/stellify/documentation/project-settings): database, capabilities, GitHub, team 7. **Profile** — [account, API tokens, preferences](/stellify/documentation/user-settings) Every dropdown is covered in detail in [Navigation](/stellify/documentation/navigation). --- ### Interface View
Interface
Code
Split
Welcome
Element Tree
The canvas *is* your page, rendered live. Click an element to select it, edit its tag, Tailwind classes, and text in the property panel, and wire its events to methods. The element tree on the side shows the page structure and is where you add and reorder elements. [Interface Builder in detail →](/stellify/documentation/interface-builder) --- ### Code View
store public → JsonResponse
public function store(Request $request)
{
return User::create($request->validated());
}
Code view opens one method at a time — selected from the file and method dropdowns — rather than scrolling through whole files. You get syntax highlighting, context-aware autocomplete, and a Run button that executes the method with JSON input right there in the editor. [Code Editor in detail →](/stellify/documentation/code-editor) --- ### AI Chat The chat panel is available in every view. It operates on the same routes, files, methods, and elements you're looking at — describe a change and watch it land in the canvas or the code view. Prefer your own tooling? Connect Claude Code or Cursor via the [MCP server](/stellify/documentation/mcp-server) and work from your IDE instead. --- ## The Loop Building a feature in Stellify usually looks like: 1. **Route** — create the page or endpoint from the route dropdown 2. **Scaffold** — let the agent create the resource stack, or add files from the file dropdown 3. **Wire** — point the route at a controller method; connect UI events to methods 4. **Refine** — edit the methods and elements that matter, by hand or by prompt 5. **Verify** — run methods with test input; run your test file; preview the page live 6. **Ship** — merge your branch and [export](/stellify/documentation/export) or push to GitHub ## Next Steps - [Navigation](/stellify/documentation/navigation) - Every dropdown, in detail - [Code Editor](/stellify/documentation/code-editor) - Method-level editing - [Interface Builder](/stellify/documentation/interface-builder) - Visual UI construction --- ## Ai AI in Stellify isn't a suggestion engine bolted onto an editor. Agents operate on your project through structured tools — and the workflow those tools exist to serve is **the Stellify development loop**: connect your editor over MCP, let AI find existing code and wire it into your project, then sync the result back to your repo or export it. ## The Development Loop Connect Claude Code, Cursor, VS Code, or any MCP-compatible client through the [Stellify MCP server](/stellify/documentation/mcp-server), and your agent works on your Stellify project from inside the editor you already use: **It finds before it generates.** The agent's mandatory first move on any feature is `search_code` — Stellify's curated library of proven units, searchable down to individual methods. A hit gets [referenced](/stellify/documentation/code-reuse) into your project in one call: real, reviewed code, wired to your routes and models, at a fraction of the cost of regenerating it. **It builds what's missing.** No match? One tool call scaffolds the resource stack — Model, Controller, Service, Migration — and the agent fills in your business logic at the method level. It checks your project's enabled [capabilities](/stellify/documentation/project-settings) before writing code against them; if framework-level support doesn't exist, it raises a capability request instead of hallucinating infrastructure. **It proves the work.** The agent runs methods in a sandboxed environment, applies migrations to your database, and executes test files with automatic rollback. You review working, tested code — not plausible-looking suggestions. **You ship it.** Commit the assembled feature back to your GitHub repo with [Live Sync](/stellify/documentation/export), or export the project wholesale. Then run the loop again. ## The Built-in Chat The same tool surface is available without leaving the browser. The editor's AI chat panel knows what you have selected — route, file, method — and works on it directly: - Plans multi-step work as tasks you can follow - Scaffolds resource stacks and wires routes - Edits individual methods and statements surgically - Builds UI elements and wires events to methods - Analyzes performance and code quality Changes land live in the canvas and code view as it works. AI copilot prompt Use whichever fits the moment: the MCP connection when you're working from your IDE (and when importing an existing codebase — the agent needs to read your local files), the chat when you're refining in the browser. ## Prompts That Use the Loop Well **Lead with reuse:** > "Add user registration — check the library for an existing flow before writing one" **Scaffold what's new:** > "Create a blog posts feature with a Post model, PostController with CRUD methods, and API routes" **Target precisely** — method-level edits are the platform's native grain: > "Add a search method to UserController that filters by email" **Make it prove itself:** > "Run the tests for the checkout service and fix any failures" **Build UI from description:** > "Create a dashboard page with a sidebar, header, and main content area using Tailwind" ## Working Habits **Let it search first.** If you tell the agent to write something from scratch, it will. Asking it to check the library first is the cheaper, better-tested path. **Build incrementally.** One feature per pass through the loop beats one giant prompt. Review, sync, repeat. **Make verification part of the ask.** "…and run it" or "…and write a test" turns generated code into proven code before you ever read it. **Review like it's a PR.** It leaves Stellify as standard Laravel — read it the way you'd read any contribution. ## Next Steps - [The MCP Server](/stellify/documentation/mcp-server) - Setup and the full tool reference - [Code Reuse](/stellify/documentation/code-reuse) - How referencing and copy-on-write work - [Exporting Code](/stellify/documentation/export) - Sync back and close the loop --- ## Mcp Server The MCP server is the front door to the Stellify development loop: **connect your editor, let AI find existing code and wire it into your project, sync back or export.** Claude Code, Cursor, VS Code Copilot, Claude Desktop — any MCP-compatible client connects directly to your Stellify project, and instead of reading and rewriting whole files, the agent works with your code the way Stellify stores it: as addressable files, methods, statements, and elements. This page covers connecting the server and what each tool does. If you want to import an existing codebase, see [Importing with MCP](/stellify/documentation/importing-with-mcp). ## Setup 1. Install the server: ```bash npm install -g @stellify/mcp ``` 2. Generate an API token in [User Settings](/stellify/documentation/user-settings) → **API Tokens**. The token is shown once — store it securely. 3. Add the server to your client's MCP configuration (e.g. `.vscode/mcp.json`, Cursor settings, or Claude Desktop's MCP section): ```json { "mcpServers": { "stellify": { "command": "npx", "args": ["@stellify/mcp"], "env": { "STELLIFY_API_URL": "https://api.stellisoft.com/api/v1", "STELLIFY_API_TOKEN": "your-api-token-here" } } } } ``` The server operates on your **active project** — the one currently open in Stellify. Switch projects in the platform and the agent follows. ## The Development Loop, Tool by Tool The server is designed reuse-first: before generating anything new, agents search the shared library and your project for existing code to reference — because referencing a proven unit costs a fraction of regenerating it ([Code Reuse](/stellify/documentation/code-reuse) explains the model). One pass through the loop looks like: 1. `search_code` — **find**: check whether the feature (or part of it) already exists in the library 2. `reuse_code` — **wire it in**: reference the unit and its dependencies into your project 3. `create_resources` / `create_file` — **fill the gaps**: scaffold what the library didn't have 4. `create_route` — connect it to a URL 5. `run_migration` — apply the database changes 6. `run_code` / `run_tests` — **prove it**: execute and verify 7. `get_assembled_code` — inspect the final rendered source 8. **Sync back** — commit to your GitHub repo or [export](/stellify/documentation/export); your repo stays the source of truth Then the next feature, same loop. ## Core Tools These are always available: | Tool | Purpose | |------|---------| | `get_project` | The active project: name, directories, enabled capabilities | | `search_code` | Search the reusable-code index for existing units to reference | | `search_files` / `search_methods` / `search_routes` | Find code in your project | | `reuse_code` | Reference an existing unit (and its dependency closure) into your project | | `create_resources` | Scaffold a complete resource stack — Model, Controller, Service, Migration — in one call | | `create_file` | Create a single file (controller, model, middleware, class, or Vue component) | | `create_route` / `save_route` | Create or update routes with controller wiring and middleware | | `run_code` | Execute a method in your project environment and return the result | | `run_migration` | Apply a migration to your connected database | | `run_tests` | Run a test file and return per-test results | | `get_assembled_code` | Render a file's structured data back into standard source code | ## Situational Tool Groups To keep the agent's context lean, less-common tools load on demand via `load_tools`: - **editing** — surgical statement-level edits and granular inspection: `save_file`, `save_method`, `create_method`, `create_statement`, `add_method_body`, `replace_method_body`, `delete_*`, `get_file`, `get_method`, `get_statement`, and more - **frontend** — UI and Vue tools: elements, element trees, HTML-to-elements conversion - **analysis** — performance and code-quality audits - **capabilities** — list and enable libraries/packages for the project - **settings** — read and write project configuration profiles - **contribute** — `submit_code`, for offering your own code into the shared library You don't need to manage this yourself — agents load groups as their task requires. ## Execution Semantics **`run_code`** executes a single method in a sandboxed environment scoped to your project and database, with a timeout (30s default). Schema-changing operations are blocked here by design. **`run_migration`** is the sanctioned path for schema changes. It applies a migration file to your connected database — use it after scaffolding with `create_resources`. **`run_tests`** runs every test in a test file and reports pass/fail, failure messages, and duration per test. Test runs are wrapped in a database transaction that is rolled back afterwards, so tests never mutate your project data. Test files export to `tests/Feature` in your Laravel project like any other code. ## The Embedded Chat You don't have to bring your own agent. The editor's built-in AI chat panel uses the same tool surface — describe what you want and it plans tasks, scaffolds resources, edits methods, and builds UI, with changes appearing live in the editor. ## Next Steps - [Code Reuse](/stellify/documentation/code-reuse) - Reference proven code instead of regenerating it - [Importing with MCP](/stellify/documentation/importing-with-mcp) - Bring an existing codebase in - [Working with AI](/stellify/documentation/ai) - Prompting patterns and workflows --- ## Code Reuse This is the middle of the Stellify development loop — the part between connecting your editor and syncing back. Most application code has been written before, so when your agent gets a feature request, its first move is to **find** that code, not generate it: Stellify's reuse system lets your project **reference** proven, curated units — whole files or individual methods — and wires them in. Referencing an existing unit costs a fraction of the tokens of regenerating it, and you get code that has already been reviewed and used in real projects. We've published the numbers in [The Economics of Code Reuse](/stellify/economics-of-code-reuse). ## References, Not Copies When you (or an agent) reuse a unit, Stellify doesn't paste a copy into your project. It creates a **reference** to the canonical unit in the shared library, pinned to a specific version. The canonical code is immutable — it can't change underneath you. Your project treats a referenced unit like any other file or method: it assembles into your exports, runs in your environment, and appears in your file tree. ## Finding Reusable Code Agents connected via the [MCP server](/stellify/documentation/mcp-server) do this automatically — `search_code` is the mandatory first step before creating anything new. It searches the shared library at method-level granularity, so an agent can pull in a single proven method rather than a whole file. In the editor, units with curated alternatives show a variant badge, and public projects in [Constellation](/stellify/documentation/constellation) show how many other projects reference them. ## Editing Referenced Code: Copy-on-Write Referenced code stays live until the moment you change it. When you edit a referenced unit, Stellify automatically **forks** it: - Your project gets its own private copy with your edit applied - The canonical unit and every other project referencing it are untouched - The fork records its ancestry (`forked_from`), so lineage is preserved You never need to think about this — edit as normal, and the fork happens transparently. ## Variants Popular units accumulate curated forks — variants that solve the same problem differently. In the editor you can browse a unit's variants, see how many projects have adopted each, and swap your reference to the variant that fits better. ## Submitting Your Own Code You can offer your own files and methods into the shared library: 1. Select the unit in the editor and choose **Submit for reuse** (or have your agent call `submit_code`) 2. Add a short note explaining what it does and why it's worth sharing 3. The Stellify team reviews submissions — approved units are locked into the library and become referenceable by other projects You keep ownership of submitted code, attribution is preserved through fork lineage, and adoption of your units is tracked — you can see how many projects reference your code from Constellation. Submission requires a subscription. Duplicate submissions (byte-identical to something already in the library) are rejected automatically. ## Why This Matters Every unit that enters the library makes the next project cheaper to build. Instead of every team paying an AI to regenerate the same registration flow, the flow is written once, reviewed once, and referenced everywhere — with copy-on-write protecting anyone who needs to diverge. ## Next Steps - [The MCP Server](/stellify/documentation/mcp-server) - The tools agents use to search and reuse - [Constellation](/stellify/documentation/constellation) - Browse public projects and their reusable code - [Exporting Code](/stellify/documentation/export) - Referenced code exports like any other code --- ## Importing With Mcp Open your existing project in your IDE, connect the Stellify MCP server, and tell the agent to import it. The agent reads your local codebase, converts it to Laravel 13 where it isn't already, and recreates it in Stellify as structured, editable code. This works for Laravel projects, legacy PHP frameworks, and non-PHP stacks alike — anything the agent can read, it can rebuild. ## Setup You need a Stellify account, an API token from [User Settings](/stellify/documentation/user-settings), and an MCP-compatible editor. Install the server: ```bash npm install -g @stellify/mcp ``` Then register it with your editor. For VS Code, create `.vscode/mcp.json` in your project root: ```json { "mcpServers": { "stellify": { "command": "npx", "args": ["@stellify/mcp"], "env": { "STELLIFY_API_URL": "https://api.stellisoft.com/api/v1", "STELLIFY_API_TOKEN": "your-api-token-here" } } } } ``` Cursor and Claude Desktop take the same command, args, and environment variables in their respective MCP settings. Full connection details are on [The MCP Server](/stellify/documentation/mcp-server) page. The import lands in your **active project** — the one currently open in Stellify. Create or switch to the right project before you start. ## Running the Import With MCP connected, the prompt is the whole interface. Open your project in the IDE and ask: > Import this project into my Stellify project The agent scans the structure, identifies the framework, and reports what it found — models, controllers, routes, components — before creating anything. Confirm, and it builds the corresponding files in Stellify using the same tools it uses to write new code (`create_file`, `create_method`, `create_route`). **Converting from another framework** — name the source and target so the agent transforms rather than transcribes: > Import this CodeIgniter project and convert it to Laravel 13 > Rebuild this Django application as a Laravel 13 project > Convert this Express.js API to Laravel with the same endpoints Framework idioms are mapped, not copied: CodeIgniter Active Record becomes Eloquent, `$this->input->post()` becomes Request objects, custom libraries become service classes, controller patterns become route-model-bound Laravel controllers. **Importing selectively** — scope the prompt: > Import just the User model and UserController > Import all controllers in app/Http/Controllers/Api > Import the routes from routes/api.php **Adding context** — the more the agent knows about what matters, the better the result: > Import the authentication system. The main files are AuthController, the User model, and the auth routes ## What Gets Imported - **Models** — with relationships, casts, and fillables - **Controllers** — all methods, including validation and responses - **Routes** — web and API, with middleware - **Middleware and services** - **Vue components** — single-file components with script setup Directory mapping is what you'd expect: `app/Models` → Models, `app/Http/Controllers` → Controllers, `app/Services` → Services, `resources/js` → JS, `routes/web.php` and `routes/api.php` → your Stellify routes. ## Working Through a Large Import Don't ask for a 400-file project in one prompt. Import in passes — models first, then controllers, then routes — reviewing in the Stellify editor between passes: > Import the models first > Now import the controllers that use those models If a relationship comes through wrong, say so plainly and the agent fixes the specific models: > The Post model belongs to User and has many Comments. Update the relationships. If imported code depends on packages or integrations, ask the agent what [capabilities](/stellify/documentation/project-settings) it needs — it will tell you what to enable and configure. ## After Importing 1. **Review in the editor** — walk the file dropdown; spot-check methods and relationships 2. **Enable capabilities** — auth, storage, mail: whatever the imported code depends on 3. **Connect your database** and run the migrations 4. **Verify** — run key methods with test input, or have the agent write and run a test file ## Tips - **Import from a clean commit** — a stable snapshot beats a mid-refactor working tree - **`.gitignore` is respected** — the agent won't read ignored files - **Describe the architecture up front** — "services hold the business logic, controllers are thin" saves a correction pass later ## Troubleshooting **Connection refused / timeout** — check the token and `STELLIFY_API_URL`, and that your network allows outbound connections. **Unauthorized** — the token was revoked (generating a new MCP token revokes old ones) or mistyped. Create a fresh one in User Settings. **Files missing in Stellify** — check the agent's output for parsing errors on specific files; re-run the import for just those files. **MCP server not found** — verify the install with `npx @stellify/mcp --version`. ## Next Steps - [The MCP Server](/stellify/documentation/mcp-server) - The full tool reference - [Importing WordPress](/stellify/documentation/importing-wordpress) - The dedicated WordPress workflow - [Code Reuse](/stellify/documentation/code-reuse) - Build the rest reuse-first --- ## Importing Wordpress Import your WordPress site and rebuild it as a modern Laravel application. ## Philosophy Standard WordPress functionality (Posts, Categories, Tags) is the same for every WordPress site. Instead of rebuilding this from scratch each time, Stellify provides a **WordPress scaffold** that sets up these standard models, controllers, and migrations. The import skill then focuses only on what's custom about your specific WordPress site. ## Prerequisites Before importing a WordPress site: 1. **Run the WordPress scaffold first** — Go to Project Settings and click "Scaffold WordPress Core" to create standard models (Post, Category, Tag) with their controllers and migrations 2. **Configure your project database** — Ensure your Stellify project has a database connection configured (Project Settings → Database) 3. **Run migrations** — The scaffold creates migrations that need to be run to create the tables 4. **Visual/styling conversion** — Template styling is handled separately from data structure import ## Quick Start ### Step 1 — Run the WordPress Scaffold In the Stellify editor, go to **Project Settings** and click **Scaffold WordPress Core**. This creates: - **Post** model (title, slug, content, excerpt, featured_image, status, published_at, author_id, meta_title, meta_description) - **Category** model (name, slug, description) - **Tag** model (name, slug) - Controllers with CRUD operations - Migrations with proper relationships (Post belongsToMany Category/Tag, Post belongsTo User) ### Step 2 — Import Content Directly In the **WordPress Import** panel (Project Settings), enter your WordPress site URL and click **Preview** to see what content is available: 1. **Enter your WordPress URL** — e.g., `https://your-wordpress-site.com` 2. **Add authentication (optional)** — For drafts, private posts, and users, enter `username:app_password` 3. **Select content types** — Choose which content to import (posts, categories, tags, users) 4. **Click Preview** — See counts of available content 5. **Click Import** — Content is imported directly into your Stellify project database The import runs immediately in the Stellify editor — no need to export your project first. You can see your imported content right away in the editor. #### Authentication for Private Content For private content and user imports, create an Application Password in your WordPress dashboard: 1. Go to **Users → Your Profile → Application Passwords** 2. Enter a name (e.g., "Stellify Import") and click **Add New** 3. Copy the generated password 4. Enter `your-username:generated-password` in the Auth field The import uses the WordPress REST API, which is enabled by default on WordPress 4.7+. ### Step 3 — Export Import Service for Re-syncs (Optional) If you need to re-import content after deploying your app (e.g., for ongoing content updates), you can scaffold an import service for your exported project: 1. Expand the **Export Import Service** section 2. Click **Add Import Service** This creates: - **WordPressImportService** — Pulls content via REST API - **wp:import artisan command** — CLI tool for running imports After exporting and deploying your project, you can run: ```bash # Basic import (public posts, categories, tags) php artisan wp:import https://your-wordpress-site.com # Import with authentication (for drafts, private posts, users) php artisan wp:import https://your-wordpress-site.com --auth=username:app_password --users # Skip specific content types php artisan wp:import https://your-wordpress-site.com --skip-posts --skip-tags ``` ### Step 4 — Install the Import Skill (Optional) For a guided import experience with custom post types and ACF fields, add the WordPress import skill to your project: ```bash mkdir -p .claude/skills/wordpress-import curl -o .claude/skills/wordpress-import/SKILL.md https://raw.githubusercontent.com/Stellify-Software-Ltd/stellify-mcp/main/skills/wordpress-import.md ``` Add the skill to your `CLAUDE.md`: ```markdown ## Skills - wordpress-import: Use this skill when importing WordPress sites into Stellify. Invoke with /wordpress-import to start the guided workflow. ``` ### Step 5 — Run the Guided Import Type `/wordpress-import` in your editor to start the guided workflow for custom post types and ACF fields. ## Import Workflow ### Step 1 — Verify WordPress Scaffold The import skill first checks that standard WordPress models exist (`app/Models/Post.php`, `Category.php`, `Tag.php`). If not, it prompts you to run the scaffold before proceeding. ### Step 2 — Analyse the WordPress Project The skill performs comprehensive analysis to understand what's custom about your site: **2a. Identify active theme** - Classic PHP theme or block theme (theme.json) **2b. Scan for custom post types & taxonomies** - Check `functions.php` for `register_post_type()` and `register_taxonomy()` calls - Detect CPT plugins (Custom Post Type UI, Pods, etc.) **2c. Scan plugins directory** - **Functionality plugins** (WooCommerce, ACF, forms) — need attention - **Low priority** (SEO, caching, security) — usually skip - **Builder plugins** (Elementor, WPBakery) — affects where templates are stored **2d. Database analysis** Run diagnostic queries to find: - Custom post types actually in use (with content counts) - Custom taxonomies in use - Custom meta keys (reveals ACF fields, custom fields) - Shortcodes embedded in content - Gutenberg blocks in use **2e. Produce analysis report** Structured summary showing: - Theme info - Content counts - Custom post types (name, slug, supports, count) - Custom taxonomies (name, slug, attached to, hierarchical, term count) - Custom fields discovered - Plugins requiring attention - Content flags (shortcodes, page builder usage) - Generation plan (what will be created vs what's already scaffolded) You'll be asked to confirm before proceeding. ### Step 3 — Generate Custom Resources For each custom post type and taxonomy identified: **3a. Custom post type models** - Model, migration, controller with: - Standard fields (title, slug, content, excerpt, status, published_at, author_id) - Custom fields from meta analysis - `getRouteKeyName()` returning 'slug' - Relationships to custom taxonomies - Published scope **3b. Custom taxonomy models** - Fields (name, slug, description, parent_id if hierarchical) - Pivot table for relationships **3c. Routes** - Following WordPress URL conventions ### Step 4 — Document Manual Tasks The skill creates a summary of items needing manual attention: - Forms (list fields and purpose) - Shortcodes in content (need processing during migration) - Plugin functionality (WooCommerce, memberships, etc.) - Content migration steps (export, transform, import, process shortcodes, migrate media) ## Key Rules | Rule | Description | |------|-------------| | **Analysis first** | Complete full analysis before generating any code | | **Only generate custom elements** | Standard models come from scaffold | | **Fresh database only** | No WordPress table connection | | **No template conversion** | Visual design handled by separate skill | | **Be pragmatic** | Focus on post types/taxonomies that actually have content | ## Before You Start ### REST API Import (Recommended) The Stellify editor imports directly from your WordPress site via its REST API. No manual export is needed — just enter your WordPress URL and authenticate if required. **Requirements:** - WordPress 4.7 or later (REST API enabled by default) - Site must be publicly accessible (or use authentication for private content) - For private posts, drafts, and users: Create an Application Password in WordPress ### Manual Export (Alternative) If REST API access is not available, you can manually export content: **Option 1: WordPress XML Export** In WordPress admin: Tools → Export → All content → Download Export File **Option 2: WP-CLI** ```bash # Export all content wp export --dir=./export # Export specific post types wp export --post_type=post,page,product ``` **Option 3: REST API (manual)** ```bash # Export posts curl "https://yoursite.com/wp-json/wp/v2/posts?per_page=100" > posts.json # Export pages curl "https://yoursite.com/wp-json/wp/v2/pages?per_page=100" > pages.json ``` ### Gather Your Theme Files Copy your theme folder locally. The AI will read: - `header.php`, `footer.php` — Global layout - `index.php`, `single.php`, `page.php` — Templates - `functions.php` — Custom functionality (important for CPT detection) - Template parts in `/template-parts/` ### Note Your Active Plugins List plugins that add functionality you want to preserve: - Forms (Contact Form 7, Gravity Forms, WPForms) - E-commerce (WooCommerce) - Custom fields (ACF, Meta Box) - Page builders (Elementor, Beaver Builder) ## WordPress to Stellify Mapping ### Content Types | WordPress | Stellify | Source | |-----------|----------|--------| | Posts | Post model + API | Scaffold | | Categories | Category model | Scaffold | | Tags | Tag model | Scaffold | | Custom Post Types | Custom models | Import skill | | Custom Taxonomies | Custom models | Import skill | ### Common Functions | WordPress Function | Stellify Equivalent | |--------------------|---------------------| | `the_title()` | `{{ $post->title }}` or `{{ post.title }}` | | `the_content()` | `{!! $post->content !!}` or `v-html` | | `the_excerpt()` | `{{ $post->excerpt }}` | | `get_the_date()` | `{{ $post->published_at }}` | | `the_post_thumbnail()` | `` | | `have_posts()` / `the_post()` | `@foreach($posts as $post)` or `v-for` | | `WP_Query` | `Post::query()` or `Http.get('/api/posts')` | | `get_permalink()` | `route('posts.show', $post)` | ## Plugin Equivalents ### Contact Forms WordPress form plugins become Vue components backed by a Laravel route. Validation lives in a Form Request on the server, and the component posts to it: ```javascript import { ref } from 'vue' const form = ref({ name: '', email: '', message: '' }) const errors = ref({}) async function submit() { const response = await fetch('/api/contact', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(form.value), }) if (response.status === 422) { errors.value = (await response.json()).errors return } } ``` ### Custom Fields (ACF) ACF field groups become model fields and migrations. The import skill detects these from the `wp_postmeta` table and adds them to your custom post type models. ### WooCommerce WooCommerce is a major plugin that should be imported separately. Use the dedicated WooCommerce import skill for: - Product model with all fields - ProductController with CRUD - Order, Customer, Coupon models - API routes for the catalog ## Content Migration ### Posts and Pages After models are created, migrate content using seeders: 1. Export WordPress content (XML or JSON) 2. Create a seeder to map WordPress fields to Eloquent models 3. Handle relationships (author, categories, tags) 4. Process shortcodes in content ### Media Files For images and files: 1. Upload media to your hosting/CDN 2. Update URLs in content 3. Or create a media migration script to rewrite paths ## Importing Plugins Separately When importing a WordPress site with major plugins, import the core site first, then handle plugins separately: 1. **Run WordPress scaffold** — Standard models 2. **Run import skill** — Custom post types and taxonomies 3. **Import plugins individually** — Each plugin as its own session For popular plugins, check the [Stellify Skills Repository](https://github.com/Stellify-Software-Ltd/stellify-mcp/tree/main/skills) for dedicated import skills: - **WooCommerce** — Products, orders, customers, coupons, shipping zones - **Advanced Custom Fields** — Field groups, layouts, flexible content - **Gravity Forms** — Form configurations, entries, notifications ## Troubleshooting ### Content not displaying correctly - Check that `{!! !!}` or `v-html` is used for WordPress content (it contains HTML) - Verify API endpoints return the expected data - Ensure relationships are loaded (eager loading) ### Shortcodes appearing as text - Shortcodes need to be processed during content migration - The import skill documents which shortcodes are in use - Create Vue components or Laravel helpers to replace shortcode functionality ### Missing custom fields - Check that ACF or custom field data was exported - Custom fields are stored in `wp_postmeta` — ensure this table is included in your export - The import skill detects custom meta keys automatically ### Custom post types not detected - Ensure `functions.php` is included in your theme files - Check for CPT plugins (Custom Post Type UI creates JSON config files) - The import skill scans the database for post types actually in use --- ## Coding # Coding in Stellify Everything you build in Stellify — PHP or JavaScript, written by you or an agent — lands in the same structure: **Files → Methods → Statements → Clauses** A file contains methods. A method contains statements (its lines). A statement contains clauses (its tokens). Every level has a stable identity, which is what makes the platform work the way it does: - The editor opens **one method at a time**, selected from the navigation breadcrumb — not a scrolling text buffer - Agents edit **one statement at a time** — "add a null check" adds a statement; nothing else in the file is touched - The [reuse system](/stellify/documentation/code-reuse) can reference a **single method** from the shared library into your project - Exports assemble the structure back into ordinary PHP and Vue files, indistinguishable from hand-written code You never manage this structure directly. You write code and it's parsed in; agents call tools and it's written in; either way it's the same data. ## Where Each Kind of Work Happens | You want to | Go to | |-------------|-------| | Write or edit PHP/JS by hand | [Code Editor](/stellify/documentation/code-editor) — method-level editing, autocomplete, in-editor execution | | Build or restyle UI | [Interface Builder](/stellify/documentation/interface-builder) — live canvas, element tree, event wiring | | Scaffold a feature | **Create Resources** in the file dropdown, or prompt the agent — Model, Controller, Service, Migration in one step | | Reuse a proven implementation | [Code Reuse](/stellify/documentation/code-reuse) — reference it from the shared library | | Bring in existing code | [GitHub import](/stellify/documentation/project-settings), [MCP import](/stellify/documentation/importing-with-mcp), or file upload | | Run and verify | Run button on any method; the test runner for test files; `run_code`/`run_tests` for agents | ## Vue Components A Vue file splits across the two views: its **template** is the element tree you edit in the Interface Builder, its **script** (imports, reactive state, functions) lives in the Code Editor as statements and methods, and styling is Tailwind classes set on the elements. One component, edited from whichever side fits the change. ## Next Steps - [Code Editor](/stellify/documentation/code-editor) - The editing model in detail - [Interface Builder](/stellify/documentation/interface-builder) - The visual side - [The MCP Server](/stellify/documentation/mcp-server) - The same operations, driven by agents --- ## Code Editor The code editor doesn't edit text files — it edits **methods**. You select a file and a method from the navigation bar, and the editor shows that method alone. What you type is parsed into statements and clauses as you write, which is what lets AI (and the platform itself) address, run, and modify your code at the level of a single line instead of a whole file. Day to day it feels like a normal editor — syntax highlighting, autocomplete, keyboard-driven — but the structure underneath changes a few workflows, which this page covers. ## Directories and Files Files live in directories that mirror a Laravel project — `Controllers`, `Models`, `Services`, `Middleware`, plus a `js` directory for Vue components. Create files and directories from the file dropdown in the navigation bar; when you create a file you pick its type (controller, model, middleware, class, or Vue component), which sets its namespace and where it lands on export. Create directory dialog For a full CRUD stack, don't create files one by one — use **Create Resources** in the file dropdown (or ask the agent) to generate the Model, Controller, Service, and Migration together, pre-wired. ## Methods Add a method from the method dropdown, then click the cog (⚙️) on the signature to set its name, parameters, visibility, and return type. The signature is structured data — the method dropdown displays every method with its return type, and exports render the exact typed signature you configured. Method settings panel Write the body as you normally would:
public function store(Request $request): JsonResponse
{
$validated = $request->validate([
'email' => 'required|email',
'name' => 'required|string',
]);
$user = User::create($validated);
return response()->json($user, 201);
}
Each line you write is stored as a statement with its own identity. That's why an agent asked to "add a null check to store()" adds exactly one statement — it isn't rewriting the file and hoping the diff is small. ## File-Level Statements Imports, class properties, and constants are statements that belong to the file rather than a method. Add them from the file view; they render above your methods. Adding statements One thing to know: `use` statements only resolve for classes registered with the platform. If an import doesn't resolve, the class may need a [capability](/stellify/documentation/project-settings) enabled — or a capability request if it isn't supported yet. ## Autocomplete As you type, suggestions appear scoped to where you are: the method's parameters and local variables, class properties, model attributes, and importable classes from your enabled capabilities. Because the editor knows the actual structure — not just nearby text — suggestions are drawn from what genuinely exists in your project.
Variables
$request Request
$response Response
Methods
request() Helper
Classes
Request Class
Navigate with **↑/↓**, accept with **Tab** or **Enter**, dismiss with **Esc**. ## Running Methods Click **Run** on any method to execute it against your project environment — no route, no HTTP client, no dump statements. Provide the input as JSON, get the return value back:
Run: store()
Input Parameters
{
  "email": "test@example.com",
  "name": "Test User"
}
Output
{
  "id": 1,
  "email": "test@example.com",
  "name": "Test User"
}
This is the same execution path agents use via `run_code` — write a method, run it, fix it, run it again, all without leaving the editor. Schema changes are the one exception: migrations run through the migration runner in [database settings](/stellify/documentation/database-connection), not here. Test files get their own runner too — every test in the file executes and reports individually, wrapped in a transaction that rolls back so your data is untouched. ## Bundling JavaScript With a JavaScript file selected, the file dropdown offers two ways to bundle: **Bundler service (recommended).** Run the [Stellify bundler service](https://github.com/Stellify-Software-Ltd/stellify-bundler-service) locally or on a server, point your project settings at it, and choose **Bundle with Service**. It's esbuild under the hood — fast, production-grade output. **ESM bundler.** Choose **Bundle with ESM** to bundle in the browser with no setup. Slower, but fine for quick iteration before you've stood up the service. ## Next Steps - [Interface Builder](/stellify/documentation/interface-builder) - The visual side of the same structured model - [The MCP Server](/stellify/documentation/mcp-server) - Let agents drive these same operations - [Exporting Code](/stellify/documentation/export) - How structured code becomes standard files --- ## Interface Builder The Interface Builder is the visual side of the editor: the canvas renders your actual page, and everything on it is a selectable, editable element. Elements are structured data — the same model your PHP methods use — so the UI you build here is just as addressable by agents as your backend code, and assembles to standard Vue templates on export. ## Pick a Route First The canvas always shows the route in the address bar. Use the route dropdown to switch pages, create new ones, or open **Route Settings** to change the path, name, and controller wiring. Route settings ## Select, Then Edit Click anything on the canvas to select it — the selection gets a dashed outline, and the element tree highlights its position in the page structure.
Welcome to My App
Get started by exploring the features below.
Element Tree
▼ div.container
▼ div.hero
h1
p
div.buttons
The element tree is the structural view: expand/collapse with ▼/▶, click to select deeply nested elements the canvas makes hard to hit, and drag to reorder. Use the responsive view buttons to check the page at desktop, tablet, and mobile widths as you go. Responsive view buttons ## Adding Elements Click the plus icon in the element tree — the new element is added as a child of the current selection, so select the container first. Add element menu Elements come in five types. The type controls which properties the editor offers you — in the final assembled code it disappears entirely: | Type | Assembles to | |------|--------------| | **s-wrapper** | Containers: `div`, `section`, `header`, `nav`… | | **s-input** | Form controls: `input`, `button`, `textarea`, `select` | | **s-form** | A `form` with submit handling wired | | **s-media** | `img`, `video`, `audio` | | **s-loop** | A repeating element (`v-for`) bound to an array | Building a big chunk of UI? Don't click it together element by element — describe it to the agent, or paste existing markup and let `html_to_elements` convert it. The result is the same editable tree. ## Editing Properties The property panel edits the selected element: its tag, Tailwind classes, text content, and attributes like `href` and `src`. Element property editor Styling is Tailwind utility classes on the `Classes` field — change a class and the canvas updates immediately. There's no separate CSS pipeline to manage; the classes you set here are the classes in your exported components. ## Wiring Events to Methods This is where UI meets your code. Select an element, open the **Events** panel, pick an event (`@click`, `@submit`, `@input`, …), and choose which method it calls — the dropdown lists the methods from the Vue files included on this route.
Events
@click
@submit
The method itself lives in the [Code Editor](/stellify/documentation/code-editor) — the typical flow is: build the form here, write (or prompt) the handler there, wire the two, then submit the form on the live canvas to test the whole path. ## Binding Data Set an element's text to `{{ variable }}` to bind it to reactive data. The panel shows which variables are available from the component's script, so you're picking from what exists rather than guessing:
Text Binding
Content
Available variables:
count title items
Mixed text like `Count: {{ count }}` works too — literal runs and expressions are stored separately and reassembled in order. For lists, use an **s-loop** element bound to an array and design the repeating item once. ## Next Steps - [Code Editor](/stellify/documentation/code-editor) - Write the methods your UI calls - [Sharing & Embedding](/stellify/documentation/sharing) - Put a finished page in front of someone - [Working with AI](/stellify/documentation/ai) - Have the agent build UI from a description --- ## Navigation Stellify has no file tree. You navigate the way you reason about a Laravel app — *which branch, which route, which file, which method* — and the navigation bar holds exactly that, as a breadcrumb of dropdowns:
main
/
Home
/
UserController
/
store()
Read left to right: you're on **main**, editing the **Home** route, with **UserController** open at the **store()** method. Change any level and everything to its right follows. On the far right, three buttons switch how the canvas renders — **Interface** (visual builder), **Code** (method editor), **Split** (both) — followed by **Settings** ([project configuration](/stellify/documentation/project-settings)) and your **profile** ([account and API tokens](/stellify/documentation/user-settings)). --- ## Branch Dropdown
Switch Branch
main
feature/user-auth
bugfix/login-issue
Create Branch
Click a branch to switch to it — every edit you make from that moment lands on that branch, invisible to collaborators on main until you merge. Type a name and hit **Create** to branch off main (subscription required). The green dot marks main; the checkmark marks where you are now. Diff, merge, and discard live alongside switching — see [Version Control](/stellify/documentation/version-control) for that workflow. --- ## Route Dropdown Routes are the entry points of your app, and in Stellify they're also how you choose what to work on: select a route and the canvas loads that page.
Pages
Home
/
Dashboard
/dashboard
User Profile
/users/{id}
Settings
/settings
API Endpoints
GET /api/users
POST /api/users
Route Settings
Share Page
Delete Page
Pages and API endpoints are listed separately, endpoints with their HTTP method badges. From here you: - **+ New Page** — create a route; give it a path and it's immediately editable on the canvas - **Route Settings** — path, name, controller and method wiring, middleware, and the **public** flag that enables [share links](/stellify/documentation/sharing) - **Share Page** — grab the share/embed URLs for a public route - **Delete Page** — remove the route (confirmed first) Agents manage routes through `create_route` and `save_route` — a scaffolded feature usually arrives with its routes already wired, and this dropdown is where you inspect and adjust them. --- ## File Dropdown Files are grouped by what they are — controllers, models, middleware, services, Vue components — not by directory path.
Controllers
UserController
AuthController
PostController
Models
User
Post
Vue Components
Counter.vue
+ New File
Create Resources
Close File
- **+ New File** — one file: pick the type, name it, start writing - **Create Resources** — the whole stack at once: Model, Controller, Service, and Migration, pre-wired to each other. Prefer this over creating CRUD files individually; it's the same scaffold agents use via `create_resources` - **Close File** — drop the file from the breadcrumb With a JavaScript file selected, this menu also holds the [bundling options](/stellify/documentation/code-editor). --- ## Method Dropdown The last breadcrumb lists the methods in the open file, each with its return type. Select one and the code view shows just that method — the unit you edit, run, and that agents target.
Methods
index → Collection
store → JsonResponse
show → User
update → JsonResponse
destroy → void
**+ New Method** adds an empty method to the file; configure its signature via the cog in the [Code Editor](/stellify/documentation/code-editor). --- ## AI Chat Panel The chat panel opens from anywhere and already knows your position in the breadcrumb — ask for "a findByEmail method here" and it targets the open file without you spelling out paths.
AI Assistant
Add a new endpoint to get user by email
I'll add a findByEmail method to the UserController that accepts an email parameter and returns the matching user.
Ask Claude...
Pick the model per task from the selector — **Haiku** for quick mechanical edits, **Sonnet** as the default, **Opus** for work that spans many files. The agent applies changes directly to your project; the canvas and code view update as it goes. --- ## Next Steps - [Code Editor](/stellify/documentation/code-editor) - What happens after you select a method - [Interface Builder](/stellify/documentation/interface-builder) - What happens on the canvas - [Version Control](/stellify/documentation/version-control) - Branch, diff, and merge --- ## Version Control Stellify has built-in version control designed around its structured code storage. Instead of tracking text diffs, branches track changes to entities — routes, files, methods, statements, elements — so you can see and merge exactly what changed. ## Branches Every project has a **main** branch. Create additional branches to work on features in isolation: 1. Open the branch dropdown in the top navigation 2. Click **New Branch** and give it a name 3. Everything you edit now happens on that branch — main is untouched While you're on a branch, your changes are invisible to collaborators on main (and conflict detection is skipped — the branch is your isolated copy). Branch creation requires an active subscription. Plan tiers set how many branches you can keep (up to 300 on the highest tier); the free tier works on main only. ## Diff The **Diff** view shows every entity your branch has changed compared to main — added, modified, and deleted routes, files, methods, and elements. Because changes are tracked per entity rather than per line, the diff tells you *what* changed at the level you think about your app. ## Merging When the work is ready: 1. Open the branch menu and choose **Merge** 2. Review the diff 3. Confirm — your branch's changes are applied to main If main moved while you worked, conflicting entities are surfaced for resolution during the merge. ## Discarding Changes - **Discard one entity** — revert a single route, file, or method on your branch back to its main version - **Discard all** — reset the entire branch to match main ## Merge History The **History** view lists past merges into main, so you can see when each batch of changes landed and who merged it. ## Next Steps - [Edit Conflicts](/stellify/documentation/edit-conflicts) - How simultaneous edits on shared code are handled - [Collaborators](/stellify/documentation/collaborators) - Working with a team - [Exporting Code](/stellify/documentation/export) - Push merged work to GitHub --- ## Database Connection Your project's data lives in your database, not ours. Connect any MySQL or PostgreSQL instance and Stellify runs your migrations, queries, and code execution against it — the same database your exported app will use in production. ## Overview Stellify doesn't host databases. Bring one from Supabase, PlanetScale, Neon, or your own server, and enter the credentials in **Project Settings → Database**. Database connection settings Supported: **MySQL 5.7+**, **PostgreSQL 12+**, **MariaDB 10.3+**. Until you connect one, your project runs against a managed workspace database — fine for early building, but connect your own before you rely on the data. --- ## Fastest Path: Supabase The Supabase wizard connects (or creates) a free PostgreSQL database without leaving Stellify: Supabase connection wizard 1. Open **Project Settings → Database** and choose **Supabase** 2. Provide your Supabase access token — the wizard lists your existing projects and can create a new one for you 3. Pick a project; Stellify pulls the connection details and fills them in Prefer to do it manually? In Supabase, **Settings → Database** has the host, port (`5432`), database (`postgres`), username, and password — paste them into Stellify's connection form. ## Other Providers Any reachable MySQL/PostgreSQL works the same way: create the database, grab the connection details, enter them in Stellify. For PlanetScale use the Laravel connection preset; for Neon copy the connection string from the dashboard; for a self-hosted server make sure it accepts external connections and the user has full rights on the database. ## Test the Connection Click **Test Connection** after saving credentials. If it fails, it's almost always one of: - The database doesn't allow external connections (firewall / IP allowlist) - Wrong username or password - The provider requires SSL --- ## Migrations Migrations are the one kind of code that doesn't run through the normal Run button — schema changes go through the migration runner: - **In the editor**: **Project Settings → Database → Run Migrations** applies pending migrations - **From an agent**: the `run_migration` MCP tool applies a specific migration file — agents do this automatically after scaffolding with `create_resources` Scaffold a resource, run its migration, and the table exists — you can `run_code` the controller against real data immediately. ## Moving Data **Copy Data** (in database settings) migrates your project's schema and data from the workspace database into your connected database — use it once when you graduate from the workspace default to your own instance. --- ## Next Steps - [The MCP Server](/stellify/documentation/mcp-server) - run_migration and run_code semantics - [Project Settings](/stellify/documentation/project-settings) - Everything else in settings - [Exporting Code](/stellify/documentation/export) - Your exported app connects to this same database --- ## Project Settings ## Overview Project Settings is where you manage the configuration that applies to your entire application. Access it from the settings icon in the top navigation. Project settings overview ## General Project Settings Basic project information and configuration. - **Project Name**: Display name for your project - **Description**: Brief description of what the app does (used by AI) - **PHP Version**: Target PHP version for compatibility ## Team Members Invite collaborators by email, review pending invitations, and set each member's permissions (read, write, execute). See [Collaborators](/stellify/documentation/collaborators) for the full picture, including limits and how simultaneous edits are handled. Subscription only. ## Version Control Create, switch, merge, and delete branches for your project. See [Version Control](/stellify/documentation/version-control). - **Default branch**: Usually `main`, used as the base for new branches - **Commits ahead**: Changes not yet merged to the default branch - Branch creation requires an active subscription ## Capabilities View and configure installed packages and integrations. AI checks for capabilities before implementing a feature request. If application framework code is needed that doesn't currently exist or is not fit for purpose, a capability request is raised and you'll be emailed once the capability is available. Some capabilities need configuration before they can be enabled — for example, Stripe needs your API keys, and the `ai` capability needs provider credentials. Save the required settings first, then enable. ### Capability Statuses - **Available**: Installed and ready to use - **Needs Config**: Installed but requires API keys or setup - **Enable**: Click to add the capability to your project ### Per-Project AI Credentials Enabling the `ai` capability lets your application code use the Laravel AI SDK with **your own provider keys** (OpenAI, Anthropic, Gemini, and others). Your credentials are stored as a project setting and injected only when your code runs — they're never shared with the platform's own AI features. ## Usage Statistics View usage metrics and analytics for your project. Statistics and GitHub settings ## Publish to Constellation Submit your project for a public listing on [Constellation](/stellify/documentation/constellation), Stellify's app store. Fill in the listing metadata (description, thumbnail, screenshot) and submit for review — on approval, your project becomes public and its code becomes referenceable by other projects. ## Export Project to Desktop Download your project as standard PHP and Vue files for local development. See [Exporting Code](/stellify/documentation/export). ## GitHub Integration Connect your project to GitHub for version control and export. Link a repository to enable importing, exporting, and two-way file sync. ## Delete Project Permanently delete your project. This action cannot be undone. ## Next Steps - [Code Editor](/stellify/documentation/code-editor) - Write application logic - [Interface Builder](/stellify/documentation/interface-builder) - Build your UI - [Exporting Code](/stellify/documentation/export) - Export to GitHub --- ## User Settings ## Overview User Settings holds everything tied to your account rather than a single project. Open it from your profile icon in the top navigation. User settings ## API Tokens The section you'll visit first. API tokens are how anything outside the browser talks to your Stellify account: - **The [MCP server](/stellify/documentation/mcp-server)** — Claude Code, Cursor, and other agents authenticate with this token - **CI/CD and integrations** — script exports and other API operations Click **Create New Token** and copy it immediately — it's shown once. Generating a new MCP token revokes the previous one, so update your editor's MCP config when you rotate. ## Profile Name, email, and avatar. ## Preferences Editor behavior: dark mode, auto-save, font size, tab size. ## Subscription Your plan, billing, and invoices. Subscription level determines [branch](/stellify/documentation/version-control) limits, [collaborator](/stellify/documentation/collaborators) seats, and access to features like embedding and library submission. ## Account Security Password and two-factor authentication. ## Next Steps - [The MCP Server](/stellify/documentation/mcp-server) - Put that API token to work - [Project Settings](/stellify/documentation/project-settings) - Per-project configuration --- ## Collaborators Stellify projects support real multi-user development: invite collaborators by email, control what each person can do, and let the platform handle simultaneous edits safely. ## Inviting Collaborators Project owners can invite collaborators from Project Settings: 1. Open **Project Settings → Team Members** 2. Enter the collaborator's email address and send the invite 3. They receive an email link; accepting it adds them to the project and switches their editor to it Invitations expire after 7 days. Pending invites can be revoked before they're accepted. ## Permissions Each collaborator has granular permissions the owner can adjust: - **Read** — view the project (the baseline for new collaborators) - **Write** — edit code, elements, and routes - **Execute** — run code, migrations, and tests - **Owner (super)** — full control, including team management and project settings New collaborators join read-only; the owner grants write/execute as needed. ## Limits - Collaboration is a subscription feature for the project owner - A project can have up to 10 collaborators (including pending invites) - One collaborator without their own subscription is allowed per project; additional collaborators need a subscribed account ## Working in a Shared Project Collaborators see the shared project in their project switcher and can move between it and their own projects. A collaborator can leave a project at any time from the project menu. When two people edit the same entity at the same time, Stellify detects it at the field level rather than silently overwriting — see [Edit Conflicts](/stellify/documentation/edit-conflicts). If you want to work without interference, create a [branch](/stellify/documentation/version-control): branches are isolated per user, so nothing you do on a branch collides with anyone else until you merge. ## Next Steps - [Edit Conflicts](/stellify/documentation/edit-conflicts) - How simultaneous edits are detected and resolved - [Version Control](/stellify/documentation/version-control) - Branch-based isolation - [Project Settings](/stellify/documentation/project-settings) - Where team management lives --- ## Edit Conflicts When multiple people (or a person and an agent) edit the same project, edits can collide. Because Stellify stores code as structured entities rather than text files, it detects collisions at the **field level** — and never silently overwrites anyone's work. Conflict detection runs automatically on multi-user projects for shared (main-branch) entities. Work on an isolated [branch](/stellify/documentation/version-control) is exempt — branches can't collide until merge. ## How Detection Works Every save carries the state the editor originally loaded. When you save, Stellify compares three things: what you loaded, what you're saving, and what's currently stored. If someone else changed the entity since you loaded it **and** your edits touch the same fields, the save is stopped and a conflict is recorded. Nothing is committed — both versions are preserved. If the other person changed *different* fields, there's no conflict: their changes are pulled in alongside yours. ## Live Reconciliation The editor also reconciles continuously while you work. If a collaborator saves changes to the entity you have selected, safe fields update in place, and only genuinely clashing fields are flagged — most simultaneous editing never becomes a conflict at all. ## Resolving Conflicts Open **/conflicts** to see your pending conflicts. Each one shows both versions with the clashing fields highlighted. The person who hit the conflict proposes a resolution: - **Mine** — keep your version - **Theirs** — accept the other person's version - **Merge** — combine, field by field - **Manual** — write the resolution yourself - **Abandon** — discard the proposed change entirely Resolutions are durable: **both parties must agree** before anything commits. The counterparty reviews the proposal and agrees (or counter-proposes); once both have agreed, the resolution is applied automatically. The proposer can also cancel their own proposal at any time. ## Design Principles - **No lost work** — a conflicting save is parked, never dropped or force-merged - **Conservative by default** — only fields both users actually touched count as conflicts - **Agreement, not authority** — neither side can unilaterally impose a resolution on shared code ## Next Steps - [Collaborators](/stellify/documentation/collaborators) - Inviting people and setting permissions - [Version Control](/stellify/documentation/version-control) - Branches sidestep conflicts entirely --- ## Constellation Constellation is Stellify's public app store, at [stellisoft.com/stellify/store](/stellify/store) — where public Stellify projects live. Every listing is a complete, working application whose code you can inspect, reference, and build on — not a screenshot gallery. ## Browsing Each listed project shows its description, screenshots, and a **"Reused by N projects"** count — how many other projects currently reference code from it. That count is Constellation's social proof: it measures code that other builders actually adopted. Featured projects showcase what the platform can do end-to-end (for example, an AI/RAG assistant and a subscription billing starter). ## Using Constellation Code Public projects feed the [code reuse](/stellify/documentation/code-reuse) system. From a listing you can pull units into your own project by reference — pinned, immutable, and copy-on-write when you need to diverge. Your agent can do the same through `search_code` and `reuse_code`. ## Publishing Your Project Any project owner with a subscription can request a listing: 1. Open **Project Settings** and fill in the listing metadata — name, description, thumbnail, and screenshot 2. Click **Submit for review** 3. The Stellify team reviews the submission; on approval your project becomes public and appears in Constellation One review request can be pending per project at a time. Until approved, your project stays private. ### What Publishing Means Publishing makes your project's code publicly visible and referenceable by other projects. You keep ownership; fork lineage preserves attribution, and you can see adoption of your code from your Constellation listing. Public projects remain live code — when you improve them, reviewed updates can become new versions without breaking anyone pinned to older ones. ## Next Steps - [Code Reuse](/stellify/documentation/code-reuse) - How referencing Constellation code works - [Sharing & Embedding](/stellify/documentation/sharing) - Share individual pages without publishing the whole project --- ## Sharing You can share live, working pages from your project with anyone — no Stellify account required — and embed them in other sites. ## Share Links A share link renders a page of your app publicly: ``` https://stellisoft.com/share/{project-uuid}/{page-uuid} ``` The page runs for real: its controller executes, data loads, and forms and buttons work. Visitors interact with your actual application, not a static preview. To make a page shareable, mark its route as **public** in the route settings. Only GET routes explicitly marked public are accessible — everything else stays private by default. ## Embedding Embed a public page in any website with an iframe: ``` https://stellisoft.com/embed/{project-uuid}/{page-uuid} ``` The editor generates the embed code for you — open a public route and choose **Embed** to copy: - The share URL - A fixed-size iframe snippet - A responsive iframe snippet - Plain HTML link and Markdown variants Embedding requires the project owner to have an active subscription; plain share links do not. ## Good Uses - **Demos** — send a working feature to a client before it ships - **Portfolios** — embed live apps in your personal site instead of screenshots - **Docs and blogs** — embed a working example right in an article ## Notes - Share and embed traffic is rate-limited to protect your project - Unmarking a route as public immediately disables its share and embed URLs - To make an entire project public and referenceable, see [Constellation](/stellify/documentation/constellation) ## Next Steps - [Constellation](/stellify/documentation/constellation) - Publish the whole project - [Routes & Navigation](/stellify/documentation/navigation) - Where route settings live --- ## Export This is where the Stellify development loop closes. The code your agent found, wired in, and verified leaves as standard Laravel — export individual files, download the entire project, or push straight to your GitHub repository. Your repo stays the source of truth; Stellify is the workbench the code passed through. ## Export Individual Files Download a single file as standard PHP or Vue: 1. Open the file you want to export 2. Click **Export** (or right-click in the file tree) 3. Choose the format: - `.php` for controllers, models, classes - `.vue` for Vue single-file components - `.js` for JavaScript modules The exported file is standard code - no Stellify-specific syntax or dependencies. ## Export Entire Project Download your complete project as a ZIP file ready to use with Laravel: 1. Go to **Project Settings** 2. Click **Download ZIP** in the Export Project section The ZIP includes everything you need: - All your PHP files (controllers, models, middleware, classes) - Vue components - Routes (web.php and api.php) - `composer.json` with dependencies based on your project capabilities - `package.json` for Vue/Vite setup - Config files generated from your project settings - `vite.config.js` and `tailwind.config.js` ### Setting Up Locally 1. **Install a fresh Laravel project:** ```bash composer create-project laravel/laravel my-project cd my-project ``` 2. **Extract the ZIP** into your Laravel directory, replacing existing files 3. **Install dependencies:** ```bash composer install npm install ``` 4. **Configure your environment:** - Copy `.env.example` to `.env` - Set your database credentials - Run `php artisan key:generate` 5. **Run migrations and start the server:** ```bash php artisan migrate npm run dev php artisan serve ``` Your exported project structure: ``` your-project/ ├── app/ │ ├── Http/ │ │ ├── Controllers/ │ │ └── Middleware/ │ └── Models/ ├── config/ ├── resources/ │ └── js/ │ └── components/ ├── routes/ │ ├── web.php │ └── api.php ├── composer.json ├── package.json ├── vite.config.js └── tailwind.config.js ``` ## Export to GitHub Push your project directly to a GitHub repository. ### Quick Export If you've exported before, you'll see a quick export view showing your last target and how many files have changed:
username/my-laravel-app
Branch: main
View last commit
Last exported: 2h ago
Total files: 47
Changed since last export: 3
Click **Export Changes** to push only modified files. Click **Options** to change the target repository or branch. ### Export Options The full export form lets you configure where to push:
Repository
Branch
Commit message (optional)
- **Repository**: Choose an existing repo or create a new one - **Branch**: Target branch (created if it doesn't exist) - **Commit message**: Custom message for the commit - **Force full export**: Re-export all files, not just changes ### What Gets Exported The GitHub export includes: - All PHP files (controllers, models, etc.) - Vue components - Routes - Migrations - Configuration files - A standard Laravel project structure ### Using Exported Code Once exported, you can: - Run locally with `php artisan serve` - Deploy to any Laravel-compatible host - Continue development in your local IDE - Use CI/CD pipelines - Collaborate with developers not using Stellify ## GitHub Live Sync Beyond one-way exports, you can link a repository and branch for two-way sync: - **Browse and import** — view files in the connected repo and pull individual files into the editor, where they're parsed into Stellify's structured format - **Commit back** — push changes to specific files back to the repo with a commit message - **Refresh** — pick up changes made outside Stellify so the editor stays current This makes Stellify a workbench your repository's code passes through: import a file, let AI refine it with surgical edits, run the tests, and commit it back. Your repo stays the source of truth. Set up the connection in **Project Settings → GitHub Integration**. ## Export Format Exported code follows Laravel and Vue conventions: ### PHP Files ```php

{{ title }}

``` No proprietary formats, no lock-in. --- ## Framework Design # AI-First Frontend Framework: Design Principles A framework designed for AI to reliably generate correct frontend code. --- ## 1. Core Thesis **The framework optimizes for AI code generation, not just human developers.** Current libraries fail AI because: - Too many ways to accomplish the same task - Massive API surfaces with implicit conventions - Configuration sprawl (objects with 50+ properties) - Undocumented "you just know" patterns This framework provides: - **One obvious way** to do each common task - **Minimal API surface** per module - **Sensible defaults** that work without configuration - **Predictable patterns** across all modules --- ## 2. API Design Principles ### 2.1 The Rule of Seven Each module exposes **a maximum of 7 primary methods**. Why 7? It's the cognitive limit for working memory. If AI can't hold the entire module API in context, it will hallucinate. ``` Good: Graph.addNode(), .addEdge(), .remove(), .connect(), .layout(), .render(), .export() Bad: Graph.addNode(), .addNodeWithData(), .addNodeAt(), .addNodeWithStyle(), .addNodeAsync()... ``` ### 2.2 Method Naming Convention All methods follow a **verb-noun** or **verb** pattern: | Pattern | Examples | |---------|----------| | `verb()` | `render()`, `layout()`, `export()` | | `verbNoun()` | `addNode()`, `removeEdge()`, `setLayout()` | | `fromSource()` | `fromJSON()`, `fromCSV()`, `fromDescription()` | | `toTarget()` | `toJSON()`, `toSVG()`, `toCanvas()` | **Never use:** - Ambiguous names: `process()`, `handle()`, `do()` - Abbreviations: `addN()`, `rmEdge()` - Multiple verbs: `addAndConnect()` ### 2.3 Parameter Philosophy **Positional parameters for required values. Options object for optional configuration.** ```javascript // Good: Required params positional, optional in object graph.addNode(id, { label: 'Hello', color: 'blue' }) // Bad: Everything positional graph.addNode(id, label, color, size, x, y, shape) // Bad: Everything in object graph.addNode({ id, label, color }) // id is required, shouldn't be optional ``` **Options objects have a maximum of 5 properties.** If you need more, you're designing wrong. Break into separate methods or rethink the abstraction. ### 2.4 Return Values Every method returns one of: - `this` (for chaining) - The created/modified object - A primitive result **Never return `void` or `undefined`.** ```javascript // Good: Returns this for chaining graph.addNode('a').addNode('b').addEdge('a', 'b') // Good: Returns the created object const node = graph.addNode('a') // returns Node instance // Bad: Returns nothing graph.addNode('a') // void ``` ### 2.5 Error Handling **Fail fast with clear messages. Never silently succeed.** ```javascript // Good: Clear error graph.addEdge('a', 'b') // Error: Cannot create edge. Node 'a' does not exist. // Bad: Silent failure graph.addEdge('a', 'b') // undefined, no error ``` Error messages must include: 1. What failed 2. Why it failed 3. What the valid options are (if applicable) --- ## 3. Module Structure Every module follows the same structure: ``` /module-name index.js # Public API (re-exports) core.js # Core logic types.js # TypeScript types defaults.js # Default configuration helpers.js # Internal utilities (not exported) ``` ### 3.1 Public API Definition Each module's `index.js` exports exactly: - One primary class or factory function - Type definitions - (Optional) Constants ```javascript // graph/index.js export { Graph } from './core' export type { Node, Edge, GraphOptions } from './types' export { LAYOUTS } from './constants' ``` ### 3.2 Defaults Pattern Every configurable value has an explicit default: ```javascript // graph/defaults.js export const DEFAULTS = { layout: 'force', nodeSize: 20, edgeWidth: 1, animate: true } ``` Defaults are: - Documented in one place - Overrideable at instantiation - Overrideable per-operation --- ## 4. The AI Contract ### 4.1 Guarantees The framework guarantees: 1. **Determinism**: Same input produces same output 2. **Completeness**: Every common task has a dedicated method 3. **Consistency**: All modules follow identical patterns 4. **Composability**: Methods chain without side effects 5. **Fail-fast**: Invalid operations throw immediately ### 4.2 Documentation for LLMs Each method is documented with: ```javascript /** * @ai-summary Adds a node to the graph * @ai-params id (required), options (optional: label, color, size) * @ai-returns Node instance * @ai-chainable yes * @ai-example graph.addNode('user-1', { label: 'Alice' }) */ addNode(id, options = {}) { ... } ``` The `@ai-` prefix creates a structured format that can be: - Extracted into prompt context - Used for fine-tuning - Validated programmatically ### 4.3 Prompt Engineering When providing the framework to an AI: ``` You have access to the Graph module with these methods: - addNode(id, options?) → Node - Add a node - addEdge(source, target, options?) → Edge - Connect two nodes - remove(id) → this - Remove a node or edge - layout(type?) → this - Apply layout algorithm - render(target) → void - Render to canvas/svg All methods are chainable. Default layout is 'force'. Example: graph.addNode('a').addNode('b').addEdge('a', 'b').layout().render(canvas) ``` This compressed format fits in limited context windows while providing complete API coverage. --- ## 5. Validation Strategy ### 5.1 Success Metrics The framework succeeds if: | Metric | Target | |--------|--------| | AI generates valid code on first attempt | >90% | | Code runs without modification | >85% | | Output matches user intent | >80% | ### 5.2 Testing Methodology **Prompt → Code → Output Loop:** 1. Define 100 common tasks as natural language prompts 2. Generate code using the framework API 3. Execute generated code 4. Validate output matches expected result Example test case: ```yaml prompt: "Create a tree with a root node and 3 children" expected_methods: [addNode, addNode, addNode, addNode, addEdge, addEdge, addEdge] expected_structure: nodes: 4 edges: 3 root_children: 3 ``` ### 5.3 Regression Testing When the API changes: 1. Re-run all prompt tests 2. Compare success rates 3. Document breaking changes 4. Update AI prompt context --- ## 6. Module Catalog ### 6.1 Core Modules (MVP) | Module | Purpose | Primary Methods | |--------|---------|-----------------| | `graph` | Node/edge graphs | addNode, addEdge, remove, layout, render | | `table` | Data tables | setData, addColumn, sort, filter, paginate | | `form` | Form handling | addField, validate, submit, reset | | `collection` | Data utilities | map, filter, sort, group, chunk | ### 6.2 Extended Modules (Phase 2) | Module | Purpose | |--------|---------| | `chart` | Data visualization | | `tree` | Hierarchical data | | `state` | State management | | `fetch` | Data fetching | ### 6.3 Module Dependencies ``` collection (no dependencies) ↓ form (uses collection for validation) ↓ table (uses collection, can contain forms) ↓ graph (uses collection for node/edge storage) ``` --- ## 7. Framework Adapters ### 7.1 Adapter Contract Every framework adapter must implement: ```typescript interface FrameworkAdapter { // Create reactive state from module instance useState(module: Module): State // Render module output to framework component render(module: Module): FrameworkComponent // Subscribe to module changes subscribe(module: Module, callback: () => void): Unsubscribe } ``` ### 7.2 React Adapter ```javascript import { useGraph } from '@framework/react' function MyComponent() { const graph = useGraph() graph.addNode('a').addNode('b').addEdge('a', 'b') return } ``` ### 7.3 Vue Adapter ```javascript import { useGraph } from '@framework/vue' const graph = useGraph() graph.addNode('a').addNode('b').addEdge('a', 'b') ``` ```vue ``` --- ## 8. Anti-Patterns Things the framework explicitly does NOT do: | Anti-Pattern | Why | |--------------|-----| | Global state | Unpredictable, hard to test | | Implicit configuration | AI can't infer unstated requirements | | Magic methods | `__call`, proxies, metaprogramming | | Overloaded methods | Same method name, different signatures | | Callback hell | Use promises/async-await | | Mutable defaults | Shared state causes bugs | --- ## 9. Naming Dictionary Consistent terminology across all modules: | Concept | Term | Never Use | |---------|------|-----------| | Create | `add` | create, insert, new, make | | Delete | `remove` | delete, destroy, drop | | Modify | `set` | update, change, modify | | Retrieve | `get` | fetch, find, retrieve | | Transform | `to` | convert, transform, as | | Parse | `from` | parse, load, import | --- ## 10. Implementation Checklist Before a module is complete: - [ ] Maximum 7 primary methods - [ ] All methods documented with @ai- tags - [ ] Defaults defined in defaults.js - [ ] TypeScript types complete - [ ] Returns this or created object (never void) - [ ] Errors include what, why, and valid options - [ ] 20+ prompt test cases defined - [ ] >90% AI generation success rate - [ ] React and Vue adapters implemented --- ## Next Steps 1. **Define Graph module API** - Exact method signatures 2. **Build test harness** - Prompt → Code → Validate pipeline 3. **Implement Graph core** - Pure JS, no framework deps 4. **Create React adapter** - Thin wrapper 5. **Run validation suite** - Measure AI success rate 6. **Iterate on API** - Based on failure modes ---