This MVP release provides a complete full-stack solution for managing action mappings in Geutebruck's GeViScope and GeViSoft video surveillance systems. ## Features ### Flutter Web Application (Port 8081) - Modern, responsive UI for managing action mappings - Action picker dialog with full parameter configuration - Support for both GSC (GeViScope) and G-Core server actions - Consistent UI for input and output actions with edit/delete capabilities - Real-time action mapping creation, editing, and deletion - Server categorization (GSC: prefix for GeViScope, G-Core: prefix for G-Core servers) ### FastAPI REST Backend (Port 8000) - RESTful API for action mapping CRUD operations - Action template service with comprehensive action catalog (247 actions) - Server management (G-Core and GeViScope servers) - Configuration tree reading and writing - JWT authentication with role-based access control - PostgreSQL database integration ### C# SDK Bridge (gRPC, Port 50051) - Native integration with GeViSoft SDK (GeViProcAPINET_4_0.dll) - Action mapping creation with correct binary format - Support for GSC and G-Core action types - Proper Camera parameter inclusion in action strings (fixes CrossSwitch bug) - Action ID lookup table with server-specific action IDs - Configuration reading/writing via SetupClient ## Bug Fixes - **CrossSwitch Bug**: GSC and G-Core actions now correctly display camera/PTZ head parameters in GeViSet - Action strings now include Camera parameter: `@ PanLeft (Comment: "", Camera: 101028)` - Proper filter flags and VideoInput=0 for action mappings - Correct action ID assignment (4198 for GSC, 9294 for G-Core PanLeft) ## Technical Stack - **Frontend**: Flutter Web, Dart, Dio HTTP client - **Backend**: Python FastAPI, PostgreSQL, Redis - **SDK Bridge**: C# .NET 8.0, gRPC, GeViSoft SDK - **Authentication**: JWT tokens - **Configuration**: GeViSoft .set files (binary format) ## Credentials - GeViSoft/GeViScope: username=sysadmin, password=masterkey - Default admin: username=admin, password=admin123 ## Deployment All services run on localhost: - Flutter Web: http://localhost:8081 - FastAPI: http://localhost:8000 - SDK Bridge gRPC: localhost:50051 - GeViServer: localhost (default port) Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Geutebruck API Architecture Documentation
This directory contains comprehensive architecture diagrams and documentation for the Geutebruck API system.
📊 Available Diagrams
PlantUML Diagrams
-
architecture-overview.puml - Complete system architecture
- Shows all layers (Client, Python API, SDK Bridge, GeViServer)
- Component relationships and communication
- Port assignments and protocols
- Implemented features with status
-
architecture-sequence.puml - Configuration management flow
- Detailed sequence diagram for creating a G-Core server
- Shows data flow through all layers
- Highlights critical implementation details
- Binary .set file parsing and writing flow
-
architecture-deployment.puml - Deployment view
- Windows server deployment structure
- Process relationships (PIDs, ports)
- Service management scripts
- Startup order and dependencies
-
architecture-components.puml - Component interactions
- Detailed component diagram
- Internal structure of each layer
- Data models and schemas
- gRPC protocol definitions
- Critical bug fixes documentation
Text Diagram
- architecture-text.md - ASCII art architecture diagram
- Complete system overview in text format
- Service management details
- Implemented features checklist
🔧 How to View PlantUML Diagrams
Option 1: VS Code (Recommended)
-
Install the PlantUML extension:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "PlantUML"
- Install "PlantUML" by jebbs
-
View diagrams:
- Open any
.pumlfile - Press
Alt+Dto preview - Or right-click → "Preview Current Diagram"
- Open any
Option 2: Online Viewer
- Visit PlantUML Online Server
- Copy the content from any
.pumlfile - Paste into the editor
- View the rendered diagram
Option 3: Export to Image
Using VS Code PlantUML extension:
- Right-click on
.pumlfile - Select "Export Current Diagram"
- Choose format: PNG, SVG, PDF
- Images will be saved in
out/directory
Option 4: Command Line (Java required)
# Install PlantUML
# Download plantuml.jar from https://plantuml.com/download
# Generate PNG
java -jar plantuml.jar architecture-overview.puml
# Generate SVG
java -jar plantuml.jar -tsvg architecture-overview.puml
# Generate all diagrams
java -jar plantuml.jar *.puml
📋 Diagram Contents
architecture-overview.puml
Visualizes:
- Client Layer: Web browsers, GeViSet, mobile apps, testing tools
- Python API Layer: REST endpoints, services, gRPC client
- C# SDK Bridge: gRPC services, SDK wrappers, configuration handlers
- GeViServer: Camera/monitor management, action engine, binary config storage
- Hardware Layer: IP cameras, monitors, I/O devices
Key Notes:
- Configuration management implementation status ✅
- Data flow for .set file operations
- Current system state (13 servers, 64 mappings)
architecture-sequence.puml
Step-by-step flow for creating a G-Core server:
- Client sends REST request
- FastAPI validates and forwards to SDK Bridge
- SDK Bridge downloads current configuration
- Parses binary .set file with FolderTreeParser
- Auto-increments server ID
- Creates new server node
- Writes modified tree with FolderTreeWriter
- Uploads to GeViServer
- GeViServer saves and reloads configuration
- Success response returned to client
Critical details documented:
- Bool type handling (type code 1 vs 4)
- Field ordering requirements
- SetupClient port exclusivity
architecture-deployment.puml
Shows actual deployment on Windows Server:
-
GeViServer Process (PID: 45612)
- Binary: GeViServer.exe console
- Location: C:\GEVISOFT
- Ports: 7700-7703
-
SDK Bridge Process (PID: 48052)
- Binary: GeViScopeBridge.exe (.NET 8.0)
- Port: 50051 (gRPC)
-
Python API Process (PID: 46212)
- Runtime: uvicorn + FastAPI
- Port: 8000 (HTTP)
-
PowerShell Scripts: Service lifecycle management
architecture-components.puml
Detailed component breakdown:
-
Python API Components:
- Routers (auth, configuration ✅, cameras, monitors, crossswitch)
- Services layer
- gRPC client with proto definitions
- Pydantic schemas
-
C# SDK Bridge Components:
- gRPC service implementations
- SDK wrappers (Database, SetupClient ✅, StateQuery)
- Configuration handlers (Parser ✅, Writer ✅)
-
Data Flow:
- REST → Service → gRPC Client → gRPC Server → SDK → GeViServer
- Configuration download/parse/modify/serialize/upload cycle
🎯 Implementation Status
✅ Completed Features
-
Configuration Management (User Story 12)
- G-Core Server CRUD (CREATE, READ, DELETE working)
- Action Mapping CRUD (all operations working)
- SetupClient integration
- FolderTreeParser/Writer for binary .set files
- Cascade deletion prevention (delete in reverse order)
- Bool type handling for GeViSet compatibility
-
Service Infrastructure
- GeViServer startup with "console" argument
- SDK Bridge gRPC service
- Python FastAPI REST API
- Automated service management scripts
- Port monitoring and health checks
⚠️ Known Issues
-
Server UPDATE Method
- Error: "Server ID is required"
- Workaround: Delete and recreate
- Status: Documented, fix pending
-
SetupClient Port Conflict
- GeViSet and SDK Bridge cannot both connect
- Workaround: Stop SDK Bridge when using GeViSet
- Status: Design limitation
📚 Additional Documentation
- SERVER_CRUD_IMPLEMENTATION.md - Implementation guide
- CRITICAL_BUG_FIX_DELETE.md - Cascade deletion bug analysis
- specs/001-surveillance-api/ - Complete specifications
🔄 Updates
- 2025-12-16: Added PlantUML diagrams for architecture visualization
- 2025-12-16: Documented configuration management implementation
- 2025-12-16: Fixed Python import errors in proto files
🤝 Contributing
When updating diagrams:
- Edit the
.pumlsource files - Regenerate images if needed
- Update this README if adding new diagrams
- Commit both source and generated images