← Back to home中文

Personal project | Live and open to the public

Doubles Flow

This site teaches positioning to recreational badminton doubles players. Overhead court diagrams show what each partner does on each shot, step by step. Players can try the optional practice questions whenever they want to check their understanding. I planned the lessons and built the interface and offline setup on my own.

Open Doubles Flow

Problems to solve

System design

Parts

Lessons

① Lesson data

Each demo, question, and etiquette example uses typed data. This includes all four player positions, the shuttle path, notes for each step, and examples to compare. There are 6 etiquette examples, 22 demos, and 42 practice questions.

TypeScript

② Lesson structure

The demos have five levels: basic coverage; serve, return, and third shot; keeping the attack; defense and transitions; and putting it together in longer rallies. A demo can link to a similar scenario with different conditions. Questions are grouped by chapter, but players can choose any question.

TypeScript, Vitest

Interface

③ Lesson and practice app

The app has a lesson index, demo pages, practice questions, and a Q&A. Hash routing keeps the current demo and step in the URL. Players can share a link to that step without sharing their answers.

Vue 3, TypeScript, Vite

④ Court diagrams

SVG shows the court from above. Dashed lines show the shuttle path, solid lines show player movement, and faded markers show starting positions. Curved lines show high shots and straight lines show flat shots. Color and hatching mark which areas each partner should cover first. Demos can play through or step by step.

Vue single-file components, SVG

Hosting and storage

⑤ Static hosting

The app is built and deployed as a static site. The home page, Service Worker, and manifest are not cached. Other assets use content hashes for long-term caching.

Vercel

⑥ Offline use and updates

The app pre-caches all lessons so it works offline after the first visit. Players can add it to their home screen. After a new version downloads, the app asks before switching. An update can be marked as required when needed.

vite-plugin-pwa, Workbox

⑦ Local progress

Answers, drafts, and the current place in a lesson stay in the browser and are not uploaded. Progress records include the content version. An old tab does not overwrite progress saved by a newer one.

localStorage, versioned data format

Testing, deployment, and operations