How rs-talentos-ufsm/sulflux.frontend works
This is Sulflux’s React frontend for an agricultural property-management workflow: users authenticate, find or enter a property, manage fields, and configure seasonal crop phases. The app also exposes document, profile/settings, and user-facing health routes. The sampled hooks show API-backed authentication and property/field operations with React Query caching and Zustand auth state; documents appear to use local mock data in the excerpt. Other pages and API wiring are represented only where the tree or README supports them, so uncertain relationships are omitted.
Main entry points: App.tsx Route App · api.ts API Client · useProperty.ts Property Operations · useAuth.ts Auth Operations
Components 21
App Shell
- Route App
src/App.tsx - App Layout
src/components/layout/app-layout/AppLayout.tsx - API Client
src/api/api.ts - Query Cache
src/main.tsx - Health Page
src/pages/health/Health.tsx
Identity
- Auth Screen
src/pages/auth/Auth.tsx - Auth Operations
src/hooks/useAuth.ts - Auth State
src/store/authStore.ts - User Operations
src/hooks/useUsers.ts
Farm Management
- Property List
src/pages/properties/Properties.tsx - CAR Search
src/pages/properties/search-sicar/SearchSicar.tsx - Property Entry
src/pages/properties/new-property/NewProperty.tsx - Property Detail
src/pages/properties/property/Property.tsx - Property Operations
src/hooks/useProperty.ts - Field Creation
src/pages/field/NewField.tsx - Field Operations
src/hooks/useField.ts - Season Planner
src/pages/season/Season.tsx
Other components
- User
- Backend API
Connections 30
- User → Route App: opens app
- Route App → Auth Operations: checks session
- Auth Operations → API Client: requests
- API Client → Backend API: calls
- Auth Operations → Auth State: updates auth
- Auth Operations → Query Cache: invalidates cache
- Route App → Auth Screen: routes unauthenticated
- Route App → App Layout: renders protected
- User → Auth Screen: signs in
- Route App → Property List: routes
- Property List → Property Operations: loads properties
- Property Operations → API Client: requests
- User → CAR Search: enters CAR
- CAR Search → Property Entry: navigates with CAR
- User → Property Entry: enters details
- Property Entry → Property Operations: creates property
- Property List → Property Detail: opens property
- Property Detail → Property Operations: loads property
- Property Detail → Field Creation: starts field entry
- Field Creation → Field Operations: creates field
- Field Operations → API Client: requests
- Field Creation → Season Planner: opens season planner
- Season Planner → Property Operations: loads property
- Season Planner → Field Operations: loads field
- Route App → Documents: routes
- User → Documents: browses files
- Route App → Settings: routes
- Settings → User Operations: updates profile
- User Operations → API Client: requests
- Route App → Health Page: routes