An open API service indexing awesome lists of open source software.

https://github.com/codingwcal/js-sensei

Interactive JavaScript learning tool with quizzes, flashcards, AI tutor, and gamified belt progression. Built with Next.js, TailwindCSS, and Supabase.
https://github.com/codingwcal/js-sensei

ai gemini gemini-ai nextjs postgresql supabase supabase-auth tailwindcss typescript vercel

Last synced: 3 months ago
JSON representation

Interactive JavaScript learning tool with quizzes, flashcards, AI tutor, and gamified belt progression. Built with Next.js, TailwindCSS, and Supabase.

Awesome Lists containing this project

README

          

# ⛩️ JS Sensei

JS Sensei is an interactive learning dojo for JavaScript fundamentals.
Users can practice through quizzes, flashcards, and guided lessons while earning points and leveling up from white belt to black belt. The app features an AI tutor for personalized explanations, gamified progress tracking, and Supabase-powered authentication and persistence. Designed with Next.js 14, TailwindCSS, and modern tooling, it demonstrates full-stack skills in state management, database integration, and interactive UI/UX design

Train your JavaScript fundamentals in our interactive dojo.

Level up from white belt to black belt with practice quizzes, flashcards, and one-on-one tutelage from our AI Sensei.

---

## πŸš€ Live Demo

[**View Live App on Vercel**](https://js-sensei.vercel.app/)

*(Signin with Github + Demo mode available β€” explore topics without an account!)*

---

## πŸ›  Tech Stack

- Front End:
- [Next.js 14 (App Router)](https://nextjs.org/) + React + TypeScript
- [Tailwind CSS](https://tailwindcss.com/)
- Back End:
- [Supabase](https://supabase.com/) (Auth + Postgres for XP/Belts)
- Google Gemini API (AI Integrated Learning Hints + Tutor)
- Deployment/DevOps:
- [Vercel](https://vercel.com/) (hosting & deployment)

---

## πŸ“Έ Screenshots


JS Sensei Landing

Landing Page + Sign In with Github


JS Sensei Topics

Topics Page


JS Sensei Learn

Learn Page


JS Sensei Quiz

Quiz Page

---

## ✨ Features

- **Learning Topic Coverage**
- Variables & Types
- Arrays & Objects
- Loops & Conditionals
- Functions
- Must-Know Methods (map, filter, reduce)
- Async/Await
- APIs & Event Loop
- JS Intro
- **Diagnostic Test** β†’ Quickly find your weakest topic
- **Learn Pages**
- Explanations, code examples
- β€œShow Hint” and β€œExplain Differently” buttons
- Ask Tutor β€” AI-powered Q&A
- **Quizzes** β†’ Per-topic multiple choice, mastery tracking
- **Flashcards** β†’ Review built-in cards or add your own (+XP)
- **Gamification**
- XP system with belt ranks (πŸ₯‹ White β†’ Black)
- Toast notifications on actions (e.g., +20 XP for adding flashcards)
- **Authentication**
- GitHub sign-in with Supabase
- Demo mode (no account needed)

---

## πŸ— Project Structure

```
web/
β”œβ”€β”€ app/ # Next.js App Router pages
β”‚ β”œβ”€β”€ page.tsx # Landing page
β”‚ β”œβ”€β”€ topics/ # Topics overview
β”‚ β”œβ”€β”€ learn/ # Learn page with AI tutor + hints
β”‚ β”œβ”€β”€ quiz/ # Quiz pages
β”‚ β”œβ”€β”€ flashcards/ # Flashcards (browse + add)
β”‚ └── api/ # API routes (e.g., /api/hint)
β”œβ”€β”€ components/ # React components (Navbar, DemoMode, AuthButtons, etc.)
β”œβ”€β”€ hooks/ # Custom React hooks (e.g., useLocalMastery)
β”œβ”€β”€ lib/ # Utility functions (score.ts, mastery.ts, supabaseClient.ts)
β”œβ”€β”€ data/ # Static data (questions.json)
β”œβ”€β”€ public/ # Static assets (dojo.jpg, screenshots, icons)
β”œβ”€β”€ styles/ # Global styles (globals.css, Tailwind config)
β”œβ”€β”€ __tests__/ # Vitest test files
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

```

---

## βš™οΈ Local Development

1. clone repo

```
git clone
cd js-sensei/web
```

2. install dependencies

```
npm install
```

3. copy env file and fill it

```
cp .env.local.example .env.local
```

4. run dev server

```
npm run dev
```

## πŸ”‘ Environment Variables

Create a .env.local in /web with:

- [x] NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
- [x] SUPABASE_ANON_KEY=your_supabase_anon_key
- [x] GEMINI_API_KEY=your_gemini_api_key
- [x] NEXT_PUBLIC_SITE_URL=http://localhost:3000

Note:
Add your Vercel URL to Supabase Auth β€œSite URL” + β€œRedirect URLs”.
For GitHub sign-in, callback URL must be:

- [x] https://.supabase.co/auth/v1/callback

## πŸš€ Deployment

- Push repo to GitHub.
- Import into Vercel.
- Root Directory: web
- Framework: Next.js
- Add env vars (same as .env.local).

After first deploy:

- Add production URL to Supabase Auth settings.
- Update NEXT_PUBLIC_SITE_URL to the production domain in Vercel settings.

### Redeploy and enjoy πŸŽ‰

## πŸ“Œ Roadmap & Future Updates

- [ ] Progress bar for XP β†’ next belt
- [ ] Confetti on belt rank-up
- [ ] Streaks and daily challenges
- [ ] Dark mode dojo theme
- [ ] PWA support

## πŸ’‘ Inspiration (Teaching Takeaways)
- [The Programming Podcast with Leon Noel & Danny Thompson - JavaScript Roadmap](https://www.youtube.com/watch?v=U4CbEV1QfOs)
- [MIT Bloom Two Sigma Problem](https://web.mit.edu/5.95/readings/bloom-two-sigma.pdf)

## πŸ“„ License: MIT