Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C-ROB Telemetry Center 🤖⚡

A full-stack, real-time telemetry monitoring dashboard designed for robotics applications. Built using React, Supabase, and a custom Node.js physics-based simulation engine.

React Supabase Node.js Vite


📌 Project Overview

The C-ROB Telemetry Center simulates an Internet of Things (IoT) telemetry system. It models real-time health data from a robot, streams it through a Supabase PostgreSQL backend, and renders live analytics and line graphs on a web dashboard.

Key Features

  • 🔋 Dynamic Battery Decay Algorithm: Drains battery non-linearly based on motor speed and acceleration.
  • Physics-based Analytics: Dynamically calculates motor RPM, thermal output, and power efficiency scores.
  • 📊 Live Timeline Visualization: Dual-line charts rendered using Recharts tracking battery and velocity over time.
  • 🛠 JSON Payload Inspector: Live-rendered state machine output for advanced system diagnostics.
  • 🔐 Secure Environment Configuration: Zero hardcoded API keys; managed via environment variables.

🛠 System Architecture

┌─────────────────────────┐          ┌──────────────────────────┐          ┌─────────────────────────┐
│  Physics Simulator      │  INSERT  │  Supabase Cloud DB       │  SELECT  │  React Dashboard UI     │
│  (simulator.mjs)        ├─────────►│  (robot_telemetry table) ├─────────►│  (Vite + Recharts)      │
└─────────────────────────┘          └──────────────────────────┘          └─────────────────────────┘

🚀 Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm
  • A free Supabase account

1. Database Setup

Execute the following query in your Supabase SQL Editor:

CREATE TABLE robot_telemetry (
  id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
  created_at TIMESTAMPTZ DEFAULT NOW(),
  battery FLOAT8,
  speed FLOAT8,
  temperature FLOAT8,
  rpm INT4,
  analytics_json JSONB
);

ALTER TABLE robot_telemetry DISABLE ROW LEVEL SECURITY;

2. Environment Variables

Create a .env file inside the dashboard/ directory:

# dashboard/.env

VITE_SUPABASE_URL=https://your-supabase-url.supabase.co
VITE_SUPABASE_ANON_KEY=your_publishable_anon_key

SUPABASE_URL=https://your-supabase-url.supabase.co
SUPABASE_ANON_KEY=your_publishable_anon_key

3. Installation & Local Execution

Step A: Run the Telemetry Simulator

From the root directory, install dependencies and start the physics generator:

# Install root dependencies
npm install @supabase/supabase-js

# Start the simulation loop
node --env-file=dashboard/.env simulator.mjs

Step B: Launch the React Dashboard

In a new terminal window, navigate to the dashboard folder and launch Vite:

cd dashboard

# Install frontend dependencies
npm install

# Start the development server
npm run dev

Navigate to http://localhost:5173/ in your browser to view the live dashboard.


📂 Project Structure

stm32-crob/
├── simulator.mjs          # Node.js telemetry & physics algorithm script
├── package.json           # Root configuration
├── .gitignore             # Protects node_modules and .env files
└── dashboard/             # Vite + React Frontend Application
    ├── .env               # Environment configuration (ignored by git)
    ├── src/
    │   ├── App.jsx        # Telemetry UI & Supabase real-time fetcher
    │   └── main.jsx       # React entrypoint
    ├── index.html
    └── package.json

👤 Author

Anton Loyed

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages