Drill

Drill

#Next.js#TypeScript#Supabase#PWA

Overview

A daily-practice PWA built around a 'study pack' architecture: questions, glossary, and domain weighting are swappable per subject, currently covering the AWS Certified Solutions Architect – Associate exam, WordPress admin/dev practice, and security, with room to add more. Each day's 10 questions are allocated across a pack's domains and picked in deterministic priority order: unseen → missed → related topics → stale. Answers show an explanation and a one-line takeaway immediately, and missed topics are recorded as weak spots and prioritized in the Weak-Spot Drill (a dedicated practice screen); the old Review tab was retired so review has a single entry point there. Signing in with Google (via Supabase Auth) ties streaks, per-domain accuracy, and the target-date countdown to your account, so progress carries over between phone and desktop. A Learn tab lets you tap underlined acronyms to pop open their full name and meaning inline. Set your own Gemini API key and weak-spot questions get generated on the fly (the AWS pack also factors in the official What's New RSS, and the security pack draws on vulnerability-info RSS feeds such as JVN, IPA, and JPCERT/CC), with Vercel Cron pre-generating each morning so there's no wait. Questions are original exercises grounded in each subject's official docs, not copies of real exam questions.

Challenges & Solutions

[PROBLEM_1] Deterministic daily question selection

A date-seeded hash drives a pseudo-random shuffle so reopening the app on the same day always yields the same 10 questions. Candidates are ranked unseen → high miss-rate → related topic → stale before drawing, balancing weak-spot review with new material.

[PROBLEM_2] Carrying pre-login progress into an account

Users can start solving immediately before signing in—progress is stashed in sessionStorage until Google login completes, then merged into Supabase via RPC (fetch_progress / push_progress). This preserves a 'try 10 questions, then sign in if you like it' flow while still syncing across devices.

[PROBLEM_3] A study-pack architecture for multiple subjects

Pulled questions, glossary, and domain weighting out of the AWS-specific code into a 'study pack' (StudyPack) abstraction. Selection logic, weak-spot tracking, and the AI generation engine stayed subject-agnostic in a shared core, so adding the WordPress and security packs meant just writing a new pack definition.

Future Improvements

  • More study packs

    Currently AWS SAA, WordPress, and security—planning to add packs for more certifications and technical subjects over time.

  • Deeper study analytics

    Beyond per-domain accuracy, exploring a dashboard for correlations between missed topics.

Tech Stack

  • Framework: Next.js 16 (App Router) / React 19
  • Language: TypeScript
  • Styling: Tailwind CSS v4(ダークUI)
  • Auth: Supabase Auth(Google)
  • Database: Supabase(Postgres + RPC)
  • AI: Google Gemini API(弱点問題のパーソナライズ生成、ユーザー自身のAPIキー)
  • 通知: Web Push(VAPID)+ Vercel Cron(日課リマインダー / AI問題の事前生成)
  • 配信: Vercel / PWA(manifest + Service Worker)