← All projects
AI-adaptive study game

Foitilingo

An AI-adaptive, gamified study web app. Paste notes or upload a PDF, PowerPoint or text file, and Foitilingo turns them into timed multiple-choice rounds you can play alone or live against friends. Built by a team of four for FuturEdAI2026.

2026 Built at the FuturEd AI hackathon, University of Crete ↗
Node.js Express Vanilla JavaScript OpenAI API AWS Bedrock pdf.js fflate multer node:test

Project Overview

Foitilingo turns your notes into a game you actually want to play. A student pastes notes or uploads a PDF, PowerPoint or text file. An AI reads it, splits it into topics, and writes multiple-choice questions in the language of the material (Greek notes give Greek questions). The student then plays timed rounds, alone or live against friends in Kahoot-style rooms, earning points, XP, levels, streaks, badges and avatar items.

Practice adapts to each player: weak topics come up more often with easier questions, strong topics get harder ones. Every wrong answer gets an explanation of what exactly was wrong with the chosen option and why the right one is right. It is a free demo with no passwords: players just pick a name.

Key Features

  • Upload and generate – Paste text or add .txt, .pdf or .pptx; topics and questions are written in the background with a progress ring in the Library
  • Adaptive practice – Choose a round of 5, 10, 15 or 20 questions; the round starts instantly and the missing questions are written while the player answers
  • Explanations that teach – Each question carries a reason for the right answer and one reason per wrong option, so a mistake is explained, not just marked
  • Live multiplayer rooms – A 4-letter code, up to 20 players, the same questions at the same time, a leaderboard after each question, and a final podium
  • Gamification – Kahoot-style speed scoring, XP and levels, daily streaks, combos, 12 badges with progress bars, weekly and all-time scoreboards, and 32 collectible avatar items
  • Profiles – Public profiles with rank, streaks, accuracy and badges; players can change name, daily goal and avatar
  • Accessibility – Built to WCAG 2.2 AA, with screen reader, keyboard-only, colour-blind, dark mode and reduced-motion support

Technical Implementation

Architecture. A Node.js 22 and Express backend serves a plain HTML, CSS and JavaScript frontend (no framework, ten pages, about 4,200 lines of JS and 1,000 lines of CSS). There is no database: data lives in JSON files behind a small storage module that writes through a temporary file and renames it, so a crash never leaves a half-written file. Reads and writes are synchronous, so a read-modify-write can never interleave. Players are identified by an X-Player-Id header (demo login by name, no passwords), and a server-side check keeps every player's materials and answers private.

The AI layer. One file is the only code that talks to the model, and it supports OpenAI (default model gpt-4o-mini) and AWS Bedrock, switchable by one setting. Uploads go through a background pipeline: text is cut into chunks, the AI finds topics, then writes questions for up to three topics in parallel. A material shows Processing, Ready or Failed (with a retry button), and a server restart marks interrupted jobs as failed instead of leaving them stuck. The output is checked in code: tolerant JSON parsing, shuffled answer options so the correct letter is not biased, near-duplicate questions dropped, markdown and emoji stripped without damaging math, math symbols repaired from PDF symbol fonts, and any question that refers to "the text" or "the slides" dropped, in English and Greek.

Adaptive learning. Each topic has a mastery score (recent accuracy weighted by confidence, so one lucky answer shows 10%, not 100%) and an Elo-style skill estimate on the same 1 to 5 scale as question difficulty. Questions are drawn by weighted random sampling: weaker topics more often, unseen or missed questions first, and questions near the player's skill preferred. Every press on a topic also writes a fresh batch in the background: weak topics (under 40% mastery) get more, easier questions; strong topics (70% and up) get harder ones.

Rounds that start instantly. The server answers at once with the questions that already exist, and if fewer exist than requested it writes the shortfall in the background. The page asks for the new questions every two seconds and adds them to the running round, so the first round of a topic is served in milliseconds instead of waiting up to 30 seconds for the AI.

Scoring and rewards. A question is worth 250, 500, 1,000, 2,000 or 4,000 points by difficulty, and the points fall in a straight line over its 40-second timer. Every 5,000 XP is a level. Badges are computed from one progress function, so the progress bars and the awarding can never disagree. The 32 avatar items are drawn as SVG in the browser and are never lost once unlocked.

Live rooms. The room game is driven by timestamps, not timers: every request first advances the room to where the clock says it should be. Nothing runs in the background, so a server restart in the middle of a game loses nothing. The server measures each answer's time itself, so a browser cannot send a faster time, and it never sends the correct answer or explanation before a question is over. XP is given once, when the room finishes, and only if at least two players answered.

Files and languages. PDFs are read with pdf.js, and PowerPoint text is extracted on the server. Before upload, the browser strips images and video out of the deck with fflate, so a 500 MB deck becomes a small text upload.

Accessibility and performance. The first tab stop is "Skip to content", answers can be picked with the keys 1 to 4 or A to D, results are announced through live regions, and nothing depends on colour alone. The app has a dark theme, honors reduced motion, and works from 320 pixels wide. Automated accessibility audits (axe-core) are clean on every page.

Testing. 83 automated tests run with npm test, including tests that replace the AI with a slow fake to prove rounds never wait, tests that replace the clock to play whole multiplayer games in milliseconds, and tests that check no answer or player id ever leaks to the browser.

The team

Eftychios Papasifakis

Eftychios
Papasifakis

Charalampos Sidiropoulos

Charalampos
Sidiropoulos

Christos Kazakos

Christos
Kazakos

Konstantinos Valaisiadis

Konstantinos
Valaisiadis