How haradakouta/life-pwa-react works
Project type and purpose
• This is a full-stack Progressive Web App:
• Front-end: React + TypeScript single-page application built with Vite, served as static assets (GitHub Pages or Firebase Hosting).
• Back-end: Firebase services (Authentication, Firestore, Storage) plus Cloud Functions for transactional email.
• External integrations: AI (Gemini API), barcode/product lookup APIs (Rakuten, JAN Code, Open Food Facts), Web Notifications.
• Purpose: A life-management app combining health tracking, expense tracking, inventory/shopping lists, social features, and AI-powered advice.
File structure
• Top-level “src/” holds all UI code:
• api/ – wrappers for Gemini, Rakuten, etc.
• components/ – 15+ feature folders (dashboard, meals, stock, shopping, recipe, expense, report, social, auth, settings, layout, common, barcode, badges).
• store/ – Zustand stores for each domain (intake, expense, stock, shopping, recipe, settings, badge).
• config/firebase.ts – Firebase SDK initialization.
• utils/ – helpers for auth, Firestore, health advisor logic, error logging, image upload, notification, etc.
• main.tsx + App.tsx – application entry, router, top-level layout.
• “functions/” – Firebase Cloud Functions (email via Nodemailer).
• Config/deployment files: firebase.json, firestore.rules, .firebaserc, vite.config.ts, tsconfig*.json, package.json.
• CI/CD: GitHub Actions deploy workflow.
README
• Confirms architecture: React + TS + Vite PWA → Firebase Auth/Firestore/Storage + Cloud Functions → External AI & product APIs.
• Describes features (barcodes, AI health advisor, offline support, notifications, badges, social timeline, real-time sync).
• Lists tech stack used in each layer.
Diagramming conventions
• “GET/SET” between React App and Firestore
• “Publish/Subscribe” for real-time streams
• “HTTP Request” to external APIs
• “Trigger” from Firebase Authentication/Login
• “Client (Browser/PWA)”
• “Serverless Backend (Firebase + Functions)”
• “Third-Party Services”
Detail
• Service worker caching strategy (Asset Cache vs. Runtime Cache).
• Detail the Cloud Function trigger (HTTP callable or Firestore trigger).
• Data schema pointers (collections: users, posts, inventory, recipes, notifications).