Skip to content
boomboompower
← Projects

Duolingo Tracker

Archived 1 June 2023 · TypeScript · Node.js


Overview

This is a small tool that logs daily Duolingo progress: XP earned against goal, streak, session count and time, and words or characters learned. Results are appended to a data file that feeds a simple public chart page, and the whole thing runs unattended on a daily schedule.

Architecture

A small client wraps Duolingo’s own, endpoints for login/user info, course data, and XP summaries. Each day, the relevant endpoints are called, and the resulting record is merged into a running data file rather than simply appended, so a same-day re-run updates that day’s entry instead of duplicating it. If a streak freeze was used instead of an actual lesson, session stats for that day are zeroed out rather than left stale.

Design Decisions

Authentication uses a stored token rather than a live login flow on each run, and requests are sent with a desktop browser user agent to reduce friction with anti-bot measures. A debug mode caches raw responses to disk by request hash, so repeated development runs do not repeatedly hit Duolingo’s servers.

Challenges

Working against an undocumented API meant handling failure modes that only show up in practice: a distinct case for a captcha-triggered lockout, in addition to normal authentication and not-found errors. Several response fields were reverse-engineered and left loosely typed, since their structure was not fully known at the time.

What’s Next

This project is not under active development. Its response types could be filled in more completely, and the loosely-typed and untested corners of the API client would need attention before extending it further.