DEV Community

Cover image for Tododo: A Private To-Do App I Built for My Friend with Gemma + Ollama
Abishethvarman V
Abishethvarman V

Posted on

Tododo: A Private To-Do App I Built for My Friend with Gemma + Ollama

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

Tododo is a to-do app for one very particular list: my friend Yathurshan's.

Yathurshan doesn't keep a normal to-do list. Almost every task is a big task with smaller steps inside it, and a lot of them come back every week. "Clean the room" is really desk, bed, floor, laundry, every Saturday. "Gym" is warm up, workout, stretch, every Monday and Thursday." Their app could repeat a task, but the subtasks stayed ticked from last time.

So I built him an app where they just type the way they talk:

Clean the room every Saturday: desk, bed, floor, laundry

and Tododo turns it into a task, four subtasks and a weekly repeat. When Saturday comes back, the subtasks untick themselves. Nothing needs to be retyped.

What it does:

  • Understands plain sentences. Gemma, running locally, reads the sentence and pulls out the title, the subtasks and the repeat rule.
  • Lets you check before saving. What the model understood appears in an editable card first, so a wrong guess never lands on the list.
  • Repeats properly. Daily, weekly on chosen days, or monthly. When a cycle passes, the task and all its subtasks reset and the next date is set.
  • Suggests subtasks. For a vague task like "prepare for exam", one click asks Gemma to break it into steps.
  • Shows progress. Each task has a progress bar, and it completes itself when every subtask is done.
  • Works with no internet, and still works if the model isn't running (more on that below).

Demo

Tododo task list with subtasks, repeat badges and progress bars

Typing a sentence and reviewing what Gemma understood before saving:

Review card showing the parsed title, subtasks and weekly repeat

It also has dark mode and works on a phone screen:

Tododo in dark mode

Code

Tododo

A local-first to-do app for people whose lists are made of big tasks with subtasks, many of which repeat.

Type a sentence the way you'd say it:

Clean the apartment every Saturday: kitchen, bathroom, laundry

and it becomes a task, three subtasks and a weekly repeat. When the cycle passes, the subtasks uncheck themselves and the next due date is set, so nothing needs retyping.

How the open-source AI is used

  • Gemma (open-weight) via Ollama reads the sentence and returns structured JSON: title, subtasks, repeat rule.
  • Optional "Suggest subtasks" asks the same local model to break a vague task into steps.
  • Offline fallback: if Ollama isn't running, a rule-based parser handles the common phrasings, so the app always works.
  • You always review and edit what the model understood before it is saved.

Nothing leaves the machine: no accounts, no cloud API, no per-use cost.

Run it

Requires Python 3.9+…

How I Built It

The whole app is two files: a Python server (app.py, standard library only, nothing to pip install) and a single HTML page. Tasks live in a local SQLite file.

The open-source AI: Gemma through Ollama. When you add a task, the server sends your sentence to Gemma running on your own machine via Ollama, and asks for JSON back:

{
  "title": "Clean the room",
  "subtasks": ["Desk", "Bed", "Floor", "Laundry"],
  "repeat": {"freq": "weekly", "days": ["saturday"]}
}
Enter fullscreen mode Exit fullscreen mode

Ollama's JSON mode keeps the output structured, and the server cleans and validates it before the review card ever shows it. The same local model powers ✨ Suggest subtasks.

A fallback so it never breaks. I didn't want the app to be useless the day Ollama isn't running. So there's a small rule-based parser that handles common phrasings ("every Saturday", "every Monday and Thursday", "on the 1st of every month"). The app tells you which one read your sentence: a little label says either gemma2 (local) or offline rules. Gemma handles the messy, real sentences; the rules are a safety net.

The repeat engine is plain code. Each repeating task stores a rule and a due date. Whenever the list loads, any task whose date has passed gets its subtasks unticked and moves to its next date (including edge cases like "the 31st" in February).

Swapping models is one setting. I used gemma2 on my laptop; OLLAMA_MODEL=gemma2 or a smaller model like gemma2 works with no code changes.

What went wrong along the way. While testing, I typed "prepare for maths exam" and the review card said offline rules, not Gemma. The app had quietly fallen back without telling me why. The cause: a task with no subtasks made Gemma reply with "subtasks": null (or slightly different key names like "Title"), and my code only expected a clean list. I made the parser accept the shapes a real model actually returns (null lists, comma-separated strings, "Mon"/"Thu" instead of "Monday"/"Thursday"), and now the terminal prints the reason whenever it falls back. Lesson: when you build on a local model, plan for the replies you'll actually get, not the ones in your prompt.

Why Does Open Innovation Matter?

A to-do list is more personal than it looks. Yathurshan's list says when he goes to the gym, when he's home cleaning, when rent is due. That's a map of someone's week, and I didn't want to send it to a company's server just to split a sentence into checkboxes.

Running an open-weight model locally changed what I could promise:

  • It's private. Every sentence is read on Yathurshan's own laptop. There's no account and no cloud API, and nothing leaves the machine.
  • It's free, forever. There's no API key and no per-request cost, so Yathurshan can add a hundred tasks without anyone paying for it.
  • It works offline, on a train, in a power cut with a charged laptop, or with no Wi-Fi.
  • I control it. I can change the prompt, swap Gemma versions, or move to a smaller model for an older laptop with a single setting. With a closed API, the model could change or disappear under me.
  • Anyone can run it. The code is MIT-licensed, two files, and needs only Python and Ollama. Someone else's friend can have their own copy in five minutes.

What Yathurshan Said

"Nice, but why you insecure me. Ill do the task and be against procrastination"

What's Next

  • A "what should I do now?" view where Gemma picks the next small step
  • Typing tasks in other languages (Gemma can read many)
  • Voice input, so tasks can be spoken instead of typed

My Agent Session

I built Tododo with help from an AI coding assistant, which I used for the first draft of the code and for debugging. The idea, the testing on my own laptop with Gemma, and the decisions about what Yathurshan needed were mine.

Prize Categories

Best Use of Gemma: Gemma (running locally through Ollama) is the model that reads every task, turns natural sentences into structured tasks with subtasks and repeat rules, and suggests subtasks for vague tasks.

Top comments (0)