# Life dashboard

Pulls your own data into one page that runs locally. You choose what goes in, whether that's your calendar and tasks or your training and money.

## What you need

- Python 3 on the machine, and permission for Claude Code to install packages into a project folder
- One or two data sources you can export or reach by API, to start with

## Safety rails it writes in

- Everything stays on your machine
- Read only towards the apps it pulls from
- Tokens live in a locked-down env file, never in code
- A daily, checked backup of the database

## Before you paste

- Open Claude Code in an empty folder for the project.
- Have one real export to hand (a CSV from an app, or your calendar), so the first importer is built against real data.

## The prompt

Copy everything inside the fence and paste it into Claude Code as one message.

````text
Build me a small personal dashboard that runs on this computer. It should
pull in data I choose, keep it in one SQLite database, and show it on a
local web page, with an optional short email each morning.

Start by interviewing me, one question at a time:
- Which sources I want first. Two at most to start with: for example my
  calendar, my task list, or an export from an app I use. For each one, ask
  what form the data comes in (an API, a CSV or JSON export, a file the app
  writes).
- What I want to see on the page, and what question each part answers for
  me. If I can't say what decision a number helps with, leave it out.
- Any targets I want to compare against.

Then propose the design in a short plan and wait for my yes. Build it in
Python, with this shape:
- One importer per source. Each reads its source and writes to the
  database, and is safe to run twice: a second run updates rows rather than
  duplicating them. Record when each source last synced successfully.
- One SQLite file as the single source of truth. The page and the email
  both read from it; neither reads the sources directly.
- Settings and targets in one config file (TOML), not in the code, so I can
  change a number without touching anything else.
- A small command-line tool with commands like sync, status (last sync per
  source), serve (the dashboard) and brief (today's summary), each with a
  --dry-run option that writes nothing.
- The dashboard served on 127.0.0.1 only, as plain HTML and CSS with no
  build step. It shows when each source last synced, so stale data is
  obvious.
- A scheduler that runs every 30 minutes and records which jobs have run
  today, so a laptop that was asleep catches up instead of skipping a job
  or running it twice. Use launchd on a Mac, cron on Linux, or Task
  Scheduler on Windows.
- A daily backup of the database, kept outside any synced folder, checked
  with PRAGMA integrity_check before it replaces anything, keeping the last
  seven.
- Tests for each importer, using small sample files, not my real data.

Ground rules:
- Keep everything local. The database, the page and any tokens stay on this
  machine. Tokens go in an env file with restricted permissions, never in
  the code or the config, and the env file goes in .gitignore.
- Read only towards my sources. Importers never change anything in the apps
  they read from.
- Ask before installing anything.
- Get one source working end to end (import, database, a page that shows
  it) before adding the second.

The daily email, if I want it: one screen, sent only to my own address,
built from the database. Ask me how I want it sent before setting it up.

When it works, write a README.md and a short USER_GUIDE.md: what runs when,
where things live, the commands, how to pause the scheduler, and how to
restore from a backup.
````
