{"id":26914558,"url":"https://github.com/ezahpizza/nexafit","last_synced_at":"2026-04-17T11:31:19.776Z","repository":{"id":285517139,"uuid":"958404220","full_name":"ezahpizza/nexaFit","owner":"ezahpizza","description":"A free web app that helps users plan healthy meals and track calories burned after workouts using smart predictions.","archived":false,"fork":false,"pushed_at":"2025-04-01T06:31:55.000Z","size":1251,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T07:34:17.248Z","etag":null,"topics":["machine-learning","reactjs","spoonacular-api","web-development","xgboost"],"latest_commit_sha":null,"homepage":"https://nexafit-zeta.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ezahpizza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-01T06:29:31.000Z","updated_at":"2025-04-01T06:31:59.000Z","dependencies_parsed_at":"2025-04-01T07:34:19.625Z","dependency_job_id":"03205727-bdd6-4402-ae5a-7eea41f3dc95","html_url":"https://github.com/ezahpizza/nexaFit","commit_stats":null,"previous_names":["ezahpizza/nexafit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezahpizza%2FnexaFit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezahpizza%2FnexaFit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezahpizza%2FnexaFit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezahpizza%2FnexaFit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezahpizza","download_url":"https://codeload.github.com/ezahpizza/nexaFit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246679822,"owners_count":20816575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","reactjs","spoonacular-api","web-development","xgboost"],"created_at":"2025-04-01T17:28:45.167Z","updated_at":"2026-04-17T11:31:19.771Z","avatar_url":"https://github.com/ezahpizza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nexaFit Monorepo\n\nWelcome to the **nexaFit Monorepo**, a unified repository for both the backend and frontend components of the nexaFit platform. nexaFit is a comprehensive nutrition and wellness platform that offers calorie prediction, meal planning, community forums, and now an **LLM-powered chatbot assistant** to guide users in utilizing the platform effectively.\n\n---\n\n## Features\n\n### Backend Features\n\n1. **Post-Workout Burnt Calorie Prediction**\n    - Uses a trained **XGBoost model** to predict calories burnt based on user input.\n    - Inputs include gender, age, height, weight, workout duration, heart rate, and body temperature.\n2. **Meal Planning**\n    - Integrates with the **Spoonacular API** to generate weekly meal plans.\n    - Supports dietary preferences, calorie limits, and intolerance filtering.\n3. **Forum**\n    - Allows users to create posts, comment on discussions, and engage with the community.\n    - Features tagging, pagination, and comment tracking for meaningful discussions.\n4. **User Management**\n    - Handles user profile creation, updates, and retrieval.\n5. **Chatbot Assistant**\n    - Powered by an LLM (Large Language Model) to assist users in navigating the platform.\n    - Provides guidance on calorie prediction inputs, meal planning options, forum usage, and more.\n\n---\n\n### Frontend Features\n\n1. **User Dashboard**\n    - Displays daily caloric intake, nutritional data, and suggested meal plans.\n    - Visualizes calorie predictions using charts.\n2. **Authentication**\n    - User registration and login powered by **Clerk**.\n3. **Meal Planning**\n    - Fetches weekly meal plans from the backend.\n4. **Forum**\n    - Enables users to participate in discussions, share motivation, and engage with the community.\n5. **Chatbot Integration**\n    - Frontend interface for interacting with the LLM-powered assistant.\n6. **Responsive Design**\n    - Optimized for mobile and desktop views.\n\n---\n\n## Tech Stack\n\n### Backend\n\n- **Framework**: FastAPI\n- **Database**: MongoDB Atlas\n- **Machine Learning Model**: XGBoost\n- **Containerization**: Docker\n- **LLM Integration**: OpenAI GPT or similar language model\n\n\n### Frontend\n\n- **Framework**: React\n- **Styling**: TailwindCSS\n- **Deployment**: Vercel\n- **HTTP Client**: Axios\n- **Authentication**: Clerk\n\n---\n\n## Monorepo Directory Structure\n\n```plaintext\n.\n├── backend/                  # Backend directory\n│   ├── .dockerignore         # Files ignored by Docker\n│   ├── .env                  # Environment variables (not included in repo)\n│   ├── .gitignore            # Git ignore rules\n│   ├── Dockerfile            # Docker build instructions\n│   ├── LICENSE               # License file\n│   ├── main.py               # FastAPI entry point\n│   ├── README.Docker.md      # Docker-specific instructions\n│   ├── README.md             # Backend documentation\n│   ├── render.yaml           # Render deployment blueprint file\n│   ├── requirements.txt      # Python dependencies\n│   ├── database/             # Database management files\n│   │   └── database.py       # MongoDB database manager\n│   ├── ml/                   # Machine learning-related files\n│   │   ├── calorie_predictor.json  # Trained XGBoost model\n│   │   ├── ml_predictor.py         # Prediction endpoint handler\n│   │   └── std_scaler.bin          # Fitted StandardScaler for normalization\n│   ├── routes/               # API route handlers\n│   │   ├── calorie_prediction.py  # Calorie prediction routes\n│   │   ├── chat_assistant.py       # Chatbot assistant routes\n│   │   ├── forum.py                # Forum routes\n│   │   ├── meal_planning.py        # Meal planning routes\n│   │   └── user_profile.py         # User profile routes\n│   └── validation/           # Validation models using Pydantic\n│       └── models.py         # Pydantic validation models for API requests/responses\n├── frontend/                 # Frontend directory\n│   ├── public/               # Static assets (e.g., images, favicon)\n│   ├── src/\n│   │   ├── components/       # Reusable React components\n│   │   ├── pages/            # Page-level components (e.g., Dashboard, Forum)\n│   │   ├── styles/           # TailwindCSS configuration files\n│   │   └── App.js            # Main React application entry point\n│   ├── .env                  # Environment variables (not included in repo)\n│   ├── package.json          # Project metadata and dependencies\n│   └── tailwind.config.js    # TailwindCSS configuration file\n└── README.md                 # Monorepo documentation (this file)\n```\n\n---\n\n## Installation\n\n### Prerequisites\n\n- Python 3.9+\n- Node.js (v16+)\n- Docker (optional for containerization)\n- MongoDB Atlas account (for backend database)\n- Spoonacular API key (for meal planning)\n- OpenAI API key or equivalent (for LLM chatbot assistant)\n\n---\n\n### Backend Setup\n\n1. Navigate to the `backend` directory:\n\n```bash\ncd backend/\n```\n\n2. Install dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n3. Set up environment variables:\nCreate a `.env` file in the `backend` directory with the following keys:\n\n```env\nMONGODB_URI=\u0026lt;your_mongodb_uri\u0026gt;\nDATABASE_NAME=\u0026lt;your_database_name\u0026gt;\nSPOONACULAR_API_KEY=\u0026lt;your_spoonacular_api_key\u0026gt;\nCALORIE_MODEL_PATH=ml/calorie_predictor.json\nOPENAI_API_KEY=\u0026lt;your_openai_api_key\u0026gt;\n```\n\n4. Run the application:\n\n```bash\nuvicorn main:app --reload\n```\n\n5. Access the API documentation at `http://127.0.0.1:8000/docs`.\n\n---\n\n### Frontend Setup\n\n1. Navigate to the `frontend` directory:\n\n```bash\ncd frontend/\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Set up environment variables:\nCreate a `.env` file in the `frontend` directory with the following keys:\n\n```bash\nREACT_APP_API_URL=\u0026lt;your-backend-api-url\u0026gt;\nREACT_APP_CLERK_FRONTEND_API=\u0026lt;your-clerk-frontend-api-key\u0026gt;\nREACT_APP_OPENAI_API_KEY=\u0026lt;your-openai-api-key\u0026gt;\n```\n\n4. Start the development server:\n\n```bash\nnpm run dev\n```\n\n5. Build for production:\n\n```bash\nnpm run build\n```\n\n6. Run production build locally:\n\n```bash\nnpm start\n```\n\n\n---\n\n## Running with Docker\n\n### Backend\n\n1. Navigate to the `backend` directory:\n\n```bash\ncd backend/\n```\n\n2. Build the Docker image:\n\n```bash\ndocker build -t nexafit-backend .\n```\n\n3. Run the container:\n\n```bash\ndocker run --env-file .env -p 8000:8000 nexafit-backend \n```\n\n4. Access the API at `http://127.0.0.1:8000`.\n\n---\n\n## Deployment\n\n### Backend Deployment\n\nThe backend can be deployed on platforms like Render.com using `render.yaml` or any cloud provider supporting Docker containers.\n\n### Frontend Deployment\n\nThe frontend is optimized for deployment on Vercel or Netlify.\n\nTo deploy on Vercel:\n\n1. Push changes to your GitHub repository.\n2. Link your repository to Vercel.\n3. Configure environment variables in Vercel settings.\n4. Deploy!\n\n---\n\n## Contributing\n\nWe welcome contributions! To contribute:\n\n1. Fork this repository.\n2. Create a new branch (`git checkout -b feature-name`).\n3. Commit your changes (`git commit -m \"Add feature\"`).\n4. Push to your branch (`git push origin feature-name`).\n5. Open a pull request.\n\n---\n\n## License\n\nThis project is licensed under the MIT License.\n\n---\n\n## Contact\n\nFor questions or support, please contact [ezahpizza](https://github.com/ezahpizza).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezahpizza%2Fnexafit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezahpizza%2Fnexafit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezahpizza%2Fnexafit/lists"}