Your cycle, gently tracked β private, offline, and beautifully simple.
Track your cycle with calm, clarity, and care.
Petal is a private, offline-first period and cycle tracker. Log your periods, symptoms and moods, and see your current phase, fertile window and next-period prediction at a glance β wrapped in a soft, Flo-inspired design with six pastel themes.
No accounts. No servers. No tracking. Your data lives on your device.
πΈ Built with care to be a calm, everyday companion.
- Cycle ring β current cycle day with a live "period in N days" countdown.
- Personal greeting β a casual, time-of-day hello that reads your profile name.
- Phase & fertility card β current phase chip plus ovulation, fertile window and next-period dates.
- Current phase card β Menstrual / Follicular / Ovulation / Luteal, with a rotating hormone fun-fact (FSH, estrogen, LH, progesterone).
- Quick stats β average cycle length, average period length, cycles logged.
- Month grid with colour-coded dots: logged period, predicted period, fertile window and ovulation.
- Month-to-month navigation and a clear legend.
- Averages and totals at a glance, plus your full, editable history.
- Log start/end dates, flow, mood, symptoms (themed chips) and notes.
- Edit or delete any entry; predictions, phases and the fertile window are all derived automatically.
- Deleting an entry moves it to Trash (with a confirmation) β restore it or delete it forever.
- Auto-purged after 30 days.
- Six pastel palettes β Lavender, Coral, Teal, Baby blue, Storm and Pale.
- Themes re-tint everything: primary colour, gradients, the gradient + button, nav highlight and fields.
- Mobile-first scaling β text, icons and controls scale with the viewport (phones β tablets) and re-flow on resize.
- Cross-fading nav highlight, smooth screen transitions, and a docked gradient action button.
- PIN app-lock β set a PIN and Petal shows a lock screen on launch. PINs are salted + SHA-256 hashed, never stored in plaintext.
- Local-first β all data stays on-device.
- In-app update checker β checks the GitHub repo for a newer release and offers a one-tap Update button that opens the download page.
| Language | Python 3.13 |
| UI | Flet 0.85 (Flutter under the hood) |
| Storage | SQLite β period_tracker.db (entries + settings) |
| Networking | httpx (update check only) |
| Tooling | uv for env & builds |
| Packaging | src/ layout + Hatchling |
# 1. Install uv (https://github.com/astral-sh/uv), then sync deps
uv sync
# 2. Run on desktop for quick iteration
uv run flet run main.py
# 3. Optional: load a few sample cycles
uv run python -m petal.seed
# 4. Build a signed Android APK (see Release workflow below)
uv run flet build apkNote: runtime deps stay lean β only
fletis bundled into the APK. The Flet CLI, web/desktop server and thewebsocketsfix live in thedevdependency group (installed by uv, never shipped to the device).
Two helper scripts (build-release.ps1 is git-ignored β it holds the keystore path) make releases a two-step affair:
# Build a signed APK β prompts for the keystore password, auto-increments versionCode
.\build-release.ps1
# Commit, tag (vX.Y.Z), push, and publish the GitHub release
.\create-release.ps1 # prompts once for a message used as commit + release notes
.\create-release.ps1 -Build # chain both: build then releaseSigning uses a local release keystore (petal-release.jks, git-ignored). Releases are published to the app repo, where the in-app update checker looks for them.
π₯ Download the latest APK: github.com/3th4n-J/petal-app/releases
PT/
ββ main.py # entry point for `flet run` / `flet build`
ββ pyproject.toml # uv project (runtime: flet Β· dev: flet[all] + websockets)
ββ assets/
β ββ icon.png # app / launcher icon
ββ src/petal/
ββ __init__.py # version
ββ __main__.py # `python -m petal` / `uv run petal`
ββ models.py # PeriodEntry dataclass + option lists
ββ db.py # SQLite data layer (CRUD, settings, trash, PIN)
ββ cycle_stats.py # predictions, phases, fertile window, calendar map
ββ theme.py # 6 pastel palettes, responsive scaling, cards/pills
ββ widgets.py # canvas cycle ring, stat tiles, calendar grid
ββ ui.py # nav shell + Today/Calendar/Insights/Settings + lock + updates
ββ seed.py # sample data loader
Petal is offline-first and account-free. Your entries, symptoms and settings never leave your device. The only network request is an optional check to GitHub for app updates.
Made with love by Ethan Johnston.
Built for my angel β€οΈ β may it be a small, gentle help every day.



