Skip to content

thinhhuynh/robotic-dashboard

Repository files navigation

Robotic Dashboard

A comprehensive robot fleet management system built with NestJS backend and Next.js frontend, featuring real-time WebSocket communication, MongoDB storage, and Docker deployment.

๐Ÿ“‹ Introduction

This project demonstrates a modern, scalable architecture for IoT device management, specifically designed for robotic fleets. It showcases real-time communication, data persistence, and containerized deployment patterns commonly used in enterprise applications.

๐ŸŽฏ Key Features

  • ๐Ÿค– Real-time Robot Fleet Management - Monitor and control multiple robots simultaneously
  • ๐Ÿ“Š Live Dashboard - Interactive dashboard with real-time updates and statistics
  • ๐Ÿ”Œ WebSocket Communication - Bidirectional communication for instant updates
  • ๐Ÿ“ฑ Responsive Web Interface - Modern React-based frontend with Next.js
  • ๐Ÿ—„๏ธ MongoDB Integration - Scalable document database for robot data
  • ๐Ÿณ Docker Containerization - Easy deployment and scaling
  • ๐Ÿ“– API Documentation - Comprehensive Swagger/OpenAPI documentation
  • ๐Ÿ” UUID-based Security - Non-predictable robot IDs for enhanced security

๐Ÿ—๏ธ Architecture Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Frontend      โ”‚    โ”‚     Backend      โ”‚    โ”‚   Database      โ”‚
โ”‚   (Next.js)     โ”‚โ—„โ”€โ”€โ–บโ”‚   (NestJS)       โ”‚โ—„โ”€โ”€โ–บโ”‚   (MongoDB)     โ”‚
โ”‚                 โ”‚    โ”‚                  โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข Dashboard     โ”‚    โ”‚ โ€ข REST API       โ”‚    โ”‚ โ€ข Robot Data    โ”‚
โ”‚ โ€ข Robot Control โ”‚    โ”‚ โ€ข WebSocket      โ”‚    โ”‚ โ€ข Historical    โ”‚
โ”‚ โ€ข Real-time UI  โ”‚    โ”‚ โ€ข Authentication โ”‚    โ”‚ โ€ข Logs          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Technology Stack

Backend (NestJS)

  • Framework: NestJS with TypeScript
  • Database: MongoDB with Mongoose ODM
  • WebSockets: Socket.IO for real-time communication
  • API Documentation: Swagger/OpenAPI
  • Validation: Class-validator and class-transformer
  • Testing: Jest for unit and integration tests

Frontend (Next.js)

  • Framework: Next.js 14 with React 18
  • Language: TypeScript for type safety
  • Styling: CSS Modules and styled-components
  • WebSocket Client: Socket.IO client
  • State Management: React hooks and context

Infrastructure

  • Database: MongoDB 8.0
  • Caching: Redis (optional for scaling)
  • Containerization: Docker and Docker Compose
  • Load Balancing: Nginx (optional)
  • Monitoring: Prometheus and Grafana (optional)

๐Ÿš€ How to Start Frontend and Backend

โšก Quick Start Script (Recommended)

# Make the script executable and run it
chmod +x quick-start.sh
./quick-start.sh

The script will guide you through:

  1. Development Mode - Local backend + frontend (requires MongoDB)
  2. Docker Mode - Everything in containers
  3. Hybrid Mode - Backend in Docker, frontend local

Option 1: Development Mode (Manual Setup)

๐Ÿ”ง Step 1: Start Backend

# Open terminal and navigate to backend
cd path-to-project/robotic-dashboard/src/backend

# Install dependencies
npm install

# Create environment file (if not exists)
cp .env.example .env

# Edit .env file and set your MongoDB URI
# MONGODB_URI=mongodb://localhost:27017/robot-dashboard

# Seed database with sample robots
npm run seed

# Start backend in development mode
npm run start:dev

โœ… Backend running at: http://localhost:8080

๐Ÿ–ฅ๏ธ Step 2: Start Frontend

# Open NEW terminal and navigate to frontend
cd /Users/thinhhd/working/WeenSpace/robotic-dashboard/src/frontend

# Install dependencies
npm install

# Install WebSocket client
npm install socket.io-client@^4.8.1

