LevainLog

Consumer

Original Idea

Sourdough Starter Tracker A mobile app for bakers that tracks feeding schedules, rise times, and helps troubleshoot starter health with photo comparisons.

Product Requirements Document (PRD): LevainLog

1. Executive Summary

LevainLog is a high-performance, mobile-first sourdough starter management system designed for the 2026 baking ecosystem. It bridges the gap between traditional artisanal baking and data-driven precision by allowing users to track feeding schedules, environmental variables (temperature/humidity), and fermentation milestones. Utilizing a local-first architecture and high-fidelity charting, LevainLog ensures bakers can maintain starter health even in low-connectivity environments like professional kitchens or basements.

2. Problem Statement

Maintaining a sourdough starter is a delicate balance of biology and environmental science. Home bakers and professionals often struggle with:

  • Inconsistency: Forgetting feeding times or ratios leads to weak yeast activity.
  • Environmental Blindness: Failing to account for how ambient temperature affects rise time.
  • Troubleshooting Fatigue: Difficulty in identifying if a starter is sluggish, hungry, or contaminated (mold/hooch).
  • Data Fragmentation: Using disparate notebooks or photo galleries that lack actionable insights.

3. Goals & Success Metrics

Business Goals

  • Establish LevainLog as the primary utility for the fermentation community.
  • Achieve a high retention rate through utility-based push notifications.
  • Minimize support overhead by providing automated troubleshooting tools.

Success Metrics

  • Monthly Active Users (MAU): Aim for 50,000 within the first year.
  • Log Completion Rate: Percentage of users who log at least 4 consecutive feedings.
  • Notification Engagement: >40% click-through rate on feeding reminders.
  • Offline Resilience: <1% data loss reported during offline-to-online transitions.

4. User Personas

| Persona | Motivation | Pain Point | | :--- | :--- | :--- | | Newbie Noah | Wants to bake his first successful loaf without killing his starter. | Doesn't know what "peak rise" looks like or when to feed. | | Prosumer Petra | Operates a micro-bakery and manages multiple starters (Rye, Levain, Sweet). | Needs to scale feedings and predict bake windows based on temp. | | Scientist Sam | Obsessed with hydration ratios and lactic acid bacteria (LAB) balance. | Needs detailed charts and CSV exports for experiment tracking. |

5. User Stories

  • As a baker, I want to log the exact weight of flour and water so I can maintain a consistent 100% hydration starter.
  • As a home cook, I want to receive a notification when my starter is likely at its peak so I can start my autolyse on time.
  • As a user in a basement kitchen, I want to log my feeding data offline so that I don't lose progress when Wi-Fi is unavailable.
  • As a micro-bakery owner, I want to compare rise times against ambient temperature to adjust my bulk fermentation schedule.
  • As a concerned baker, I want to compare my starter's surface to a gallery of healthy vs. moldy starters to ensure food safety.

6. Functional Requirements

6.1 Starter Management

  • Multi-Starter Support: Create profiles with Name, Flour Type (Rye, Whole Wheat, AP), and Creation Date.
  • Hydration Calculator: Automatically calculate and store hydration % based on input weights.

6.2 Feeding Log & Reminders

  • Dynamic Logging: Input fields for Starter Carryover, Flour Weight, and Water Weight.
  • Environmental Auto-fill: Integration with OpenWeather API to pull ambient temp/humidity based on location.
  • Smart Notifications: Using Notifee to schedule the next feeding reminder based on user-defined intervals (e.g., 12h or 24h).

6.3 Rise Tracker & Visual Diary

  • Milestone Marking: Buttons to mark "Fed," "Doubled," "Peak," and "Collapsed."
  • Image Capture: Native camera integration to store high-res photos of bubble structure.
  • WebP Compression: Automatic client-side conversion to WebP for efficient S3 storage.

6.4 Health Dashboard

  • Trend Visualization: Dual-axis charts showing "Rise Time to Peak" vs. "Ambient Temperature."
  • Statistical Averages: Calculation of average time-to-peak over the last 7 days.

7. Technical Requirements

7.1 Tech Stack (2026 Standards)

  • Frontend: React Native v0.83.x (New Architecture / Hermes).
  • Language: TypeScript v5.9.3.
  • Backend: Node.js v25.3.0 with Express v5.2.1.
  • Database & ORM: PostgreSQL (v17+) with Prisma v7.2.0 (ESM-first).
  • Local Database: expo-sqlite with Prisma Client for React Native.
  • Synchronization: PowerSync (Local-first architecture for offline resilience).
  • Auth: Firebase Authentication with OAuth 2.0 (Google/Apple).
  • Storage: AWS S3 with Transfer Acceleration and Signed URLs.

7.2 Integrations

  • OpenWeather One Call API 3.0: For historical and real-time climate data.
  • Notifee: For advanced background notification scheduling.
  • React Native Gifted Charts: For dual-axis time-series visualization.

