Skip to main content
Back to projectsFull-stack PWA · Personal project
CycleSync — a cycle-tracking PWA built around PMOS
Full-stack PWA · Personal project

CycleSync — a cycle-tracking PWA built around PMOS

A PWA that syncs nutrition, training and mental health with the phases of the menstrual cycle. Offline-first, privacy-first, with an AI assistant that only sees your data when you say so.

Disciplines
UX/UIFrontend
Role
End-to-end design, frontend, backend and database
Context
Full-stack PWA · Personal project
Duration
Live · 2026
Stack
Next.js 16 · React 19 · TypeScript · Supabase (Postgres + RLS) · Dexie · Gemini · Vitest
Enlaces externos
Try it live
GitHub
01 — THE PROBLEM

THE PROBLEM

Popular cycle apps treat PMOS as an edge case, and apps that store health data rarely explain what they do with it.

Make PMOS the core of the product: quick daily logging, lab results, medication and phase-aware meal and training advice, while protecting privacy.

Connectivity (Before)

Apps that need the network to log a symptom and lose data when it fails.

Solution

Logs go to IndexedDB (Dexie) first and sync to Supabase when the device is back online.

AI Privacy (Before)

Sending health history to a model without the person knowing.

Solution

Explicit consent enforced on the server, explicit column lists and a per-user daily quota.

PMOS Focus (Before)

PMOS treated as an edge case inside a generic cycle tracker.

Solution

Symptom scoring, labs with reference ranges, medication and phase-aware meal and training advice.

02 — DECISIONS

What happens behind the interface

Architecture decisions for a health app that works offline and protects data.

Offline-first:Logs are written to IndexedDB (Dexie) first and synced to Supabase when the device is back online.
Security by design:RLS on all 37 tables, server-only secrets, hashed webhook tokens and CSP and HSTS headers.
Responsible, cost-aware AI:Data minimization, explicit consent, and generated recipes saved to a shared catalog so they are reused.
Testable domain logic:Cycle prediction, PMOS metrics and nutrition targets are pure functions covered by 360+ Vitest tests.
Q.

Why offline-first with IndexedDB?

A.

Logging a symptom has to work without a connection. Data is written to Dexie and synced to Supabase when back online; sign-out uploads pending entries before wiping the device.

Q.

Why RLS instead of app-level checks only?

A.

Most reads and writes go from the browser straight to Supabase. The middleware redirect to /login is only a UX guard; access is enforced by RLS and by getUser() in every API route.

Q.

Why call the AI only from server routes?

A.

Gemini and NewsAPI keys never reach the client. Each route checks the user, consent and daily quota before sending anything.

Q.

How is AI cost kept down?

A.

The planner fills meals from the recipe library before calling the model, and generated recipes are saved to a shared, deduplicated catalog.

03 — WHAT I BUILT

How it works

Try it without an account:The dashboard, routines, nutrition, PMOS and articles open in guest mode; logging data requires signing up.
Log in seconds:Every screen helps record something quickly and shows progress over time, even offline.
Share with your doctor:Export a PDF report for appointments or all your data as JSON.
04 — RESULT

By the numbers

37Tables with RLSEvery table protected by per-user access policies.
360+TestsDomain logic covered with Vitest.
PWAOffline-firstInstallable and usable without a connection.
LEARNINGS

What I learned from this project

01

Product & Design

A complete guest mode lets people understand the product before creating an account.

02

Technical Architecture

Keeping domain logic in pure functions and letting RLS control access made the app easy to test and secure by default.

03

Core Takeaway

In a health app, trust comes from deciding which data never leaves the device.