ordinarthur 6760759cb6 feat: add WiFi setup wizard and device detail dashboard (Phase 4)
- SetupRobotPage: 4-step wizard (AP connect → WiFi scan → connect → pairing code)
- DeviceDetailPage: health metrics dashboard + log viewer with filters
- Robot local API client for captive portal communication (192.168.4.1)
- API endpoints for health reports, alerts, and device logs
- Dashboard: clickable device cards linking to detail, "Nouveau robot" button

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 21:23:02 +02:00
..
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00
2026-04-08 19:59:47 +02:00

@ti-pote/frontend

Desktop companion app for Ti-Pote. Vite + React + TypeScript + Tailwind, wrappable as a native desktop app with Tauri v2.

Features

  • Auth: register / login / auto refresh-token rotation
  • Session persistence (Tauri Store plugin on desktop, localStorage in browser)
  • Dashboard: list of associated robots (GET /api/devices)
  • Robot pairing: 6-digit code screen wired to POST /api/pairing/confirm

Quick start (web dev)

cd apps/frontend
cp .env.example .env    # point VITE_API_URL to your backend
pnpm install
pnpm dev                # http://localhost:1420

Desktop build (Tauri v2)

Prerequisites: Rust toolchain (rustup) and the Tauri prerequisites for your OS.

# First time only: generate the bundle icons from any source PNG
pnpm tauri icon path/to/logo.png

# Dev (hot reload + native window)
pnpm tauri dev

# Production bundle (.dmg / .app on macOS, .msi on Windows, .deb/.AppImage on Linux)
pnpm tauri build

Project layout

apps/frontend/
├── src/
│   ├── components/        Button / Input / Card / ProtectedRoute
│   ├── context/           AuthContext (React)
│   ├── lib/
│   │   ├── api.ts         fetch wrapper + typed endpoints + auto-refresh
│   │   └── storage.ts     Tauri Store ↔ localStorage fallback
│   ├── pages/             Login / Register / Dashboard / PairRobot
│   ├── styles/            Tailwind entry
│   ├── App.tsx            Router
│   └── main.tsx           Entry point
└── src-tauri/             Tauri v2 Rust wrapper
    ├── Cargo.toml
    ├── tauri.conf.json
    ├── capabilities/
    └── src/{main.rs,lib.rs}

Backend API used

Flow Endpoint Notes
Register POST /api/auth/register Creates user + home
Login POST /api/auth/login
Refresh POST /api/auth/refresh Called transparently on 401
Me GET /api/auth/me
Devices GET /api/devices Dashboard
Pair POST /api/pairing/confirm { code } — 6-digit from robot UI