HNU-TimeLetter (与她的海大时光笺) is a Galgame-style interactive visual narrative built on a modern TypeScript full-stack. Every layer of the stack was chosen to serve the project’s two core constraints: a rich, ceremony-driven animation experience on desktop and a lightweight stamp-collection waterfall on mobile, both fed by a single Feishu Bitable CMS with zero manual file deployments.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/HNU-himematsu/HNU-TimeLetter/llms.txt
Use this file to discover all available pages before exploring further.
Framework Layer
Next.js 16.2.4 — App Router
Server Components, nested layouts, and file-system routing via the
app/ directory. Turbopack is the default bundler for next dev, cutting cold-start HMR to under 300 ms on a mid-range machine.TypeScript 5+ Strict Mode
strict: true throughout tsconfig.json. All domain types live in src/lib/types.ts as a single source of truth; the compiler enforces every import boundary at build time.React 19
The project targets React 19.2.3 and opts into the React Compiler via
babel-plugin-react-compiler, reducing manual useMemo / useCallback boilerplate across animation-heavy components.Turbopack
Enabled as the default Next.js dev bundler. Production builds still use Webpack via
next build for maximum compatibility with the self-hosted server environment.Styling
Tailwind CSS v4
The v4 PostCSS plugin (
@tailwindcss/postcss) is used instead of the legacy tailwind.config.js approach. Utility classes are composed with tailwind-merge to prevent specificity conflicts in dynamic components.Radix UI / Shadcn-style Components
Primitive headless components from
radix-ui underpin all accessible interactive elements. Components under src/components/ui/ follow Shadcn conventions and must not have their logic modified directly — extend via wrapper components instead.| Token | Value | Usage |
|---|---|---|
| Background | #ece9e4 | Warm-grey paper surface across all routes |
| Accent | #c23643 | Wax-seal red — CTAs, active states, highlights |
| Title font | ChillDINGothic_SemiBold | Local OTF, registered in app/layout.tsx |
| Body font | ZouLDFXKAJ | Local TTF, registered in app/layout.tsx |
| Viewport frame | 5 px white border + 16 px radius | Applied site-wide via layout.tsx wrapper |
Animation
Framer Motion v12
Drives the envelope-open ceremony, full-screen transition overlay, story card stack entrance / exit, and the magnetic button physics. All variants are defined as named
AnimationConfig objects co-located with their component.@waaark/luge 0.6.20-beta
Scroll-driven progressive animation engine. The Luge smooth-scroll plugin is explicitly disabled (
useLuge.ts) to prevent conflicts with Lenis. Only the stagger, reveal, and parallax plugins are active.Lenis 1.3.23
Smooth-scroll runtime active on desktop only, during the post-envelope scroll-section group. Built-in Snap is used for footer anchoring. Wrapped in
useVirtualScroll.ts; paused automatically when the envelope overlay is visible.State Management
Global UI state is managed by a single Zustand v5 store defined insrc/lib/store.ts.
Zustand v5 uses the
useSyncExternalStore API internally. Slices are not split into separate files — all state lives in one flat store to keep cross-slice transitions (e.g. isEnvelopeOpened → isTransitioning) a single atomic update.External Services
Feishu (Lark) Bitable
The sole CMS data source. All story, location, creation-board, and contributor records are authored in Feishu multi-dimensional tables. No headless CMS, no markdown files.
Aliyun OSS
All image assets are stored in an Aliyun Object Storage bucket. The sync pipeline downloads Feishu attachments, uploads them to OSS, and back-fills the OSS URL into the originating Feishu record.
node-schedule
Runs inside the long-lived Node.js process (managed by PM2). Schedules automatic Feishu → JSON syncs without an external cron daemon. Initialized at app startup in
src/lib/admin/.Directory Structure
public/ (static assets including local fonts), tests/e2e/ (Playwright suites), and the collaboration asset directories described below.
Compile Boundary Rules
| Path | Purpose | In tsconfig? |
|---|---|---|
src/ | All application runtime code | ✅ Included |
agents/ | AI agent collaboration assets (skills, knowledge bases) | ❌ Excluded |
.opencode/agents/ | OpenCode agent definitions | ❌ Excluded |
.trae/skills/ | Trae IDE skill files | ❌ Excluded |
opencode.json | Local Playwright MCP server registration | ❌ Runtime-only |