No description
- Svelte 46.7%
- TypeScript 37%
- Python 11.2%
- CSS 4.5%
- HTML 0.3%
- Other 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .claude | ||
| .vscode | ||
| data | ||
| docs | ||
| drizzle | ||
| examples/opk | ||
| scripts | ||
| src | ||
| static | ||
| tests | ||
| .codex | ||
| .gitignore | ||
| .npmrc | ||
| LICENSE | ||
| loop.au.pe | ||
| loop.service | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| svelte.config.js | ||
| tsconfig.json | ||
| vite.config.ts | ||
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_PASSWORDbefore starting the app - Visit
/loginand 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.