Deep DivesWeb

Introduction

An overview of the RawStack Web component.

The Web component is the public-facing Next.js application. It consumes the RawStack API via the shared @rawstack/api-client package and renders pages using the App Router.

Responsibilities

  • Public-facing pages and user-facing features
  • Authentication flows (login, registration, password reset, email verification)
  • Server-side and client-side data fetching via React Query
  • Accessible UI built on Radix UI primitives with Tailwind CSS

Architecture

The app uses Next.js App Router. Pages are React Server Components by default; client components are marked with "use client" where interactivity is needed.

Data fetching follows a consistent pattern:

  • React Query manages server state, caching, and background refetching
  • Axios (via @rawstack/api-client) handles HTTP requests
  • Zod + React Hook Form validate all user-submitted data before submission

Key features

  • Next.js 16 with Turbopack dev server
  • React 19
  • Tailwind CSS v4 for styling
  • Radix UI for accessible UI primitives
  • TanStack React Query v5 for data fetching
  • Sonner for toast notifications
  • Standalone output for containerised deployment