Arogya-Fitness Guide

MaterialUIReactNodeMongoDBCloudinaryTS

Thursday, July 25, 2024

1. Project Vision

Arogya-Fitness Guide was created as a single, unified platform to manage a complete fitness journey, integrating workouts, diet, and other vital metrics like sleep and water intake. The goal was to provide users with a simple, all-in-one dashboard and give administrators an easy way to manage the workout content, creating a holistic wellness tool where users feel in control of their health.

2. Technology Choices

The tech stack was chosen for a robust, decoupled architecture:

  • Frontend: Next.js and React were used to build a modern, component-based UI for both the user and admin panels.
  • Backend: A Node.js/Express server with a MongoDB database was chosen to flexibly handle complex user data and create a powerful REST API.
  • Authentication: JWT (JSON Web Tokens) provides secure, role-based authentication for users and admins.
  • Media & UI: Cloudinary efficiently manages all image uploads, while Material-UI and Swiper.js are used to create a functional and interactive user experience.

3. Challenges & Solutions

  • Dependency Conflicts: Resolved integration issues between modern JavaScript libraries by using the npm install --legacy-peer-deps flag.
  • Complex Data Aggregation: Instead of processing data on the client, dedicated backend endpoints were built using Mongoose aggregation pipelines to efficiently summarize user stats for reports.
  • Multi-Environment Management: Handled the complexity of running separate frontend, admin, and backend apps by using distinct ports and .env files for clean, portable configuration.

4. Image Section

Login Page
Home Page
Calorie Intake Page
Calorie Intake Popup
Workout Page
Admin Page

5. Final Architecture

The final architecture is a powerful, decoupled system designed for separation of concerns and scalability:

  • Frontend (User App): A responsive Next.js application that serves as the primary interface for users to interact with their fitness data.
    Admin Panel: A separate, secure Next.js application for administrators to manage the platform's content.
    Backend API: A central Node.js/Express server that acts as the brain of the operation. It handles all business logic, communicates with the MongoDB database, and securely serves data to both the user and admin frontends.
    External Services: The platform offloads specific tasks to specialized services: Cloudinary for all image hosting and an external Nutrition API to enrich user data with real-world calorie information.

Project Repository

https://github.com/this-is-rachit/Arogya-FitnessGuide