Skip to content

Repository files navigation

ToDo Planner

A full-featured, notebook-style task management web application built with Flask and vanilla JavaScript. Manage tasks, subtasks, ideas, and view your schedule on a calendar — all in a clean, elegant interface.

中文文档

Tasks View

Features

  • Task Management — Create, edit, delete and toggle tasks with priority levels (P0–P3), status tracking (To Do / In Progress / Done), and due dates
  • Subtasks — Break down tasks into subtasks with independent completion tracking (up to 50 per task)
  • Categories — Organize tasks by customizable color-coded categories (Work, Personal, Study, etc.)
  • Calendar View — Monthly calendar displaying tasks by due date with color-coded status indicators
  • Quick Notes (Ideas) — Sticky-note style idea board with color themes and pin support
  • Admin Panel — User management dashboard for administrators (first registered user becomes admin)
  • Responsive Design — Notebook-style UI with warm tones, works on desktop and mobile

Screenshots

Login Page

Login

Task Board

Tasks

Calendar View

Calendar

Ideas / Quick Notes

Ideas

Tech Stack

Layer Technology
Backend Flask 3.1.0 (Python 3.12)
WSGI Server Gunicorn 23.0.0 with 2 workers + 2 threads
Database SQLite with WAL mode and foreign key enforcement
Frontend Vanilla JavaScript (ES6+), single-page app via fetch API
Styling Pure CSS with Google Fonts (Noto Serif SC)
Auth Session-based with werkzeug password hashing (PBKDF2)
Deployment Docker + Docker Compose, multi-stage build, non-root user

Architecture Overview

Browser (Vanilla JS SPA)
  |
  | fetch() JSON
  v
Flask + Gunicorn
  ├── /api/auth/*        Session auth, password hashing
  ├── /api/tasks/*       Task & subtask CRUD
  ├── /api/categories/*  Category management
  ├── /api/ideas/*       Quick notes CRUD
  ├── /api/calendar      Monthly task query
  ├── /api/stats         Task statistics
  └── /api/admin/*       User management (admin only)
  |
  | sqlite3
  v
SQLite (WAL mode)
  tables: users, tasks, subtasks, categories, ideas, activity_logs

Security

  • Password hashing via Werkzeug (PBKDF2-SHA256)
  • Signed session cookies (HttpOnly, SameSite=Lax)
  • HTML sanitization with tag whitelist
  • IP-based rate limiting on auth and API endpoints
  • X-Content-Type-Options: nosniff and X-Frame-Options: DENY headers
  • Docker: read-only filesystem, non-root user, no-new-privileges

Getting Started

Prerequisites

  • Python 3.10+ or Docker

Run with Docker (Recommended)

git clone https://github.com/YOUR_USERNAME/ToDo.git
cd ToDo
docker compose up -d

The app will be available at http://localhost:5000.

Run Locally

git clone https://github.com/YOUR_USERNAME/ToDo.git
cd ToDo
pip install -r requirements.txt
python app.py

Open http://localhost:5000 in your browser.

Environment Variables

Variable Default Description
SECRET_KEY auto-generated Flask session signing key
TODO_DB_PATH data/todo.db SQLite database file path
PORT 5000 Server port
FLASK_DEBUG false Enable debug mode
HTTPS_ONLY false Set Secure flag on session cookies

API Reference

Authentication

Method Endpoint Description
POST /api/auth/register Register a new user
POST /api/auth/login Log in
POST /api/auth/logout Log out
GET /api/auth/me Get current user info

Tasks

Method Endpoint Description
GET /api/tasks List tasks (filter by status, category_id)
POST /api/tasks Create a task
PUT /api/tasks/:id Update a task
DELETE /api/tasks/:id Delete a task
POST /api/tasks/:id/toggle Cycle task status

Subtasks

Method Endpoint Description
GET /api/tasks/:id/subtasks List subtasks
POST /api/tasks/:id/subtasks Create a subtask
PUT /api/subtasks/:id Update a subtask
DELETE /api/subtasks/:id Delete a subtask
POST /api/subtasks/:id/toggle Toggle subtask completion

Categories, Ideas, Calendar, Stats & Admin

Method Endpoint Description
GET/POST /api/categories List / create categories
DELETE /api/categories/:id Delete a category
GET/POST /api/ideas List / create ideas
PUT/DELETE /api/ideas/:id Update / delete an idea
GET /api/calendar?year=&month= Get tasks for a given month
GET /api/stats Task count statistics
GET /api/admin/users List all users (admin)
DELETE /api/admin/users/:id Delete a user (admin)
POST /api/admin/users/:id/toggle_admin Toggle admin role (admin)

Project Structure

ToDo/
├── app.py                 # Flask application (routes, models, auth)
├── requirements.txt       # Python dependencies
├── Dockerfile             # Multi-stage Docker build
├── docker-compose.yml     # Production deployment config
├── .dockerignore
├── templates/
│   └── index.html         # Single-page HTML shell
├── static/
│   ├── style.css          # Notebook-style theme
│   └── app.js             # Frontend SPA logic
├── screenshots/           # README screenshots
└── data/                  # SQLite database (auto-created)

About

A full-featured, notebook-style task management web application built with Flask and vanilla JavaScript. Manage tasks, subtasks, ideas, and view your schedule on a calendar — all in a clean, elegant interface.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages