diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 83b3b79..ee64f0a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Thanks for helping improve SketchForge. +Thanks for helping improve SnapCAD Studio, developed by YakNet Bilişim as part of the YakHub ecosystem. ## Local Setup diff --git a/README.md b/README.md index 995e7ba..245e367 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@
+

SnapCAD Studio

+

Erişilebilir, tarayıcı tabanlı 3B parametrik CAD ve mimari modelleme stüdyosu.

-

DWG/DXF/STEP/STL/OBJ/GLB içe aktarma, .skf proje paketleri, isteğe bağlı YakNet Bulut yedeği ve ekran okuyucu dostu arayüz.

+ +

DWG/DXF/STEP/STL/OBJ/GLB içe aktarma, .skf proje paketleri, isteğe bağlı YakNet Bulut yedeği ve ekran okuyucu dostu arayüz.

YakHub deposu @@ -9,13 +12,20 @@ Canlı uygulama Erişilebilirlik hedefi

+ +

YakNet Bilişim tarafından geliştirilir · YakHub ekosistemine bağlıdır

+
-![SnapCAD Studio editor showing a selected model on the workplane](https://sketchforge3d.com/assets/landing/editor-phone-stand.png) +![SnapCAD Studio düzenleyicisi: çalışma düzleminde seçili bir kutu ve sağdaki özellik paneli](docs/media/sketchforge-editor-v0.8.0.png) -> **Depo:** [yakhub.com.tr/YakNet/snapcad-studio](https://yakhub.com.tr/YakNet/snapcad-studio) -> -> **Canlı uygulama:** [snap.yakhub.com.tr](https://snap.yakhub.com.tr) +| | | +| --- | --- | +| **Depo** | [yakhub.com.tr/YakNet/snapcad-studio](https://yakhub.com.tr/YakNet/snapcad-studio) | +| **Canlı uygulama** | [snap.yakhub.com.tr](https://snap.yakhub.com.tr) | +| **Lisans** | [AGPL-3.0-only](LICENSE) | + +> **English:** SnapCAD Studio is an accessible, browser-based parametric CAD and architectural modeling workspace by YakNet Bilişim, part of the YakHub ecosystem. It imports DWG/DXF/STEP/STL/OBJ/GLB, stores projects as `.skf` packages, and targets WCAG 2.2 AAA. ## Neden SnapCAD Studio @@ -25,441 +35,196 @@ Temel döngü: bir şekil bırak, boyutlandır, döndür, başka bir şekli oyuk Projeler varsayılan olarak tarayıcıda saklanır. İsterseniz YakNet hesabınızla buluta yedekleyebilirsiniz; bulut isteğe bağlıdır ve yerel kopya her zaman önceliklidir. Ağır CAD kurulumu gerekmez. -## What It Does +## Özellikler -- **Local-first projects** - designs live in browser storage with generated project thumbnails. -- **DWG ve DXF içe aktarma** - AutoCAD çizimlerini LibreDWG/WebAssembly ile tarayıcıda açar; gerçek CAD birimleri korunur. -- **.skf proje paketleri** - kaynak dosya ve türetilmiş ağı birlikte saklar; projeler yeniden açıldığında geometri kaybolmaz. -- **YakNet Bulut (isteğe bağlı)** - projeleri hesapla yedekler; boş veya eski bir bulut kopyası yerel geometriyi asla silmez. -- **Erişilebilirlik** - klavye ile tam kullanım, ekran okuyucu duyuruları ve WCAG 2.2 AAA hedefi. -- **Real 3D workplane** - grid, camera controls, snap settings, transform handles, outlines, and inspector controls. -- **Primitive shape library** - boxes, cylinders, spheres, cones, pyramids, wedges, text, roofs, half spheres, torus shapes, tubes, and more. -- **Solid and hole workflow** - turn shapes into cutters and group them into final geometry. -- **Boolean Intersection** - keep only the geometry where selected solid and hole shapes overlap. -- **Reversible edge tools** - chamfer and fillet selected CAD edges, with history controls for removing applied edge features. -- **Rotated solid edge treatment** - chamfer and fillet preserve analytic box topology after one-, two-, or three-axis rotations. -- **STL import** - bring outside models into the same workspace as primitives. -- **STL, OBJ, and STEP workflows** - export selected objects or the whole scene, and round-trip exact STEP/B-Rep geometry. -- **Fast browser stack** - Next.js, React, TypeScript, Three.js, and Manifold/CSG geometry tooling. +- **Yerel öncelikli projeler** — tasarımlar tarayıcı depolamasında yaşar; proje kartları için küçük önizlemeler üretilir. +- **DWG ve DXF içe aktarma** — AutoCAD çizimlerini LibreDWG/WebAssembly ile tarayıcıda açar; gerçek CAD birimleri olduğu gibi korunur, sessiz ölçek değişikliği yapılmaz. +- **`.skf` proje paketleri** — kaynak dosyayı ve türetilmiş ağı birlikte saklar; proje yeniden açıldığında geometri kaybolmaz. Biçim ayrıntıları: [docs/SKF_PROJECT_FORMAT.md](docs/SKF_PROJECT_FORMAT.md). +- **YakNet Bulut (isteğe bağlı)** — projeleri hesapla yedekler. Boş veya eski bir bulut kopyası yerel geometrinin üzerine asla yazılmaz; bulut sınırını aşan büyük projeler yalnızca bu tarayıcıda kalır ve kullanıcıya açıkça bildirilir. +- **Erişilebilirlik** — klavyeyle tam kullanım, ekran okuyucu duyuruları ve WCAG 2.2 AAA hedefi. +- **Gerçek 3B çalışma düzlemi** — ızgara, kamera denetimleri, yakalama ayarları, dönüştürme tutamaçları, dış çizgiler ve denetçi panelleri. +- **İlkel şekil kitaplığı** — kutu, silindir, küre, koni, piramit, kama, metin, çatı, yarım küre, torus, boru ve daha fazlası. +- **Katı ve oyuk akışı** — şekilleri kesiciye çevirip gruplayarak nihai geometriyi üretin. +- **Boolean kesişim** — yalnızca seçili katı ve oyuk şekillerin çakıştığı bölümü koruyun. +- **Geri alınabilir kenar araçları** — seçili CAD kenarlarına pah (chamfer) ve yuvarlatma (fillet) uygulayın; uygulanan kenar özelliklerini geçmişten geri alın. +- **Döndürülmüş katılarda kenar işlemleri** — bir, iki veya üç eksende döndürülmüş kutularda analitik topoloji korunur. +- **STL, OBJ ve STEP akışları** — seçili nesneleri veya tüm sahneyi dışa aktarın; STEP/B-Rep geometrisinde birebir gidiş-dönüş yapın. +- **Mimari ve devre çalışma alanları** — duvar/açıklık araçları, hazır bileşenler ve devre şablonları. +- **Hızlı tarayıcı yığını** — Next.js, React, TypeScript, Three.js ve Manifold/CSG geometri araçları. -### Camera projection shortcut +### Kamera projeksiyonu kısayolu -Press **O** in the editor to switch between perspective and orthographic projection. The current view direction and framing are preserved when switching. +Düzenleyicide **O** tuşuna basarak perspektif ve ortografik projeksiyon arasında geçiş yapın. Geçiş sırasında bakış yönü ve kadraj korunur. -## Demo +## Hızlı başlangıç -![SketchForge projects dashboard](https://sketchforge3d.com/assets/landing/project-dashboard.png) +### Gereksinimler -## Getting Started +- Node.js 20 veya üzeri +- npm (Node.js ile birlikte gelir) -There are two common ways to run SketchForge. If you are not sure which one to choose, use Docker. - -| Path | Best for | Difficulty | -| --- | --- | --- | -| Docker / FabLab server | Teachers, classrooms, shared computers, local network hosting | Recommended | -| Local development | Developers who want to edit the code | Medium | - -SketchForge is local-first in both modes. The app files may be served from a computer or server, but projects stay in each user's browser storage. STL and OBJ exports download through the user's browser. SketchForge does not upload models to a SketchForge cloud service. - -## macOS Desktop Release - -GitHub releases include macOS DMG files for Intel (`x64`) and Apple Silicon (`arm64`) Macs. Choose the file that matches your Mac. - -1. Open the downloaded DMG file. -2. Drag `SketchForge.app` to the `Applications` folder. -3. Eject the DMG file. -4. Control-click `SketchForge.app` in `Applications`. -5. Select **Open**, then select **Open** again. - -Unsigned releases have `-unsigned` in the file name. macOS shows a Gatekeeper warning for these releases. If macOS does not show the **Open** option, run this command in Terminal: - -```bash -xattr -dr com.apple.quarantine /Applications/SketchForge.app -open /Applications/SketchForge.app -``` - -Do not open the app from Safari's Downloads folder or directly from the mounted DMG. Copy it to `Applications` first. - -### macOS Virtual Machines - -Some macOS virtual machines do not provide hardware WebGL. Launch SketchForge with software WebGL in that case: - -```bash -/Applications/SketchForge.app/Contents/MacOS/SketchForge \ - --use-angle=swiftshader \ - --enable-unsafe-swiftshader -``` - -### Download the Project - -If you already know Git: - -```bash -git clone https://yakhub.com.tr/YakNet/snapcad-studio.git -cd snapcad-studio -``` - -If you do not know Git yet: - -1. Open the YakHub page for this repository. -2. Press the **Code** button. -3. Press **Download ZIP**. -4. Extract the ZIP somewhere easy to find, such as your Desktop. -5. Open a terminal in the extracted folder. - -On Windows, you can open PowerShell in the folder by opening the folder, clicking the address bar, typing `powershell`, and pressing Enter. - -## Docker / FabLab Server (Recommended) - -Docker is the easiest way to run SketchForge for a classroom, workshop, or FabLab. It packages the build tools, Next.js server, health check, persistent shared-project storage, and restart behavior together. - -### What You Need - -- Docker Desktop on Windows or macOS, or Docker Engine on Linux -- Docker Compose, which is included with modern Docker Desktop -- This repository downloaded on the server computer - -If `docker` is not recognized, install Docker Desktop and open it once before running the commands. - -### Start SketchForge - -#### Compose (Build images locally) - -From the SketchForge project folder, run: - -```bash -docker compose -f deploy/docker/compose.yaml up --build -d -``` - -The first start can take a few minutes because Docker builds the app. - -#### Compose (Prebuilt) - -From the SketchForge project folder or with the downloaded `deploy/docker/compose-ghcr.yaml`, run: - -```bash -docker compose -f deploy/docker/compose-ghcr.yaml up -d -``` - -#### Standalone (Prebuilt) - -```bash -docker run -d --name sketchforge --restart unless-stopped \ - -p 3000:3000 \ - -e SKETCHFORGE_SHARED_PROJECTS_DIR=/data/projects \ - -v sketchforge-shared-projects:/data/projects \ - ghcr.io/formsmith746/sketchforge-3d:latest -``` - -After running, open this on the same computer: - -```text -http://127.0.0.1:3000/ -``` - -If that works, SketchForge is running. - -The container listens on port `3000`. It also accepts connections on port `80` for backward compatibility with older UnRAID templates and forwards them to the same server. New Docker and UnRAID configurations should use container port `3000`. - -### Shared Docker Projects - -Docker deployments include a shared `.skf` project library. Private projects still autosave in each user's browser. The **Shared** dashboard section lists files stored in `/data/projects`, and **Export → SKF → Save to shared** writes the current project there. Revision-matched PNG previews are stored beside the library in `/data/projects/.thumbnails` and appear on shared project cards. - -Compose uses the persistent `sketchforge-shared-projects` volume by default. To use a directory on the Docker host instead, set `SKETCHFORGE_SHARED_PROJECTS_VOLUME` before starting Compose: - -Windows PowerShell: - -```powershell -$env:SKETCHFORGE_SHARED_PROJECTS_VOLUME = "C:/SketchForge/shared-projects" -docker compose -f deploy/docker/compose.yaml up --build -d -``` - -Linux or macOS: - -```bash -SKETCHFORGE_SHARED_PROJECTS_VOLUME=/srv/sketchforge-projects docker compose -f deploy/docker/compose.yaml up --build -d -``` - -Opening a shared file creates a private local working copy. Saving back checks the server revision first; if another user has changed the file, SketchForge refuses to overwrite it and asks the user to reload or save with another name. This is shared file storage, not simultaneous live editing. - -### Let Other Computers Join - -Other computers on the same Wi-Fi or LAN need the server computer's local IP address. - -On Windows PowerShell, run: - -```powershell -ipconfig -``` - -Look for the `IPv4 Address`, for example: - -```text -192.168.1.25 -``` - -Then other computers can open: - -```text -http://192.168.1.25:3000/ -``` - -Use your own IP address, not the example one. - -### Use a Different Port - -If port `3000` is already being used, choose another port such as `8080`. - -Windows PowerShell: - -```powershell -$env:SKETCHFORGE_PORT = "8080" -docker compose -f deploy/docker/compose.yaml up --build -d -``` - -Linux or macOS: - -```bash -SKETCHFORGE_PORT=8080 docker compose -f deploy/docker/compose.yaml up --build -d -``` - -Then open: - -```text -http://127.0.0.1:8080/ -``` - -### Stop SketchForge - -```bash -docker compose -f deploy/docker/compose.yaml down -``` - -### Update SketchForge Later - -The home dashboard's **Settings** panel checks the official version and displays an update prompt when a newer version is available. It never installs an update automatically. Choosing **Not now** dismisses only that version, so a later release will be offered again. - -If you used Git, update the existing checkout in place. You do not need to remove or download the repository again: - -```bash -git pull -docker compose -f deploy/docker/compose.yaml up --build -d -``` - -If you use the prebuilt GHCR Compose file: - -```bash -docker compose -f deploy/docker/compose-ghcr.yaml pull sketchforge -docker compose -f deploy/docker/compose-ghcr.yaml up -d --no-deps sketchforge -``` - -If you downloaded the ZIP, download the newest ZIP, extract it, and run: - -```bash -docker compose -f deploy/docker/compose.yaml up --build -d -``` - -Application updates do not clear private projects stored in the browser. Docker shared projects remain in the existing `sketchforge-shared-projects` volume or the host directory configured with `SKETCHFORGE_SHARED_PROJECTS_VOLUME`. Never add `--volumes` or `-v` to an update command. - -For an administrator-managed one-click installation, configure all of the following server variables: - -- `SKETCHFORGE_UPDATE_TRIGGER_URL`: an internal HTTPS endpoint that pulls/recreates only the SketchForge application while retaining its existing project volume. -- `SKETCHFORGE_UPDATE_ADMIN_KEY`: the key the administrator must enter in the confirmation dialog. -- `SKETCHFORGE_UPDATE_TRIGGER_TOKEN` (optional): a bearer token SketchForge sends only to the internal update service. - -Without an administrator-managed trigger, the confirmation opens these safe update instructions instead of granting the web container access to the Docker socket. - -### Docker Troubleshooting - -- **`docker` is not recognized**: install Docker Desktop, open it, and try again. -- **Docker says the daemon is not running**: Docker Desktop is closed or still starting. -- **Port already in use**: use another port, for example `8080`. -- **Other computers cannot connect**: check that they are on the same network and that the server firewall allows the chosen port. -- **The page opens but old files appear**: stop and rebuild with `docker compose -f deploy/docker/compose.yaml down`, then `docker compose -f deploy/docker/compose.yaml up --build -d`. - -If you already have Node.js installed, the repository also includes shortcuts: - -```bash -npm run docker:up -npm run docker:down -``` - -## Local Development - -Use this path if you want to edit SketchForge's code. - -### What You Need - -- Node.js 20 or newer -- npm, included with Node.js - -Check your versions: +Sürümlerinizi kontrol edin: ```bash node -v npm -v ``` -If those commands do not work, install Node.js from the official Node.js website and reopen your terminal. - -### Install and Run - -From the SketchForge project folder: +### Kurulum ve çalıştırma ```bash +git clone https://yakhub.com.tr/YakNet/snapcad-studio.git +cd snapcad-studio npm install npm run dev ``` -Open: +Ardından tarayıcıda açın: ```text http://127.0.0.1:3000/ ``` -Leave the terminal open while you use the app. To stop the development server, press `Ctrl+C` in the terminal. +Uygulamayı kullanırken terminali açık bırakın. Geliştirme sunucusunu durdurmak için `Ctrl+C` tuşlarına basın. -### Useful Developer Commands +Git bilmiyorsanız: depo sayfasında **Code** düğmesine basıp **Download ZIP** ile indirebilir, arşivi açıp klasörde terminal başlatabilirsiniz. Windows'ta klasörü açıp adres çubuğuna `powershell` yazıp Enter'a basmak yeterlidir. -Run TypeScript checks: +### WebAssembly çalışma zamanları + +DWG/DXF dönüştürme için gereken LibreDWG ve OpenCascade WASM dosyaları depoda tutulmaz; `node_modules` içinden kopyalanır. `npm install` sonrası `npm run dev`, `npm run build` ve `npm run export` bu kopyalamayı (`npm run copy:wasm`) kendiliğinden yapar. + +## Statik dışa aktarma (Laragon / Apache) + +`npm run export` komutu: + +1. WASM çalışma zamanlarını hazırlar, +2. Next.js statik çıktısını `apps/web/.next-export` içine üretir, +3. service worker varlıklarını doğrular, +4. çıktıyı depo köküne kopyalar. + +Kopyalama sırasında kökteki PHP dosyaları ve `.env` **asla ezilmez**; bunlar `scripts/sync-laragon-static.mjs` içinde korumalı olarak tanımlıdır. + +## YakNet Bulut arka ucu (PHP/MySQL) + +Bulut API'si Apache/Laragon üzerinde PHP ve MySQL ile çalışır. + +1. `.env.example` dosyasını `.env` olarak kopyalayın ve veritabanı ile OAuth değerlerini doldurun. +2. PHP bağımlılıklarını kurun: `composer install` +3. Veritabanı şemasını oluşturun/güncelleyin: `php database/migrate.php` +4. Statik siteyi derleyip kopyalayın: `npm run export` + +Şema değişiklikleri yalnızca göç betiğiyle uygulanır. `SNAPCAD_AUTO_MIGRATE` varsayılan olarak `false` olmalıdır; `true` yalnızca yeni bir yerel veritabanında tek seferlik kolaylık içindir. `database/` klasörü `.htaccess` ile HTTP erişimine kapatılmıştır. + +Oturumlar yalnızca sunucu tarafındaki OAuth geri çağrısıyla (`callback.php`) açılır; istemci tarafında oturum üretilmez. Misafir öğrenci erişimi PIN korumalıdır. + +`.env` dosyası sürüm kontrolüne **girmez**. Sırları depoya, issue'lara veya ekran görüntülerine eklemeyin. + +## Docker (isteğe bağlı) + +Docker; sınıf, atölye veya FabLab kurulumları için Next.js sunucusunu, sağlık kontrolünü ve paylaşımlı proje depolamasını tek pakette toplar. ```bash -npm run typecheck +docker compose -f deploy/docker/compose.yaml up --build -d ``` -Run tests: +Ardından `http://127.0.0.1:3000/` adresini açın. İlk başlatma, imaj yerelde derlendiği için birkaç dakika sürebilir. -```bash -npm run test +- Farklı port: `SKETCHFORGE_PORT=8080` ortam değişkeniyle (PowerShell'de `$env:SKETCHFORGE_PORT = "8080"`). +- Paylaşımlı proje klasörü: `SKETCHFORGE_SHARED_PROJECTS_VOLUME` ile ana makinedeki bir dizine bağlanabilir. +- Durdurma: `docker compose -f deploy/docker/compose.yaml down` + +> Önceden derlenmiş bir konteyner imajı bu depo için yayınlanmıyor; imajı yerelde derleyin. `deploy/docker/compose-ghcr.yaml` ve `SKETCHFORGE_*` değişken adları, üst projeyle uyumluluk için korunmuştur. + +Docker kurulumlarında paylaşımlı bir `.skf` kitaplığı bulunur. Özel projeler yine her kullanıcının tarayıcısında saklanır. Paylaşımlı bir dosyayı açmak özel bir yerel çalışma kopyası oluşturur; geri kaydederken sunucu revizyonu kontrol edilir ve başka biri dosyayı değiştirdiyse üzerine yazılmaz. Bu, eşzamanlı canlı düzenleme değil paylaşımlı dosya depolamasıdır. + +## Erişilebilirlik + +SnapCAD Studio'nun ana hedeflerinden biri, ekran okuyucu kullanan kişilerin CAD çalışmasını sürdürebilmesidir. + +- Düzenleyicinin tamamı klavyeyle kullanılabilir; odak sırası ve odak halkaları görünür tutulur. +- İçe aktarma, açma, bulut eşitleme ve hata durumları `aria-live` bölgeleriyle Türkçe duyurulur. +- Renk tek başına anlam taşımaz; durum bilgisi metinle de verilir. +- Hareket azaltma tercihi (`prefers-reduced-motion`) dikkate alınır. +- Hedef WCAG 2.2 AAA'dır. Bu bir hedeftir, sertifika değildir; bulduğunuz erişilebilirlik sorunlarını issue olarak bildirebilirsiniz. + +## Geliştirici komutları + +| Komut | Açıklama | +| --- | --- | +| `npm run dev` | Geliştirme sunucusu | +| `npm run typecheck` | TypeScript denetimi | +| `npm run test` | Birim testleri (Vitest) | +| `npm run test:e2e` | Uçtan uca testler | +| `npm run build` | Üretim derlemesi | +| `npm run export` | Statik dışa aktarma ve köke kopyalama | +| `npm run copy:wasm` | WASM çalışma zamanlarını hazırlama | +| `npm run mcp:sketchforge` | Yerel MCP köprüsü (yalnızca geliştirme) | + +## Proje yapısı + +```text +apps/web/ Next.js arayüzü, 3B düzenleyici ve istemci kitaplıkları +cloud-api.php YakNet Bulut API'si +callback.php OAuth geri çağrısı (oturum burada açılır) +login.php YakNet ile giriş +logout.php Oturum kapatma +snap-config.php Ortam değişkenlerini okuyan yapılandırma +database/ Şema ve göç betiği (HTTP'den kapalı) +scripts/ WASM kopyalama, statik dışa aktarma, MCP köprüsü +tests/ Vitest birim ve uçtan uca testleri +deploy/docker/ Docker ve Compose dosyaları +docs/ .skf biçimi, değişiklik günlüğü, MCP örnekleri ``` -Start the local SketchForge MCP bridge for editor automation: +## Katkı -```bash -npm run mcp:sketchforge -``` +Katkılar memnuniyetle karşılanır. Özellikle şu alanlarda yardım değerli: -Create a production build: +- düzenleyici hata düzeltmeleri +- geometri ve Boolean test senaryoları +- DWG/DXF/STL içe ve dışa aktarma uç durumları +- erişilebilirlik ve performans iyileştirmeleri +- belge, ekran görüntüsü ve video -```bash -npm run build -``` +Pull request açmadan önce [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) dosyasını okuyun. Değişikliklerinizi `npm run typecheck` ve `npm run test` ile doğrulayın. -Build a static export: +## Güvenlik -```bash -npm run export -``` +Güvenlikle ilgili bildirimler için lütfen herkese açık issue açmayın. İzlenecek süreç: [.github/SECURITY.md](.github/SECURITY.md). -## Contributing +## MCP köprüsü (geliştirici aracı) -Contributions are welcome. Good places to help: +Depo, MCP destekleyen yapay zekâ istemcileri için yerel bir MCP sunucusu içerir. Bir ajan; açık düzenleyicileri listeleyebilir, sahneyi okuyabilir, nesne oluşturup güncelleyebilir, gruplayabilir, kenar kimliklerini listeleyebilir, pah/yuvarlatma uygulayabilir ve görüntü yakalayabilir. -- editor bug fixes -- geometry and boolean test cases -- STL import/export edge cases -- UI polish -- documentation screenshots and videos -- accessibility and performance improvements - -Read [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) before opening a pull request. - -## Security - -Please do not open public issues for security-sensitive reports. Read [.github/SECURITY.md](.github/SECURITY.md) for the reporting process. - -## License - -Copyright © 2026 SketchForge contributors. - -SketchForge is licensed under the **GNU Affero General Public License v3.0 only** (`AGPL-3.0-only`). If you modify SketchForge and let users interact with the modified version over a network, you must offer those users the corresponding source code under the same license. See [LICENSE](LICENSE). - -The application exposes a **Source** link in the dashboard. Operators distributing or hosting a modified build should set `NEXT_PUBLIC_SOURCE_CODE_URL` at build time to the public URL containing that build's complete corresponding source code. - -## SketchForge MCP Skill - -SketchForge includes a local MCP server for AI clients that support MCP tools. It lets an agent inspect and control a live local editor tab: list open editors, read the scene, create/update/select objects, group/cut/separate parts, list CAD edge ids, apply chamfer or fillet, inspect errors, and capture viewport images. - -This is for local development only. Run SketchForge with `npm run dev`; the MCP route is disabled in production builds and Docker/static hosting. - -### Start SketchForge for MCP - -From the SketchForge project folder: +Bu araç yalnızca yerel geliştirme içindir. MCP rotası üretim derlemelerinde ve Docker/statik barındırmada kapalıdır. ```bash npm install npm run dev ``` -Open an editor tab: - ```text http://127.0.0.1:3000/?editor=1 ``` -The AI client starts the MCP server with: - ```bash node scripts/sketchforge-mcp-server.mjs ``` -### Codex +Codex ve Claude Desktop için örnek yapılandırmalar `docs/mcp/` altında, Codex becerisi `docs/skills/sketchforge-mcp-skill` altında bulunur. -The Codex skill is included at: +## Belgeler -```text -docs/skills/sketchforge-mcp-skill -``` - -Install it into your Codex skills folder. - -Windows PowerShell: - -```powershell -New-Item -ItemType Directory -Force "$env:USERPROFILE\.codex\skills" | Out-Null -Copy-Item -Recurse -Force "docs\skills\sketchforge-mcp-skill" "$env:USERPROFILE\.codex\skills\sketchforge-mcp-skill" -``` - -macOS or Linux: - -```bash -mkdir -p ~/.codex/skills -cp -R docs/skills/sketchforge-mcp-skill ~/.codex/skills/ -``` - -Then add an MCP server entry to your Codex config. Use [`docs/mcp/codex-config.example.toml`](docs/mcp/codex-config.example.toml) as the template and replace the script path with the absolute path on your machine. Restart Codex after changing the config. - -Once installed, ask Codex: - -```text -Use $sketchforge-mcp-skill to list my open SketchForge editors and inspect the current scene. -``` - -### Claude - -Claude does not use Codex `SKILL.md` files, but it can use the same SketchForge MCP server. Add the server to Claude Desktop's MCP config using [`docs/mcp/claude-desktop-config.example.json`](docs/mcp/claude-desktop-config.example.json) as the template, replacing the script path with the absolute path on your machine. - -After restarting Claude Desktop, ask: - -```text -Use the SketchForge MCP tools to list open editors, inspect the scene, and modify the selected object. -``` - -The main tool names are `sketchforge_list_editors`, `sketchforge_read_scene`, `sketchforge_list_objects`, `sketchforge_create_shape`, `sketchforge_update_object`, `sketchforge_list_edges`, `sketchforge_apply_edge_treatment`, and `sketchforge_capture_image`. - -## YakNet cloud backend (PHP/MySQL) - -The cloud API runs on Apache/Laragon with PHP and MySQL. - -1. Copy `.env.example` to `.env` and fill in the database and OAuth values. -2. Install PHP dependencies with `composer install`. -3. Create or update the database schema with `php database/migrate.php`. -4. Build and copy the static site with `npm run export`. - -Schema changes are applied only by the migration script. `SNAPCAD_AUTO_MIGRATE=true` is a one-off escape hatch for a fresh local database and should stay `false` in production. The `database/` directory is blocked from HTTP access by `.htaccess`. +- [.skf proje biçimi](docs/SKF_PROJECT_FORMAT.md) +- [Değişiklik günlüğü](docs/CHANGELOG.md) +- [MCP örnekleri](docs/mcp/) ## Lisans -SnapCAD Studio, **GNU Affero General Public License v3.0 (AGPL-3.0-only)** altında lisanslanmıştır. Ayrıntılar için [LICENSE](LICENSE) dosyasına bakın. +Copyright © 2026 YakNet Bilişim ve SketchForge katkıda bulunanları. -Bu proje GNU LibreDWG (GPL-3.0) ve OpenCascade (LGPL-2.1) gibi açık kaynak bileşenler kullanır. AGPL-3.0 bu bileşenlerle uyumludur. Uygulamayı bir sunucuda değiştirerek çalıştırırsanız, AGPL-3.0 gereği kullanıcılara değiştirilmiş kaynak kodunu sunmanız gerekir. +SnapCAD Studio, **GNU Affero General Public License v3.0 only** (`AGPL-3.0-only`) altında lisanslanmıştır. Ayrıntılar için [LICENSE](LICENSE) dosyasına bakın. + +AGPL-3.0; yazılımı değiştirip ağ üzerinden kullanıma sunan herkesin, kullanıcılara aynı lisans altında karşılık gelen kaynak kodu sunmasını gerektirir. Uygulama panelinde bir **Kaynak** bağlantısı bulunur; değiştirilmiş bir sürümü barındırıyorsanız derleme sırasında `NEXT_PUBLIC_SOURCE_CODE_URL` değişkenini o derlemeye ait kaynak kodun genel adresine ayarlayın. + +Bu proje GNU LibreDWG (GPL-3.0) ve OpenCascade (LGPL-2.1) gibi açık kaynak bileşenler kullanır. AGPL-3.0 bu bileşenlerle uyumludur.