How fridec13/robocop-frontend works
Project type and purpose
• This is a full-stack, real-time Robot Monitoring System.
• Frontend: A Vue.js 3 (Vite) SPA that displays dashboards for camera streams, LiDAR point clouds, robot status, maps, and manual controls.
• Backend: A FastAPI service exposing REST endpoints for authentication, robot management and camera status, plus WebSocket endpoints for real-time camera/video streams, monitoring data, and sensor data.
• Database: A relational store (e.g. PostgreSQL) holding Users and Robots tables.
File structure
• Top-level:
• backend/ – Python FastAPI app
– main.py (FastAPI app entrypoint)
– auth.py, database.py, models.py (ORM + security)
– camera_test.py, create_admin.py (utilities)
– requirements.txt, run.bat
• frontend/ – Vue 3 SPA
– public/, index.html, vite.config.js, package.json
– src/
· App.vue, router/index.js (Vue Router)
· services/ (mapService.js, websocket.js)
· stores/ (Pinia/Vuex modules)
· views/ (DashboardView, LoginView, RobotControlView, etc.)
• The clear separation of “frontend” vs. “backend” immediately suggests a classic 3-tier architecture.
Insights from the README
• REST API endpoints for login (/token), robot listing (/api/robots), camera status.
• WebSocket endpoints at /ws/camera/{id}, /ws/monitoring/{id}, /ws/sensor/{id} with message formats.
• Database schema for users and robots.
• Communication patterns: HTTP for request/response, WebSockets for push updates.
• Security: JWT Bearer tokens in HTTP headers and WebSocket query params; CORS policies.
Diagramming recommendations
• Blue = Frontend
• Green = Backend
• Orange = Data
• Grey = External
• Authentication flow (JWT retrieval and header injection).