How asguizar/nutritrackapp works
Project type and purpose
• NutriTrack is a full-stack, single-page web application (SPA) built in React-TypeScript for nutritionists.
• The “backend” is serverless Firebase (Authentication + Firestore).
File structure
• src/index.tsx → React app entry point, wraps App.tsx in BrowserRouter and AuthContext.
• src/App.tsx → Top-level routes (Login vs protected Dashboard flows).
• src/contexts/AuthContext.tsx → Global auth state, route guard logic.
• src/config/firebase.ts → Firebase initialization + exports (auth, firestore).
• src/components/* → UI views:
• Login.tsx
• Dashboard.tsx (patient list + metrics overview)
• AppointmentCalendar.tsx
• NewPatient.tsx
• PatientProfile.tsx (history, charts via Plotly/Recharts)
• Tailwind/Tailwind config + postcss config govern styling.
• firestore.rules & indexes define security boundaries and query optimizations.
README for additional insights
• Stack: React18 + TS, Tailwind CSS, Plotly (charts), Firebase Auth, Firestore (real-time listeners).
• Key features: secure login, per-user data isolation, real-time patient & appointment updates, analytics dashboards.