Quick Start Guide - T420 Robo-Hub

Get up and running with the T420 ecosystem in minutes.


Prerequisites

  • Node.js: v18+ (v20 recommended)

  • npm: v9+

  • Supabase Account: For database access

  • Git: For version control


Installation

1. Clone & Install

cd C:\Projects\robo-hub
npm install

2. Environment Setup

Create .env file in project root:

# Supabase Configuration
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
VITE_SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Product Configuration
VITE_PRODUCT=robo-hub  # or 'fleetos' or 'robo-dapp'

3. Database Setup (Optional)

If starting fresh, apply RLS policies:


Running the Apps

FleetOS (Standalone)

FleetOS Features:

  • Zero-signup request/response flow

  • Supplier onboarding

  • Fleet coordination

  • Magic link authentication

Robo-Hub (Main App)

Robo-Hub Features:

  • Shepherd dashboard

  • RFQ management

  • Contract negotiations

  • Zone assignments

Robo-Dapp (Separate Next.js App)

Robo-Dapp Features:

  • Wallet authentication

  • DAO governance

  • On-chain operations


Project Structure


Using Shared Components

Card Component

EmptyState Component

FilterBar Component


Using Shared Services

QueryService (Replaces Direct Supabase Calls)

Old way:

New way:

useLocalStorage Hook

Old way:

New way:


Development Workflow

1. Start Development Server

2. Make Changes

Edit files in components/, services/, or lib/

3. Type Check

4. Build

5. Preview Build


Common Tasks

Adding a New View

  1. Add view to types/shared/common.ts:

  2. Create component in appropriate folder:

  3. Add routing in App.tsx:

Creating a New Service

  1. Define contract in services/contracts/:

  2. Implement service:

Adding Database Queries

Add to QueryService:


Testing

Manual Testing

  1. FleetOS: Visit /fleetos-demo.html

  2. Robo-Hub: Visit /

  3. Components: Create test pages like demo-*.html

Type Checking

Build Testing


Authentication Flow

  1. User receives WhatsApp/email with magic link

  2. Click link β†’ lands on /respond?requestId=xxx

  3. View request details

  4. Respond (prompts for name + email if first time)

  5. Done - no signup required

Robo-Hub (Email + Password)

  1. User signs up with email

  2. Verify email

  3. Choose role (Shepherd/Supplier)

  4. Access dashboard

Robo-Dapp (Wallet)

  1. Connect wallet (MetaMask, WalletConnect)

  2. Sign message to verify ownership

  3. Link to email account (optional)

  4. Access DAO features


Troubleshooting

Port Already in Use

Supabase Connection Issues

  1. Check .env file has correct credentials

  2. Verify Supabase project is running

  3. Check RLS policies don't block your queries:

Type Errors

Module Not Found

If you see "Cannot find module '@/components/shared/Card'":

  1. Check the file exists

  2. Verify import path uses @/ alias

  3. Restart dev server (Ctrl+C then npm run dev)


Next Steps

  1. Read Architecture: T420_ECOSYSTEM_MASTER_ARCHITECTURE.md

  2. Review Work Log: docs/WORK_LOG.md

  3. Explore Components: components/shared/README.md

  4. Study Services: services/shared/README.md

  5. Check Contracts: services/contracts/


Getting Help

  • Documentation: Check docs/ folder

  • Work Log: See docs/WORK_LOG.md for recent changes

  • Archive: Historical docs in docs/archive/2026-01/

  • Code Examples: Look in components/fleetos-clean/ for clean implementations


Last Updated: 2026-01-05 Version: 1.0 Status: Active Development

Last updated

Was this helpful?