pnpm install # install + runs postinstall → nuxt prepare
pnpm dev # nuxt dev server
pnpm fmt # oxfmt (NOT eslint/prettier)
pnpm build # generate-icons → nuxt generate
pnpm generate # nuxt generate (static export)
pnpm preview # nuxt preview
pnpm generate-icons # sharp: logo.svg → public/pwa-*.png- Nuxt 4 SPA (
ssr: false) — pure client-side, no API backend - PWA (
@vite-pwa/nuxt) — auto-update, install prompt - Data: IndexedDB via
app/utils/db.ts(manual IndexedDB, no ORM). Migrates from legacylocalStorageon first load. - UI: Varlet UI v3 (Material Design 3 dark theme) + Tailwind CSS v4
- i18n:
@nuxtjs/i18n, localezhonly,no_prefixstrategy - Formatter: oxfmt (config: singleQuote, bracketSameLine)
- Package manager: pnpm (workspace used for allowBuilds only, not multi-package)
- Typechecking: no script — relies on IDE / Nuxt's built-in typegen
- No tests found in the repo
- postinstall runs
nuxt prepare—.nuxt/must exist for type hints - PWA icons generated from
public/logo.svgviascripts/generate-icons.mjs(ESM, requires sharp) .nuxt/,.output/,dist/are gitignored
app/
app.vue — root layout (Varlet AppBar + NuxtPage)
pages/
index.vue — event list + add dialog
events/[id].vue — event detail/edit
components/
EventCard.vue
EventForm.vue
composables/
useEvents.ts — CRUD over IndexedDB
utils/
db.ts — IndexedDB helpers (DB_NAME: taiki-countdown, v2)
types.ts — DayEvent, DayEventInput, RepeatMode
testData.ts — sample data for development
plugins/
varlet.ts — MD3 dark theme (client-only)
assets/css/
main.css — Tailwind + scrollbar styles
font.css — Noto Sans SC, Material Symbols
scripts/
generate-icons.mjs
i18n/locales/
zh.json
import.meta.client/import.meta.serverguards are required for IndexedDB and client-only plugin codeuseEvents()composable auto-initializes on client mount; import it in any component- Event
idisDate.now().toString(36)— generated client-side - Repeat is
'none'|'yearly' - Date format:
YYYY-MM-DD(strings) - Varlet components are auto-imported by
@varlet/nuxtmodule; no manual import needed in templates