Inspiration

In Java lab exams, writing the program is only half the test. The viva is where you are asked why your code works, and most students prepare by re-reading their code and hoping. There was no easy way to practise being questioned, see which concepts are weak, or revise quickly. VivaPilot fixes that.

What it does

VivaPilot is an AI trainer for Java students with four modes:

  • Explain: paste a Java snippet and get a plain-language explanation, likely bugs, and time and space complexity.
  • Viva: the AI asks one question at a time about your code or a topic, scores your answer out of 10, and shows the model answer.
  • Weak-topic tracker: it remembers which concepts you got wrong (inheritance, exceptions, collections) and drills those next.
  • Revision pack: paste your notes and get flashcards and a short summary.

How we built it

A Node.js and Express backend exposes four small endpoints. Each one builds a different prompt and sends it to Google's Gemini API (gemini-3.5-flash), then validates the JSON reply before sending it to the browser. The API key stays on the server. The frontend is plain HTML, CSS and JavaScript. Viva scores are saved by topic in the browser's localStorage, so the weak-topic tracker works without a database or accounts. We built it by working from a PRD and architecture document written first.

Challenges we ran into

Getting reliable structured output from the model was the hardest part, so every reply goes through a validator that retries once when the JSON is invalid. We also had to keep the weak-topic tracker consistent, which we solved with a fixed list of Java topics the model must choose from. Along the way a newer model name was extremely slow, so we tested several and pinned the fastest. GitHub's push protection caught an API key we had left in an example file, and we rewrote the history to remove it.

Accomplishments that we're proud of

A full working loop: explain code, get quizzed on it, see your weak topics update, and have the next question target them. Everything runs with no accounts and no database.

What we learned

What's next for VivaPilot: AI Java Viva Trainer

More languages (Python, C++), saved progress with accounts, and a shareable weak-topic report for teachers.

Built With

Share this project:

Updates

Submission history