Skip to content

Repository files navigation

GHBanner

Run and deploy your AI Studio app

This contains everything you need to run your app locally.

View your app in AI Studio: https://ai.studio/apps/drive/1_oNg3uQmr9Pq_XzfOHf6Kdn3pFATKHtR

Run Locally

Prerequisites: Node.js

  1. Install reproducible dependencies: npm ci

  2. Run the app: npm run dev

  3. Verify application and test TypeScript: npm run typecheck

  4. Run the automated tests: npm run test

  5. Create a production build: npm run build

Pull requests and pushes to main run the same install, type-check, test, and build sequence in GitHub Actions using Node.js 22.

Code organization

  • components/ contains the screens and shared navigation/input components.
  • hooks/useGameLogic.ts coordinates an active practice session.
  • services/dbService.ts owns session persistence, session classification, and personal-best comparison rules.
  • utils/math.ts generates and selects multiplication problems.
  • db.ts defines the versioned Dexie/IndexedDB schema.

Named race lengths and their record-comparison rules are centralized in the database service so session classification and personal-best checks cannot drift apart.

PWA support

This app now ships as a Progressive Web App (PWA).

  • Installable on supported browsers via the web app manifest.
  • Offline-friendly for the app shell and previously fetched same-origin assets via the service worker.
  • Uses source-controlled SVG app icon assets located in public/icons/ (no binary icon files in the PR).

To verify locally:

  1. Run npm run build
  2. Run npm run preview
  3. Open the app in Chrome/Edge and confirm:
    • the install prompt is available,
    • Application → Manifest is valid,
    • Application → Service Workers shows /sw.js as active.

Deploy to Vercel

This app can be deployed to Vercel without any UI/design changes.

  1. Import this repository into Vercel.
  2. Keep the default project settings (Vite framework preset).
  3. Deploy. No API key is required by the current client-only application.

Vercel will run npm install and npm run build, and serve the generated dist output.

About

A motorsport-themed mental arithmetic trainer designed to master double-digit multiplication through high-speed drills and detailed performance telemetry.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages