Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,17 +263,30 @@ Inspect, filter, insert, and inline-edit live database records across MongoDB an

---

### 2. πŸ“ Schema Studio & Visual Model Builder
Design database models visually or write standard GraphQL SDL with real-time AST syntax validation.
### 2. πŸ“ Schema Studio & AI Schema Architect (BYO-LLM)
Design database models visually, edit raw SDL, or **generate production-grade schemas from plain English** using any connected LLM with full AutoGraphQL AST directive knowledge.

<div align="center">
<img src="docs/assets/studio/02-studio-schema-studio.png" alt="AutoGraphQL Schema Studio & Visual Model Builder" width="100%" style="border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.3);" />
<img src="docs/assets/studio/10-studio-ai-copilot.png" alt="AutoGraphQL Schema Studio & AI Schema Architect (BYO-LLM)" width="100%" style="border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.3);" />
</div>

- **Declarative Directive Toggles:** Easily apply `@model`, `@unique`, `@defaultValue`, `@trim`, `@clamp`, `@history`, and `@tenantScoped`.
- **Dual-Pane Live Sync:** Visual form field edits automatically sync with the right-hand GraphQL SDL Code Editor in real time.
- **Multi-Database Dialect Selection:** Target MongoDB (Mongoose) or PostgreSQL (Sequelize) on a per-model basis.
- **Managed Schemas (`schemas/`):** Auto-discovers, saves, and hot-reloads schemas instantly.
- **πŸ€– Universal "Bring Your Own LLM" (BYO-LLM):** Connect seamlessly to:
- **Google Cloud Vertex AI (Gemini):** Native Google SDK authentication via Application Default Credentials (`gcloud auth application-default login`) β€” zero token pasting needed!
- **Commercial Cloud Models:** OpenAI (`gpt-4o`), Google Gemini (`gemini-2.0-flash`, `gemini-1.5-pro`), Anthropic Claude (`claude-3-5-sonnet`), Groq (`llama-3.3-70b`), OpenRouter.
- **Local Offline Models:** Ollama (`http://localhost:11434/v1` with `llama3.2`, `qwen3`, etc.), vLLM, LocalAI, LM Studio.
- **Custom Endpoints:** Any private or self-hosted OpenAI-compatible endpoint.
- **πŸ”’ Zero Server Storage (Privacy-First):** API keys are stored exclusively in your browser's `localStorage` and passed ephemerally via secure request headers.
- **🧠 AutoGraphQL AST Directive Knowledge Base:** Generates schemas strictly conforming to AutoGraphQL directives:
- Backing Database: `@model(database: postgres)` or MongoDB default.
- Security & Multi-Tenancy: `@tenantScoped(field, claim)`, `@ownerScoped(field, claim)`.
- Immutable Audit Trails: `@history`.
- Relational Connectors: `@relation(name, direction: "OUT" | "IN" | "BOTH")` and `@relationalMeta`.
- Field Constraints: `@clamp(min, max)`, `@validate(regex)`, `@defaultValue(value)`, `@unique`.
- Transformations & Access: `@trim`, `@nameCase`, `@upperCase`, `@lowerCase`, `@slug`, `@readOnly`, `@writeOnly`, `@encrypted`.
- Custom Enums: Auto-generated `enum Status { ... }` definitions.
- **πŸ”„ RAG Active Schema Awareness:** Automatically injects existing project models (`schemas/`) into context so relations link seamlessly without breaking foreign keys.
- **πŸ›‘οΈ AST Validation & Self-Healing:** Validates generated SDL with `graphql.parse` and automatically auto-corrects syntax variances.
- **⚑ Bi-Directional Visual Builder Sync:** 1-click **`⚑ Sync to Visual Builder`** loads generated SDL back into the visual field cards and dropdowns, with instant **`Deploy Model ⚑`** compilation into `schemas/<Model>.graphql`.

---

Expand Down
Binary file added docs/assets/studio/10-studio-ai-copilot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions docs/studio-user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,32 @@ The **Schema Studio** tab is your central hub for designing GraphQL entities and
<img src="assets/studio/02-studio-schema-studio.png" alt="AutoGraphQL Schema Studio & Visual Model Builder" width="100%" style="border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.3);" />
</div>

### πŸ€– AI Schema Architect & Universal LLM Integration (BYO-LLM)

<div align="center">
<img src="assets/studio/10-studio-ai-copilot.png" alt="AutoGraphQL AI Schema Copilot & Universal LLM Integration" width="100%" style="border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); margin-bottom: 1rem;" />
</div>

AutoGraphQL Studio includes a built-in **Universal AI Schema Copilot** that converts natural language requirements into production-ready GraphQL SDL with complete knowledge of AutoGraphQL's custom AST directives and database architecture.

- **Bring Your Own LLM (BYO-LLM):** Connect to:
- **Google Cloud Vertex AI (Gemini):** Native Google SDK authentication via Application Default Credentials (`gcloud auth application-default login`) β€” zero token pasting needed!
- **Commercial Cloud Providers:** OpenAI (`gpt-4o`, `o3-mini`), Google Gemini (`gemini-2.0-flash`), Anthropic Claude (`claude-3-5-sonnet`), Groq (`llama-3.3-70b`), OpenRouter.
- **Local & Offline LLMs:** Ollama (`localhost:11434`), vLLM, LocalAI, LM Studio.
- **Custom Endpoints:** Any OpenAI-compatible gateway base URL.
- **πŸ”’ Zero Server Storage (Privacy-First):** API keys are stored exclusively in your browser's `localStorage` and sent ephemerally over headers to the proxy route. They are never written to disk or logged.
- **Deep AutoGraphQL Directive Nomenclature Awareness:** The AI automatically applies:
- `@model` with database selection (`database: postgres` or MongoDB default).
- Multi-tenancy & Security: `@tenantScoped(field, claim)`, `@ownerScoped(field, claim)`.
- Audit logs: `@history`.
- Relations: `@relation(name, direction: "OUT" | "IN" | "BOTH")` and `@relationalMeta`.
- Field Constraints: `@clamp(min, max)`, `@validate(regex)`, `@defaultValue(value)`, `@unique`.
- Sanitization: `@trim`, `@nameCase`, `@upperCase`, `@lowerCase`, `@slug`.
- Security: `@readOnly`, `@writeOnly`, `@filterOff`, `@encrypted`.
- **RAG Active Schema Awareness:** Scans existing models in `schemas/` (e.g. `User`, `Category`) so generated relational connectors wire directly to existing types.
- **AST Validation & Self-Correction:** Before rendering, generated SDL is parsed with `graphql/language`. If a syntax error occurs, the server automatically retries with AST error feedback to self-heal the output.
- **Bi-Directional Visual Builder Sync:** Click **`⚑ Sync to Visual Builder`** to parse generated or edited SDL into the Visual Model Builder cards and custom enums.

### Visual Model Builder
- **Model Name:** Enter the entity name (e.g. `Course`, `Order`, `Product`, `Invoice`).
- **Database Dialect:** Choose between:
Expand Down
Loading
Loading