Skip to main content

Frontend Overview

The IPFOS web app lives in the ipfos-web/ repository. It is a TanStack Start application — a full-stack React meta-framework — that renders the internal operations portal: ticketing, users & departments, projects, meals, and notifications.

Tech stack

ConcernTechnology
FrameworkTanStack Start (React 19, React Compiler enabled)
Build / serverVite 7, Nitro server runtime (production runs node .output/server/index.mjs)
RoutingTanStack Router, file-based (src/routes/, generated tree in src/routeTree.gen.ts)
Server stateTanStack Query 5 (with SSR integration)
TablesTanStack Table 8
FormsReact Hook Form + Zod 4
StylingTailwind CSS v4 (CSS-first config, global styles in src/styles.css)
UI primitivesBase UI, cmdk, react-day-picker, react-dropzone, motion
Rich textTipTap 3 with DOMPurify sanitization
IconsSolar icons (preferred, import from @solar-icons/react/ssr), Lucide as fallback
HTTPaxios wrapped by r3-utils/http-client
Lint / formatoxlint + oxfmt (not ESLint/Prettier), enforced by Husky + lint-staged
TestsVitest + jsdom
Package managerpnpm — do not use npm or yarn

Folder structure

The import alias is @/*src/*.

DirectoryPurpose
src/components/Global reusable UI components (avatar, button, combobox, modal, table, tiptap-editor, form-controls, …)
src/routes/File-based routes — this is also the map of the app's feature areas
src/hooks/Global custom hooks (use-debounce, use-search-params-state, use-route-dialog, …)
src/libs/Cross-cutting libraries: auth/, access-control/, http-client/. Each sub-folder exports through an index.ts
src/providers/React context providers (app-provider, confirmation modals, dialogs)
src/layout/Layout shells
src/utils/Utilities (cn, date/error/string utils, reusable Zod schemas in zod-common/)
src/constants/Static constants

Inside a feature route folder, the team uses --prefixed folders (excluded from routing):

  • -api/ or -resources/ — query options, Zod schemas, types
  • -sections/ — page-specific presentational components
  • -layout/ — feature-scoped layout pieces
  • route.tsx is the layout/guard wrapper, index.tsx is the page content

Naming and code conventions

  • kebab-case for all files and folders, except hook files (named after the hook) and Zod schema files (PascalCase...Schema.ts).
  • Component categories: compound (folder + index.tsx, sub-elements prefixed with the parent name, e.g. ComboboxTrigger), grouped (e.g. form-controls/), and singular (one file).
  • Always import through the @/ alias; avoid any; type every function and component.
  • Object/type keys are sorted ascending — oxfmt enforces this, so let the formatter do it.
  • Prefer TSDoc for reusable utils, hooks, and components.

The components playground

src/routes/components-playground/ is an internal showcase of the component library (buttons, form controls, tables, modals, slide-overs). It is not a product feature — but it is the fastest way for a new developer to discover which components already exist before building new ones.