Skip to content

Architecture

SakuraNav is a full-stack navigation page application built on Next.js 16 + React 19.

Technical Architecture

┌──────────────────────────────────────────────────────────┐
│                    🖥 Frontend (Client)                    │
│      React 19 · TypeScript · Tailwind CSS 4 · @dnd-kit   │
└──────────────────────────────────────────────────────────┘
                              │  HTTP / JSON

┌──────────────────────────────────────────────────────────┐
│               ⚙️ Backend (Next.js App Router)              │
│          Route Handlers · Server Actions · API            │
│          Vercel AI SDK (Smart Analysis / Recommendations)  │
└──────────────────────────────────────────────────────────┘
                              │  SQL Queries

┌──────────────────────────────────────────────────────────┐
│              💾 Data Layer (SQLite/MySQL/PostgreSQL)         │
│         DatabaseAdapter Pattern · SQL Dialect Translation   │
└──────────────────────────────────────────────────────────┘

Core Design Principles

PrincipleDescription
DatabaseAdapterData access layer supports multiple databases through a unified DatabaseAdapter interface
Server-Only ConfigSensitive configuration protected by the server-only package, accessible only on the server
Progressive EnhancementProgressive loading and enhancement
Type SafetyFull-stack TypeScript type safety
React CompilerEnabled reactCompiler: true for automatic render performance optimization
Standalone OutputUses output: "standalone" build mode, optimized for Docker deployment
Zod ValidationAPI request parameters validated at runtime using Zod