SakuYado LogoSakuYado
๐Ÿ—๏ธTechnical Reference

Architecture Documentation

SakuYado follows a component-based architecture with centralized state management, built on Next.js 16 App Router with full TypeScript support.

Source Architecture

Rendering Diagram...

Tech Stack

โšก

Next.js 16.1.6

App Router with Turbopack

โš›๏ธ

React 19.2.4

With TypeScript

๐ŸŽจ

Tailwind CSS v4.2.1

Utility-first styling

๐Ÿ—‚๏ธ

Context + useReducer

Centralized state management

๐Ÿงช

Vitest

Unit tests with V8 coverage

๐ŸŒฒ

Cypress

End-to-end testing

Core Architecture Pattern

Component-Based Architecture with Context API

  1. Modular Components โ€” Reusable UI components with clear responsibilities
  2. Centralized State โ€” HotelContext manages all hotel-related state
  3. Separation of Concerns โ€” UI, business logic, and data management are distinct
  4. Type-Safe Development โ€” Full TypeScript integration throughout
๐Ÿ”„

Context API over Redux

Simpler, built-in solution with predictable state updates

๐Ÿ’พ

LocalStorage Persistence

Hotel data persists automatically across browser sessions

๐Ÿ“ฑ

Mobile-First Design

Optimized for 375px mobile with desktop support at 1280px+

App Router Architecture

Rendering Diagram...

Application Pages

FileRouteDescription
page.tsx/Landing page with hero section and navigation CTAs
hotels/add/page.tsx/hotels/addHotel entry form with rich validation
hotels/compare/page.tsx/hotels/compareHotel comparison table and value ranking
docs/page.tsx/docsDocumentation overview and quick links
docs/architecture/page.tsx/docs/architectureTechnical documentation covering architecture and components
docs/features/page.tsx/docs/featuresUser guide detailing available features and usage

Component Architecture

Rendering Diagram...

UI Component Library

ComponentPurpose
ButtonInteractive actions with variants (default, secondary, destructive, ghost, outline) and asChild support for Link components.
InputBasic text input field with Tailwind-based styling and focus states.
SelectFull Radix-UI based selection system including SelectTrigger, SelectValue, SelectContent, and SelectItem.
CardCompositional container with CardHeader, CardTitle, CardDescription, CardContent, CardAction, and CardFooter sub-components.
AlertFeedback and warning messages with AlertTitle and AlertDescription for structured content.
FieldA rich form layout system featuring FieldSet, FieldGroup, FieldLabel, FieldDescription, and FieldError with multi-error support.
LabelAccessible Radix-UI based label element for form controls.
SeparatorAccessible visual divide between content sections with horizontal and vertical orientations.
TableAccessible data tables with TableHeader, TableBody, TableFooter, TableHead, and TableCell sub-components.

Component Design Patterns

โ—

Stateless Components

All UI components receive data via props; business logic handled by context

โ—

Composition over Inheritance

Components built for reusability with flexible prop interfaces

โ—

Accessibility-First

Semantic HTML, ARIA labels, keyboard navigation, screen reader support