# Create frontend environment configuration
cp .env.example .env.local

# Start frontend in development mode
npm run dev

โœ… Frontend running at: http://localhost:3000

๐Ÿงช Step 3: Verify Everything Works

  1. Backend Health: http://localhost:8080/health
  2. API Documentation: http://localhost:8080/api/v1/docs
  3. WebSocket Test: http://localhost:8080/websocket/test
  4. Frontend Dashboard: http://localhost:3000/dashboard

Option 2: Docker Mode (One Command Setup)

# Navigate to project root
cd path-to-project/robotic-dashboard

# Start all services with Docker
docker compose up --build

# Or run in background
docker compose up -d --build

Services will be available at:


Option 3: Production Mode

Backend Production

cd src/backend

# Build for production
npm run build

# Start production server
npm run start:prod

Frontend Production

cd src/frontend

# Build for production
npm run build

# Start production server
npm run start

๐Ÿ”„ Complete Development Workflow

First Time Setup

# 1. Clone repository
git clone <repository-url>
cd robotic-dashboard

# 2. Backend setup
cd src/backend
npm install
cp .env.example .env
# Edit .env with your MongoDB URI
npm run seed
npm run start:dev

# 3. Frontend setup (in new terminal)
cd src/frontend
npm install
npm install socket.io-client@^4.8.1
cp .env.example .env.local
npm run dev

# 4. Open in browser
# Frontend: http://localhost:3000
# Backend API: http://localhost:8080/api/v1/docs

Daily Development

# Terminal 1: Backend
cd src/backend
npm run start:dev

# Terminal 2: Frontend
cd src/frontend
npm run dev

# Terminal 3: Database operations (optional)
cd src/backend
npm run seed          # Reseed database
npm run db:clean      # Clean database
npm run simulator     # Start robot simulator

๐Ÿ› Quick Troubleshooting

Port Conflicts

# Kill processes on ports
sudo lsof -ti:3000 | xargs kill -9  # Frontend
sudo lsof -ti:8080 | xargs kill -9  # Backend
sudo lsof -ti:27017 | xargs kill -9 # MongoDB

Clean Restart

# Stop all services
docker compose down -v

# Clean everything
rm -rf src/backend/node_modules src/frontend/node_modules
docker system prune -f

# Fresh install
cd src/backend && npm install
cd ../frontend && npm install

# Start development
cd src/backend && npm run start:dev &
cd src/frontend && npm run dev

Check Services Status

# Check backend
curl http://localhost:8080/health

# Check frontend
curl http://localhost:3000

# Check WebSocket
curl http://localhost:8080/websocket/test

๐Ÿณ Docker Deployment

Orchestrated Startup (Recommended)

# Use the orchestrated startup script for step-by-step service startup
chmod +x start-orchestrated.sh
./start-orchestrated.sh

Quick Docker Start

# Build and start all services
docker compose up --build

# Or run in background
docker compose up -d --build

Individual Service Control

# Start only backend services
docker compose up -d mongodb redis backend

# Start only frontend
docker compose up -d frontend

# View logs
docker compose logs -f backend
docker compose logs -f frontend

# Stop all services
docker compose down

Docker Services


๐Ÿ“‹ Available Commands

Backend Commands

cd src/backend

# Development
npm run start:dev          # Start with hot reload
npm run start:debug        # Start with debugging
npm run start:prod         # Start production build

# Database
npm run seed              # Seed with 200 robots
npm run seed:advanced     # Seed with 7 days history (5,600 records)
npm run db:clean          # Clean database
npm run db:reset          # Clean + seed

# Utilities
npm run simulator         # Start robot simulator
npm run build             # Build for production
npm run lint              # Lint code
npm run test              # Run tests

Frontend Commands

cd src/frontend

# Development
npm run dev               # Start development server
npm run build             # Build for production
npm run start             # Start production server
npm run lint              # Lint code

Docker Commands

# Development
docker compose up --build        # Build and start all
docker compose up -d            # Start in background
docker compose down             # Stop all services
docker compose logs -f          # Follow logs

# Production
docker compose -f docker-compose.prod.yml up -d