8. Data Model

8.1 User

  • id: UUID (Primary Key)
  • email: String (Unique)
  • unit_system: Enum (Metric/Imperial)
  • created_at: Timestamp

8.2 Starter

  • id: UUID
  • user_id: FK -> User.id
  • name: String
  • flour_type: String
  • base_hydration: Float
  • is_active: Boolean

8.3 FeedingEvent

  • id: UUID
  • starter_id: FK -> Starter.id
  • timestamp: Timestamp
  • flour_weight: Float
  • water_weight: Float
  • carryover_weight: Float
  • ambient_temp: Float
  • humidity: Float
  • photo_url: String (S3 Path)

8.4 RiseMetric

  • id: UUID
  • feeding_id: FK -> FeedingEvent.id
  • peak_time: Timestamp
  • peak_height_ratio: Float (e.g., 2.0 for doubled)
  • notes: Text

9. API Specification (Simplified)

POST /api/v1/feedings

  • Auth: Required (Firebase JWT)
  • Body: { starter_id, flour, water, carryover, temp, humidity }
  • Response: 201 Created with feeding object.

GET /api/v1/storage/upload-url

  • Purpose: Requests a pre-signed S3 URL for image upload.
  • Query Params: fileName, contentType.
  • Response: { uploadUrl, fileKey }.

GET /api/v1/analytics/trends/{starter_id}

  • Response: Array of feeding events with associated rise metrics for charting.

10. UI/UX Requirements

  • Dashboard: A "Current Status" card showing the time elapsed since the last feeding and a countdown to the next.
  • Quick Action Button (FAB): Central "+" button to log a feeding or a rise milestone.
  • Chart Interaction: Users can "scrub" (long-press and slide) across the rise chart to see specific data points.
  • Dark Mode: Native support for 2026 OS-level dark/light switching.
  • Haptic Feedback: Subtle vibrations when weights are logged or milestones are hit.

11. Non-Functional Requirements

  • Performance: UI must maintain 120fps on supported devices using React Native Skia for charts.
  • Security: All photos must be private; access only via 15-minute expiration Signed URLs.
  • Offline-First: All data must be writeable while offline and sync automatically via PowerSync LSN (Log Sequence Numbers).
  • Accessibility: Support for dynamic font sizing and a minimum contrast ratio of 4.5:1.

12. Out of Scope

  • Recipe Book: This version will not store full bread recipes, only starter-related data.
  • Social Network: No public user profiles or comments in v1.
  • E-commerce: No selling of starters or baking kits.

13. Risks & Mitigations

| Risk | Impact | Mitigation | | :--- | :--- | :--- | | Inaccurate Temperature Data | High | Use OpenWeather as fallback but prioritize on-device barometer/sensor data if available. | | Notification Drift | Medium | Use Notifee's allowWhileIdle for Android and UNCalendarNotificationTrigger for iOS. | | S3 Storage Costs | Medium | Mandatory client-side WebP/AVIF compression to reduce file sizes by ~50%. |

14. Implementation Tasks

Phase 1: Project Setup

  • [ ] Initialize project with React Native 0.83.x and TypeScript 5.9.3
  • [ ] Configure ESLint and Prettier for "Strict" TS 7-readiness
  • [ ] Set up Firebase Project and Native Auth SDK
  • [ ] Initialize Prisma 7.2.0 with PostgreSQL and expo-sqlite adapter

Phase 2: Core Data & Offline Sync

  • [ ] Define Prisma Schema for Starters and Feeding Events
  • [ ] Implement PowerSync / ElectricSQL sync bridge for Local-First persistence
  • [ ] Build "Add Starter" wizard UI
  • [ ] Implement Offline Outbox pattern for feeding logs

Phase 3: Feeding Logic & Notifications

  • [ ] Create Feeding Log form with hydration calculator
  • [ ] Integrate OpenWeather One Call 3.0 for auto-filling climate metadata
  • [ ] Implement Notifee for dynamic reminder scheduling
  • [ ] Build background task to reschedule reminders when a feed is logged early

Phase 4: Visuals & Analytics

  • [ ] Integrate react-native-compressor for WebP conversion
  • [ ] Implement S3 Pre-signed URL flow via Node.js v25 backend
  • [ ] Build Health Dashboard using React Native Gifted Charts (Dual-Axis)
  • [ ] Create photo gallery with lazy loading for historical visual diary

Phase 5: Troubleshooting & Polish

  • [ ] Implement "Health Check" reference gallery (Healthy vs. Moldy)
  • [ ] Add Haptic Feedback and Reanimated 4 transitions
  • [ ] Conduct final performance audit (120Hz check on Skia components)
  • [ ] Beta test with "Scientist Sam" persona group