Skip to content

Frontend implementation

Toolora’s frontend is a React and TypeScript single-page application built with Vite. Pages and components provide presentation; reusable hooks coordinate queries and mutations. Browser-safe configuration initializes Supabase access and API addresses. The architecture distinguishes direct RLS-governed operations from privileged server operations.

SupabaseApp.tsx is the application entry. Routes connect staff and portal pages with shared providers and components. Navigation and controls reflect user context, but resource authorization remains independently enforced. The detailed route reference identifies entry conditions, redirects and direct-link behaviour for each surface.

Application routes and navigation gives the detailed contract, examples and evidence limits.

Reusable query hooks include the active company in their query keys. The query provider creates a new client when that company changes, dropping the previous cache. Queries still need appropriate database filters or API policy. A cache key describes client state and does not grant company access.

Company-scoped query state gives the detailed contract, examples and evidence limits.

A hook selects the data path required by the operation. Ordinary tenant CRUD commonly uses the Supabase client under RLS; privileged or transactional work goes through the API. Revision checks and idempotency belong to the specific mutation contract. Editing states must reflect conflicts and confirmed results rather than assuming every request saved successfully.

Browser mutations and owning transactions gives the detailed contract, examples and evidence limits.

Vite exposes browser configuration through VITE-prefixed values. Provider credentials, database passwords and service-role keys remain server-side. The frontend’s Supabase types are generated from the local database after schema changes. Schema migrations and regenerated types are committed together; the generated file is not edited by hand.

Frontend configuration and generated contracts gives the detailed contract, examples and evidence limits.