Skip to content

richa008/ReadRewind

Repository files navigation

Build Commands

  • npm run dev - Start development server with hot reload
  • npm run build - TypeScript compile + Vite production build
  • npm run lint - Run ESLint on TypeScript files
  • npm run preview - Preview production build locally

Environment Setup

Copy .env.example to .env and add your Anthropic API key for genre classification:

VITE_ANTHROPIC_API_KEY=sk-ant-...

Architecture

ReadRewind is a React + TypeScript + Vite app that analyzes Goodreads reading data. Users upload their Goodreads CSV export and get interactive analytics dashboards.

Data Flow

  1. User uploads CSV via ProfileInput component
  2. csvParser.ts parses the CSV (filters for "read" shelf only)
  3. Optional: genreClassifier.ts calls Claude API to classify books by genre (batched in groups of 25, cached in localStorage)
  4. parser.ts calculates analytics (stats, distributions, top authors)
  5. Analytics component renders charts (Recharts) with two views: "overall" and "yearly"

Key Files

  • src/App.tsx - Root component, manages app state and data flow
  • src/types.ts - TypeScript interfaces (Book, Analytics, FetchStatus)
  • src/components/Analytics.tsx - Main dashboard with charts and book grids
  • src/components/BookCover.tsx - Fetches covers from OpenLibrary API
  • src/utils/csvParser.ts - Goodreads CSV parsing with quote handling
  • src/utils/genreClassifier.ts - LLM genre classification with localStorage caching

About

ReadRewind is a React + TypeScript + Vite app that analyzes Goodreads reading data. Users upload their Goodreads CSV export and get interactive analytics dashboards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors