Core Concepts
Understanding Stellify's Architecture
Stellify stores your application as structured JSON in a database instead of text files. This fundamental shift enables instant refactoring, intelligent code reuse, and AI-native development.
The Big Idea
Traditional codebases are text files that humans and machines struggle to modify reliably. Stellify treats your application as structured data - every element, method, and line of code is a queryable database record with relationships.
What This Means for You
- Update a method once, all references update instantly
- Reuse battle-tested code across projects automatically
- AI can read and write code with surgical precision
- No merge conflicts - work on the same file simultaneously
The Hierarchy
Your application is organized in a hierarchical structure, similar to a traditional file system but stored as database records:
Project
└── Directories (e.g., "Controllers", "Models")
└── Files (e.g., "UserController.php")
└── Methods (e.g., "store()")
└── Statements (individual lines of code)
└── Clauses (code fragments like variables, operators)
What You Work With
- Directories - Organize files, just like folders (Controllers, Models, etc.)
- Files - PHP classes, controllers, models - contain methods
- Methods - Functions that do things - contain statements
- Statements - Individual lines of code
- Clauses - The smallest pieces (variables, operators, values)
For interface building, there's also Elements - HTML components like divs, buttons, forms.
How It Works in Practice
Creating a Controller Method
When you create a new controller method in Stellify:
- You select the file (UserController)
- Create a method (store)
- Add statements (the actual code logic)
- Stellify stores everything as connected database records
- When needed, it assembles these records into executable PHP
You Don't Need to Think About This
Use the IDE or API to work with your code naturally. Stellify handles the JSON structure behind the scenes. You interact with files and methods just like any other development tool.
The Deduplication Magic
Here's where Stellify gets powerful: automatic code reuse.
Global Libraries
Stellify maintains global libraries of proven code patterns:
- Method Library - Common utility methods (validateEmail, formatDate, etc.)
- Statement Library - Frequently-used code patterns
When you (or AI) write code that matches an existing pattern, Stellify automatically references the existing version instead of creating a duplicate. Over time, your codebase becomes more efficient and consistent.
How Deduplication Works
- You create a method or statement
- Stellify computes a hash of the code
- Checks if this exact code already exists in the global library
- If yes: references the existing version, increments its usage count
- If no: creates a new entry that can be reused later
Real Benefits
- Import the same utility function 10 times - stored once
- AI suggests existing methods instead of writing duplicates
- Popular patterns become battle-tested through usage
- Smaller database, faster queries, more consistent code
Working with Stellify
Through the IDE
The Stellify IDE provides visual tools for:
- Code Editor - Write PHP methods with syntax highlighting and autocomplete
- Interface Builder - Drag-and-drop HTML elements
- Bulk Editor - Update multiple files/methods at once
Through the API
The REST API enables programmatic access for AI agents and custom tools:
# Create a new method
POST /api/v1/method
{
"file": "controller-uuid",
"name": "store",
"returnType": "redirect"
}
# Search global library for reusable methods
POST /api/v1/method/search-global
{
"name": "validateEmail",
"limit": 10
}
With AI via MCP
AI assistants can connect via the Model Context Protocol to:
- Search for existing code patterns before generating new ones
- Create and modify methods with surgical precision
- Refactor code across your entire project instantly
- Suggest improvements based on usage patterns
Key Differences from Traditional Development
| Traditional | Stellify |
|---|---|
| Files are text | Files are structured JSON |
| Edit text directly | Edit through API or IDE |
| Find/replace with regex | Query database with SQL |
| Git merge conflicts | Granular, conflict-free updates |
| Duplicate code everywhere | Automatic deduplication |
| AI rewrites everything | AI references existing patterns |
From Database to Executable Code
When your application runs, Stellify:
- Receives an HTTP request
- Looks up the route in the database
- Fetches the controller and method definitions
- Assembles statements and clauses into PHP code
- Executes the assembled code
- Returns the response
For deployment, you can export your entire application as traditional PHP files if needed.
Why This Matters
For You
- Faster development - Reuse code automatically, refactor instantly
- Higher quality - Battle-tested patterns, consistent code
- Better collaboration - No merge conflicts, granular permissions
- AI superpowers - AI can actually understand and modify your code
For AI
- Structured context - No token waste parsing text files
- Precise modifications - Update specific methods, not entire files
- Knowledge sharing - Global libraries = shared AI knowledge
- Zero hallucination - AI references actual code, doesn't imagine it
Getting Started
The best way to understand Stellify is to use it:
- Set up your database connection
- Create your first project through the IDE
- Add a controller with a simple method
- See how Stellify assembles it into working PHP
The structure becomes intuitive quickly - you're still building Laravel applications, just with a more intelligent foundation.
Deep Dive Available
If you need technical details about the JSON structure, database schema, or API endpoints, check out the API documentation.
- Previous
- Hosting
- Next
- Code Editor