ordinarthur 3b993894e4 fix: deployment issues from Pi testing
- WiFi: use iwgetid -r (privilege-free) before nmcli fallback
- systemd: move StartLimit directives to [Unit] section
- pi-gen: add netdev group for NetworkManager permissions
- Setup page: add enter pairing code shortcut link

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 23:57:25 +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