[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110371":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":8,"language":10,"languages":8,"totalLinesOfCode":8,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":8,"pushedAt":21,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},110371,"statsnap","kargulstudio\u002Fstatsnap","kargulstudio",null,"https:\u002F\u002Fstatsnap-kargul.vercel.app","TypeScript",95,21,54,0,17,39.73,false,"main",true,[],"2026-11-07 08:49:56","2026-11-19 13:19:54","# Statsnap — Reports (design prototype)\n\n> [!IMPORTANT]\n> **This is a design prototype only.** It has **no backend, no database, no API, no authentication and no real money data.**\n> Every number, transaction and notification is static mock data in [`lib\u002Fdata.ts`](lib\u002Fdata.ts) or comes from the Figma chart export.\n> Nothing you do in the UI is saved — reload the page and it's back to the original state.\n\nA pixel-perfect, working front-end implementation of the **Statsnap \"Finance Dashboard — Redesign\"** Figma frame\n(node `1:3`, 1440 × 1024), built with **Next.js 16 (App Router)**, **shadcn\u002Fui (Base UI)** and **Tailwind CSS v4**.\n\nOnly the **Reports** screen exists. Navigation items for other screens show a short \"coming soon\" toast.\n\n---\n\n## Run it\n\n```bash\npnpm install\n```\n\n```bash\npnpm dev\n```\n\nOpen \u003Chttp:\u002F\u002Flocalhost:3000>. The design is authored at **1440 × 1024** — that viewport matches Figma 1:1.\n\nOther scripts: `pnpm build` · `pnpm start` · `pnpm lint`\n\n---\n\n## What works\n\n| Area | Behaviour |\n| --- | --- |\n| **Sidebar** | Collapse\u002Fexpand (button or \u003Ckbd>⌘B\u003C\u002Fkbd> \u002F \u003Ckbd>Ctrl B\u003C\u002Fkbd>). Collapsed, the logo stays and the toggle glides down beneath it. Tooltips on the rail, Planning group expands\u002Fcollapses, profile menu. Below 1024px it becomes a slide-in drawer |\n| **Search** | Filters the transactions table by name, category or payment method. \u003Ckbd>\u002F\u003C\u002Fkbd> focuses it, \u003Ckbd>Esc\u003C\u002Fkbd> clears it |\n| **Date range** | Presets + range calendar (two months on desktop, one on phones). Press-and-drag to select, **drag either end** to adjust, or click start then end. Filters the transactions table and the CSV export |\n| **Download** | Generates a real CSV of the currently filtered transactions — entirely in the browser |\n| **Cash Flow chart** | Hover to scrub any day (crosshair, points and tooltip follow the line), click to pin a week, \u003Ckbd>←\u003C\u002Fkbd>\u002F\u003Ckbd>→\u003C\u002Fkbd> (\u003Ckbd>Shift\u003C\u002Fkbd> = week) when focused. Tooltip flips side near the right edge; the active month label highlights |\n| **Recent transactions** | \"View all\" reveals 11 more mock rows; row hover |\n| **Help \u002F Notifications** | Popovers with keyboard shortcuts and sample notifications (\"Clear all\" works) |\n\nWhat it does **not** do: fetch or persist anything, sign in\u002Fout, change the KPI cards or the chart line when the date range changes (the chart is the exact Figma export).\n\n---\n\n## Responsive behaviour\n\n| Width | Layout |\n| --- | --- |\n| **≥ 1280px** | Figma layout: docked 260px sidebar, 4 KPI cards in a row, floating chart tooltip, 5-column table |\n| **1024–1279px** | Docked sidebar, KPI cards 2 × 2 |\n| **768–1023px** | Sidebar becomes a drawer (menu button in the header, scrim, Esc to close); search stays inline |\n| **\u003C 768px** | Search collapses to an icon that expands over the header (with Cancel); Help hidden (it's keyboard shortcuts); Download is icon-only; chart readout docks above the plot and you scrub with your finger (lift to pin); table becomes a stacked list; date picker shows one month with scrollable presets |\n\nThe main scroll area reserves its scrollbar gutter (`scrollbar-gutter: stable`), so expanding \"View all\" never shifts the layout sideways.\n\n## Metadata\n\nTitle `Reports · Statsnap` (template `%s · Statsnap`), description, Open Graph + Twitter cards, web manifest and theme colour, all in [`app\u002Flayout.tsx`](app\u002Flayout.tsx). File-based icons:\n\n- [`app\u002Ficon.svg`](app\u002Ficon.svg) — favicon (the Figma logo mark)\n- [`app\u002Fapple-icon.tsx`](app\u002Fapple-icon.tsx) — 180×180 home-screen icon\n- [`app\u002Fopengraph-image.tsx`](app\u002Fopengraph-image.tsx) \u002F [`twitter-image.tsx`](app\u002Ftwitter-image.tsx) — 1200×630 card: full logo (mark + Geist SemiBold wordmark) on white\n- [`app\u002Fmanifest.ts`](app\u002Fmanifest.ts)\n\nPages are marked `noindex` because this is a prototype.\n\n**Social card URLs** ([`lib\u002Fsite-url.ts`](lib\u002Fsite-url.ts)): production builds point `og:image` at **https:\u002F\u002Fstatsnap-kargul.vercel.app**. Vercel previews use their own deployment URL, and `next dev` uses localhost (link-preview crawlers can't reach localhost, so test previews on a deployed URL). To move to a custom domain, set `NEXT_PUBLIC_SITE_URL` (see [`.env.example`](.env.example)). Don't rely on `VERCEL_PROJECT_PRODUCTION_URL` here: on this project it resolves to `statsnap-eight.vercel.app`, which 404s.\n\n## Fidelity notes\n\n- All icons, the logo, chart gridlines, series lines, crosshair and data points are the **original Figma SVG exports** in [`public\u002Ffigma\u002F`](public\u002Ffigma). Icons are tinted through CSS masks so they can follow theme tokens; their geometry is untouched.\n- Sizes, spacing, radii, shadows and colours are taken from the Figma node values (see [`DESIGN_SYSTEM.md`](DESIGN_SYSTEM.md)).\n- **One deliberate deviation:** in Figma the X-axis month labels use a narrower scale than the gridlines and data (the \"Sep\" label sits ~270 px left of the September gridlines, while the tooltip correctly says *Jun 18–24*). The labels here are centred on the real month gridlines so hovering lines up with the right month.\n- Buttons intentionally **don't bounce** — no scale\u002Ftranslate on press. Feedback is a 120 ms colour + shadow change.\n- Motion follows Emil Kowalski's design-engineering rules: strong custom ease-out curves, nothing over 250 ms, no animation on keyboard-triggered actions, hover effects gated behind `(hover: hover)`, and `prefers-reduced-motion` respected.\n\n---\n\n## Project structure\n\n```\napp\u002F\n  globals.css            ← the design system: primitives → semantic tokens → shadcn map → Tailwind theme\n  layout.tsx             ← fonts (Geist, Geist Mono, Inter) + providers\n  page.tsx               ← renders \u003CDashboard \u002F>\ncomponents\u002F\n  dashboard\u002F\n    dashboard.tsx        ← page shell + state (sidebar, search, date range, table expansion)\n    app-sidebar.tsx      ← Figma 1:5\n    page-header.tsx      ← Figma 1:125\n    report-toolbar.tsx   ← Figma 1:145 (date range + Download)\n    kpi-cards.tsx        ← Figma 1:159\n    cash-flow-card.tsx   ← Figma 1:213 (interactive chart)\n    transactions-card.tsx← Figma 1:286\n  ui\u002Frange-calendar.tsx  ← drag-to-select range calendar (built on react-day-picker)\n  icon.tsx               ← mask-tinted Figma icon\n  ui\u002F                    ← shadcn\u002Fui components, re-skinned with Statsnap tokens\nlib\u002F\n  data.ts                ← ALL mock data\n  use-media-query.ts     ← SSR-safe breakpoint hook\n  brand-image.tsx        ← shared logo\u002Ffont for generated icons + OG card\n  chart.ts               ← chart geometry + reading the Figma line export for hover\n  format.ts, prototype.ts, utils.ts\npublic\u002Ffigma\u002F            ← Figma SVG exports (do not edit)\nDESIGN_SYSTEM.md         ← full token + component documentation\n```\n\n---\n\n## Turning this into a real product\n\n1. Replace `lib\u002Fdata.ts` with server data (Route Handlers \u002F Server Components).\n2. Render the chart from data (e.g. Recharts via `shadcn add chart`) instead of the static SVG — the scales in `lib\u002Fchart.ts` already describe the axes.\n3. Wire the date range into the KPI and chart queries.\n4. Add real routes for the sidebar items and real auth for the profile menu.\n","Statsnap 是一个纯前端的金融数据看板设计原型，完整实现了 Figma 中「Finance Dashboard — Redesign」报告页的交互与视觉效果。核心功能包括响应式侧边栏导航、动态交易搜索与日期范围筛选、浏览器端 CSV 导出、可交互现金流量图（支持悬停、拖拽、键盘导航）及适配多端的布局切换。项目基于 Next.js 16（App Router）、shadcn\u002Fui 和 Tailwind CSS 构建，所有数据均为静态模拟，无后端、数据库或真实资金接口。适用于 UI\u002FUX 设计验证、前端技术演示、金融类管理后台原型评审及团队协作中的设计-开发对齐场景。",2,"2026-11-24 04:38:47","CREATED_QUERY"]