How in03/not-a-haiku works
Project type and purpose
• From the file tree and README, this is a full-stack web application built with SvelteKit.
• Purpose: an interactive haiku (and other syllable-constrained poetry) editor that validates syllable count in real time, performs AI-powered analysis/tagging, and syncs data via GitHub Gists.
File structure
• Top level: configuration (pnpm, Vite, PostCSS, Tailwind, Vercel), README, environment example.
• src/:
• app.html / app.css – entrypoint template and global styles
• lib/ – client-side code
· auth/ (GitHub OAuth helper)
· components/ (Svelte UI components: editor, dialogs, grid, toasts)
· config/, data/ (CMU dictionary JSON, syllable-counter logic, external API wrappers)
· stores/ (Svelte writable stores: auth state, settings, in-memory “DB”)
· ml/ (ONNX model & metadata for client inference)
• routes/ – SvelteKit pages and serverless endpoints
· +page.svelte / +layout.* – UI pages (editor, settings, test onnx)
· api/auth/github/... – server routes for OAuth token, callback
• static/: serves the ONNX model for browser fetch
• .cursor/: editor rules, which inform UI/UX constraints
README for additional insights
• Architecture section highlights syllable-count strategy (CMU lookup → ONNX fallback).
• Performance: small binary model, JSON dictionary, sub-5ms inference.
• Components called out: HaikuEditor, Toast, onnx-syllable-counter.
• Deployment: Vercel serverless.