About this project
Free AP Practice is an open-source study tool built with SvelteKit and Svelte 5, created and maintained by Ajay Saravanan. It targets AP exam preparation, aiming to make practice faster, more personalized, and accessible without a paid prep subscription.
Core features include AI-generated multiple-choice questions with an in-app tutor, bookmarks, and attempt history. The app has public marketing pages (landing, about, subjects, summer study guide, blog, stats, privacy, terms, changelog) plus an authenticated area at /app covering dashboard, practice, progress, question history, resources, and settings. SEO-oriented practice landing pages live under /practice/[...slug], and public generation counters are shown at /stats.
An optional Super membership adds personalized MCQ/FRQ tutoring, a Coach, and a weekly study plan. Authentication uses Better Auth for email/password and Google sign-in, including Google One Tap when configured.
Technically, the project uses TypeScript, Tailwind CSS, Neon PostgreSQL with Drizzle ORM over the serverless HTTPS driver, the Vercel AI SDK with an OpenAI-compatible API (OpenAI or local LM Studio), Resend for email, Stripe with the Better Auth Stripe plugin for subscriptions, Mem0 for optional tutor memory, Upstash Redis for short-lived AI controls, and Vercel for deployment. Question content is stored in Neon PostgreSQL for practice, bookmarks, and history; blog posts are Markdown files in src/content/blog/.
Setup requires Node.js 20+, Bun, and a Neon PostgreSQL project. Commands include bun install, bun dev, bun run build, bun run db:apply for Drizzle migrations, bun test:unit for Vitest, and a deployed question-generation smoke test. A compose.yaml can start local PostgreSQL and Redis for inspection and migration work, though runtime must use a Neon branch URL. Required environment variables include DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL, OPEN_AI_KEY, and OPENAI_BASE_URL; optional ones cover Google OAuth, Resend, S3 legacy imports, GitHub bug reports, and cron security. Model choices are exported constants in src/lib/ai/ai-models-config.ts.
API routes under src/routes/api include Better Auth flows at /api/auth/*, signed-in user data at /api/me/* (stats, progress, history, record-attempt, bookmarks), question selection at POST /api/question, public generation stats, tutor chat and greeting endpoints, bug reports that create GitHub Issues with per-IP rate limiting, and a /health check. Vercel Analytics and Speed Insights load only after user opt-in.
Deployment is to Vercel as a SvelteKit app; CI applies migrations on pushes to main or staging before deployment. The Freeappractice name, logo, and brand are proprietary and reserved for the founder, while the source code is open for forking and contributions under a different name.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.