WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

chamika/tt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table Tennis Tools

This project is for building various tools required for table tennis.

  1. Handicap Score Calculator: A tool to calculate handicap scores for players based on their handicap points.
  2. Soon: ELTTTL Match Availability Tracker: A tool to track match availability for players in the Edinburgh and Lothians Table Tennis League (ELTTTL).

Project scaffold

This repository now contains two main pieces:

  • frontend/ — A SvelteKit (TypeScript) frontend scaffold. The home page (src/routes/+page.svelte) contains tiles that link to individual tools (e.g. /handicap).
  • worker/ — A Cloudflare Worker scaffold (TypeScript) using Hono for lightweight API endpoints. It exposes /api/handicap and /api/health handlers.

Quick start (local)

Prereqs: Node 18+, npm, and wrangler for Cloudflare Workers.

  1. Frontend
cd frontend
npm install
npm run dev
  1. Worker (local dev with Wrangler)
cd worker
npm install
npx wrangler dev

Running Tests

The frontend includes both end-to-end tests (Playwright) and unit tests (Vitest).

cd frontend

Unit Tests

npm run test:unit

End-to-End Tests

# Install Playwright browsers (first time only)
npx playwright install
# Run tests
npm run test:e2e

Run all tests

npm run test

Deploy notes

  • Frontend: build with npm run build in frontend/ and deploy to Cloudflare Pages. SvelteKit supports the Cloudflare adapter for Pages/Workers.
  • Worker: publish with npx wrangler publish (fill account_id in worker/wrangler.toml).

Next steps

  • Wire the frontend to the Worker API endpoints health endpoint
  • Implement availability tracker

About

Table Tennis Tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published