polterguy/magic
Instant SECURE Full Stack Apps and AI Agents
Magic – Instant Secure Full‑Stack Apps & AI Agents
What it is
Magic is an open‑source platform that lets you turn a plain‑English description into a complete, self‑hosted full‑stack application. It automatically creates:
- a relational database schema (or connects to an existing one),
- a secured REST API with role‑based access control (RBAC),
- a React‑based dashboard for managing the app, and
- optional AI‑driven agents that can call the generated endpoints.
All components run on your own hardware – there is no SaaS lock‑in. The core runtime is Hyperlambda, a compiled .NET‑based language that can be generated by an LLM and executed inside a sandbox.
Key features (from the README)
| Feature | What you get |
|---|---|
| One‑click start | `curl … |
| Natural‑language generation | Describe a database, an endpoint, or UI in plain English; the built‑in generator writes Hyperlambda, SQL, HTML, or CSS for you. |
| Secure, self‑hosted backend | Compiled .NET runtime, sandboxed Hyperlambda, per‑function whitelist, RBAC, JWT auth, OIDC sign‑in (Google, GitHub, Azure AD, etc.). |
| MCP server | Every endpoint is exposed as a Model Communication Protocol tool, so Claude, Cursor, Codex, Qoder, etc., can invoke them directly. |
| AI‑agent friendly | Agents can query/update your own databases, call your own APIs, and run background jobs – all behind your own access control. |
| Import third‑party APIs | Paste an OpenAPI/Swagger URL; Magic generates typed, documented CRUD‑style wrappers with automatic validation. |
| Sandbox API | Generates an endpoint that executes caller‑supplied Hyperlambda (or English‑generated code) inside a role‑based whitelist – safe “run‑code‑as‑a‑service”. |
| Web Designer | In‑browser WYSIWYG editor that edits the actual HTML file on disk; 60+ pre‑built blocks, live preview, and AI‑assisted editing. |
| Chat Ops | Global “Ctrl+.” shortcut opens a chat window that can ask the server to generate code, run functions, or retrieve data – the model’s actions are executed server‑side and shown with real‑time status pills. |
| Rewind debugger | Record an execution, then step forward/back through each statement with full variable values displayed. |
| Performance | Claims 20× faster than FastAPI/Flask, 50× faster than LangChain, and up to 1 000× faster than workflow tools because Hyperlambda compiles to native .NET code. |
| Deployment options | Docker Compose (quick start), DigitalOcean droplet (single‑node), Kubernetes (cluster), or run from source (.NET 10 + Node). |
| AI model flexibility | Uses OpenAI by default but also supports Ollama, HuggingFace, and a local BM25 retrieval fallback that needs no embeddings. |
| Extensible language | Hyperlambda can call C# functions, run Python scripts, Bash commands, or use PuppeteerSharp for headless‑browser automation. |
How it works (high‑level flow)
- Start the stack – Docker Compose launches a backend container (
magic-backend) and a frontend container (magic-frontend). - Log in – Default admin user
root/root(or configure OIDC). A JWT is issued for each session. - Create a project – Use the Endpoint Generator or API Wizard in the dashboard. Point it at a database (MySQL, PostgreSQL, SQL Server, MariaDB) or an OpenAPI spec.
- Describe what you need – Type a natural‑language prompt in the “Machine Creates the Code” bar. The LLM generates an AST (Abstract Syntax Tree) for Hyperlambda; the system validates that every called function exists before saving.
- Run / debug – Execute the generated file directly from the IDE, or click Debug to record a step‑by‑step trace.
- Expose as MCP tools – The MCP plugin automatically registers each HTTP endpoint as a tool that any compatible LLM can call, cutting token usage by ~80 %.
- Deploy – Since everything runs on your machine, you simply expose ports or put the containers behind a reverse proxy (Caddy is pre‑configured for HTTPS on DigitalOcean). No additional build or publish step is required.
Who might use it
- Solo developers or small teams who want to prototype a CRUD app quickly without writing boilerplate code.
- Enterprises that need to keep data on‑premises but still want AI‑assisted development and internal agents.
- AI‑ops teams building custom agents that must interact with legacy databases or internal services securely.
- Educators / hackathon participants looking for a demo‑ready platform that showcases AI‑generated code and secure sandbox execution.
Limitations / considerations (as stated in the README)
- The LLM can still produce logically incorrect code – only function existence is guaranteed.
- Security relies on correct RBAC configuration and the whitelist; mis‑configuration could expose dangerous functions.
- Performance claims are based on the authors’ benchmarks; real‑world results may vary.
- The platform is relatively new; community support and ecosystem (plugins, extensions) are still growing.
Quick start recap
curl -fsSL https://hyperlambda.dev/docker-compose.yaml | docker compose -f - up
# then open http://localhost:5555, log in with root/root
From the dashboard you can immediately point the API Wizard at a sample chinook database and watch 50+ secured endpoints appear.
All information above is taken directly from the repository’s README; no additional features have been inferred.
Related
- Project
- Project
- Project
- Project
- Project