No description
  • Svelte 46.7%
  • TypeScript 37%
  • Python 11.2%
  • CSS 4.5%
  • HTML 0.3%
  • Other 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Satya Benson 927782dd9f Add MIT license
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 15:26:27 -04:00
.claude feat: add theme controls and demo seed script 2026-03-27 20:14:47 -04:00
.vscode chore: initial project scaffold for Loop 2026-03-27 18:43:55 -04:00
data chore: initial project scaffold for Loop 2026-03-27 18:43:55 -04:00
docs Make OPK surge evidence more cautious 2026-04-05 17:49:02 -04:00
drizzle Improve OPK scanning flow and settings feedback 2026-03-27 23:09:55 -04:00
examples/opk feat: add single-user auth and improve OPK scanner 2026-03-27 21:03:48 -04:00
scripts Refine OPK line pairing and handle-side inference 2026-03-28 00:29:14 -04:00
src Preserve forecasting evidence and confidence improvements before archive 2026-09-29 19:53:45 +00:00
static feat: add single-user auth and improve OPK scanner 2026-03-27 21:03:48 -04:00
tests Preserve forecasting evidence and confidence improvements before archive 2026-09-29 19:53:45 +00:00
.codex Snapshot existing form and deploy changes 2026-04-24 12:56:02 +00:00
.gitignore feat: add single-user auth and improve OPK scanner 2026-03-27 21:03:48 -04:00
.npmrc chore: initial project scaffold for Loop 2026-03-27 18:43:55 -04:00
LICENSE Add MIT license 2026-10-05 15:26:27 -04:00
loop.au.pe add 2026-06-06 11:48:33 +00:00
loop.service add 2026-06-06 11:48:33 +00:00
package-lock.json feat: implement full Loop cycle tracking app 2026-03-27 20:14:47 -04:00
package.json Implement spec-based cycle forecasting 2026-04-03 22:41:28 -04:00
README.md feat: add single-user auth and improve OPK scanner 2026-03-27 21:03:48 -04:00
svelte.config.js feat: implement full Loop cycle tracking app 2026-03-27 20:14:47 -04:00
tsconfig.json chore: initial project scaffold for Loop 2026-03-27 18:43:55 -04:00
vite.config.ts chore: initial project scaffold for Loop 2026-03-27 18:43:55 -04:00

Loop

A self-hosted, privacy-first cycle tracking web app. Your data stays on your machine — no cloud sync, no accounts, no tracking.

Philosophy

  • Lightweight — SvelteKit + SQLite, minimal dependencies, fast cold starts
  • Private by default — all data stored locally in a single SQLite file you own
  • Visually clean — focused UI, no clutter
  • Self-hosted — run it on your laptop, home server, or Raspberry Pi

Features (planned)

  • Daily cycle log: BBT, cervical mucus, bleeding, notes
  • OPK strip scanning — camera-based LH surge detection via line ratio analysis
  • Cycle calendar with pattern visualization
  • Fertility window prediction
  • Data export (CSV / JSON)

Stack

Layer Choice
Frontend SvelteKit + TypeScript
Database SQLite via better-sqlite3
ORM Drizzle ORM
Bundler Vite

Getting Started

npm install
npm run db:generate   # generate SQL migrations from schema
npm run db:migrate    # apply migrations (creates data/loop.db)
export LOOP_PASSWORD='choose-a-long-password'
npm run dev           # start dev server at http://localhost:5173

If you want a dedicated session signing secret, also set LOOP_SESSION_SECRET. Otherwise Loop derives it from LOOP_PASSWORD.

Project Structure

src/
  lib/
    components/   # Svelte UI components
    server/       # Server-only: db connection, schema, queries
    stores/       # Svelte stores for client state
    utils/        # Shared utilities (date helpers, etc.)
  routes/         # SvelteKit file-based routes
    api/          # API endpoints (+server.ts files)
    log/          # Daily log view
    settings/     # App settings
drizzle/
  migrations/     # Auto-generated SQL migrations
data/             # SQLite database (gitignored)

Data & Privacy

The SQLite database lives at data/loop.db (configurable via DATABASE_PATH env var). It is gitignored by default. Back it up by copying the file.

Authentication

Loop uses simple single-user auth:

  • Set LOOP_PASSWORD before starting the app
  • Visit /login and enter that password
  • A signed session cookie keeps you logged in for 30 days

OPK Example Images

Place local ovulation test example images in examples/opk/. That directory is gitignored except for a placeholder file, so you can drop private sample images there without polluting the repo.