@@ -42,6 +42,7 @@ pnpm build --filter=backend # Build backend only
4242pnpm lint # Run linters for all apps
4343pnpm format # Format all code with Prettier
4444pnpm clean # Clean all build artifacts and node_modules
45+ pnpm backend:inspector # Launch MCP Inspector for testing tools (STDIO mode)
4546```
4647
4748### Docker
@@ -128,6 +129,8 @@ This is a **pnpm workspaces + Turborepo** monorepo (converted from standalone ap
128129- Enabled when ` VITE_REMOTE_CONTROL_ENABLED=true ` (automatically set in Docker builds)
129130- WebSocket auto-detects URL from browser (supports both direct access and nginx proxy)
130131- Commands are handled by contexts, responses sent back to backend
132+ - Automatic reconnection with exponential backoff (max 10 attempts, up to 30s delay)
133+ - Connection status displayed via Toast notifications
131134
132135### Backend (apps/backend)
133136
@@ -220,11 +223,13 @@ Example: `apps/backend/src/mcp/primitives/essential/tools/add-table.tool.ts`
220223- ` addRelationship() ` , ` updateRelationship() ` , ` deleteRelationship() ` - Relationship operations
221224- ` addArea() ` , ` updateArea() ` , ` deleteArea() ` - Area (grouping) operations
222225- ` addNote() ` , ` updateNote() ` , ` deleteNote() ` - Note operations
223- - ` getTables() ` , ` getTable() ` , ` getRelationships() ` - Query operations
226+ - ` addEnum() ` , ` updateEnum() ` , ` deleteEnum() ` - PostgreSQL ENUM type operations
227+ - ` addType() ` , ` updateType() ` , ` deleteType() ` - PostgreSQL composite type operations
228+ - ` getTables() ` , ` getTable() ` , ` getRelationships() ` , ` getAreas() ` , ` getNotes() ` , ` getEnums() ` , ` getTypes() ` - Query operations
224229- ` setDatabase() ` - Set database type (MySQL, PostgreSQL, SQLite, etc.)
225230- ` importDiagram() ` - Import complete diagram JSON
226231
227- See ` apps/backend/src/drawdb/drawdb-client.service.ts ` for full command list.
232+ See ` apps/backend/src/drawdb/drawdb-client.service.ts ` and ` apps/gui/src/hooks/useRemoteControl.js ` for full command list.
228233
229234### Frontend Data Model
230235
@@ -253,6 +258,15 @@ See `apps/backend/src/drawdb/drawdb-client.service.ts` for full command list.
253258
254259- ` id ` , ` title ` , ` content ` (Lexical editor state), ` x ` , ` y ` , ` width ` , ` height `
255260
261+ ** Enums (PostgreSQL):**
262+
263+ - ` id ` , ` name ` , ` values[] ` - Array of allowed enum values
264+
265+ ** Types (PostgreSQL):**
266+
267+ - ` id ` , ` name ` , ` fields[] ` - Array of field objects with ` name ` and ` type `
268+ - ` comment ` - Optional description
269+
256270### Environment Variables
257271
258272** GUI:**
@@ -263,10 +277,19 @@ See `apps/backend/src/drawdb/drawdb-client.service.ts` for full command list.
263277
264278- ` PORT ` - HTTP server port (default: 3000)
265279- ` HOST ` - HTTP server host (default: 127.0.0.1)
266- - ` MCP_SERVER_NAME ` - MCP server name (default: drawdb-mcp-server)
267- - ` MCP_SERVER_VERSION ` - MCP server version (default: 0.1.0 )
280+ - ` MCP_SERVER_NAME ` - MCP server name (default: drawdb-mcp-server-dev )
281+ - ` MCP_SERVER_VERSION ` - MCP server version (default: from package.json )
268282- ` LOG_LEVEL ` - Logger level (default: info)
269283
284+ ** CLI Arguments** (HTTP mode only):
285+
286+ ``` bash
287+ node dist/main-http.js --port 3000 --host 127.0.0.1
288+ ```
289+
290+ - ` --port <number> ` - Override PORT environment variable
291+ - ` --host <string> ` - Override HOST environment variable
292+
270293## Development Tips
271294
272295### Adding a New MCP Tool
@@ -312,10 +335,37 @@ function MyComponent() {
312335### Common Gotchas
313336
314337- ** WebSocket connection fails** : Check that ` VITE_REMOTE_CONTROL_ENABLED=true ` and backend is running
315- - ** MCP tools timeout** : Default timeout is 30s (configured in ` DrawDBClientService ` )
338+ - ** MCP tools timeout** : Default timeout is 30s (configured in ` DrawDBClientService:16 ` )
316339- ** Docker nginx issues** : Nginx runs as non-root user ` nodejs:nodejs ` , requires proper permissions
317340- ** Build failures** : Run ` pnpm clean ` then ` pnpm install ` to reset
318341- ** Turborepo cache issues** : Delete ` .turbo ` directory to clear cache
342+ - ** Area/Note deletion** : Areas and notes use numeric array indices internally but are looked up by ` name ` /` title ` for MCP operations
343+ - ** Field IDs** : All entities (tables, fields, relationships) use ` nanoid() ` for ID generation
344+
345+ ## CI/CD and Deployment
346+
347+ ### GitHub Actions
348+
349+ ** Docker Image Publishing** (` .github/workflows/docker-publish.yml ` ):
350+
351+ - Triggers on version tags (` v* ` )
352+ - Builds multi-platform images (linux/amd64, linux/arm64)
353+ - Publishes to GitHub Container Registry (ghcr.io)
354+ - Creates tags: ` latest ` , ` vX.Y.Z ` , ` vX.Y ` , ` vX `
355+
356+ ** Release Process:**
357+
358+ 1 . Update version in ` apps/backend/package.json `
359+ 2 . Commit changes
360+ 3 . Create git tag: ` git tag -a v1.1.2 -m "Release message" `
361+ 4 . Push tag: ` git push origin v1.1.2 `
362+ 5 . GitHub Actions automatically builds and publishes Docker image
363+
364+ ### Version Management
365+
366+ - Backend version: ` apps/backend/package.json ` (currently 1.1.2)
367+ - GUI version: ` apps/gui/package.json ` (currently 1.0.0)
368+ - Root package: ` package.json ` (workspace root)
319369
320370## Git Workflow
321371
@@ -324,3 +374,4 @@ function MyComponent() {
324374 - ` 768d638 ` - Converted to Turborepo monorepo with MCP server
325375 - ` cef2d67 ` - Added GHCR support and CI/CD
326376 - ` db9950e ` - Restructured README to Docker-first approach
377+ - ` 62dee54 ` - Version 1.1.2 (current)
0 commit comments