{"id":50368379,"url":"https://github.com/rockacola/cdawgva-cyclethon-app","last_synced_at":"2026-05-30T05:30:21.504Z","repository":{"id":349114235,"uuid":"1200884921","full_name":"rockacola/cdawgva-cyclethon-app","owner":"rockacola","description":"Real-time charity donation tracker for CDawgVA's cross-Japan cycling event","archived":false,"fork":false,"pushed_at":"2026-05-22T07:07:33.000Z","size":4294,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T15:25:32.736Z","etag":null,"topics":["chakra-ui","charity","donation-tracker","nextjs","reactjs","server-sent-events","typescript","vercel"],"latest_commit_sha":null,"homepage":"https://cdawgva-cyclethon.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rockacola.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-04T00:08:54.000Z","updated_at":"2026-05-10T19:27:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rockacola/cdawgva-cyclethon-app","commit_stats":null,"previous_names":["rockacola/cdawgva-cyclethon-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rockacola/cdawgva-cyclethon-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockacola%2Fcdawgva-cyclethon-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockacola%2Fcdawgva-cyclethon-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockacola%2Fcdawgva-cyclethon-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockacola%2Fcdawgva-cyclethon-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rockacola","download_url":"https://codeload.github.com/rockacola/cdawgva-cyclethon-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockacola%2Fcdawgva-cyclethon-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33681809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chakra-ui","charity","donation-tracker","nextjs","reactjs","server-sent-events","typescript","vercel"],"created_at":"2026-05-30T05:30:20.724Z","updated_at":"2026-05-30T05:30:21.494Z","avatar_url":"https://github.com/rockacola.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CDawgVA Cyclethon Tracker\n\nA real-time donation tracker built for the [CDawgVA Cyclethon 5](https://tiltify.com/@cdawgva/cyclethon-5) charity event, a 15-day cross-Japan cycling challenge. The app ingests live donation data via Tiltify webhooks and a Cloudflare R2 data feed, then presents it through multiple interactive views: live feed, donor leaderboards, searchable history, journey progress, and themed \"donation wars.\"\n\nBuilt with **Next.js 15**, **React 19**, **Chakra UI v3**, and **TypeScript**. Supports English and Japanese with timezone-aware formatting.\n\n## Demo\n\n**Live site:** [cdawgva-cyclethon.vercel.app](https://cdawgva-cyclethon.vercel.app/)\n\n![CDawgVA Cyclethon Tracker screenshot](docs/screenshot.png)\n\nKey screens include:\n\n- **Live Feed** (`/donations/live`): streaming donation table with relative timestamps\n- **Top Donors** (`/donations/top`): ranked leaderboard by total donated and largest single donation\n- **Search** (`/donations/search`): full history with text search, amount filtering, sorting, and pagination\n- **Journey** (`/journey`): day-by-day route tracker with maps, daily stats, and embedded clips\n- **About Cyclethon** (`/about-cyclethon`): historical context across all five editions — cumulative donation charts, edition comparisons by route, days, and total raised\n- **Finish Line** (`/finish-line`): details for the IRL finish line event (venue, reservations, special pizzas)\n- **About** (`/about`): tracker data sources and ways to support the cause\n- **Donation Wars** (`/stats/donation-war`): category tallies where donations are classified by theme (anime, games, countries, etc.) using regex pattern matching on donor comments\n\n## Tech Stack\n\n| Layer        | Technology                                            |\n| ------------ | ----------------------------------------------------- |\n| Framework    | Next.js 15 (App Router, Server Components, React 19)  |\n| UI           | Chakra UI v3, Lucide Icons, Recharts                  |\n| Language     | TypeScript 5.8 (strict mode)                          |\n| Real-time    | Tiltify Webhooks (HMAC-SHA256) + Server-Sent Events   |\n| Data         | Cloudflare R2 (public JSON bucket)                    |\n| i18n         | Custom hook-based system (EN/JA), no external library |\n| Hosting      | Vercel (auto-deploy on push to `main`)                |\n| Code Quality | ESLint 9, Prettier, TypeScript strict                 |\n\n## Architecture\n\n```text\nBrowser  \u003c--  SSE stream  ──  Next.js API route  \u003c--  Tiltify webhook (HMAC verified)\n   │                              │\n   │                              ▼\n   └──  polling (30s)  --\u003e  Cloudflare R2 (JSON)  \u003c--  external data pipeline\n```\n\n**Data flow:**\n\n1. **Tiltify** sends donation events to `/api/webhooks/tiltify`, verified with HMAC-SHA256\n2. Events are broadcast to connected clients via an in-memory **EventEmitter** singleton and **Server-Sent Events** (`/api/donations/stream`)\n3. As a fallback, pages also **poll Cloudflare R2** every 30 seconds for the latest JSON snapshot\n4. Server Components fetch data at request time with **60-second revalidation** for fast initial loads\n\n**State and rendering:**\n\n- Server Components handle initial data fetch (SSR with cache revalidation)\n- A **DonationsContext** provider shares donation state across client components\n- Three context providers manage user preferences: appearance (dark/light/system), locale (EN/JA), and timezone (JST/UTC/local), all persisted in localStorage\n\n## Key Features\n\n- **Real-time updates** via webhook-driven SSE with polling fallback\n- **Donation war classifier**: regex pattern engine that categorizes donations into themed wars (anime, games, countries, consoles, pizza, Pokemon, Gacha, Sanrio, Uma Musume, etc.) by parsing donor comments\n- **Custom i18n**: lightweight hook-based translation system with namespace scoping, no external dependency\n- **Multi-timezone support**: timestamps render in JST, UTC, or local time; currency symbols adapt accordingly\n- **Animated counters**: donation totals animate smoothly using `requestAnimationFrame` with cubic ease-out\n- **Responsive design**: mobile drawer navigation, adaptive chart sizing (30 bars mobile / 60 desktop)\n- **Dark/light mode**: system-aware theming via next-themes + Chakra UI color mode\n\n## What This Demonstrates\n\n| Skill                     | Where it shows up                                                                      |\n| ------------------------- | -------------------------------------------------------------------------------------- |\n| **Frontend architecture** | Next.js App Router with server/client component split, context providers, custom hooks |\n| **Real-time systems**     | Webhook ingestion, HMAC signature verification, SSE broadcasting, polling fallback     |\n| **TypeScript**            | Strict mode, typed interfaces for all data, type-safe context/hooks                    |\n| **API design**            | REST webhook endpoint, SSE streaming endpoint, structured error handling               |\n| **State management**      | React Context for global state, localStorage persistence, animated transitions         |\n| **i18n engineering**      | Custom translation system with namespace lookup, locale detection                      |\n| **Data processing**       | Regex-based text classification, donation aggregation, multi-currency handling         |\n| **UI/UX**                 | Responsive layouts, dark mode, timezone handling, loading states, search with filters  |\n| **DevOps**                | Vercel CI/CD, Cloudflare R2 integration, environment-based configuration               |\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+\n- npm\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/rockacola/cdawgva-cyclethon-app.git\ncd cdawgva-cyclethon-app\n\n# Install dependencies\nnpm install\n\n# Set up environment variables\ncp .env.example .env.local\n```\n\n### Environment Variables\n\nEdit `.env.local` with:\n\n| Variable                     | Required | Description                                                                     |\n| ---------------------------- | -------- | ------------------------------------------------------------------------------- |\n| `NEXT_PUBLIC_R2_BASE_URL`    | Yes      | Base URL of the Cloudflare R2 public bucket serving donation JSON files         |\n| `TILTIFY_WEBHOOK_SIGNING_ID` | No       | Secret for verifying Tiltify webhook signatures (not needed for local browsing) |\n\n### Run\n\n```bash\nnpm run dev          # Start dev server at http://localhost:3000\n```\n\n### Other Commands\n\n```bash\nnpm run build        # Production build\nnpm start            # Start production server\nnpm run lint         # ESLint\nnpm run typecheck    # TypeScript type checking\nnpm run format       # Prettier (write)\nnpm run check        # Run format + lint + typecheck\n```\n\n## Project Structure\n\n```text\nsrc/\n├── app/                     # Next.js App Router pages\n│   ├── api/                 # API routes (webhook handler, SSE stream)\n│   ├── about/               # About the tracker (data sources, how to support)\n│   ├── about-cyclethon/     # Cyclethon history and edition comparisons\n│   ├── donations/           # Donations section: live, search, top donors\n│   ├── finish-line/         # Finish line IRL event details\n│   ├── journey/             # Day-by-day journey pages ([day] dynamic route)\n│   ├── stats/               # Donation Wars tracker\n│   └── en/, ja/             # Locale redirect routes\n├── components/              # React components (UI, charts, leaderboards)\n│   └── journey/             # Journey-specific sub-components\n├── contexts/                # DonationsContext (global donation state)\n├── hooks/                   # Custom hooks (polling, translations, animation)\n├── lib/                     # Data fetching, types, utilities, pattern matchers\n├── messages/                # Translation files (en.json, ja.json)\n└── providers/               # Chakra, appearance, locale, timezone providers\n```\n\n## Future Improvements\n\n- Add unit and integration tests for data processing and pattern matching logic\n- Extract donation war patterns into a configurable format (JSON/YAML) for non-developer editing\n- Add WebSocket support as an alternative to SSE for bidirectional communication\n- Implement donation milestone notifications and achievement badges\n- Add historical event comparison (Cyclethon 4 vs 5 stats)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockacola%2Fcdawgva-cyclethon-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frockacola%2Fcdawgva-cyclethon-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockacola%2Fcdawgva-cyclethon-app/lists"}