Skip to content
mahmudulashevPublic

About

πŸ“ Digital SAT practice platform β€” Bluebook-style timed tests, adaptive modules, exam lockdown, server-side scoring and score analytics. Next.js 16 + Supabase.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

62 Commits

Folders and files

Repository files navigation

Satify logo

Satify

Digital SAT practice that feels like test day.

Full-length, timed Math and Reading & Writing tests in an interface modeled on the real exam β€” with adaptive modules, exam lockdown, server-side scoring and detailed score analytics.

Live demo β†’

Next.js React TypeScript Tailwind CSS Supabase Vercel

Satify home page

✨ Highlights

πŸ§ͺ Real exam structure Math (2 Γ— 22 questions, 35 min), Reading and Writing (2 Γ— 27 questions, 32 min) and full-length tests with a 10-minute break, scored 400–1600
πŸ”€ Adaptive modules Module 2 gets easier or harder depending on your Module 1 score, just like the digital SAT
πŸ–₯️ Familiar test interface Resizable passage split, answer eliminator, mark for review, question navigator, Check Your Work page, highlighter, line reader, Desmos graphing and scientific calculator (College Board edition), reference sheet
πŸ”’ Exam lockdown Full screen only, copy/paste and dev-tools shortcuts blocked, tab-switch detection β€” 3 warnings and the test submits itself; every event is logged
πŸ›‘οΈ Server-side scoring Answer keys never reach the browser. Timing, grading and daily limits all run in Postgres
πŸ“Š Score reports Scaled scores, domain breakdown, skill radar, difficulty and timing charts, plus a full question review with explanations
πŸ“ˆ Progress dashboard Every attempt saved to your account with score trends over time

πŸ“Έ Screenshots

Test interface

Test interface

Test lobby

Test lobby and rules

Mobile home page
Responsive on phones

🎟️ Plans

Guest Free account
Tests per day 2 4
Full test interface and tools βœ… βœ…
Score report after each test βœ… βœ…
Saved results and progress charts β€” βœ…

Limits are enforced in the database (guests by cookie and hashed IP) and reset every day at 00:00 UTC.

πŸ—οΈ How it works

flowchart TD
    B["πŸ–₯️ Browser (Next.js client)"] -->|answers and autosave| A["βš™οΈ Next.js route handlers /api/exam/*"]
    B <-->|auth session| AU["πŸ”‘ Supabase Auth"]
    A -->|RPC with server secret| P[("πŸ—„οΈ Supabase Postgres")]
    P -->|questions without answer keys| A
    P --> L["Daily limits"]
    P --> S["Question selection and adaptive modules"]
    P --> G["Timing and grading"]
Loading
  • The browser only ever receives question content β€” never the answers.
  • Route handlers call security-definer Postgres functions with a server secret, so the exam engine can't be driven directly from the client.
  • Row Level Security keeps each student's attempts private.

🧰 Tech stack

Next.js 16 (App Router) Β· React 19 Β· TypeScript Β· Tailwind CSS 4 Β· Supabase (Postgres, Auth, RLS, Storage) Β· Recharts Β· KaTeX Β· Zod Β· Vercel

πŸš€ Getting started

git clone https://github.com/mahmudulashev/sat-prep.git
cd sat-prep
npm install
cp .env.example .env.local   # fill in the values
npm run dev

Open http://localhost:3000.

Database

  1. Create a Supabase project and run the files in supabase/migrations in order.

  2. Generate a server secret and store its SHA-256 hash in the database:

    openssl rand -hex 32            # -> EXAM_SERVER_SECRET in .env.local
    printf %s "<secret>" | shasum -a 256
    insert into private.config (key, value) values ('server_secret_sha256', '<hash>');
  3. Load the sample questions:

    npm run seed -- --push
  4. Configure Supabase Auth (Dashboard β†’ Authentication):

    • Emails: Supabase's built-in email service only delivers to your project's team members. For real sign-ups, add a custom SMTP provider (Resend, Postmark, SES…) or turn off Confirm email under Sign In / Providers β†’ Email.
    • URL Configuration: set the Site URL to your domain and add https://<your-domain>/auth/callback to the redirect URLs.
    • Password security: enable leaked password protection.

Sample questions live in content/questions/*.ts and test forms in content/tests.ts. npm run seed validates them and regenerates supabase/seed.sql.

Official practice content (optional)

Official College Board practice tests and question bank PDFs go in SATBOOKS/ and QUESTIONS BANK/ (both git-ignored and not included in this repository). To extract and upload them:

python3 -m pip install pymupdf        # once
npm run extract:official              # writes content/official/ (git-ignored)
npm run seed:official                 # uploads questions, tests and images to Supabase
npm run upload:images                 # copies images to the Storage CDN (NEXT_PUBLIC_ASSET_BASE)

upload:images writes to the public question-images bucket, which has no public upload policy: add SUPABASE_SECRET_KEY to .env.local before running it.

Reading and Writing questions are stored as text (with tables and graphs as images); Math questions are stored as images cropped from the PDFs.

πŸ“œ Scripts

Command Description
npm run dev Start the dev server
npm run build Production build
npm run lint ESLint
npm run typecheck TypeScript
npm run seed Validate sample content and write supabase/seed.sql (-- --push uploads it)
npm run extract:official Extract official practice content from the PDFs
npm run seed:official Upload official content to Supabase
npm run upload:images Copy question images to Supabase Storage

πŸ“ Project structure

src/
  app/            routes: landing, auth, dashboard, exam, results, API handlers
  components/     exam runner, charts, dashboard, marketing and UI components
  lib/            Supabase clients, exam engine client, helpers
content/          sample questions and test forms
supabase/         SQL migrations and seed
scripts/          content seeding and official-content extraction

πŸ“ Notes

  • Browsers don't allow a website to fully disable developer tools or prevent leaving full screen. The lockdown detects and records these actions, warns the student and submits the test after repeated violations; answers are graded on the server so inspecting the page reveals nothing useful.
  • Full screen is required in production builds; development builds continue without it when the browser refuses (for example inside embedded previews).

πŸ‘€ Author

Made by Mahmud Ulashev β€” Telegram Β· GitHub

SAT is a trademark of the College Board, which is not affiliated with and does not endorse this project.

About

πŸ“ Digital SAT practice platform β€” Bluebook-style timed tests, adaptive modules, exam lockdown, server-side scoring and score analytics. Next.js 16 + Supabase.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages