This is the interactive frontend application for Travix. It is built as a single-page app (SPA) using React Router v8 (React 19) and styled with Tailwind CSS v4. It features an elegant multi-step Trip Generation Wizard, dynamic timelines, interactive budgets, and smooth animations powered by Framer Motion.
- Framework: React Router v8 (formerly Remix v2) running in SPA mode with React 19.
- Why React Router v8? Standardized nested routing, layout outlets, page transition indicators, and Vite integration for blazing fast SPA loading and build speeds.
- Styling: Tailwind CSS v4 with
@tailwindcss/viteintegration.- Why Tailwind CSS v4? Offers a compile-time CSS processor that boosts application build speed, with zero configuration files required and seamless CSS-only theme token definitions.
- State Management: Zustand for global token persistence and layout states.
- Why Zustand? A lightweight, hook-based state manager that avoids the re-render performance costs and boilerplate complexity of Redux or React Context.
- API Fetching: TanStack React Query v5 +
react-query-kitfor clean, encapsulated query and mutation hooks. - Animations: Framer Motion v12 for micro-animations, slide-ins, and orchestrations.
- Forms: React Hook Form + Zod validation resolvers.
- Routing & Utility: Rapiq for building URL filters and parsing query parameters.
- Icons & Alerts:
lucide-reactfor icon assets andsonnerfor toast notifications.
apps/web/app/
├── root.tsx # Base layout, HTML shell, and global providers setup
├── routes.ts # Page routes configuration (mapped to routes/)
├── app.css # Tailwind v4 configuration, theme tokens, and typography
├── Welcome/ # Welcome assets
├── api/
│ └── swagger/ # Auto-generated API client using swagger-typescript-api
├── queries/ # React Query Kit endpoints definitions
├── schemas/ # Shared Zod validation schemas for forms
├── stores/ # Zustand stores (session and auth management)
├── hooks/ # Global React custom hooks (e.g. useDebounce)
├── lib/ # Common axios and api clients configurations
├── types/ # Shared frontend types
├── components/ # FEATURE-BASED component co-location
│ ├── ui/ # Reusable atomic UI elements (Button, Card, Input)
│ ├── auth/ # Sign-in and sign-up form components
│ ├── dashboard/ # Sidebar navigation, layout containers, and overview stats
│ ├── trip-wizard/ # Multi-step Destination, Details, and Interests wizard
│ ├── trip-detail/ # Day timeline, activities lists, hotel lists, and budget trackers
│ └── hero/ # Landing page content blocks (Hero, Features, Pricing)
└── routes/ # Routing page containers
├── home.tsx # Public landing page
├── auth/ # Auth layouts (login, register)
└── dashboard/ # Protected views (overview, trips list, trip details)
Developers and agents must conform to these styling and structural guidelines:
- Strict File Size Limit: No React file should exceed 150 lines. Split large components into smaller, single-responsibility files inside their feature-specific subfolder (e.g.,
components/trip-detail/). - Color System: Consistent color palettes defined in
app.cssusing theme variables:- Primary Background: White (
bg-background). - Brand Primary Text: Blue (
text-primary/bg-primary). - Supporting Copy: Gray (
text-muted). - Contrast Text: White (
text-secondary/bg-secondary). - Do not hardcode hex colors or custom inline grays.
- Primary Background: White (
- Typography: Poppins is loaded globally and is the only font family allowed.
- UI Logic: The client is a presentation layer. Do not write business logic, filtering, or aggregations here; rely on the backend API as the single source of truth.
- Path Aliasing: Import files from subdirectories using the tilde alias (e.g.,
~/queries/...,~/hooks/...), avoiding deep relative paths.
Start the frontend development server:
# From workspace root
yarn dev --filter=web
# Or inside apps/web
yarn devThe application will run at: http://localhost:5173
The web app uses swagger-typescript-api to generate a typed API client based on the backend Swagger OpenAPI JSON spec.
To regenerate the Swagger client definitions:
# Ensure apps/api is running on port 6500, then run:
yarn workspace web api:generateThis updates the client definitions inside app/api/swagger/.