How jigarsk/fitnesstracker works
Project type and purpose
• This is a full-stack web application called “FitnessTracker.”
• The frontend is a React + TypeScript single-page app (Vite, Tailwind CSS).
• The backend is an Express/Node.js REST API with routes for authentication, meals, workouts, profiles.
• Data is persisted in a database (likely MongoDB or another NoSQL/SQL store) and there’s a Firebase config file on the frontend for additional services (e.g., hosting, analytics, or auth).
File structure
• Top-level:
• index.html, package.json, tailwind.config.js, vite.config.ts, tsconfig files, README.md
• src/ – React source: App.tsx, main.tsx, component library, page views (Landing, Dashboard, Nutrition, Workout, Profile, etc.), API wrappers, context providers, CSS.
• backend/ – Node/Express server: server.js entry point, Routes/ (authRoutes.js, mealRoutes.js, workoutRoutes.js, profileRoutes.js), models/ (User.js, Meals.js, Workouts.js), package.json, .env for DB and secrets.
• Patterns & conventions:
• Frontend: Context API for state management (authContext, nutritionContext, workoutContext, BMRContext).
• Backend: MVC-style separation (models + route handlers).
• Configuration: .env at both levels, ESLint, PostCSS & Tailwind, Vite for bundling.
README
• Only a title “# FitnessTracker” is provided; no architectural notes.
• We’ll infer architecture solely from the file tree.
Elements
• Blue for frontend elements
• Green for backend services
• Orange for external/cloud services