Family reading tracker built with Next.js 15 and Firebase featuring achievements, activity feeds, and monthly calendar visualizations. The dashboard requires Firebase email/password auth before it loads any data.
- Node.js 22+
- npm 10+
- Firebase CLI (
npx firebase --version) - Access to the Firebase project
reading-tracker-7a90d
- Install dependencies:
npm install
- Copy the environment template and populate the Firebase web config plus the allowed email list:
cp .env.local.example .env.local # Fill NEXT_PUBLIC_FIREBASE_* and NEXT_PUBLIC_ALLOWED_EMAILS - (Optional) Start the Functions + Firestore emulators in another terminal:
npm --prefix functions run serve -- --only "functions,firestore" - Launch the Next.js dev server:
npm run dev
Accounts are provisioned manually in Firebase Authentication. Create email/password users for the family members and list their emails in NEXT_PUBLIC_ALLOWED_EMAILS so the login screen accepts them. The app signs users out via the Firebase web SDK.
- Functions code lives in
functions/and is written in TypeScript. - Deploy Functions only:
npm --prefix functions run deploy
- Run the Firebase emulators (Functions + Firestore):
When emulators are running, set
npm --prefix functions run serve -- --only "functions,firestore"NEXT_PUBLIC_HELLO_ENDPOINTin.env.localso the UI points at the local function.
- Build the static Next.js site:
npm run build:static
- Deploy Hosting, Functions, Firestore rules, and indexes:
npm run firebase:deploy
- Reading Log Form: Log daily reading by minutes, pages, or books with optional book title/author
- Live Statistics: Current streak, last log date, and totals for minutes, pages, and books
- Achievements System: 20 milestone badges across streak, pages, minutes, and books categories
- Recent Activity Feed: Last 10 reading entries with book details
- Monthly Overview: Calendar heatmap showing logged days, monthly stats, and completion percentage
- Book-Themed Design: Warm, calm UI with amber/orange gradients and book icons
- Theme Toggle: Choose light, dark, or system mode (respects OS preference by default)
- Mobile Responsive: Optimized layout for all screen sizes with proper overflow handling
Use the built-in CLI to import Beanstack log summary PDFs directly into Firestore:
# Preview the parsed rows without writing data
node scripts/import-pdf.js path/to/Log-Summary-ReaderA.pdf reader-a --dry-run
# Run without --dry-run to import into readers/<readerId>/logs
node scripts/import-pdf.js path/to/Log-Summary-ReaderB.pdf reader-bEach row is stored as readers/<readerId>/logs with matching importBatches metadata. The parser handles multi-line titles/authors and page breaks, so no external scripts/repositories are required.
- Performance optimization: Materialize stats into
readers/{readerId}/dailyStatsfor faster loads - Multi-reader support: Add UI for selecting/managing multiple readers
- Data export: Add CSV export functionality
- Add automated tests for the auth flow and data components