How geekyroshan/streak-webapp works
Project type and purpose
• This is a full-stack web application called GitHub Streak Manager. Its purpose is to present a React-powered UI for viewing and fixing GitHub contribution streaks and to provide a REST API backend for data storage, authentication, and business logic.
File structure
• Root folder
• index.html, public/ → static assets for the React SPA
• main.py (unused or auxiliary script)
• package.json, bun.lockb, setup.sh, restart-servers.sh → build/install scripts
• .env.example, server/.env.example → environment variable templates
• server/ (Express + TypeScript)
• src/config → DB and GitHub OAuth configuration
• src/controllers → route handlers (auth, repo, contribution, streak, user, GitHub callbacks)
• src/routes → express.Router definitions mapping endpoints to controllers
• src/middleware → auth and error-handling middleware
• src/models → MongoDB schemas (user, commit)
• src/services → GitHub API client, in-memory MongoDB server (for testing), scheduler service
• src/utils → error class and time utilities
• src/ (React + TypeScript + Vite)
• src/pages → top-level page components (Dashboard, ActivityPage, Settings, etc.)
• src/components → reusable UI pieces (ActivityCalendar, GapAnalysis, Sidebar, BackdatingCard, plus shadcn/ui primitives)
• src/hooks → data fetching and state hooks (use-commit-history, use-github-profile, etc.)
• src/lib → global contexts and API wrapper (AuthContext, api.ts)
• index.css, App.tsx, main.tsx, tailwind.config.ts, vite.config.ts → styling and build setup
README for additional insights
• It confirms a React+Vite frontend, Express+TypeScript backend, MongoDB persistence, and GitHub OAuth.
Essential architectural elements
• Don’t omit the scheduler.service.ts background job layer.
• How temp files (server/temp) are used during bulk backdating.