Frontend Overview
Tracera’s frontend is built with Next.js 16 and React 19, using the App Router for server-side rendering and React Server Components.Tech Stack
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16.1.6 | React framework with App Router |
| React | 19.0.0 | UI library |
| Tailwind CSS | 4.2.1 | Utility-first styling |
| shadcn/ui | - | Accessible component primitives |
| Radix UI | - | Unstyled, accessible UI components |
| Zustand | 5.0.11 | Client-side state management |
| Zod | 4.3.6 | Runtime validation |
| next-themes | - | Dark/light mode theming |
| Lucide React | 0.575.0 | Icon library |
Project Structure
Key Patterns
Server Components by Default
Pages are server components by default, enabling data fetching at the server level without client-side loading states:Server Actions
Authentication operations use Next.js Server Actions for secure server-side mutations:Auth Context
Client components access authentication state via React Context:Security Headers
The Next.js config sets comprehensive security headers:- Content Security Policy (CSP)
- Strict-Transport-Security (HSTS)
- X-Frame-Options
- X-Content-Type-Options
- Referrer-Policy