A chess.com-quality chess training platform built with Next.js 16
65+ puzzles ยท 80+ openings ยท 8 AI difficulty levels ยท Full gamification
| Category | Highlights |
|---|---|
| ๐ฏ Puzzles | 65 tactical puzzles, Puzzle Rush mode, multi-level hints, theme filtering, combo streaks |
| ๐ค Play vs AI | 8 levels (400โ2000 ELO), pre-move system, time controls, eval bar, opening detection |
| ๐ Learn | 80+ openings with ECO codes, 10 opening traps, interactive move-by-move lessons |
| ๐๏ธ Training | Coordinate trainer, 12 endgame practice positions, blindfold mode |
| ๐ Gamification | 15 levels, 24+ achievements, daily challenges, weekly missions, XP combos |
| ๐ Analytics | Rating graphs, tactical radar chart, activity heatmap, move quality annotations |
| ๐จ Customization | 7 board themes, 5 piece styles, dark/light mode, zen mode |
| ๐ฑ Platform | Fully responsive mobile + desktop, PWA installable, keyboard shortcuts |
Challenge a custom-built chess engine with 8 difficulty levels โ from beginner-friendly random play to a depth-6 tactical monster.
- 8 AI opponents โ Beginner Bot (400) โ Stockfish Beast (2000)
- Engine โ Negamax with alpha-beta pruning, quiescence search, piece-square tables, MVV-LVA move ordering, and opening book
- Time controls โ Unlimited, 1/3/5/10 min, or increment (5|3, 10|5)
- Pre-move system โ Queue your next move while AI thinks
- Evaluation bar โ Real-time position assessment beside the board
- Opening detection โ Automatically identifies 66+ openings by ECO code
- Move quality annotations โ Post-game analysis marks moves as
!!!?!??? - Keyboard move input โ Type moves in SAN (
Nf3) or coordinate (e2e4) notation - Board controls โ Resize (280โ600px), flip, coordinates toggle, blindfold mode
- FEN copy โ One-click copy of current position
- PGN export โ Download or copy full game notation
- Captured pieces โ Material balance display
- Resign โ With confirmation dialog
65 hand-picked puzzles across multiple themes and difficulty levels with a satisfying progression system.
- Puzzle categories โ Forks, pins, skewers, back-rank mates, discovered attacks, and more
- Difficulty tiers โ Easy, Medium, Hard, Expert with color-coded badges
- Theme filtering โ Filter by tactical motif
- Multi-level hints โ 4 progressive hint levels (highlight piece โ show square โ draw arrow โ reveal answer) at 5 XP each
- Puzzle Rush โ Speed mode: solve as many as possible in 3 or 5 minutes
- Combo system โ Chain correct solves for 2xโ3x XP multipliers
- Perfect solve bonus โ Extra XP for solving without hints or mistakes
- Tactical radar chart โ SVG radar visualization of your strengths/weaknesses across puzzle themes
- Share buttons โ Share your solve on social media
80+ chess openings with interactive board visualization, move annotations, and win-rate statistics.
- Categories โ King's Pawn (1.e4), Queen's Pawn (1.d4), and Flank openings
- Interactive lessons โ Step through each opening move-by-move with annotations
- Win rate stats โ White/Draw/Black percentages for each opening
- Key ideas โ Strategic concepts explained for every opening
- Difficulty ratings โ Beginner to Advanced
- ECO classification โ Standard Encyclopedia of Chess Openings codes
10 deadly traps with step-by-step explanations to catch opponents off guard.
- Famous traps โ Legal Trap, Fried Liver, Stafford Gambit, and more
- For both sides โ Traps for White and Black
- Interactive board โ Walk through each trap move-by-move
- Strategic context โ Why each trap works and how to set it up
- 30-second timed challenge โ find the named square on the board
- Score, accuracy, streak, and best streak tracking
- Visual feedback with color-coded correct/incorrect flashes
- 12 curated positions across Basic, Intermediate, and Advanced categories
- K+Q vs K, K+R vs K, Lucena Position, Philidor Position, and more
- Play against AI (depth 4) to practice technique
- Tips and explanations for each position
- Toggle in Settings to hide all pieces on the board
- Train board visualization and memory
- Works in Play vs AI and practice modes
15 progression levels with unique titles and exponential XP requirements:
| Level | Title | XP Required |
|---|---|---|
| 1 | Pawn | 0 |
| 2 | Knight Initiate | 100 |
| 3 | Bishop's Student | 250 |
| 5 | Queen's Guard | 800 |
| 8 | Expert | 2,500 |
| 10 | Grandmaster | 5,000 |
| 15 | Chess Immortal | 17,000 |
24+ achievements across 4 rarity tiers:
- ๐ข Common โ First Steps, Opening Scholar, Trap Apprentice
- ๐ต Rare โ Tactician (50 puzzles), Rating milestones (1200+)
- ๐ฃ Epic โ Grandmaster (1600+ rating), 10-game streak
- ๐ก Legendary โ Chess Master (2000+ rating), 20x combo
- Daily puzzle โ Fresh challenge each day with bonus XP
- Daily login bonus โ 5โ50 XP based on streak length
- Weekly missions โ 4โ5 rotating challenges (e.g., "Solve 20 puzzles", "Learn 3 openings")
- Streak tracking โ Current and best streak with visual calendar
Classic Green ยท Wooden Brown ยท Ocean Blue ยท Royal Purple ยท Rose Pink ยท Tournament ยท Deep Sea
Standard ยท Neo ยท Classic ยท Minimal ยท Rose
Dark mode (default) ยท Light mode ยท System auto-detect
- Zen Mode โ Fades away all non-essential UI for distraction-free play
- Reduced Motion โ Respects
prefers-reduced-motion; manual toggle available - Keyboard shortcuts โ
Cmd/Ctrl+Kcommand palette,Cmd+1โ5quick nav,Hfor hint,Nfor next - Sound & haptic toggles โ Independent controls for sound effects and vibration
- Rating graph โ Puzzle rating history with trend indicators
- Activity heatmap โ GitHub-style 52-week contribution calendar
- Tactical radar โ SVG radar chart showing strengths across puzzle themes
- Move quality analysis โ Post-game move annotations with color coding
- 8 profile stats โ Games Played, Puzzles Solved, Openings Learned, Traps Mastered, Current Streak, Best Streak, Puzzle Rating, Total XP
- Recent games โ Last 8 games with W/D/L indicators
- Areas to improve โ Top failed puzzle themes with progress bars
- Mobile โ Bottom navigation, touch-optimized 44px+ tap targets, swipe-friendly
- Desktop โ Persistent sidebar, command palette (
Cmd+K), hover preloading, keyboard shortcuts
- Installable on iOS, Android, and desktop
- Standalone display mode with custom splash screen
- App icons at 192px, 512px, and SVG
- Lazy-loaded pages with React
Suspenseand skeleton fallbacks - Memoized chessboard rendering (64 squares, piece caching)
- Code-split routes โ only dashboard loads eagerly
- Turbopack builds in ~5 seconds
- Glassmorphism card styling with backdrop blur
- Framer Motion page transitions and micro-interactions
- XP floating text, level-up celebrations, achievement particle bursts
- Confetti on puzzle completion, combo fire effects
- Animated counters, progress rings, and shimmer text
| Layer | Technology |
|---|---|
| Framework | Next.js 16.1.6 (App Router, Turbopack) |
| UI | React 19.2 + TypeScript |
| Styling | Tailwind CSS 3.4 + custom CSS |
| Animations | Framer Motion 11 |
| Chess Logic | chess.js 1.0 + custom engine |
| Icons | Lucide React |
| Auth | JWT (jose) + bcryptjs |
| Database | Upstash Redis |
| Fonts | Inter + Space Grotesk (Google Fonts) |
| Deployment | Vercel |
- Node.js 18+
- pnpm (recommended) or npm
- Upstash Redis account (optional โ works in demo mode without it)
# Clone the repository
git clone https://github.com/nitheesb/chessmind.git
cd chessmind
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env.localEdit .env.local:
UPSTASH_REDIS_REST_URL=https://your-redis-url.upstash.io
UPSTASH_REDIS_REST_TOKEN=your-redis-token
JWT_SECRET=your-secure-random-string-min-32-chars# Start development server
pnpm devOpen http://localhost:3000 to view the app.
No Redis credentials? No problem. The app runs fully in demo mode:
- All features work using localStorage
- Progress persists per browser
- No authentication required
# Option 1: CLI
npm i -g vercel
vercel
# Option 2: Git integration
# Push to GitHub โ Connect to Vercel โ Auto-deploy on pushAdd environment variables in Vercel dashboard:
| Variable | Description |
|---|---|
UPSTASH_REDIS_REST_URL |
Upstash Redis REST URL |
UPSTASH_REDIS_REST_TOKEN |
Upstash Redis REST token |
JWT_SECRET |
Secret key for JWT signing (min 32 chars) |
- Go to console.upstash.com
- Create a new Redis database
- Select a region close to your Vercel deployment
- Copy the REST URL and Token to your environment variables
chessgrind/
โโโ app/ # Next.js App Router
โ โโโ api/
โ โ โโโ auth/ # Login, register, logout, session
โ โ โโโ user/ # Progress sync & updates
โ โโโ learn/ # SEO-friendly learning pages
โ โโโ layout.tsx # Root layout with SEO metadata
โ โโโ page.tsx # Entry point
โโโ components/
โ โโโ chess/ # Chessboard, eval bar, coordinate trainer
โ โโโ desktop/ # Desktop-specific page variants
โ โโโ pages/ # Mobile-first page components
โ โโโ shell/ # App shell (mobile + desktop)
โ โโโ ui/ # Shared UI (radar, heatmap, animations, etc.)
โโโ lib/
โ โโโ chess-engine.ts # Custom AI engine (negamax, alpha-beta, PSTs)
โ โโโ chess-data/ # Openings, puzzles, traps datasets
โ โโโ opening-detection.ts # ECO opening book (66 entries)
โ โโโ endgame-positions.ts # 12 curated endgame positions
โ โโโ move-quality.ts # Post-game move annotation analyzer
โ โโโ game-context.tsx # Global game state (React Context)
โ โโโ settings-context.tsx # App settings (theme, sound, etc.)
โ โโโ chess-store.ts # Levels, achievements, XP calculations
โโโ styles/globals.css # Tailwind + custom styles
โโโ public/manifest.json # PWA manifest
โโโ vercel.json # Vercel configuration
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Create new account |
| POST | /api/auth/login |
Sign in |
| POST | /api/auth/logout |
Sign out |
| GET | /api/auth/session |
Check session status |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/user/sync |
Fetch user progress |
| POST | /api/user/sync |
Sync progress to server |
| POST | /api/user/progress |
Update specific progress fields |
- Open chessgrind.vercel.app in Safari
- Tap the Share button
- Select Add to Home Screen
- Open in Chrome
- Tap โฎ menu โ Install app
- Open in Chrome/Edge
- Click the install icon in the address bar
MIT
Contributions are welcome! Please open an issue or submit a pull request.