Files
web-cad/README.md
T

75 lines
3.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# WebCAD
Web-basiertes 2D-CAD mit Kollaboration, Plugin-System und Fokus auf
Veranstaltungsplanung (Bestuhlung, Bühnen, Layouts).
## Features
- **Zeichnen:** Linien, Rechtecke, Kreise, Bögen, Ellipsen, Splines, Polylinien, Text, MTEXT, Bemaßungen, Hatch
- **Modifizieren:** Move/Copy/Rotate/Scale/Mirror, Trim/Extend/Fillet/Chamfer, Stretch/Break/Join/Explode/Align/Lengthen, Polyline-Editor, Grips (Vertex/Center), Arrays (rect/polar/path)
- **Event-Tools:** Stühle, Sitzreihen (Drag), Sitzblöcke, ArcRows, Tische, Bühnen (mit Höhen-Attribut), Vorhang, Scheinwerfer, Absperrungen, Vorlagenkatalog, Gäste-Verwaltung mit Sitzplatz-Zuweisung, CSV-Sitzlistent-Export
- **Snaps:** Endpoint, Midpoint, Center, Intersection, Quadrant, Perpendicular, Tangent, Grid, Polar-Tracking
- **Bibliothek:** Globale Block-Bibliothek mit Ordnern, Suche, Favoriten, Thumbnails; Builtin-Kataloge (Event/Architektur/Landschaft); Export/Import als .wcadlib (JSON oder ZIP)
- **Import/Export:** DXF (Import mit ELLIPSE/SPLINE/MTEXT/POINT/ATTDEF + Fehlerreport; Export R12/2000 mit BLOCKS/ATTR), SVG (echte Geometrie-Konvertierung mit Path-Parser), PDF (je Layout, maßstabsgetreu), PNG, JSON
- **Layouts & Plot:** Layout-Verwaltung mit Viewport-Minimap, Titelblock mit Attributen, PDF-Export, Browser-Print
- **Kollaboration:** Yjs CRDT, kollaborativ korrektes Undo/Redo (nur eigene Operationen)
- **Modi:** simple (Grundwerkzeuge) / pro (Vollpalette), localStorage-persistiert
- **Templates:** 6 Branchen-Presets (Halle, OpenAir, Saal, Messe, Büro, Garten)
- **i18n:** de/en (Grundlage, erweiterbar über `src/i18n/strings.ts`)
- **Rollen:** admin (library-admin, globaler Schreibzugriff) / planer (lesen + eigene Zeichnungen)
## Stack
- **Frontend:** React 18 + TypeScript + Vite + PixiJS v8 (WebGL-Renderer, Canvas2D-Fallback) + zustandsfreier Service-Layer
- **Backend:** Node.js + TypeScript + Fastify 5 + SQLite (better-sqlite3)
- **Kollaboration:** Yjs + y-websocket
- **Tests:** Vitest (697 FE + 287 BE), Playwright E2E, tsc-Strict-Mode
## Entwicklung
```bash
# Backend
cd backend && npm install && npm run dev # http://localhost:3001
# Frontend
cd frontend && npm install && npm run dev # http://localhost:5173
```
### Tests
```bash
cd frontend && npm test # 697 Vitest-Tests
cd backend && npm test # 287 Vitest-Tests
cd frontend && npx tsc --noEmit # Typecheck
cd frontend && npm run build # Production-Build
```
## Docker
```bash
docker-compose up --build
```
## Plugin-Entwicklung
Siehe [docs/PLUGIN_GUIDE.md](docs/PLUGIN_GUIDE.md) Plugin-API v2 mit
Werkzeugen, Panels und Bibliotheks-Providern, inkl. Minimal-Beispiel.
## Bibliotheks-Pakete (.wcadlib)
Siehe [docs/LIBRARY_SPEC.md](docs/LIBRARY_SPEC.md) JSON- und ZIP-Format,
Validierungsregeln, Endpoints und CAD-Element-Konventionen.
## Architektur-Regeln
- `kernel/**` importiert niemals React
- `render/pixi/**` kennt keine React-Components
- React kennt den Renderer nur über CanvasArea
- Eine Werkzeug-Aktion = eine `doc.transact()` = ein Undo-Schritt
## Roadmap & Status
Alle funktionalen Phasen (AH) sind abgeschlossen. Aktueller Stand und
Task-Log: [ROADMAP.md](ROADMAP.md).