Frontend
Frontend Architecture
Vertical-slice architecture and patterns used in the Hireable frontend application
Overview
The frontend is built with Next.js 16 (App Router) and React 19, following a vertical-slice (feature-first) architecture for scalability and maintainability.
Technology Stack
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16.0.3 | React framework with App Router |
| React | 19.0.0 | UI library |
| TypeScript | 5.7.2 | Type safety |
| Tailwind CSS | 4.1.17 | Styling |
| Radix UI | Latest | Headless UI primitives |
| Framer Motion | 12.23.24 | Animations |
| React Hook Form | 7.67.0 | Form handling |
| Zod | 4.1.13 | Schema validation |
Directory Structure
Vertical-Slice Architecture
Features are organized as self-contained slices under src/features/. Each slice owns its services, types, hooks, and components.
Feature Structure
Public API Pattern
Each feature exports a public API through index.ts:
Import Rules
App Router Structure
The app/ directory uses Next.js 16 App Router conventions:
Route Groups
Route groups (folders with parentheses) organize routes without affecting the URL:
Screens Pattern
Page implementations live in features/screens/:
The App Router pages import from screens:
Data Flow
- Components call hooks or services
- Services make HTTP requests to the backend
- Mappers transform API responses to domain models
- Hooks manage local state and side effects