Skip to content

About

Bare bones of a new project using NextJS, React, PostGres and Vercel. Like 25% complete tops so don't judge me much.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,389 Commits

Folders and files

Repository files navigation

20TwentyScore

A ball-by-ball scorecard app for Twenty20 (T20) cricket matches.

Features

  • 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)

Tech stack

  • 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

Getting started

Prerequisites

Install dependencies

yarn install

Run the development server

yarn dev

Open http://localhost:3000 in your browser.

Build for production

yarn build
yarn start

Running tests

yarn test

To generate a coverage report:

yarn jest --coverage

Linting

yarn lint

Auto-fix lint issues:

yarn lint:fix

Format all files with Prettier:

yarn format

About

Bare bones of a new project using NextJS, React, PostGres and Vercel. Like 25% complete tops so don't judge me much.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages