Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Raya-logs logo

Raya-logs 🍼

A free, open-source baby tracker PWA built for sleep-deprived parents.
One-tap logging Β· Multi-caregiver sync Β· Works offline Β· Privacy-first

Features Β· Quick Start Β· Connect Your Database Β· Free vs Pro Β· Contributing Β· License


Why Raya-logs?

Most baby tracker apps are either too expensive, too cluttered, or don't let you own your data. Raya-logs is different:

  • πŸ†“ 100% free & open-source β€” host it yourself, own your data forever
  • πŸ“± PWA β€” install on any phone, works like a native app, no app store needed
  • πŸ‘¨β€πŸ‘©β€πŸ‘§ Multi-caregiver β€” both parents (and grandparents!) track together with a shared family code
  • πŸ”’ PIN-protected β€” 4-digit PIN keeps your data private
  • ✈️ Offline-first β€” works without internet, syncs when back online
  • 🎨 Beautiful UI β€” soft pastel theme designed for 3 AM use with one hand

Features

βœ… Free (Open Source β€” this repo)

Feature Description
🧷 Diaper Tracking Log wet/dirty/both with color, consistency & quantity
🍼 Feeding Tracker Timer or manual entry, left/right/both side tracking
😴 Sleep Sessions Duration-based sleep logging with quality rating
🀱 Tummy Time Timer or manual duration entry
πŸ’Š Vitamin D3 Simple given/not-given daily tracker
πŸ“ Notes Free-text notes for anything else
πŸ“ Growth Weight (kg) & height (cm) measurements
πŸ“Š Dashboard Daily, weekly & monthly stats with charts
πŸ”„ Real-time Sync Changes appear instantly across all devices
πŸ“€ Export Download daily summaries as HTML or full data as JSON
✏️ Edit History Every edit is logged with who changed what and when
πŸ‘Ά Multi-baby Track multiple babies under one family

πŸ’Ž Pro (Paid β€” coming soon)

The Pro version is a hosted, managed service with additional features designed to make parenting even easier.

Feature Description
πŸŽ™οΈ Voice Logging "Hey Raya, log a wet diaper" β€” hands-free at 3 AM
πŸ”” Smart Reminders Feeding reminders, vitamin alerts, milestone nudges
πŸ“‹ Pediatrician Reports One-tap export formatted for your baby's doctor
πŸ‘¨β€βš•οΈ Ask Doc AI-powered answers to common newborn questions, sourced from AAP guidelines
πŸ’‘ Daily Tips Age-appropriate parenting tips delivered daily
πŸ“± Push Notifications Cross-device notifications for shared caregivers
πŸŒ™ Sleep Insights Pattern analysis and sleep coaching suggestions
πŸ₯ Consultant Support Connect with certified pediatric consultants

Quick Start

Prerequisites

1. Clone the repo

git clone https://github.com/esainath96/raya-logs.git
cd raya-logs

2. Install dependencies

npm install

3. Set up environment variables

cp .env.example .env.local

Open .env.local and fill in your Firebase credentials (see next section for how to get them).

4. Start the dev server

npm run dev

Open http://localhost:5173 in your browser. That's it! πŸŽ‰


Connect Your Database

Raya-logs uses Firebase Firestore as its database. Firebase's free Spark plan gives you:

  • 1 GiB storage
  • 50K reads/day, 20K writes/day
  • More than enough for a family of caregivers

Step-by-step Firebase setup

πŸ“– Click to expand full instructions

1. Create a Firebase project

  1. Go to Firebase Console
  2. Click "Create a project" (or "Add project")
  3. Name your project (e.g., my-baby-tracker)
  4. Disable Google Analytics if you don't need it (optional)
  5. Click "Create project"

2. Create a web app

  1. In your project dashboard, click the web icon </> to add a web app
  2. Give it a nickname (e.g., baby-tracker-web)
  3. Do NOT check "Firebase Hosting" (you're self-hosting)
  4. Click "Register app"
  5. You'll see a config object β€” copy those values:
const firebaseConfig = {
  apiKey: "AIza...",           // β†’ VITE_FIREBASE_API_KEY
  authDomain: "xxx.firebaseapp.com",  // β†’ VITE_FIREBASE_AUTH_DOMAIN
  projectId: "xxx",           // β†’ VITE_FIREBASE_PROJECT_ID
  storageBucket: "xxx.appspot.com",   // β†’ VITE_FIREBASE_STORAGE_BUCKET
  messagingSenderId: "123...",        // β†’ VITE_FIREBASE_MESSAGING_SENDER_ID
  appId: "1:123...:web:abc..."        // β†’ VITE_FIREBASE_APP_ID
};
  1. Paste each value into your .env.local file

3. Enable Cloud Firestore

  1. In the Firebase Console sidebar, click "Cloud Firestore"
  2. Click "Create database"
  3. Choose "Start in test mode" (you can lock it down later)
  4. Select a location closest to you (e.g., us-central1, asia-south1)
  5. Click "Enable"

4. (Recommended) Set Firestore Security Rules

Go to Firestore β†’ Rules and replace the default rules with:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /families/{familyId} {
      allow read, write: if true;  // Lock this down further in production
      
      match /logs/{logId} {
        allow read, write: if true;
      }
    }
  }
}

⚠️ For production use, implement proper authentication rules. The above is for getting started quickly.

5. Restart the dev server

npm run dev

The app will now connect to your own Firebase project!

πŸ”„ Using an alternative database?

Raya-logs is architecturally simple β€” all database calls go through two hooks:

Hook File Purpose
useFamily src/hooks/useFamily.js Family CRUD, PIN verification
useEntries src/hooks/useEntries.js Log entry CRUD, real-time subscriptions

To swap Firebase for Supabase, PocketBase, Appwrite, or any other backend, you only need to rewrite these two files. The rest of the app doesn't know or care what database you use.


Project Structure

raya-logs/
β”œβ”€β”€ public/                  # Static assets (favicon, icons)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/              # Images
β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ ActivityFeed.jsx
β”‚   β”‚   β”œβ”€β”€ BottomSheet.jsx
β”‚   β”‚   β”œβ”€β”€ Charts.jsx
β”‚   β”‚   β”œβ”€β”€ ChipSelector.jsx
β”‚   β”‚   β”œβ”€β”€ DatePicker.jsx
β”‚   β”‚   β”œβ”€β”€ EditHistory.jsx
β”‚   β”‚   β”œβ”€β”€ EntryCard.jsx
β”‚   β”‚   β”œβ”€β”€ Layout.jsx
β”‚   β”‚   β”œβ”€β”€ PinInput.jsx
β”‚   β”‚   β”œβ”€β”€ QuickStats.jsx
β”‚   β”‚   └── Timer.jsx
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── firebase.js      # Firebase initialization (reads from env vars)
β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”œβ”€β”€ AuthContext.jsx   # Authentication state
β”‚   β”‚   └── FamilyContext.jsx # Family data state
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ useDashboard.js   # Dashboard data aggregation
β”‚   β”‚   β”œβ”€β”€ useEntries.js     # Firestore log entries CRUD
β”‚   β”‚   β”œβ”€β”€ useFamily.js      # Family management
β”‚   β”‚   └── useTimer.js       # Timer hook for feeding/tummy time
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx     # Stats & charts
β”‚   β”‚   β”œβ”€β”€ Home.jsx          # Main logging screen
β”‚   β”‚   β”œβ”€β”€ Onboarding.jsx    # Family setup flow
β”‚   β”‚   β”œβ”€β”€ PinGate.jsx       # PIN unlock screen
β”‚   β”‚   └── Settings.jsx      # App settings
β”‚   β”œβ”€β”€ sheets/               # Bottom sheet forms (one per entry type)
β”‚   β”‚   β”œβ”€β”€ DiaperSheet.jsx
β”‚   β”‚   β”œβ”€β”€ FeedingSheet.jsx
β”‚   β”‚   β”œβ”€β”€ GrowthSheet.jsx
β”‚   β”‚   β”œβ”€β”€ NoteSheet.jsx
β”‚   β”‚   β”œβ”€β”€ SleepSheet.jsx
β”‚   β”‚   β”œβ”€β”€ TummyTimeSheet.jsx
β”‚   β”‚   └── VitaminSheet.jsx
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ dateHelpers.js    # Date formatting utilities
β”‚   β”‚   β”œβ”€β”€ entryBuilders.js  # Canonical entry model (single source of truth)
β”‚   β”‚   β”œβ”€β”€ exportHelpers.js  # HTML/JSON export
β”‚   β”‚   β”œβ”€β”€ familyCode.js     # Family code generation
β”‚   β”‚   └── statsCalculator.js # Stats aggregation
β”‚   β”œβ”€β”€ App.jsx               # Root component & routing
β”‚   β”œβ”€β”€ index.css             # Complete design system
β”‚   └── main.jsx              # App entry point
β”œβ”€β”€ .env.example              # Template for environment variables
β”œβ”€β”€ .gitignore
β”œβ”€β”€ index.html
β”œβ”€β”€ package.json
└── vite.config.js

Tech Stack

Layer Technology
Framework React 19 + Vite
Styling Vanilla CSS with custom properties (design tokens)
Database Firebase Firestore (swappable)
Offline Firestore persistent local cache + multi-tab sync
Font Nunito via Google Fonts
Package Manager npm

Security Notes

Your data, your responsibility.

  • πŸ” No API keys are stored in this repository. All credentials are loaded from environment variables.
  • 🚫 The dist/ build folder is git-ignored. Production builds containing inlined env values never touch the repo.
  • πŸ”‘ .env.local is git-ignored. Your private credentials stay on your machine.
  • 🧹 No telemetry, no analytics, no tracking. This app phones home to nobody except your own Firebase project.

If you fork this repo, always verify that your .gitignore includes *.local and dist before pushing.


Free vs Pro

Free (Open Source) Pro (Paid)
Price $0 forever Subscription (TBA)
Hosting Self-hosted Managed cloud
Core tracking βœ… All 7 entry types βœ… All 7 entry types
Multi-caregiver βœ… βœ…
Offline support βœ… βœ…
Dashboard & charts βœ… βœ… + advanced insights
Data export βœ… βœ… + formatted PDF reports
Voice logging ❌ βœ…
Smart reminders ❌ βœ…
Push notifications ❌ βœ…
Ask Doc (AI) ❌ βœ…
Daily parenting tips ❌ βœ…
Sleep insights ❌ βœ…
Consultant support ❌ βœ…

The free version is fully functional β€” you can track everything, sync across devices, and export your data. The Pro version adds convenience features for parents who want extra help at 3 AM.


Contributing

We welcome contributions! Please read our Contributing Guide before submitting a pull request.

Quick rules:

  1. Fork the repo and create a feature branch
  2. Follow the existing code style (vanilla CSS, functional React components)
  3. Test your changes locally before submitting a PR
  4. Don't commit .env.local or any credentials

License

This project is open-source under the MIT License.


Built with πŸ’œ for sleep-deprived parents everywhere.
Created by Sainath

About

A beautiful, free, and open-source baby tracker PWA designed for sleep-deprived parents. Features diaper, feed, sleep, and tummy time tracking with multi-caregiver sync.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages