Practice causal inference with a Next.js app: I formulated the questions; the UI and flow were built with Cursor to match PRD_causal_analysis_app_final.md.
Pick a method (or all of them), choose MCQ or open-ended mode, and work through shuffled questions from local JSON. Session score and a short summary stay in the tab only (no accounts, no persistence across sessions).
Repository: github.com/chandravenky/practice_causal
- Home: method card grid (including All methods), mode toggle, Start →
/practice - Practice: one question at a time; loads from
/data/<method>.json; shuffle per session; no repeats within a run - MCQ: four options, immediate feedback, explanation, then next
- Open-ended: reveal model answer, key points (from
key_pointsorskills_testedin JSON), self-rating (got it / partial / missed) with PRD scoring - Summary: final score as
earned / totaland percentage, plus a question log
| Layer | Choice |
|---|---|
| Framework | Next.js (App Router) |
| Language | TypeScript (strict) |
| Styling | Tailwind CSS v4 |
| UI | shadcn/ui (Base UI primitives) |
| Font | Nunito (next/font/google) |
| Data | Static JSON under data/ (imported at build time) |
cd practice_causal
npm install
npm run devOpen http://localhost:3000.
Dependencies sometimes install incompletely (or global npm cache permissions break). From this folder:
npm run deps:repairIf deps:repair errors on EACCES under ~/.npm, fix cache ownership (macOS example):
sudo chown -R "$(whoami)" ~/.npmThen run npm run deps:repair again.
| Script | Purpose |
|---|---|
npm run dev |
Development server |
npm run build |
Production build |
npm run start |
Run production build |
npm run lint |
ESLint |
npm run deps:repair |
Clean reinstall using a project-local npm cache |
app/
page.tsx # Home - method + mode + start
practice/page.tsx
summary/page.tsx
components/ # UI pieces (home flow, practice session, mode selector, …)
data/ # One JSON file per causal method (MCQ + open-ended mixed)
lib/ # Types, parsing, scoring, question loading
PRD_causal_analysis_app_final.md
Remote: https://github.com/chandravenky/practice_causal
cd practice_causal
git remote add origin https://github.com/chandravenky/practice_causal.git
# If `origin` already exists:
# git remote set-url origin https://github.com/chandravenky/practice_causal.gitIf the GitHub repo already has commits (e.g. an initial README) and your local history is different, merge histories once:
git fetch origin
git pull origin main --allow-unrelated-histories --no-rebase
# Resolve any conflicts (e.g. README.md), then:
git add README.md
git commit -m "Merge remote main with local project"
git push -u origin mainIf you intend to replace the remote main entirely with this project (destructive):
git push -u origin main --force-with-leaseUse --force-with-lease only when you are sure no one else has pushed important work to main.
The PRD targets Vercel. Connect the GitHub repo, use the default Next.js settings, and deploy from main.
Private or public as you choose on GitHub; question content is yours to license.