A chess learning platform built with Laravel and React that helps players improve by studying their own mistakes through spaced repetition flashcards.
Blunder Bank is a personal chess improvement tool designed for players who want to systematically analyze and learn from their blunders. Rather than relying on engine analysis or automated imports, Blunder Bank puts you in controlโyou define what made the move a blunder, categorize it, and practice it until it sticks.
The core philosophy: Manual Entry = Deeper Learning. By forcing yourself to admit and analyze your errors, you create a more meaningful learning experience.
- Add chess blunders from your games manually
- Store the chess position (FEN format), correct move, and opening details
- Add personal notes explaining why it was a blunder (tactical blindspot? Time pressure? Opening trap?)
- Track ELO rating at the time of the blunder
- Link to source games
- General Practice: Review all blunders or filter by specific criteria
- Focused Practice: Targeted training sessions for specific blunders
- Answer interface for interactive learning
- Overall accuracy percentage across all cards
- Correct vs. wrong attempts tracking
- Practice streaks (current and highest streak)
- Last practiced timestamp
- Filter blunders by:
- Accuracy percentage
- User ELO rating
- Date created
- Date last practiced
- Opening name
- Search by notes
- Email verification
- Two-factor authentication (2FA) support
- Secure password hashing
- Session management
- Clean, responsive React interface with Inertia.js
- Real-time data updates
- Tailwind CSS styling with Radix UI components
- Dark mode support
- Mobile-friendly design
- Framework: Laravel 12
- Authentication: Laravel Fortify (with 2FA support)
- Database: MySQL/PostgreSQL (migrations included)
- API: RESTful endpoints for flashcard CRUD operations
- Testing: Pest PHP
- Code Quality: Pint (PHP linter)
- Library: React 19
- Routing: Inertia.js (server-side routing with React components)
- Styling: Tailwind CSS 4
- UI Components: Radix UI
- Build Tool: Vite
- Type Safety: TypeScript
- Code Quality: ESLint, Prettier
- Package Manager: Composer (PHP), npm (JavaScript)
- Local Development: Laravel Sail (Docker)
- Queue Support: Laravel Queue (for background tasks)
blunder-bank/
โโโ app/
โ โโโ Models/
โ โ โโโ User.php # User model with stats
โ โ โโโ FlashCard.php # FlashCard model
โ โโโ Http/
โ โ โโโ Controllers/ # FlashCardController, UserController
โ โ โโโ Middleware/ # Auth middleware
โ โ โโโ Requests/ # Form request validation
โ โโโ Actions/
โ โโโ Concerns/ # Traits for reusable logic
โ
โโโ resources/
โ โโโ js/
โ โ โโโ pages/ # React page components
โ โ โ โโโ dashboard.tsx # Dashboard with stats
โ โ โ โโโ blundersList.tsx # Library view with filters
โ โ โ โโโ practiceFlashCards.tsx
โ โ โ โโโ focusedPracticeFlashCards.tsx
โ โ โ โโโ welcome.tsx # Landing page
โ โ โโโ components/ # Reusable React components
โ โโโ css/ # Tailwind configuration
โ โโโ views/
โ โโโ app.blade.php # Root Blade template
โ
โโโ routes/
โ โโโ web.php # All application routes
โ
โโโ database/
โ โโโ migrations/ # Database schema
โ โโโ factories/ # Seeding factories
โ โโโ seeders/ # Database seeders
โ
โโโ tests/ # Pest PHP tests
โโโ config/ # Laravel configuration
โโโ bootstrap/ # Bootstrap files
โ
โโโ vite.config.ts # Vite build configuration
- PHP 8.2+
- Composer
- Node.js 18+ & npm
- MySQL/PostgreSQL database
-
Clone the repository
git clone <repository-url> cd blunder-bank
-
Run setup script (Recommended)
composer run setup
This will:
- Install PHP dependencies
- Create
.envfile - Generate app key
- Run database migrations
- Install npm packages
- Build assets
-
Manual setup (If needed)
# Install dependencies composer install npm install # Environment configuration cp .env.example .env php artisan key:generate # Database setup php artisan migrate # Build frontend assets npm run build
Start the development server with all required services:
composer run devThis runs concurrently:
- Laravel development server (port 8000)
- Queue listener
- Vite dev server (HMR)
For SSR (Server-Side Rendering):
composer run dev:ssrnpm run build
php artisan queue:workid,name,email,passwordemail_verified_at,two_factor_secret,two_factor_recovery_codes- Statistics:
stats_total_correct,stats_total_wrong,stats_last_practiced_at,stats_current_streak,stats_highest_streak
id,user_id(foreign key)fen(chess position)correct_move(correct response)note(long text explanation)user_elo_at_time(ELO rating when added)opening_name(e.g., "Sicilian Defense")source_game_url(link to game source)- Statistics:
times_correct,times_wrong,last_practiced_at,priority_score - Timestamps:
created_at,updated_at
All authenticated endpoints require session or token authentication.
POST /api/flashcardsโ Create new flashcardGET /api/flashcardsโ List all user's flashcardsGET /api/flashcards/:idโ Get specific flashcardPATCH /api/flashcards/:idโ Update flashcardDELETE /api/flashcards/:idโ Delete flashcardGET /api/flashcards/next-cardโ Get next card for practicePOST /api/flashcards/answer-attempt/:idโ Record practice attempt
GET /api/dashboard/statsโ Get user statistics
Run tests with:
composer test # Run all tests with linting checks
npm run lint:check # Check JavaScript linting
npm run types:check # Check TypeScript typesFrom todo.tasks:
- โ Accept multiple correct moves per card
- โณ Improve focused practice accuracy logic
- โณ Add Privacy Policy screen in footer
- โณ Implement platform logo
- โณ Add meta tags for better social sharing
- Major: Migrate endpoints to API-first with token authentication (for mobile app compatibility)
Chess positions are stored in FEN formatโa standardized way to describe any chess position. Example:
r1bqkb1r/pppp1ppp/2n2n2/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 4
The platform is designed with spaced repetition principles in mindโcards you struggle with are revisited more frequently, helping you solidify weak areas.
Internal system to determine which cards need practice based on accuracy and recency.
Contributions welcome! Please ensure:
- Code follows Pint (PHP) and ESLint/Prettier (JavaScript) standards
- Tests pass:
composer test - Type checks pass:
npm run types:check
MIT License
Made by Kian Jacob Anthony Tubalinal
For issues or questions, please open an issue on the repository.
- Laravel Documentation
- Inertia.js Documentation
- React Documentation
- Chess FEN Format
- Spaced Repetition Learning
Happy studying! Turn those blunders into strength. โ๏ธ