# Cleanup
docker compose down -v          # Remove volumes
docker system prune -f          # Clean unused images

๐ŸŒ Service URLs

Development

Service URL Description
Frontend http://localhost:3000 React dashboard
Backend API http://localhost:8080 NestJS REST API
API Docs http://localhost:8080/api/v1/docs Swagger documentation
WebSocket ws://localhost:8080/socket.io Socket.IO endpoint
Dashboard WebSocket ws://localhost:8080/dashboard Dashboard namespace
Health Check http://localhost:8080/health Service health
MongoDB mongodb://localhost:27017 Database

Docker

Service URL Description
Frontend http://localhost:3000 Dockerized frontend
Backend http://localhost:8080 Dockerized backend
MongoDB localhost:27017 Dockerized database
Redis localhost:6379 Dockerized cache

๐Ÿ”ง Configuration

Backend Environment (.env)

# Server
NODE_ENV=development
PORT=8080

# Database
MONGODB_URI=mongodb://localhost:27017/robot-dashboard

# CORS
CORS_ORIGIN=http://localhost:3000

# WebSocket
WEBSOCKET_PORT=8080

# Seeding
SEED_ON_START=true

Frontend Environment (.env.local)

# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:8080

# WebSocket Configuration
NEXT_PUBLIC_WS_URL=http://localhost:8080
NEXT_PUBLIC_WS_DASHBOARD_URL=http://localhost:8080/dashboard
NEXT_PUBLIC_WS_ROBOT_URL=http://localhost:8080

๐Ÿ“Š Project Features Status

โœ… Completed Features

Backend Implementation:

  • REST API with NestJS and TypeScript
  • MongoDB integration with Mongoose ODM
  • WebSocket real-time communication (Socket.IO)
  • JWT authentication and authorization
  • Health check endpoints
  • Database seeding with sample data
  • API documentation with Swagger
  • Docker containerization
  • Environment configuration management

Frontend Implementation:

  • Next.js 14 with React 18 and TypeScript
  • Responsive dashboard interface
  • Real-time robot status monitoring
  • Individual robot detail pages
  • WebSocket integration for live updates
  • Interactive data visualization
  • Mobile-friendly responsive design
  • Component-based architecture

Infrastructure:

  • Docker Compose multi-service setup
  • Service health checks and dependencies
  • MongoDB and Redis containers
  • Automated database seeding
  • Development and production environments

๏ฟฝ In Progress Features

Real-time Enhancements:

  • Advanced WebSocket event handling
  • Real-time dashboard metrics
  • Live robot telemetry streaming
  • Performance monitoring dashboards

User Interface Improvements:

  • Enhanced robot control interface
  • Advanced data filtering and search
  • Custom dashboard layouts
  • Notification system implementation

Backend Optimizations:

  • Rate limiting implementation
  • Advanced error handling
  • Logging system enhancement
  • Database query optimization

๐Ÿ“‹ To Do Features

Authentication & Security:

  • User role-based access control
  • Two-factor authentication (2FA)
  • Session management improvements
  • Security audit and penetration testing

Advanced Functionality:

  • Multi-robot fleet management
  • Task scheduling and automation
  • Historical data analytics
  • Predictive maintenance alerts
  • Data export (CSV, PDF, JSON)
  • Advanced reporting system

Mobile & Performance:

  • Progressive Web App (PWA) features
  • Mobile application development
  • Performance optimization
  • Caching strategies implementation
  • Code splitting and lazy loading

Testing & Quality:

  • Comprehensive unit test suite
  • Integration testing framework
  • End-to-end testing with Cypress
  • Load testing and performance benchmarks
  • Code coverage reporting

DevOps & Deployment:

  • CI/CD pipeline setup
  • Kubernetes deployment configuration
  • Monitoring with Prometheus and Grafana
  • Automated backup systems
  • Production logging and alerting

๐Ÿ“Š Features

โœ… Completed Features

Backend (NestJS)

  • โœ… REST API with NestJS - Complete CRUD operations for robots
  • โœ… MongoDB Integration - Mongoose ODM with robot data models
  • โœ… WebSocket Gateways - Real-time communication with Socket.IO
    • โœ… Robot Gateway (default namespace)
    • โœ… Dashboard Gateway (/dashboard namespace)
  • โœ… Health Check Endpoints - Service monitoring and status
  • โœ… Swagger API Documentation - Complete API documentation at /api/v1/docs
  • โœ… Database Seeding - Automatic population with sample data
    • โœ… Basic seeding (200 robots)
    • โœ… Advanced seeding (7 days historical data, 5,600 records)
  • โœ… Environment Configuration - Flexible configuration management
  • โœ… UUID-based Robot IDs - Secure, non-predictable identifiers
  • โœ… CORS Configuration - Frontend-backend communication
  • โœ… Docker Support - Containerized deployment
  • โœ… Service Dependencies - Robust startup with health checks

Frontend (Next.js)

  • โœ… Robot Fleet Dashboard - Main dashboard with fleet overview
  • โœ… Individual Robot Pages - Detailed robot information and control
  • โœ… Real-time WebSocket Integration - Live updates from backend
    • โœ… Robot-specific WebSocket connections
    • โœ… Dashboard-wide WebSocket updates
  • โœ… WebSocket Status Indicators - Connection status display
  • โœ… Responsive Design - Mobile-friendly interface
  • โœ… TypeScript Implementation - Type-safe development
  • โœ… Environment Configuration - Configurable API and WebSocket URLs
  • โœ… Error Handling - Graceful error states and fallbacks
  • โœ… Loading States - User feedback during data fetching

Infrastructure & DevOps

  • โœ… Docker Compose Setup - Multi-service orchestration
  • โœ… MongoDB Container - Persistent database storage
  • โœ… Redis Container - Caching and pub/sub support
  • โœ… Service Health Checks - Automatic service monitoring
  • โœ… Orchestrated Startup Scripts - Step-by-step service initialization
  • โœ… Development Scripts - Quick setup and testing utilities
  • โœ… WebSocket Testing Tools - Automated connection testing
  • โœ… Environment Management - Development/production configurations

๐Ÿ”„ In Progress Features

Backend Enhancements

  • ๐Ÿ”„ Authentication & Authorization - JWT-based user authentication
  • ๐Ÿ”„ Rate Limiting - API request throttling
  • ๐Ÿ”„ Logging System - Structured logging with Winston
  • ๐Ÿ”„ Performance Monitoring - Response time and error tracking

Frontend Improvements

  • ๐Ÿ”„ Robot Control Interface - Direct robot command sending
  • ๐Ÿ”„ Historical Data Visualization - Charts and graphs for robot metrics
  • ๐Ÿ”„ Real-time Notifications - Toast notifications for events
  • ๐Ÿ”„ Advanced Filtering - Filter robots by status, location, etc.

Infrastructure

  • ๐Ÿ”„ Production Docker Setup - Optimized production configurations
  • ๐Ÿ”„ Load Balancing - Nginx configuration for scaling

๐Ÿ“‹ Planned Features (To Do)

Backend Features

  • ๐Ÿ“‹ User Management System - Multi-user support with roles
  • ๐Ÿ“‹ Robot Command Queue - Queued command execution
  • ๐Ÿ“‹ Data Analytics API - Statistical analysis endpoints
  • ๐Ÿ“‹ File Upload System - Robot firmware and configuration uploads
  • ๐Ÿ“‹ Backup & Recovery - Automated database backups
  • ๐Ÿ“‹ API Versioning - Multiple API versions support
  • ๐Ÿ“‹ Webhook System - External system integrations
  • ๐Ÿ“‹ Robot Simulation API - Virtual robot testing
  • ๐Ÿ“‹ Geolocation Tracking - GPS-based robot positioning
  • ๐Ÿ“‹ Alert System - Automated notifications for critical events

Frontend Features

  • ๐Ÿ“‹ User Authentication UI - Login/logout interface
  • ๐Ÿ“‹ Dashboard Customization - User-configurable dashboard layouts
  • ๐Ÿ“‹ Robot Map View - Geographical robot positioning
  • ๐Ÿ“‹ Advanced Charts - Interactive data visualizations
  • ๐Ÿ“‹ Dark/Light Theme - User preference themes
  • ๐Ÿ“‹ Mobile App - React Native mobile application
  • ๐Ÿ“‹ Offline Support - PWA with offline capabilities
  • ๐Ÿ“‹ Export Functionality - Data export to CSV/PDF
  • ๐Ÿ“‹ Real-time Chat - Communication between operators
  • ๐Ÿ“‹ Robot Scheduling - Task scheduling interface

