The frontend uses React, TanStack Router, TanStack Query, Zustand, shadcn/ui, and Rsbuild.

Route tree

Routes live in pinter-fe/src/routes. The app sidebar is the main navigation interface:
It exposes:
  • New chat.
  • Claim code redemption.
  • My usage.
  • Workspace items filtered by role level.
  • Conversation history.
  • User menu.

Data access seam

Frontend API access goes through one seam:
Use these exported functions instead of calling fetch directly: This module handles token refresh, 401 retry, logout on terminal auth failure, JSON errors, uploads, and streaming.

State modules

Role-aware UI

Workspace navigation uses role_level: Route guards live in:
The frontend guard hides routes and redirects users. Backend route permissions remain the source of truth for security.