How aydh/symptom-tracker works
Project type and purpose
• This is a single‐page React application (“Symptom Tracker”) that uses Firebase as a backend (Auth and Firestore) and is deployed via Firebase Hosting (and optionally Netlify).
• Users can sign up/log in, record symptoms over date ranges, view tables, and analyze symptom trends.
File structure
• Top level: configuration files for GitHub Actions (.github), Firebase (.firebaserc, firebase.json), Netlify (netlify.toml), and package definitions (package.json).
• public/: static assets (index.html, manifest, robots.txt).
• src/: React source code.
• App.js & index.js: entry points.
• components/: UI modules (Login, Signup, SymptomTracker, etc.).
• firebase.js: initializes Firebase SDK (Auth + Firestore).
• utils/: helper functions (caching, date formatting, dynamic fields, styling).
• theme.js: design/theme settings.
README for additional insights
• Basic install/run instructions (“npm install”, “npm start”).
• No explicit backend server code—Firebase is the BaaS layer.
Main components & interactions
a. Components:
• Client Browser (user’s device)
• React SPA (App shell with component submodules)
• Utility layer (cacheUtils, dateUtils, etc.)
• Firebase Services (Authentication, Firestore Database)
• CI/CD Pipeline (GitHub Actions)
• Hosting (Firebase Hosting and/or Netlify)
b. Interactions:
• Browser loads React SPA from Hosting.
• SPA (via firebase.js) calls Firebase Auth for sign‐in/up/out.
• SPA reads/writes symptom data to Firestore.
• cacheUtils may store local data (localStorage) for offline or performance.
• GitHub pushes trigger GitHub Actions → deploy updated code to Firebase Hosting.
c. Architectural patterns/design principles:
• Client–Server separation via BaaS.
• Component‐based UI (React).
• Utility library for cross‐cutting concerns (caching, date handling, styling).
d. Technologies/frameworks:
• React (create‐react‐app structure)
• Firebase SDK (Auth + Firestore + Hosting)
• GitHub Actions for CI/CD
• Netlify (alternative hosting)
• Standard web stack (HTML5, JS, CSS via React)