Advanced Features

  • ๐Ÿ“‹ Machine Learning Integration - Predictive maintenance
  • ๐Ÿ“‹ Video Streaming - Live camera feeds from robots
  • ๐Ÿ“‹ Voice Commands - Voice control interface
  • ๐Ÿ“‹ AR/VR Interface - Immersive robot control
  • ๐Ÿ“‹ Multi-Language Support - Internationalization (i18n)
  • ๐Ÿ“‹ Plugin System - Extensible architecture
  • ๐Ÿ“‹ Edge Computing - Distributed processing capabilities

Infrastructure & DevOps

  • ๐Ÿ“‹ Kubernetes Deployment - Container orchestration
  • ๐Ÿ“‹ CI/CD Pipeline - Automated testing and deployment
  • ๐Ÿ“‹ Monitoring & Alerting - Prometheus + Grafana setup
  • ๐Ÿ“‹ Security Scanning - Automated vulnerability assessment
  • ๐Ÿ“‹ Performance Testing - Load testing and optimization
  • ๐Ÿ“‹ Multi-Environment Support - Dev/Staging/Production pipelines
  • ๐Ÿ“‹ Auto-scaling - Dynamic resource allocation
  • ๐Ÿ“‹ SSL/TLS Configuration - Secure communications
  • ๐Ÿ“‹ Database Clustering - High availability MongoDB setup
  • ๐Ÿ“‹ CDN Integration - Global content delivery

๐ŸŽฏ Current Development Focus

  1. ๐Ÿ”„ Priority 1: Authentication System

    • JWT implementation
    • User roles and permissions
    • Protected routes
  2. ๐Ÿ”„ Priority 2: Real-time Robot Control

    • Command interface
    • Live robot status updates
    • Command feedback system
  3. ๐Ÿ”„ Priority 3: Data Visualization

    • Historical charts
    • Performance metrics
    • Fleet analytics

๐Ÿ“ˆ Feature Progress Overview

Category Completed In Progress Planned Total
Backend 8 4 10 22
Frontend 8 4 10 22
Infrastructure 8 2 10 20
Total 24 10 30 64

Overall Progress: 37.5% Complete ๐Ÿš€


Dashboard Features

  • ๐Ÿ“ฑ Real-time Robot Fleet Overview
  • ๐Ÿ“Š Live Statistics (Online, Offline, Maintenance, Charging)
  • ๐Ÿค– Individual Robot Details
  • ๐Ÿ“ˆ Historical Data Visualization
  • ๐ŸŽฎ Remote Robot Control
  • ๐Ÿ”” Real-time Notifications
  • ๐Ÿ”Œ WebSocket Status Indicators

Technical Features

  • โšก WebSocket Real-time Communication
  • ๐Ÿ—„๏ธ MongoDB with Mongoose ODM
  • ๐Ÿณ Docker Containerization with Service Dependencies
  • ๐Ÿ“– Swagger API Documentation
  • ๐Ÿ” UUID-based Robot IDs
  • ๐Ÿงช Health Check Endpoints
  • ๐Ÿ“Š Database Seeding Tools
  • ๐Ÿ”„ Automatic Database Seeding on First Startup

๐Ÿงช Testing

Backend Testing

cd src/backend

# Unit tests
npm run test

# E2E tests
npm run test:e2e

# Test coverage
npm run test:cov

# Test WebSocket
node test-websocket.js

# Test Dashboard WebSocket
node test-dashboard-websocket.js

API Testing

# Health check
curl http://localhost:8080/health

# Get robots
curl http://localhost:8080/robots

# Get specific robot
curl http://localhost:8080/robots/{robot-id}

# Create robot
curl -X POST http://localhost:8080/robots \
  -H "Content-Type: application/json" \
  -d '{"status":"online","battery":85}'

WebSocket Testing

# Test robot WebSocket
chmod +x test-websocket.js
node test-websocket.js

