DEV Community

Mothilal M
Mothilal M

Posted on

We Finished Our AI Chess Coach: Meet Chaturanga ♟️

GitHub “Finish-Up-A-Thon” Challenge Submission

This is a submission for the GitHub Finish-Up-A-Thon Challenge.

What We Built

Chaturanga (चतुरङ्ग) is an AI-powered chess learning app for iOS & Android, built with Flutter. The idea is simple but stubborn: playing chess and understanding it should happen in the same place.

You play real games against an on-device Stockfish engine, and a grandmaster-style AI coach named "Acharya" sits with you the whole time — you can ask "why that move?" or "what would a GM do here?" and get a clear, human explanation instead of a raw engine evaluation. After the game, a debrief shows your best move, your biggest blunder, and the one concept to take away.

It's named after chaturanga, the ancient Indian game that modern chess descends from — chess was born in India, and this app helps it teach.

What's actually in it:

  • ♟️ Play vs Stockfish — on-device engine, adjustable skill (1–20), with a pure-Dart fallback engine on desktop.
  • 🧠 AI coach (Acharya) — context-aware (gets the live FEN + move history), supports OpenAI and Google Gemini, streams replies token-by-token, and works with the built-in proxy or your own API key (stored only in the device's secure storage).
  • 🔍 Post-game debrief — evaluation chart, best/worst move detection, and a "My Mistakes" trainer that resurfaces your blunders to fix later.
  • 📚 Learn & Quizzes — interactive lessons with arrows/highlights and tactical puzzles, with a streak + daily-challenge loop.
  • 🏆 Gamification — XP and 7 progression tiers (Pawn → Grandmaster), daily streaks, and unlockables.
  • 🎨 Make it yours — 16 piece styles, 4 board themes, sound effects, and smart local notifications.
  • 📦 Offline-first & private — the engine runs fully offline and all progress is stored locally (Hive); there is no cloud account and no tracking.

Tech: Flutter · Riverpod · go_router · Stockfish (FFI) · bishop · squares · Hive · dio · flutter_secure_storage.

🔗 Repo: https://github.com/Mothilal-M/Chaturanga

Demo

https://drive.google.com/file/d/1MgDVRSBaVmaM3h-yf7VK43ELnAL8dAGw/view?usp=drive_link

The Comeback Story

This is exactly the kind of project this challenge was made for.

Before: Chaturanga was an ambitious side project I got most of the way through and then stalled. The hard parts were actually done — the Stockfish integration, the AI coaching loop, the board UI, the lessons/quizzes engine — but it was stuck in "almost":

  • It still had half-removed backend plumbing (leftover Firebase/Remote-Config references) from an architecture I'd abandoned.
  • The Learn/Quizzes engines worked, but the content was third-party data I couldn't legally publish, so the app couldn't go public.
  • There was no real README, no license, no public release — it lived only on my machine.

I stopped because the app was maybe 90% done and everything left was the un-fun 10% — licensing the lesson content, ripping out a backend I'd outgrown, and writing docs — so it quietly sat on my drive for months. This challenge was the deadline-shaped nudge I needed to finally clear those blockers and put it in front of people.

After (what I finished for this challenge):

  • 🧹 Cleared the dead backend — removed the Firebase/Remote-Config remnants so the codebase honestly reflects what it is: a private, local-first app.
  • ✍️ Replaced the unpublishable content with my own — wrote an original starter set of lessons and tactical puzzles in the app's JSON format, so Learn & Quizzes work out of the box and the whole thing is safe to open-source.
  • 📖 Made it a real project — proper README, MIT license, repo description/topics, and a clean public history.
  • 🚀 Shipped it — Chaturanga is now public on GitHub for the first time.

The "almost-done project gathering dust" finally became a finished, shippable app. That's the arc.

My Experience with GitHub Copilot

Copilot was the thing that got me over the "last 10%" hump — the unglamorous finishing work that's easy to procrastinate on.

  • Repo-wide context that paid off. I added a .github/copilot-instructions.md describing the architecture (Riverpod, go_router, Hive, local-only, the AI-coach flow). After that, Copilot's suggestions actually fit my conventions instead of generic Flutter boilerplate.
  • Regenerating the content. The biggest blocker was replacing the third-party lesson/quiz data. I used Copilot to scaffold new JSON in the exact schema the app expects — lesson trees (root + variations) and puzzles (fen + solutionUcis) — and to sanity-check positions.

The biggest blocker was replacing the third-party lesson/quiz data. I used Copilot Chat to scaffold new JSON in the exact schema the app expects — for example: "Using the lesson/quiz schema in copilot-instructions.md, generate a beginner back-rank-mate puzzle with a fen and solutionUcis." It got the structure right immediately, so I could focus on verifying the chess instead of the JSON.

  • Cleanup & consistency. Copilot helped me hunt down and remove the stale Firebase references and keep doc comments consistent across files.
  • Docs at the finish line. It sped up writing the README and this very post structure.

Once Copilot had that instructions file, it stopped guessing and started writing code that fit the project — five minutes of setup paid for itself within the hour. The flip side: it happily produced chess puzzles with illegal or non-mating positions, so I still verified every fen by hand. A good reminder that it accelerates the work but doesn't replace your judgment.


Thanks for reading! If you want to try it or read the code, it's all here: https://github.com/Mothilal-M/Chaturanga

A note on the repo: this is a brand-new public repository. The original lessons and puzzles, I don't want to distribute the data, so I stripped that out and shipped a small original starter set in its place — Learn and Quizzes now run entirely on my own content, which is what made it safe to open-source.

Top comments (0)