About TyloPlanner

How TyloPlanner is built, its core architecture, and the philosophy behind its development.

The Philosophy

TyloPlanner was born out of a frustration with modern productivity apps. Most planners demand expensive subscriptions, trap your data in their cloud ecosystems, and are incredibly bloated. TyloPlanner takes the opposite approach: it is deliberately small, dependency-light, and entirely self-hosted. You own your server, you own your database.

The entire codebase is designed so that a student can read all of it in an afternoon and bend it to their needs.

Core Architecture

The application relies on a simple, robust stack without any complex frontend build steps (like Webpack or Vite) or heavy ORMs.

Python & Flask

The backend is a fast, lightweight Python Flask server driving generic REST APIs.

SQLite3

Zero-configuration database. Everything lives in one single file on your machine.

Vanilla JS

Frontend rendering uses pure ES modules and native DOM manipulation. No React, no Vue.

Docker

One command deployment. A single container runs the server and background jobs.

How it works

When you open TyloPlanner, the frontend (`app.js`) fetches the full application state (`GET /api/state`) and keeps it in a global state object. The UI is then rendered synchronously. When you edit a note or check off a habit, changes are pushed via standard API calls (`POST`, `PUT`, `DELETE`). The backend enforces a strict whitelist of columns to ensure security and simplicity.

Offline Mode & Sync Queue

TyloPlanner functions flawlessly even when you lose internet connection on your phone or laptop. It achieves this using modern browser features:

Background Scheduler & Automation

TyloPlanner isn't just a passive dashboard; it works for you in the background. A dedicated background daemon thread (`scheduler.py`) ticks every minute to handle automated tasks:

Security

Even though it's built to be simple, security is not compromised. TyloPlanner features session-based authentication, an optional TOTP Two-Factor Authentication (2FA) flow, and parameterized SQL queries to prevent injections. All endpoints require a valid session cookie (or secret feed key).