A ball-by-ball scorecard app for Twenty20 (T20) cricket matches.
- Track runs, wickets, overs, and balls for two teams
- Ball-by-ball scoring with over-by-over breakdown
- Batting and bowling player tracking
- Extras (wides, no-balls, byes, leg-byes)
- Save and load game state via localStorage
- Sign in with Google (via NextAuth) to manage your account and access cloud-backed features
- In-progress game state is auto-saved to localStorage; signed-in users can additionally save completed/in-progress games to the cloud (Postgres-backed) and reload them later
- Dashboard page for signed-in users to view and manage their cloud saves and cricket seasons in one place
- Premium users can organize cloud saves into seasons, creating, viewing, and managing named seasons and the games within them
- Premium subscriptions via Stripe Checkout, managed from the account page through the Stripe customer billing portal, with subscription status kept in sync via Stripe webhooks
- Responsive layout built with Emotion (CSS-in-JS)
- Next.js — React framework and routing
- React with TypeScript
- Emotion — CSS-in-JS styling
- React Context +
useReducer— state management - NextAuth — Google sign-in and session management
- Prisma + PostgreSQL — cloud saves, seasons, and subscription data
- Stripe — premium subscription checkout and billing
- Jest + React Testing Library — unit and integration tests
- Node.js 18+
- Yarn
yarn installyarn devOpen http://localhost:3000 in your browser.
yarn build
yarn startyarn testTo generate a coverage report:
yarn jest --coverageyarn lintAuto-fix lint issues:
yarn lint:fixFormat all files with Prettier:
yarn format