Robo-Hub Architecture

This document describes the monorepo structure, deployment configuration, and how the 4 products are organized.


Products Overview

Product
Location
Domain
Status

FleetOS

Root / + /components/fleetos/

fleetos.us

LIVE

Robo-Dapp

/Robo-Dapp/

-

Dashboard (Next.js)

Products Page

/Robo-Dapp/app/(landing)/products/

products.t420.io

LIVE

Learn-App

/Learn-App/

learn.t420.io

LIVE (separate git repo)


Repository Structure

robo-hub/                      # Monorepo root
β”œβ”€β”€ App.tsx                    # Master router (FleetOS + Robo-Hub views)
β”œβ”€β”€ index.html                 # Vite entry point
β”œβ”€β”€ fleetos.html               # FleetOS standalone entry
β”œβ”€β”€ vite.config.ts             # Vite configuration
β”œβ”€β”€ vercel.json                # Root deployment config (FleetOS)
β”‚
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ fleetos/               # FleetOS UI components
β”‚   β”‚   β”œβ”€β”€ pages/             # FleetOS page components
β”‚   β”‚   β”œβ”€β”€ components/        # Reusable FleetOS components
β”‚   β”‚   β”œβ”€β”€ forms/             # Form components
β”‚   β”‚   β”œβ”€β”€ feedback/          # Feedback/notification components
β”‚   β”‚   └── theme.ts           # FleetOS theming
β”‚   β”œβ”€β”€ robo-hub/              # Robo-Hub UI components
β”‚   └── shared/                # Shared components
β”‚
β”œβ”€β”€ services/                  # Backend services (shared)
β”‚   β”œβ”€β”€ AuthService.ts         # Authentication
β”‚   β”œβ”€β”€ KPIService.ts          # KPI tracking
β”‚   β”œβ”€β”€ NotificationService.ts # Notifications
β”‚   β”œβ”€β”€ RelationshipService.ts # Fleet/Supplier relationships
β”‚   β”œβ”€β”€ fleetos/               # FleetOS-specific services
β”‚   └── shared/                # Shared service utilities
β”‚
β”œβ”€β”€ lib/                       # Shared utilities
β”œβ”€β”€ database/                  # SQL schemas
β”œβ”€β”€ types/                     # TypeScript type definitions
β”œβ”€β”€ types.ts                   # Core type definitions
β”‚
β”œβ”€β”€ Robo-Dapp/                 # Next.js dashboard + Products page
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ (landing)/
β”‚   β”‚   β”‚   └── products/      # Products marketing page
β”‚   β”‚   └── dashboard/         # Fleet management dashboard
β”‚   β”œβ”€β”€ vercel.json            # Products page domain rewrite
β”‚   └── ...
β”‚
└── Learn-App/                 # Education site (separate git history)
    └── ...

View Routing (App.tsx)

The root App.tsx (77K+ lines) serves as a master router handling multiple products via URL query parameters.

FleetOS Views (18 views)

Accessed via ?view=FLEETOS* or through fleetos.html:

View
Purpose

FLEETOS

Main landing page

FLEETOS_ALT

Alternative landing

FLEETOS_QUICK_ACCESS

Quick access portal

FLEETOS_LOGIN

Authentication

FLEETOS_AUTH_VERIFY

Auth verification

FLEETOS_SUPPLIER_ONBOARDING

Supplier onboarding flow

FLEETOS_FLEET_ONBOARDING

Fleet onboarding flow

FLEETOS_SUPPLIER_DASHBOARD

Supplier dashboard

FLEETOS_FLEET_DASHBOARD

Fleet dashboard

FLEETOS_SUPPLIER_ADD_MANUAL_REQUEST

Manual request entry

FLEETOS_FLEET_CREATE_REQUEST

Create service request

FLEETOS_INVITE_FLEET

Fleet invitation

FLEETOS_INVITE_SUPPLIER

Supplier invitation

FLEETOS_MOBILE_TIRES

Mobile tire service

FLEETOS_WHATSAPP_TEST

WhatsApp integration test

FLEETOS_PUBLIC_REQUEST

Public request form

FLEETOS_REQUEST_SUCCESS

Request confirmation

FLEETOS_REQUEST_TRACKING

Request tracking

FLEETOS_REQUEST_RESPONSE

Supplier response

FLEETOS_ANALYTICS

Analytics dashboard

Robo-Hub Views

Content and marketing views:

View
Purpose

LANDING

Main Robo-Hub landing

DASHBOARD

Role-based dashboard

SHEPHERD_LEARN

Shepherd learning content

SUPPLIER_LEARN

Supplier learning content

ZONE_DETAIL

Zone detail page

ZONE_DIRECTORY

Zone listing

CITY_OVERVIEW

City overview

SUPPLIER_PROFILE

Supplier profile page

SUPPLIER_DIRECTORY

Supplier listing

BLOG

Blog listing

BLOG_POST

Individual blog post

ZONE_COMPARISON

Zone comparison tool

SIMULATION

Simulation view

ABOUT

About page

LEGAL

Legal documents

WHITEPAPER

Whitepaper page

DEVELOPERS

Developer documentation

URL Pattern Examples


Vercel Deployment Configuration

Project Mapping

Vercel Project
Domain
App
Root Directory

fleet-os

fleetos.us

FleetOS (Vite)

`` (repo root)

fleetos

products.t420.io

Robo-Dapp (Next.js)

Robo-Dapp

v0-june-2-ui

learn.t420.io

Learn-App

(separate repo)

Root vercel.json (FleetOS)

Robo-Dapp/vercel.json (Products Page)

This rewrite works with the middleware below to ensure products.t420.io serves the Products page.

Robo-Dapp/middleware.ts (Products Domain Redirect)

The root page.tsx in Robo-Dapp redirects to /dashboard by default. To override this for products.t420.io, middleware intercepts requests and redirects to /products:

Why middleware? The vercel.json rewrite happens at the edge, but the Next.js page.tsx redirect (redirect("/dashboard")) executes after. Middleware runs before page components, allowing us to intercept and redirect based on hostname.


Vercel Project Settings

fleet-os Project (FleetOS)

Configure in Vercel Dashboard β†’ fleet-os β†’ Settings β†’ General:

  • Root Directory: `` (empty = repo root)

  • Build Command: npm run build

  • Output Directory: dist

  • Framework Preset: Vite

  • Install Command: npm install

Domain: fleetos.us

fleetos Project (Products Page / Dashboard)

Configure in Vercel Dashboard β†’ fleetos β†’ Settings β†’ General:

  • Root Directory: Robo-Dapp

  • Framework Preset: Next.js (auto-detected)

Domain: products.t420.io


Why FleetOS is Not Extracted

FleetOS remains embedded in the root App.tsx for several reasons:

  1. 18 views deeply integrated with shared state management

  2. 20+ services in /services/ used by both FleetOS and Robo-Hub

  3. fleetos.us is LIVE - extraction would risk breaking production

  4. Authentication, navigation, and user context are shared

Future Extraction (If Needed)

Would require:

  1. Create /FleetOS/ directory with own Vite config

  2. Extract 18 views from App.tsx

  3. Duplicate or abstract shared services

  4. Separate deployment pipeline

  5. Extensive testing before DNS switch

Recommendation: Only extract if there's a specific need. Current architecture works.


Critical Files

File
Purpose

vercel.json

Root Vite deployment config

Robo-Dapp/vercel.json

Products page domain rewrite

Robo-Dapp/middleware.ts

Products domain redirect (products.t420.io β†’ /products)

App.tsx

Master router (FleetOS + Robo-Hub views)

fleetos.html

FleetOS standalone entry point

vite.config.ts

Vite build configuration


Deployment Verification Checklist

After configuring Vercel:

Last updated

Was this helpful?