# Test dashboard WebSocket
chmod +x test-dashboard-websocket.js
node test-dashboard-websocket.js

# Test Docker build
chmod +x test-docker-fix.sh
./test-docker-fix.sh

๐Ÿ› Troubleshooting

Common Issues

MongoDB Connection Error

# Check MongoDB is running
mongosh --eval "db.adminCommand('ismaster')"

# Start MongoDB
mongod --config /usr/local/etc/mongod.conf

# Check Docker MongoDB
docker compose logs mongodb

Port Already in Use

# Kill process using port 8080
lsof -ti:8080 | xargs kill -9

# Kill process using port 3000
lsof -ti:3000 | xargs kill -9

WebSocket Connection Failed

# Test WebSocket endpoint
curl http://localhost:8080/websocket/test

# Check backend logs
docker compose logs -f backend

# Test WebSocket connections
node test-websocket.js
node test-dashboard-websocket.js

Docker Build Issues

# Clean Docker cache
docker system prune -a -f

# Rebuild without cache
docker compose build --no-cache

# Check container logs
docker compose logs backend
docker compose logs frontend

# Test specific fix
./test-docker-fix.sh

Reset Everything

# Stop all services
docker compose down -v

# Clean Docker
docker system prune -a -f

# Remove node_modules
rm -rf src/backend/node_modules src/frontend/node_modules

# Fresh install
cd src/backend && npm install
cd ../frontend && npm install

# Start fresh
docker compose up --build

Service Dependencies Issues

# Use orchestrated startup
./start-orchestrated.sh

# Check service health
docker compose ps

# Wait for specific services
./wait-for-services.sh mongodb:mongodb:27017 redis:redis:6379

๐Ÿ“ Project Structure

robotic-dashboard/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ backend/          # NestJS API server and Websocket server
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ app.module.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ main.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ infrastructure/
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ socket/
โ”‚   โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ gateways/
โ”‚   โ”‚   โ”‚   โ”‚           โ”œโ”€โ”€ robot.gateway.ts
โ”‚   โ”‚   โ”‚   โ”‚           โ””โ”€โ”€ dashboard.gateway.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ config/
โ”‚   โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ”‚   โ””โ”€โ”€ docker-entrypoint-simple.sh
โ”‚   โ””โ”€โ”€ frontend/         # Next.js dashboard
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ”œโ”€โ”€ app/
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ robot/
โ”‚       โ”‚   โ”œโ”€โ”€ config/
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ api.config.ts
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ websocket.config.ts
โ”‚       โ”‚   โ””โ”€โ”€ hooks/
โ”‚       โ”‚       โ””โ”€โ”€ useRobotWebSocket.ts
โ”‚       โ”œโ”€โ”€ package.json
โ”‚       โ””โ”€โ”€ Dockerfile
โ”œโ”€โ”€ docker-compose.yml    # Docker services with dependencies
โ”œโ”€โ”€ start-orchestrated.sh # Orchestrated startup script
โ”œโ”€โ”€ wait-for-services.sh  # Service dependency helper
โ”œโ”€โ”€ quick-start.sh        # Quick setup script
โ”œโ”€โ”€ test-websocket.js     # Robot WebSocket test
โ”œโ”€โ”€ test-dashboard-websocket.js # Dashboard WebSocket test
โ”œโ”€โ”€ test-docker-fix.sh    # Docker build test
โ””โ”€โ”€ README.md

๐Ÿš€ Deployment

Production Docker

# Build images
docker compose -f  build

# Start stack
docker compose -f up -d

# Monitor
docker compose -f logs -f

Environment Variables

Update production environment variables in:

  • src/backend/.env.production
  • src/frontend/.env.production

Production Considerations

  • Set SEED_ON_START=false in production
  • Configure proper MongoDB authentication
  • Use environment-specific WebSocket URLs
  • Enable Redis for scaling
  • Configure Nginx for load balancing

๐Ÿ“š API Documentation

Once the backend is running, visit: http://localhost:8080/api/v1/docs

WebSocket Namespaces

  • Robot Gateway: ws://localhost:8080 (default namespace)
  • Dashboard Gateway: ws://localhost:8080/dashboard

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly with provided test scripts
  5. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published