{"id":48288122,"url":"https://github.com/cyrus-nodejs/foodpal-api","last_synced_at":"2026-04-04T23:00:24.431Z","repository":{"id":337728400,"uuid":"1154942822","full_name":"cyrus-nodejs/foodpal-api","owner":"cyrus-nodejs","description":"FoodPal Nodejs Express  API","archived":false,"fork":false,"pushed_at":"2026-02-11T00:41:33.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-11T04:01:03.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyrus-nodejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-11T00:14:58.000Z","updated_at":"2026-02-11T01:01:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cyrus-nodejs/foodpal-api","commit_stats":null,"previous_names":["cyrus-nodejs/foodpal-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cyrus-nodejs/foodpal-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrus-nodejs%2Ffoodpal-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrus-nodejs%2Ffoodpal-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrus-nodejs%2Ffoodpal-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrus-nodejs%2Ffoodpal-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyrus-nodejs","download_url":"https://codeload.github.com/cyrus-nodejs/foodpal-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrus-nodejs%2Ffoodpal-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31418285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-04-04T23:00:12.162Z","updated_at":"2026-04-04T23:00:24.307Z","avatar_url":"https://github.com/cyrus-nodejs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍲 FoodPal Backend\n\n**FoodPal** is an intelligent cooking companion that blends **AI recipe recommendations**, **community engagement**, and **personalized nutrition** — tailored for the modern African kitchen 🇳🇬.  \nThis backend powers all API endpoints, authentication, gamification, and real-time cook-along sessions.\n\n---\n\n## 🚀 Features\n\n### 👤 Authentication \u0026 Users\n- Email/password + Google OAuth login  \n- JWT-based authentication  \n- User profiles with dietary preferences, cooking habits \u0026 cultural background  \n\n### 🧠 AI-Powered Recipe Recommendations\n- Personalized \"For You\" feed using OpenAI embeddings  \n- Smart search \u0026 filtering (diet, culture, skill level)  \n\n### 🧑🏾‍🍳 Cook-Along (Live)\n- WebSocket-powered **live cook-along chat + timer**  \n- Users can join cooking sessions and message in real time  \n\n### 🍱 Meal Planning\n- AI-generated weekly meal plans  \n- Smart substitutions for allergies and budget  \n\n### 🌍 Community\n- Share recipes, like, comment, and discuss  \n- Social-style interaction among food lovers  \n\n### 🥕 Nutrition\n- Ingredient-based nutrition breakdown  \n- Calorie and macro tracking  \n\n### 🏅 Gamification (New!)\n- Cooking streaks tracking  \n- Achievement badges (`\"Budget Chef\"`, `\"Zero-Waste Pro\"`, etc.)  \n- Weekly cooking challenges (e.g., *“5 Meals Under ₦2000”*)  \n\n---\n\n## 🧩 Tech Stack\n\n| Category | Tech |\n|-----------|------|\n| **Runtime** | Node.js (TypeScript) |\n| **Framework** | Express.js |\n| **Database** | MongoDB + Mongoose |\n| **Auth** | JWT + Google OAuth2 |\n| **AI Integration** | FastAPI  | Transformers\n| **Real-Time** | Socket.io |\n| **Cache/Scaling (optional)** | Redis |\n| **Docs** | Swagger (OpenAPI 3.0) |\n\n---\n\n## 🗂️ Folder Structure\n\n ```\nbackend/\n├── controllers/\n│ ├── authController.ts\n│ ├── userController.ts\n│ ├── mealPlanController.ts\n│ ├── communityController.ts\n│ ├── cookAlongController.ts\n│ ├── nutritionController.ts\n│ └── gamificationController.ts\n│\n├── models/\n│ ├── user.ts\n│ ├── userPreference.ts\n│ ├── recipe.ts\n│ ├── communityPost.ts\n│ ├── mealPlan.ts\n│ └── gamification/\n│ ├── streak.ts\n│ ├── badge.ts\n│ └── challenge.ts\n│\n├── routes/\n│ ├── authRoutes.ts\n│ ├── userRoutes.ts\n│ ├── mealPlanRoutes.ts\n│ ├── communityRoutes.ts\n│ ├── cookAlongRoutes.ts\n│ ├── nutritionRoutes.ts\n│ └── gamificationRoutes.ts\n│\n├── middleware/\n│ └── authMiddleware.ts\n│\n├── utils/\n│ ├── sendEmail.ts\n│ └── embedding.ts\n│\n├── config/\n│ └── db.ts\n│\n├── swagger.json\n├── app.ts\n└── server.ts\n\n```\n---\n\n## ⚙️ Environment Variables\n\nCreate a `.env` file in your project root:\n\n```bash\nPORT=5000\nMONGO_URI=mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@cluster.mongodb.net/yourdb\nJWT_SECRET=\u003cyour_jwt_secret\u003e\nJWT_EXPIRES=7d\nOPENAI_API_KEY=\u003cyour_openai_key\u003e\nGOOGLE_CLIENT_ID=\u003cgoogle_client_id\u003e\nGOOGLE_CLIENT_SECRET=\u003cgoogle_client_secret\u003e\nREDIS_URL=\u003coptional_for_scaling\u003e\nFRONTEND_URL=http://localhost:3000\n\n```\n\n# 1️⃣ Clone the repo\ngit clone https://github.com/\u003cyour-org\u003e/FoodPal-backend.git\ncd FoodPal-backend\n\n# 2️⃣ Install dependencies\nnpm install\n\n# 3️⃣ Run development server\nnpm run dev\n\n# 4️⃣ For production\nnpm run build\nnpm start\n\n🧪 API Documentation\n\nSwagger UI is available at:\n\nIt includes:\n\n/api/auth → Login, Register, Google Auth\n\n/api/users → Profile management\n\n/api/mealplans → AI meal planner\n\n/api/community → Posts, likes, comments\n\n/api/cookalong → Live cooking chat\n\n/api/nutrition → Nutrition facts\n\n/api/gamification → Streaks, badges, challenges\n\n\n🧡 Credits\n\nBuilt with love by the FoodPal Team — inspiring creativity and connection through food.\n🍛 “Cook smarter, not harder.”\n\n📜 License\n\nThis project is licensed under the MIT License.\n\nMIT © 2025 FoodPal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrus-nodejs%2Ffoodpal-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyrus-nodejs%2Ffoodpal-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrus-nodejs%2Ffoodpal-api/lists"}