All work

Calculi

A PWA used by 151,000+ Tunisian students: university and Bac grade calculators, target-grade simulations, and the full national orientation guide, extracted from a 203-page PDF into 870+ searchable pages.

Visit live site · Calculi Media Kit 2026 (PDF)

Started
November 2022
Timeline
Ongoing since Dec 2022
Complexity
High
Type
Web App, Data, SEO

Calculi-tn is the grade calculator Tunisian students open every exam season. It started in December 2022 as a single page that did one sum, the university average. Since then it has grown into a platform 151,765 people have used: calculators for university and the Bac, target-grade simulations, and the complete national orientation guide, turned from a 203-page PDF into 870+ searchable pages. I design, build, operate and fund it on my own.

The full audience report is attached under Resources as Calculi Media Kit 2026 (PDF).

The problem

Every exam season, Tunisian students run into the same arithmetic. University averages come in several grading schemes across two exam sessions, the Bac has a different formula for each of its seven streams, and the national orientation guide is a 203-page PDF whose score tables are images. The information is public, but turning it into an answer is not. Calculi's job is to make each of these a thirty-second task, on a phone, with no account required.

Results

At a glance: 151,765 users, 339,187 sessions, 566,190 page views, 1.5M events, 3m03s average session, 50.3% engagement rate, 37,963 returning users

Every visit was earned: 80% of sessions come from organic search, and there has never been an ad budget. The average session lasts just over three minutes, about the time it takes to type in a whole transcript, and 37,963 people have come back.

Users per year: 6,733 in 2023, 26,855 in 2024, 56,839 in 2025 and 66,243 in 2026 up to September

Users grew ×4 from 2023 to 2024 and ×2 from 2024 to 2025. By September, 2026 had already passed all of 2025.

Heatmap of page views by month and year, showing waves in January–March and May–July

Traffic follows the academic calendar: university exams from January to March, then Bac results and orientation from May to July. The best month on record, June 2026, brought 20,284 users and 94,133 page views, and the best single day brought 2,664 users.

Audience: 89% Tunisia; Tunis, Sfax and Sousse lead; 42% of users aged 18–24; 59% female
Acquisition: 80% organic search; 78% of users on mobile

78% of users are on a phone. That shaped the product from the first line: fast pages, instant calculation, and an app that installs to the home screen and works offline.

What I built

Calculators and simulations

The university calculator with eight subjects and a general average of 11.97

A university average calculator that covers every grading scheme and both exam sessions. Transcripts are saved to the cloud, where students can compare and print them, and work in progress survives a page reload.

Bac Maths calculator: average 14.68, FG score 146.11, result "Admis"

Seven Bac calculators, one per stream, for both the principal and the resit session, including the regional bonus.

The simulation window: a plan to reach 13.00 from 11.97, spread across subjects

Target simulations answer the question students actually ask: “what do I need to get 13?” Calculi turns a target into a realistic plan across the student's subjects, which they can adjust, save and compare.

The orientation guide, online

The orientation shelf with the 2026 edition: 3,215 programmes, 709 codes, 188 institutions

The Ministry's guide rebuilt as a website. Each yearly edition sits on its own shelf, every Bac stream becomes a filterable table, each of the 709 programme codes gets its own page, and one search box works across French and Arabic.

A Bac stream table with filters, sorted by 2025 score

Where can I go with this score?

Orientation simulation: programmes grouped by how reachable they are for a given score

Starting from a Bac result, Calculi shows every programme in the country the student can realistically reach, each scored with the formula that programme actually uses. It then turns that into a rehearsal of the real application form: students put their choices in order and see roughly where the assignment would land.

It is built to be honest about uncertainty. Last year's cut-offs are treated as evidence rather than promises, and a question the student hasn't answered is never counted against them.

A saved choice list, showing where the assignment would likely stop

Voices from students

Student accounts on a programme page

Each programme page carries accounts from students and graduates of that programme. They are moderated, ranked by readers, and styled so they can never be mistaken for official data.

One account, adapted to each student

Student profile with shortcuts to the calculator, transcripts and simulations

The profile puts the right tools first for a Bac candidate or for a university student, without hiding anything from either.

Calculi on a phone: the orientation guide and a Bac calculator

Hard problems

Turning a 203-page PDF into data

The orientation guide was the hardest engineering problem in the project. Its Arabic text decoded to gibberish because of broken font mappings, and the score tables (about 120 of them, around 13,000 cells) existed only as images. I built a separate extraction pipeline to handle this. It recovers the text deterministically without OCR, rebuilds the tables with a computer-vision process that preserves merged cells, and checks every value against the domain's rules, flagging anything uncertain for review instead of guessing.

203-page PDF → 3,215 programmes → 870+ pages → 47 KB gzipped. The whole national guide ships as a compact dataset, so the guide pages load fast and stay online independently of the database.

Being right, seven times over

Every Bac stream has its own formulas and every programme has its own, so correctness is the product. An automated verification suite keeps the calculators, the guide and the simulations consistent with each other.

Two languages, two directions

The interface is French, the data is Arabic, and students mix both in the middle of a sentence. Getting text direction, search and typography right across that mix was a project of its own.

Built for peaks

Traffic multiplies several times over within a few weeks every summer. The platform absorbs those peaks on modest infrastructure and stays fast on the phones students actually use.

Architecture

  • Node.js and Express with server-rendered pages, running as a container on Google Cloud Run behind Cloudflare. MongoDB Atlas holds user data and Cloudinary holds media.
  • Seven subsystems in one codebase: calculators, simulations, the orientation guide, testimonials, payments, and two publications sharing one CMS.
  • Calculation in the browser, validated on the server.
  • A Progressive Web App with offline support.
  • SEO architecture for 880+ indexable pages: generated sitemaps, structured data, canonical URLs, and share cards in each interface language.
  • A custom verification suite covering templates, routes, localisation and right-to-left behaviour, and historically fragile paths.

Security and privacy

Calculi holds student accounts, stored grades and real payments, so security was part of the design from the start, not added later:

  • Layered CSRF protection and strict request-origin validation.
  • Rate limiting on sensitive endpoints, with privacy-preserving abuse records.
  • Secure password handling, and account recovery that never reveals whether an account exists.
  • User-generated content is sanitised, and uploads are validated.
  • Payments are verified independently with the provider before anything is granted.
  • Security headers, managed secrets, and error pages that never expose internals.

Business model

The ad-free subscription page: 6 months for 1,9 TND or 1 year for 2,9 TND

Calculi is free for every student, and calculating needs no account. It is funded by advertising, by an optional ad-free subscription priced for student budgets (1,9 TND for six months or 2,9 TND for a year) through a Tunisian payment gateway, and by voluntary donations. Pages where ads would be out of place, such as sign-in, payment and legal pages, carry none.

Two publications

Calculi also runs two editorial publications on a shared CMS: an Arabic blog for Tunisian students and Invariant, an English engineering publication. They have their own case study: Calculi Blog & Invariant.

What I took away

  • Honesty is a feature. Show uncertainty as uncertainty. It's what makes the confident numbers worth trusting.
  • Small, well-placed data beats infrastructure. The right 47 KB in the right place outperforms a database round trip.
  • Correctness needs a machine watching it. When the product is a set of formulas, verification is part of the product.
  • Working alone means choosing boring, dependable technology, and spending the complexity budget where students actually feel it.