Skip to content

administrativetrick/SRE_Toil_Tracker

Repository files navigation

SRE Toil Tracker

A web application for logging operational toil and surfacing what to automate first.

This is the 2026 rebuild of the original 2023 Python/Tkinter prototype. The companion article walks through what changed in three years of AI coding tools: I Asked ChatGPT to Build an App in 2023. Here's What Claude Code Did With the Same Prompt in 2026.

Looking for the original 2023 Python version? It lives on the legacy-python-2023 branch.

What it does

Log instances of operational toil — cert rotations, manual scaling, on-call interruptions, ad-hoc cleanups, status reports — and the app surfaces:

  • A dashboard with total hours, top category, weekly trend, and a recent-activity feed.
  • An automation-candidate score for each recurring task: (total minutes × frequency multiplier × automation_potential / 5) / 60. The tasks at the top of the ranking are the ones most worth scripting.
  • A filterable entries log with category pills, an automation-potential slider, and full CRUD.

Stack

  • Next.js 16 (App Router, Server Actions, Turbopack)
  • React 19, Tailwind v4
  • SQLite via better-sqlite3 (local file at .data/toil.db)
  • Recharts for the dashboard
  • Zod for form validation

Running locally

npm install
npm run seed   # populates the local SQLite db with 105 realistic SRE toil entries
npm run dev

Open http://localhost:3000.

The seed script is idempotent — running it again wipes the entries table and regenerates fresh data so the dashboards always have something to show.

Schema

Two tables. categories ships with 8 defaults (Incident Response, Deployments, On-Call, Manual Ops, Cert/Key Rotation, Capacity/Scaling, Access Requests, Reporting). entries records each toil instance:

Column Purpose
title Short description, e.g. "Rotated TLS cert on edge-proxy nodes"
category_id FK to categories
duration_minutes How long it took
performed_at When you did it
automation_potential 1 (hard / specialised) – 5 (easy win)
frequency daily / weekly / monthly / quarterly / ad_hoc
notes Optional free-text context

Indexes on performed_at and category_id keep dashboard queries fast even past tens of thousands of entries.

Project layout

app/                       Next.js App Router pages and components
  page.tsx                   Dashboard
  entries/page.tsx           Entries list
  entries/new/page.tsx       Add form
  entries/[id]/edit/         Edit form
  components/                Chart and form components
lib/
  db.ts                      SQLite connection + migrations
  queries.ts                 Read paths (dashboard stats, breakdowns, candidates)
  actions.ts                 Server actions (create/update/delete)
  types.ts                   Shared types and frequency multipliers
scripts/
  seed.ts                    Realistic SRE-flavoured seed data

License

Personal project; use at your own risk. Pull requests welcome if you have ideas — especially around features that turn this from a tracker into an actual automation pipeline.

About

A small, lightweight tool to track toil for SRE teams.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors