diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..3eb2ef65 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,84 @@ +name: "๐Ÿ› Bug Report" +description: File a bug report to help us improve AutoGraphQL +title: "[Bug]: " +labels: ["bug", "triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report an issue with AutoGraphQL! + Please fill out the form below as completely as possible. + + - type: textarea + id: description + attributes: + label: Bug Description + description: A clear and concise description of what the bug is. + placeholder: Describe what happened unexpectedly... + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to Reproduce + description: Detailed steps to reproduce the issue. + placeholder: | + 1. Define schema in `schemas/Course.graphql`: `...` + 2. Execute query `query { courses { ... } }` + 3. See error ... + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: A clear and concise description of what you expected to happen. + validations: + required: true + + - type: textarea + id: schema + attributes: + label: GraphQL Schema Definition or Query (if applicable) + description: Provide the relevant SDL or mutation / query payload. + render: graphql + + - type: textarea + id: logs + attributes: + label: Server Logs / Stack Trace + description: Paste any terminal logs, stack traces, or Studio console errors. + render: shell + + - type: dropdown + id: dialect + attributes: + label: Database Dialect + options: + - MongoDB (Mongoose) + - PostgreSQL (Sequelize) + - Both / In-Memory + - Other / N/A + validations: + required: true + + - type: input + id: environment + attributes: + label: Environment Info + description: Node.js version, OS, AutoGraphQL version (e.g. Node 18.20.8 on macOS / Ubuntu 22.04). + placeholder: Node 18.20.8, macOS Sonoma, AutoGraphQL v1.0.0 + validations: + required: true + + - type: checkboxes + id: checkboxes + attributes: + label: Checklist + options: + - label: I have searched existing issues to ensure this is not a duplicate. + required: true + - label: I have verified that this issue occurs on the latest version of AutoGraphQL. + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..2f775fbf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: ๐Ÿ’ฌ GitHub Discussions & Questions + url: https://github.com/namanmukund/AutoGraphQL/discussions + about: Ask questions, share architectures, and connect with the AutoGraphQL community. + - name: ๐Ÿ“– AutoGraphQL Documentation + url: https://github.com/namanmukund/AutoGraphQL#readme + about: Read the official setup, directives reference, and Studio guides. + - name: ๐Ÿ›ก๏ธ Security Vulnerability Reporting + url: https://github.com/namanmukund/AutoGraphQL/security/advisories + about: Privately report a security vulnerability to project maintainers. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..37cd7d9f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,56 @@ +name: "๐Ÿ’ก Feature Request" +description: Propose a new feature, schema directive, or enhancement for AutoGraphQL +title: "[Feature]: " +labels: ["enhancement", "discussion"] +body: + - type: markdown + attributes: + value: | + Thanks for helping improve AutoGraphQL! Please describe your proposed feature or enhancement below. + + - type: textarea + id: problem + attributes: + label: Problem or Motivation + description: Is your feature request related to a problem or limitation? Please describe it. + placeholder: I am frustrated when trying to... / Our team needs support for... + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution / API Design + description: Describe the solution you'd like, including proposed GraphQL SDL directives, Studio features, or CLI commands. + placeholder: | + e.g. Add `@searchable` directive to automatically generate full-text search indexes... + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: A description of any alternative solutions or features you've considered. + + - type: dropdown + id: component + attributes: + label: Affected Component + options: + - Schema Directives & AST Engine + - AutoGraphQL Studio & Web UI + - Multi-Database Connectors (MongoDB / Postgres) + - DataLoader & Reliability Safeguards + - Birdwatch & Webhooks Outbox + - TypeScript SDK Codegen & Tooling + - Documentation + - Other + + - type: checkboxes + id: contribution + attributes: + label: Contribution + options: + - label: I would be interested in submitting a Pull Request to implement this feature. + required: false diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..15bd914c --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,126 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +**namanmukund@gmail.com**. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][mozilla-coc]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[mozilla-coc]: https://github.com/mozilla/diversity diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..5ab4be6f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,162 @@ +# Contributing to AutoGraphQL + +Thank you for your interest in contributing to **AutoGraphQL**! ๐ŸŽ‰ + +AutoGraphQL is an open-source, schema-first, AST-driven GraphQL backend engine designed to make building high-performance Node.js APIs instantaneous and enjoyable. We welcome contributions of all kinds: bug reports, feature proposals, documentation improvements, architectural reviews, and code contributions. + +Please take a moment to review this document to understand our development workflow and contribution standards. + +--- + +## ๐Ÿ“œ Code of Conduct + +All contributors and maintainers are expected to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you pledge to foster an inclusive, respectful, and harassment-free community for everyone. + +--- + +## ๐Ÿงญ How Can I Contribute? + +### 1. Reporting Bugs +Before submitting a new issue, please check existing [Open Issues](https://github.com/namanmukund/AutoGraphQL/issues) to ensure the bug has not already been reported. + +When opening a bug report via our [Bug Report Template](.github/ISSUE_TEMPLATE/bug_report.yml), please include: +- A clear, descriptive title. +- Steps to reproduce the behavior. +- Relevant GraphQL schema definition or mutation payloads. +- Expected vs. actual behavior. +- Environment details (Node version, OS, database dialect: MongoDB vs. PostgreSQL). +- Relevant server logs or terminal stack traces. + +### 2. Suggesting Enhancements +Have an idea for a new directive, database connector, or Studio capability? We would love to hear it! +Open an issue using our [Feature Request Template](.github/ISSUE_TEMPLATE/feature_request.yml) describing: +- The problem or use-case you are trying to solve. +- Proposed solution or API syntax. +- Any alternative solutions or workarounds considered. + +### 3. Improving Documentation +Clear documentation is essential. If you find typos, unclear instructions, or missing examples in our guides or README: +- Edit the file directly or open a Pull Request. +- All documentation files are organized in `docs/` and `README.md`. + +--- + +## ๐Ÿ’ป Local Development Setup + +### Prerequisites +- **Node.js**: `v18.0.0` or higher (we recommend managing via [nvm](https://github.com/nvm-sh/nvm)). +- **npm**: `v9.0.0` or higher. +- **Docker & Docker Compose** *(optional, for running local databases)*. + +### 1. Fork and Clone the Repository +```bash +git clone https://github.com//AutoGraphQL.git +cd AutoGraphQL +``` + +### 2. Install Dependencies +```bash +npm install +``` + +### 3. Environment Configuration +Copy the sample environment file: +```bash +cp .env.example .env +``` +Ensure your database connection string and ports are set appropriately: +```ini +PORT=3000 +DEFAULT_DATABASE_DIALECT=mongoose +MONGO_DB_URL=mongodb://localhost:27017/autographql_dev +DATABASE_URL=postgres://autographql:secret@localhost:5432/autographql_dev +``` + +### 4. Start Local Databases (Optional) +If you have Docker installed: +```bash +npm run db:up +``` + +### 5. Launch the Development Server +```bash +npm run dev +``` +Once started: +- **AutoGraphQL Studio:** [`http://localhost:3000/studio`](http://localhost:3000/studio) +- **GraphQL Playground:** [`http://localhost:3000/graphql/core`](http://localhost:3000/graphql/core) +- **Health Probes:** [`http://localhost:3000/health/live`](http://localhost:3000/health/live) + +--- + +## ๐Ÿงช Running Tests & Quality Checks + +Always verify that the test suite passes before opening a Pull Request. + +### Run Automated Tests +```bash +npm test +``` +AutoGraphQL uses Mocha/Jest for unit, reliability, and integration tests across: +- **Reliability:** Request-scoped DataLoader batching, depth limits, query complexity, and Kubernetes health probes. +- **Event Automation:** Transactional Outbox, webhook dispatcher, and HMAC signatures. +- **Architecture:** PostgreSQL Sequelize model generator, MongoDB dynamic schemas, RLS isolation, and TypeScript SDK codegen. + +### Code Linting +```bash +npm run lint +# Or automatically fix lint issues: +npm run lint:fix +``` + +--- + +## ๐ŸŒฟ Git Branching & Commit Guidelines + +### Branch Naming Conventions +Prefix your branch name according to the nature of your change: +- `feat/`: New features or directives (e.g. `feat/sqlite-connector`) +- `fix/`: Bug fixes (e.g. `fix/auth-cache-poisoning`) +- `docs/`: Documentation updates (e.g. `docs/add-aggregations-tutorial`) +- `test/`: Test improvements or additional coverage +- `refactor/`: Code refactoring without behavior change + +### Commit Message Guidelines +We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification: +```text +(): + +[optional body explaining motivation and context] + +[optional footer(s)] +``` + +**Examples:** +- `feat(studio): add real-time telemetry metrics and streaming console` +- `fix(auth): prevent caching null records on database misses` +- `docs(readme): add visual screenshots for studio tabs` +- `test(dataloader): add test for request-scoped batching with multi-db` + +--- + +## ๐Ÿš€ Pull Request Checklist + +When you are ready to submit your work: +1. Ensure your branch is rebased on the latest `main` branch. +2. Verify all automated tests pass: `npm test`. +3. Check code formatting: `npm run lint`. +4. Open a Pull Request on GitHub targeting `main`. +5. Fill out the Pull Request template completely, detailing: + - What changed and why. + - Any breaking changes or schema migrations. + - Verification steps and testing evidence. +6. A maintainer will review your Pull Request, provide feedback, and merge upon approval. + +--- + +## ๐Ÿ’ฌ Community & Questions + +- **Discussions & Q&A:** Open a topic on [GitHub Discussions](https://github.com/namanmukund/AutoGraphQL/discussions). +- **Security Inquiries:** Please review our [Security Policy](SECURITY.md) before reporting security-sensitive issues. + +Thank you for contributing to the future of AutoGraphQL! ๐Ÿš€ diff --git a/README.md b/README.md index 08e7b48f..0af5cfd0 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,14 @@ Watch the complete visual explainer video for an overview of AutoGraphQL, its ar > ๐ŸŽฅ **[Watch the Full Video Walkthrough on YouTube](https://www.youtube.com/watch?v=h7C2RLe4sik)** > *A comprehensive guide covering the schema-first architecture, AST compilation, dynamic database generation, and developer workflow.* +
+
+ + AutoGraphQL Studio โ€” Universal Data Browser & Developer Console + +

AutoGraphQL Studio: Zero-code visual developer platform, universal data browser, schema designer, and interactive ERD canvas.

+
+ --- ## ๐Ÿ“‘ Table of Contents @@ -237,17 +245,86 @@ npm run dev > ๐Ÿ“– **Full Studio Guide**: Read **[`docs/studio-user-guide.md`](docs/studio-user-guide.md)** for an in-depth walkthrough of all Studio features, tutorials, and workflows. -AutoGraphQL Studio is a **zero-code, visual developer console** that allows you to manage the entire application lifecycle directly from your browser: +AutoGraphQL Studio is a **zero-code, visual developer console** that allows you to manage the entire application lifecycle directly from your browser. Access it anytime at **`http://localhost:3000/studio`** (or `/console`). -| Studio Tab | Capabilities | -| :--- | :--- | -| ๐Ÿ“ **Schema Studio** | Visual entity builder, data type selection (`String`, `Int`, `Float`, `Boolean`, `Date`, `JSONB`), directive toggles (`@history`, `@tenantScoped`, `@ownerScoped`), Pro SDL editor with line numbers, and safe schema deletion. | -| ๐Ÿ”— **Connected Schemas** | Visual cross-schema relationship graph mapping 1:1, 1:N, and N:N relations (`@relation(name, direction)`). | -| ๐Ÿช **Lifecycle Hooks** | **Schema-to-Hooks Finder** with interactive Mutation Lifecycle Matrix (`add`, `update`, `delete`) and 1-click presets for slug generation, validation, bcrypt hashing, and welcome emails. | -| ๐Ÿ“ก **Webhooks & Events** | Birdwatch Transactional Outbox manager, event subscription filters (`addOrder`, `updateUser:*`), and HMAC-SHA256 signing. | -| ๐Ÿ—„๏ธ **Databases & RLS** | Real-time database diagnostics across MongoDB (Mongoose) and PostgreSQL (Sequelize) with multi-tenant RLS policy inspector. | -| ๐Ÿš€ **API Playground** | Interactive query console with **1-Click Admin & User JWT generation** and real-time latency diagnostics. | -| ๐Ÿ“ฆ **1-Click Exports** | **`๐Ÿ“ฆ Export SDK`** (generates type-safe TypeScript Client SDK) and **`๐Ÿ“„ Dump SDL`** (exports consolidated GraphQL schema). | +--- + +### 1. ๐Ÿ—‚๏ธ Universal Data Browser & Content Manager +Inspect, filter, insert, and inline-edit live database records across MongoDB and PostgreSQL without leaving your browser. + +
+ AutoGraphQL Universal Data Browser +
+ +- **Inline Cell Editing:** Click any table cell to immediately edit values in place with automatic type validation. +- **Advanced Filtering & Full-Text Search:** Filter by any field using operators (`contains`, `equals`, `gt`, `lt`, `startsWith`). +- **๐ŸŽฒ Synthetic Mock Seeder:** Generate realistic test data with 1-click presets for rapid prototyping. +- **Batch CSV & JSON Portability:** Export your datasets or import external records in a single click. + +--- + +### 2. ๐Ÿ“ Schema Studio & Visual Model Builder +Design database models visually or write standard GraphQL SDL with real-time AST syntax validation. + +
+ AutoGraphQL Schema Studio & Visual Model Builder +
+ +- **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. + +--- + +### 3. ๐Ÿ”— Interactive Visual Entity-Relationship Diagram (ERD) +Explore and understand your entire application data graph visually. + +
+ AutoGraphQL Visual ERD Canvas +
+ +- **Automatic Relationship Mapping:** Introspects `@relation` directives and foreign keys to visualize 1:1, 1:N, and N:N connections. +- **Engine Badge Identifiers:** See at a glance which collections reside in MongoDB (`๐Ÿƒ Mongo`) vs. relational tables in PostgreSQL (`๐Ÿ˜ Postgres`). +- **Interactive Canvas:** Zoom, pan, search for specific entities, and use Auto-Layout to organize complex enterprise schemas. + +--- + +### 4. ๐Ÿ›ก๏ธ Role-Based Access Control (RBAC) & Multi-Tenant RLS Matrix +Audit and enforce security policies across all models and user roles. + +
+ AutoGraphQL Access Control and RBAC Matrix +
+ +- **Granular Permission Matrix:** View CRUD capabilities across roles (`ADMIN`, `USER`, `GUEST`). +- **Row-Level Security (RLS) Diagnostics:** Verify tenant isolation policies (`@tenantScoped`) to guarantee multi-tenant data safety. +- **1-Click Test JWT Generator:** Generate scoped tokens directly in Studio to test auth rules against live endpoints. + +--- + +### 5. ๐Ÿ“ก Birdwatch Webhooks & Transactional Outbox +Monitor and trigger asynchronous event delivery with guaranteed at-least-once reliability. + +
+ AutoGraphQL Webhooks and Transactional Outbox +
+ +- **Transactional Outbox Worker:** Dispatches events asynchronously with automated retries and exponential backoff. +- **HMAC-SHA256 Signatures:** Cryptographically sign outgoing payloads to ensure consumer integrity. +- **Wildcard Subscriptions:** Subscribe endpoints to specific events (e.g. `addUser`, `order:paid`, `post:*`). + +--- + +### 6. ๐Ÿ“Š Real-Time Telemetry, Health Diagnostics & Live Logs +Track system health, memory footprint, and query execution without third-party APM overhead. + +
+ AutoGraphQL Telemetry and Live Server Logs +
+ +- **Real-Time Health Probes:** Live server uptime, heap memory consumption, and active DB connection status. +- **Streaming Winston Console:** Live log stream with log-level filtering (`INFO`, `WARN`, `ERROR`), search, and auto-scroll. --- diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..03438f7a --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,66 @@ +# Security Policy + +The AutoGraphQL team takes security issues seriously and appreciates responsible disclosure from the community. + +--- + +## ๐Ÿ›ก๏ธ Supported Versions + +We actively provide security patches and updates for the following versions of AutoGraphQL: + +| Version | Supported | Security Patches | +| ------- | ------------------ | ---------------- | +| 1.x.x | :white_check_mark: | Active | +| < 1.0.0 | :x: | End of Life | + +If you are using an older version, we strongly recommend upgrading to the latest release to ensure you receive security and stability enhancements. + +--- + +## ๐Ÿšจ Reporting a Vulnerability + +**Please DO NOT report security vulnerabilities through public GitHub issues.** + +If you believe you have discovered a security vulnerability in AutoGraphQL, please report it confidentially using one of the following methods: + +1. **GitHub Private Vulnerability Reporting (Preferred):** + - Navigate to the repository's [Security Advisories](https://github.com/namanmukund/AutoGraphQL/security/advisories) tab. + - Click **"Report a vulnerability"** to open a confidential report directly with repository maintainers. + +2. **Direct Email Disclosure:** + - Send an email to **namanmukund@gmail.com** with the subject line: `[SECURITY] AutoGraphQL Vulnerability Report`. + +### What to Include in Your Report +To help us triage and resolve the issue quickly, please provide: +- A description of the vulnerability and its potential impact. +- Clear, reproducible steps or a proof-of-concept (POC) script or GraphQL query. +- The affected component (e.g. Authentication middleware, AST engine, DataLoader, Webhook HMAC dispatcher, RLS engine). +- Any proposed remediations or patches if available. + +### Response Timeline +- **Initial Acknowledgment:** Within **48 hours** of receiving your report. +- **Triage & Assessment:** We will investigate and confirm the impact within **5 business days**. +- **Fix & Public Advisory:** Once resolved, we will publish a security patch release and coordinate the public advisory with proper attribution. + +--- + +## ๐Ÿ”’ Built-in Security Safeguards in AutoGraphQL + +AutoGraphQL incorporates defense-in-depth principles across the engine: + +1. **Row-Level Security (RLS) & Multi-Tenancy:** + - Declarative `@tenantScoped` and `@ownerScoped` directives enforce automatic query filtering at the database layer, overriding client-supplied tenant claims. +2. **Query Complexity & Depth Safeguards:** + - Built-in validation rules reject malicious nested queries exceeding configurable depth and complexity thresholds before execution. +3. **Cryptographic Webhook Signatures:** + - Transactional outbox webhooks are signed using `HMAC-SHA256` (`x-autographql-signature`) to guarantee payload integrity. +4. **Request-Scoped DataLoader Memoization:** + - DataLoaders are isolated per HTTP request to prevent cross-tenant or cross-user cache leakage. +5. **AST Strict Directives:** + - Directives such as `@readOnly`, `@writeOnly`, `@clamp`, and `@trim` prevent mass-assignment and parameter tampering. + +--- + +## ๐Ÿ… Attribution & Recognition + +We deeply value researchers and developers who contribute to the security of open source software. If you report a valid security vulnerability, we will gladly credit your contribution in our release notes and security advisories (unless you prefer to remain anonymous). diff --git a/docs/assets/studio/01-studio-data-browser.png b/docs/assets/studio/01-studio-data-browser.png new file mode 100644 index 00000000..de8dabe3 Binary files /dev/null and b/docs/assets/studio/01-studio-data-browser.png differ diff --git a/docs/assets/studio/02-studio-schema-studio.png b/docs/assets/studio/02-studio-schema-studio.png new file mode 100644 index 00000000..f7226725 Binary files /dev/null and b/docs/assets/studio/02-studio-schema-studio.png differ diff --git a/docs/assets/studio/03-studio-visual-erd.png b/docs/assets/studio/03-studio-visual-erd.png new file mode 100644 index 00000000..5af71625 Binary files /dev/null and b/docs/assets/studio/03-studio-visual-erd.png differ diff --git a/docs/assets/studio/04-studio-access-rbac.png b/docs/assets/studio/04-studio-access-rbac.png new file mode 100644 index 00000000..c63eabe9 Binary files /dev/null and b/docs/assets/studio/04-studio-access-rbac.png differ diff --git a/docs/assets/studio/05-studio-webhooks-outbox.png b/docs/assets/studio/05-studio-webhooks-outbox.png new file mode 100644 index 00000000..5bed937b Binary files /dev/null and b/docs/assets/studio/05-studio-webhooks-outbox.png differ diff --git a/docs/assets/studio/06-studio-telemetry-metrics.png b/docs/assets/studio/06-studio-telemetry-metrics.png new file mode 100644 index 00000000..b6948d61 Binary files /dev/null and b/docs/assets/studio/06-studio-telemetry-metrics.png differ diff --git a/docs/assets/studio/07-studio-lifecycle-hooks.png b/docs/assets/studio/07-studio-lifecycle-hooks.png new file mode 100644 index 00000000..bbdfa5c2 Binary files /dev/null and b/docs/assets/studio/07-studio-lifecycle-hooks.png differ diff --git a/docs/assets/studio/08-studio-databases-rls.png b/docs/assets/studio/08-studio-databases-rls.png new file mode 100644 index 00000000..0ff28021 Binary files /dev/null and b/docs/assets/studio/08-studio-databases-rls.png differ diff --git a/docs/assets/studio/09-competitor-analysis-slides.png b/docs/assets/studio/09-competitor-analysis-slides.png new file mode 100644 index 00000000..6f04859d Binary files /dev/null and b/docs/assets/studio/09-competitor-analysis-slides.png differ diff --git a/docs/studio-user-guide.md b/docs/studio-user-guide.md index caf5cf49..593c4075 100644 --- a/docs/studio-user-guide.md +++ b/docs/studio-user-guide.md @@ -41,10 +41,29 @@ Navigate to: --- +## ๐Ÿ—‚๏ธ Universal Data Browser & Content Manager + +The **Data Browser** tab provides an interactive CRUD data grid to inspect, filter, insert, and inline-edit live database records across MongoDB and PostgreSQL. + +
+ AutoGraphQL Universal Data Browser +
+ +- **Inline Editing:** Double-click any table cell to immediately edit strings, numbers, booleans, or enums in place. +- **Search & Filter:** Apply field-specific filters with operators (`contains`, `equals`, `gt`, `lt`, `startsWith`). +- **๐ŸŽฒ Synthetic Mock Seeder:** Populate models with 10, 50, or 100 realistic records for development testing. +- **Batch CSV & JSON Portability:** Export collections with one click or import external datasets. + +--- + ## ๐Ÿ“ Schema Studio The **Schema Studio** tab is your central hub for designing GraphQL entities and generating dynamic database models for MongoDB or PostgreSQL. +
+ AutoGraphQL Schema Studio & Visual Model Builder +
+ ### Visual Model Builder - **Model Name:** Enter the entity name (e.g. `Course`, `Order`, `Product`, `Invoice`). - **Database Dialect:** Choose between: @@ -82,17 +101,17 @@ Click **`๐Ÿ”— Connect Schema`** to link the model to another entity: --- -## ๐Ÿ”— Connected Schemas Graph +## ๐Ÿ”— Connected Schemas Graph (Visual ERD) -The **Connected Schemas** tab renders an interactive map of all cross-entity relationships wired across your GraphQL types: +The **Visual ERD** tab renders an interactive map of all cross-entity relationships wired across your GraphQL types: -```text -Course โ”€โ”€( instructor )โ”€โ”€โ–บ User -Order โ”€โ”€( customer )โ”€โ”€โ”€โ”€โ–บ User -Post โ”€โ”€( tags )โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Tag -``` +
+ AutoGraphQL Visual ERD Canvas +
-Use this visual graph to audit foreign keys, verify relation names, and inspect join directions. +- **Foreign Key Connectors:** Trace relations across models with color-coded connector links. +- **Database Engine Badges:** Distinguishes MongoDB collections (`๐Ÿƒ Mongo`) from PostgreSQL tables (`๐Ÿ˜ Postgres`). +- **Auto-Layout & Zoom:** Drag nodes to rearrange or click Auto-Layout to instantly organize complex multi-schema architectures. --- @@ -100,6 +119,10 @@ Use this visual graph to audit foreign keys, verify relation names, and inspect The **Lifecycle Hooks** tab allows you to find, inspect, edit, and create Pre-Hooks and Post-Hooks for any schema. +
+ AutoGraphQL Lifecycle Hooks Studio +
+ ### Mutation Lifecycle Matrix Select any schema from the **Active Schema** dropdown: - **`add` (Create Mutation):** @@ -125,6 +148,11 @@ Select any schema from the **Active Schema** dropdown: ## ๐Ÿ“ก Birdwatch Webhooks & Transactional Outbox Manage event-driven webhooks directly from the UI: + +
+ AutoGraphQL Webhooks and Transactional Outbox +
+ 1. Enter the target **Endpoint URL** (e.g. `https://api.mycrm.com/webhooks`). 2. Specify **Subscribed Events** (e.g. `addOrder`, `updateUser:*`, or `*` for all). 3. Set your **HMAC Secret Key** for payload signature verification (`x-autographql-signature`). @@ -135,6 +163,10 @@ Manage event-driven webhooks directly from the UI: ## ๐Ÿ—„๏ธ Databases & Multi-Tenancy (RLS) +
+ AutoGraphQL Databases & RLS Diagnostics +
+ - **MongoDB Status:** Document collections, connection state, and active Mongoose models. - **PostgreSQL Status:** Relational tables, Sequelize connection, and B-Tree/GIN index states. - **Row-Level Security (RLS):** View active tenant isolation policies preventing cross-tenant data access. diff --git a/src/studio/public/index.html b/src/studio/public/index.html index 276ef961..34e300d1 100644 --- a/src/studio/public/index.html +++ b/src/studio/public/index.html @@ -3401,7 +3401,13 @@ // Initialize on load window.addEventListener('DOMContentLoaded', () => { document.getElementById('db-status-text').innerText = `Server Online :${window.location.port || 3001}`; - loadDataModels(); + const urlParams = new URLSearchParams(window.location.search); + const targetTab = urlParams.get('tab') || window.location.hash.replace('#', ''); + if (targetTab && document.getElementById(targetTab)) { + switchTab(targetTab); + } else { + loadDataModels(); + } resetModelBuilder(); loadDevOpsTemplates(); });