Vectreal

السجل الرسمي الذكاء الاصطناعي والوكلاء

Upload, publish and embed 3D models on any website from your agent.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @vctrl/cli
Claude Code
claude mcp add vectreal -- npx -y @vctrl/cli@3.1.0 mcp
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "vectreal": {
            "command": "npx",
            "args": [
                "-y",
                "@vctrl/cli@3.1.0",
                "mcp"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Vectreal Platform
  2. Quick Links (External)
  3. What Is In This Repo
  4. Documentation Map
  5. Workflows And Package Reference
  6. Local Development
  7. Your First Model
  8. Architecture Overview
  9. Package Overview
  10. Deployment
  11. Contributing
  12. Community
  13. License

Vectreal Platform

Deployment Actions

See the viewer

NPM packages


Vectreal is an open platform for preparing, managing, and publishing 3D content for the web.

This monorepo contains the full platform app, reusable React packages, shared libraries, and infrastructure code used to run Vectreal in production.

Built on Three.js, React Three Fiber, glTF-Transform, Supabase, and Nx.

What Is In This Repo

AreaPathPurpose
Platform appapps/vectreal-platform/Full-stack React Router v7 app with SSR, auth, dashboard, publisher, and preview routes
Viewer packagepackages/viewer/@vctrl/viewer React 3D viewer component
Hooks packagepackages/hooks/@vctrl/hooks browser-side loading, optimization, and export hooks
Core packagepackages/core/@vctrl/core isomorphic model processing pipeline (Node.js, browser, Web Worker)
Embed packagepackages/embed/@vctrl/embed framework-agnostic SDK for controlling embedded 3D scenes
SDK packagepackages/sdk/@vctrl/sdk typed client and zod schemas for the /api/v1 agent API
CLI packagepackages/cli/@vctrl/cli the vectreal command and its MCP server for agents
Shared librariesshared/Shared UI components and utilities
Infrastructureterraform/Cloudflare DNS, Turnstile widgets, and Fly.io secret sync scripts

Documentation Map

SectionWhat you will find
Getting StartedYour first model in the publisher, with no install or account
GuidesUpload, optimize, publish, and embed workflows
Package ReferenceAPI docs for @vctrl/viewer, @vctrl/hooks, @vctrl/core, and @vctrl/embed
Run It YourselfLocal setup, Fly.io deployment, Terraform, and CI/CD
ContributingBranching, commits, testing, and PR process

Workflows And Package Reference

Use these links to move between product workflows and the package APIs behind them.

Local Development

The local setup below matches the platform documentation in Installation.

1. Clone the repository
git clone https://github.com/Vectreal/vectreal-platform.git
cd vectreal-platform
2. Install dependencies
pnpm install
3. Configure environment variables
cp .env.development.example .env.development

The main variables required for local development are:

VariableDescription
SUPABASE_URLLocal Supabase API URL, usually http://localhost:54321
SUPABASE_KEYSupabase anon key from supabase status
SUPABASE_SECRET_KEYSupabase service-role key, used server-side for asset storage
DATABASE_URLPostgreSQL connection string for the local Supabase database
SEND_EMAIL_HOOK_SECRETAuth email hook secret. Ships blank in the example file and Supabase will not start without it

CSRF_SECRET is not in the example file and is optional locally: outside production the app falls back to a development value. Set it in production.

Model assets are stored in Supabase Storage (the assets bucket), which is created automatically on first upload. SUPABASE_URL, SUPABASE_KEY and SUPABASE_SECRET_KEY are printed by the supabase-start target in the next step.

4. Start the local Supabase stack
pnpm nx run vectreal-platform:supabase-start
pnpm nx run vectreal-platform:supabase-db-reset

This starts local Postgres, Auth, Storage, and Studio, then applies the baseline schema.

The Supabase project lives at apps/vectreal-platform/supabase/, so go through the Nx target rather than calling the CLI from the repo root, where it would not find config.toml.

5. Start the platform app
pnpm nx dev vectreal-platform

Open http://localhost:4200.

6. Verify the setup
  1. Open the home page.
  2. Create an account at /sign-up.
  3. Complete onboarding and confirm you land in the dashboard.
  4. Upload a model in the Publisher to verify the full asset pipeline.

Your First Model

The documented end-to-end workflow is:

  1. Open the Publisher at https://vectreal.com/publisher.
  2. Upload a model: GLB, a glTF bundle, STL, FBX, or an OBJ with its .mtl and textures.
  3. Adjust quality, lighting, and camera settings.
  4. Save the scene to your account.
  5. Publish it to generate a stable embed URL.
  6. Copy the iframe snippet into your application.

Full walkthrough: Your First Model.

Architecture Overview

The monorepo is organized into three layers:

vectreal-platform/
├── apps/vectreal-platform/   # Full-stack React Router v7 app (this site)
├── packages/
│   ├── viewer/               # @vctrl/viewer: React 3D viewer component
│   ├── hooks/                # @vctrl/hooks: browser-side loading and optimization hooks
│   ├── core/                 # @vctrl/core: isomorphic model processing
│   └── embed/                # @vctrl/embed: SDK for controlling embedded scenes
├── shared/
│   ├── components/           # Shared Radix UI component library
│   └── utils/                # Shared utility functions
└── terraform/                # Cloudflare DNS + Turnstile, Fly.io secret sync

The platform app uses:

  • React Router v7 in framework mode with SSR
  • Supabase for authentication, database, and asset storage
  • Drizzle ORM for type-safe SQL access
  • @vctrl/viewer and @vctrl/hooks for the in-browser 3D pipeline

Package Overview

PackageDescriptionDocs
@vctrl/viewerReady-to-use React 3D viewer componentViewer docs
@vctrl/hooksBrowser-side hooks for loading, optimizing, and exporting modelsHooks docs
@vctrl/coreIsomorphic (Node.js + browser) loading, optimization, and export utilitiesCore docs
@vctrl/embedFramework-agnostic SDK for controlling embedded 3D scenesEmbed docs
@vctrl/sdkTyped client and zod schemas for the /api/v1 agent APISDK docs
@vctrl/cliThe vectreal command and its MCP server for Claude Code, Cursor and VS CodeCLI docs

Deployment

Vectreal is deployed on Fly.io (region fra) via GitHub Actions, which builds a Docker image and deploys it with flyctl. Cloudflare fronts DNS, caching, and Turnstile bot protection; Terraform manages the Cloudflare configuration. Application secrets are synced to Fly.io from your local .env.development.

Cloudflare infrastructure and Fly.io secret setup:

cd terraform
./scripts/apply-infrastructure.sh          # apply Cloudflare DNS + Turnstile config
./scripts/setup-fly-secrets.sh --env prod  # sync Fly.io app secrets

Database migration flow:

pnpm nx run vectreal-platform:drizzle-generate
pnpm nx run vectreal-platform:supabase-db-push-staging
pnpm nx run vectreal-platform:supabase-db-push-prod

High-level deployment docs: https://vectreal.com/docs/self-hosting/deployment
Canonical infrastructure details: terraform/README.md

Contributing

We welcome contributions across code, docs, fixes, and performance improvements.

Useful development commands:

pnpm nx affected --target=lint
pnpm nx affected --target=test
pnpm nx test vectreal-platform

Community

License

GNU Affero General Public License v3.0.

See LICENSE.md.

الأسئلة الشائعة

ما هو Vectreal؟

Upload, publish and embed 3D models on any website from your agent.

كيف أثبّت Vectreal؟

يعمل على جهازك. في Claude Code: claude mcp add vectreal -- npx -y @vctrl/cli@3.1.0 mcp. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج Vectreal إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل Vectreal مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص AGPL-3.0.

من يصون Vectreal؟

ينشره Vectreal. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.