Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions PRODUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Product

<!-- impeccable:product-schema 1 -->

## Platform

android

## Users

Mainly the owner and his family, each wearing an inexpensive smart ring (Colmi, R100, SR08,
Ale-Hop and similar). Public users on GitHub are welcome but secondary: they report rings and
bugs, and their reports have shaped much of the ring code.

They check the app in a hurry, one-handed: in the morning to see how the night went and whether
to push or rest, and in the evening to log the day. The answer has to be on the first screen.

## Product Purpose

Give a budget ring Oura-level insight: readiness, sleep, vitals, symptom radar, trends, and a
coach that reads the data. Success is a morning glance that says something true and useful about
the person, without the vendor's app and without a subscription.

## Positioning

Oura-level insight from a cheap ring. It works with many inexpensive rings by speaking each
vendor's own protocol, needs no subscription and no account, keeps the data on the phone, is open
source, and says plainly what the ring measured and what the app estimated.

## Operating Context

- The ring syncs over Bluetooth about every 30 minutes in the background, and on opening the app.
- Data can also come from Health Connect, and goes out to it and to Strava.
- A coach (the user's own API key, or an on-device model) reads the data and answers questions.
- The owner reviews screens on a Claude Design canvas and in released APKs on his phone.

## Capabilities and Constraints

- **English and Brazilian Portuguese** for every string; layouts must survive the longer
Portuguese (owner's confirmation, 2026-11-16).
- **One-handed and glanceable**: the important answer first, detail on tap (owner's
confirmation, 2026-11-16).
- **Never a diagnosis**: estimates are labelled as estimates, nothing names a condition, and
safety text keeps its plain wording (AGENTS.md: lab reports, postpartum, derived stress).
- Ring hardware differs: a metric the app shows must say when this ring doesn't measure it.
- Undecided: whether public users ever become a primary audience.

## Brand Commitments

- The name PulseLoop, the mint accent, and Fairy mode (the brand turns pink for Tatá's profile,
never announced).
- The visual system is recorded in `docs/new-look-plan.md` (new look, in progress) and the Gabriel
Design System's `pulseloop` layer (current look).

## Evidence on Hand

- Real ring captures and reports in the GitHub issues (#29, #58, #59, #63, #68, #73 and others).
- No testimonials, customer counts or benchmarks exist; don't invent any.

## Product Principles

1. The ring's own data, shown honestly: measured and estimated are never confused.
2. The morning answer first; detail on tap.
3. Nothing leaves the phone unless the person sends it.
4. Works with the ring people already own, by matching each vendor's app.

## Accessibility & Inclusion

Two languages, TalkBack, and large font scales: no clipped text at 1.3×. 48dp targets.
5 changes: 4 additions & 1 deletion app/src/main/assets/i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@
"Learning your dry nights: {0} of {1}. Then PulseLoop shows what each drink does to your sleep.": "Aprendendo suas noites sem álcool: {0} de {1}. Depois o PulseLoop mostra o que cada bebida faz com seu sono.",
"Learning your normal": "Aprendendo o seu normal",
"Learning your normal: {0} of {1} nights.": "Aprendendo seu normal: {0} de {1} noites.",
"Learning: {0} of {1} nights": "Aprendendo: {0} de {1} noites",
"Learns your baseline": "Aprende sua linha de base",
"Leave": "Sair",
"Leave max tokens blank to let the server decide. Raise the timeout for a large model on CPU — a slow reply is not retried.": "Deixe o máximo de tokens em branco para o servidor decidir. Aumente o tempo limite para um modelo grande em CPU — uma resposta lenta não é repetida.",
Expand Down Expand Up @@ -1413,6 +1414,7 @@
"Range low": "Faixa mínima",
"Raw Packets": "Pacotes brutos",
"Re-analyze": "Reanalisar",
"Read more": "Ler mais",
"Readiness": "Prontidão",
"Readiness is estimated by PulseLoop from your ring's sleep, heart rate, HRV and activity, compared with your own recent nights. It is not a medical measurement.": "A Prontidão é estimada pelo PulseLoop a partir do sono, da frequência cardíaca, da HRV e da atividade medidos pelo anel, comparados com suas próprias noites recentes. Não é uma medida médica.",
"Reading (mg/dL)": "Medição (mg/dL)",
Expand Down Expand Up @@ -1553,7 +1555,7 @@
"Score {0} out of 100": "Pontuação {0} de 100",
"Scores are PulseLoop estimates from ring data compared with the user's own baseline, not medical measurements.": "As pontuações são estimativas do PulseLoop a partir dos dados do anel comparados com a linha de base do próprio usuário, não medidas médicas.",
"Screens in bed": "Telas na cama",
"Screens that have moved to it so far: Symptom Radar.": "Telas que já usam o novo visual: Radar de sintomas.",
"Screens that have moved to it so far: Today, Symptom Radar.": "Telas que já usam o novo visual: Hoje, Radar de sintomas.",
"Searching…": "Procurando…",
"See Raw Packets above.": "Veja Pacotes brutos acima.",
"See Ring Events above.": "Veja Eventos do anel acima.",
Expand Down Expand Up @@ -2192,6 +2194,7 @@
"{0} % same stage": "{0} % no mesmo estágio",
"{0} (Tailscale)": "{0} (Tailscale)",
"{0} / week": "{0} / semana",
"{0} asleep": "{0} dormindo",
"{0} asleep · woke {1} times · longest stretch {2}": "{0} dormindo · acordou {1} vezes · maior trecho {2}",
"{0} at {1}.": "{0} às {1}.",
"{0} awake during the night": "{0} acordado durante a noite",
Expand Down
47 changes: 47 additions & 0 deletions app/src/main/java/com/pulseloop/ui/calm/CalmSparkline.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.pulseloop.ui.calm

import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Path
import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.graphics.StrokeJoin
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.unit.dp

/**
* A small trend line for a row: the shape of the recent readings, nothing else. No axes and no
* labels, because the value beside it is the number; TalkBack skips it for the same reason.
* Draws nothing below two readings.
*/
@Composable
fun CalmSparkline(values: List<Double>, color: Color, modifier: Modifier = Modifier.size(88.dp, 32.dp)) {
// The newest readings only: a day of five-minute samples is more line than 88dp can show.
val points = remember(values) { values.takeLast(MAX_POINTS) }
if (points.size < 2) return
Canvas(modifier.clearAndSetSemantics { }) {
val inset = 4.dp.toPx()
val w = size.width - inset * 2
val h = size.height - inset * 2
val min = points.min()
val span = (points.max() - min).takeIf { it > 0 } ?: 1.0
fun at(i: Int) = Offset(
inset + w * i / (points.size - 1),
inset + h - (h * ((points[i] - min) / span)).toFloat(),
)
val path = Path().apply {
moveTo(at(0).x, at(0).y)
for (i in 1 until points.size) lineTo(at(i).x, at(i).y)
}
drawPath(path, color.copy(alpha = 0.8f), style = Stroke(width = 2.dp.toPx(), cap = StrokeCap.Round, join = StrokeJoin.Round))
// The newest reading, so the eye lands where the value beside it comes from.
drawCircle(color, radius = 3.dp.toPx(), center = at(points.size - 1))
}
}

private const val MAX_POINTS = 60
28 changes: 28 additions & 0 deletions app/src/main/java/com/pulseloop/ui/calm/CalmTheme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,36 @@ object CalmType {
val title = TextStyle(fontFamily = Inter, fontSize = 16.sp, fontWeight = FontWeight.SemiBold, lineHeight = 1.35.em)
val body = TextStyle(fontFamily = Inter, fontSize = 16.sp, lineHeight = 1.5.em)
val bodySmall = TextStyle(fontFamily = Inter, fontSize = 14.sp, lineHeight = 1.5.em)
/** A screen's one headline number (Today's readiness). 40 is the top of the scale. */
val score = TextStyle(fontFamily = Inter, fontSize = 40.sp, fontWeight = FontWeight.SemiBold, lineHeight = 1.05.em, letterSpacing = (-0.02).em)
val value = TextStyle(fontFamily = Inter, fontSize = 28.sp, fontWeight = FontWeight.SemiBold, lineHeight = 1.1.em)
val label = TextStyle(fontFamily = Inter, fontSize = 12.sp, fontWeight = FontWeight.Medium, lineHeight = 1.3.em)
/** The small capitals over a card ("RESPIRATORY RATE"). */
val eyebrow = TextStyle(fontFamily = Inter, fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 0.08.em, lineHeight = 1.3.em)
}

/**
* Runs [content] with Inter as the text family: Material's whole type scale and the ambient text
* style. A converted screen still reuses some shared pieces (a program chip, the bedtime card);
* inside this scope their text comes out in Inter too, so the screen keeps one family. Text that
* names its own family explicitly (PulseType's styles) is unchanged until its piece is converted.
*/
@androidx.compose.runtime.Composable
fun CalmTypography(content: @androidx.compose.runtime.Composable () -> Unit) {
val t = androidx.compose.material3.MaterialTheme.typography
fun TextStyle.inter() = copy(fontFamily = Inter)
val typography = t.copy(
displayLarge = t.displayLarge.inter(), displayMedium = t.displayMedium.inter(), displaySmall = t.displaySmall.inter(),
headlineLarge = t.headlineLarge.inter(), headlineMedium = t.headlineMedium.inter(), headlineSmall = t.headlineSmall.inter(),
titleLarge = t.titleLarge.inter(), titleMedium = t.titleMedium.inter(), titleSmall = t.titleSmall.inter(),
bodyLarge = t.bodyLarge.inter(), bodyMedium = t.bodyMedium.inter(), bodySmall = t.bodySmall.inter(),
labelLarge = t.labelLarge.inter(), labelMedium = t.labelMedium.inter(), labelSmall = t.labelSmall.inter(),
)
androidx.compose.material3.MaterialTheme(
colorScheme = androidx.compose.material3.MaterialTheme.colorScheme,
shapes = androidx.compose.material3.MaterialTheme.shapes,
typography = typography,
) {
androidx.compose.material3.ProvideTextStyle(androidx.compose.material3.LocalTextStyle.current.inter(), content)
}
}
Loading
Loading