A baby tracking application inspired by Baby Buddy, built for Cloudflare's edge platform.
- Multi-child support — track multiple children, each linked to one or more users
- Comprehensive tracking — feedings, diaper changes, sleep, tummy time, pumping, growth, temperature, notes, and timers
- Photo uploads — child profile photos stored securely in Cloudflare R2
- Secure by default — authentication via Cloudflare Access (no custom login UI needed)
- Edge-native — runs entirely on Cloudflare (Pages, Workers, D1, R2)
| Component | Technology | Deployment |
|---|---|---|
| Client | React + Vite + MUI | Cloudflare Pages |
| Server | Hono (TypeScript) | Cloudflare Workers |
| Database | D1 (SQLite) | Cloudflare D1 |
| Object Storage | R2 | Cloudflare R2 |
| Auth | Cloudflare Access | JWT validation |
- Node.js 18+
- npm
- Wrangler CLI (
npm install -g wrangler)
npm install# Start the API server (with local D1 + R2)
npm run dev:server
# Start the client dev server (in another terminal)
npm run dev:clientPopulate a local D1 database with sample data:
npm run db:seed# All tests
npm test
# Server only
npm run test:server
# Client only
npm run test:clientnpm run build:client
npm run build:server# D1 database
npx wrangler d1 create baby-tracker-db
# R2 bucket for photos
npx wrangler r2 bucket create baby-tracker-photosUpdate server/wrangler.toml with your D1 database ID, Cloudflare Access team domain, and audience tag.
npx wrangler d1 migrations apply baby-tracker-db# Deploy the Worker API
npm run build:server
npx wrangler deploy -c server/wrangler.toml
# Deploy the client
npm run build:client
npx wrangler pages deploy client/distAdd both the Pages site and Worker API to a Cloudflare Access application to protect them with your identity provider.
├── client/ # React + Vite SPA
│ ├── src/
│ │ ├── api/ # API client
│ │ ├── components/ # Layout, shared components
│ │ ├── hooks/ # Auth & children context
│ │ ├── pages/ # Route pages
│ │ └── types/ # TypeScript models
│ └── test/
├── server/ # Hono Cloudflare Worker
│ ├── src/
│ │ ├── middleware/ # Auth (CF Access JWT)
│ │ ├── routes/ # REST API routes
│ │ └── types/ # Env bindings
│ ├── migrations/ # D1 SQL migrations
│ ├── seed/ # Sample data
│ └── test/
└── package.json # npm workspaces root