All projects

092025AI / Backend

Affordable Meals

A meal planning platform aligned with UN SDG 1 and SDG 2, generating low-cost, nutritious and culturally appropriate meal plans from dietary preferences, health conditions, budget and origin region.

Period
Sep 2025 - Oct 2025
Context
University & GNEC Hackathon

Open the live site ↗

The problem

A platform whose whole point is affordability cannot fail when a free-tier LLM provider rate-limits it. So every AI feature has somewhere to fall: OpenRouter fails over to Groq, and both fail over to structured fallback data. The sustainability scoring sidesteps the problem entirely by being deterministic - carbon footprint comes from a database-backed emission-factor table, with hardcoded factors if even that is unavailable.

What I built

  1. Implemented a 17-endpoint Express REST API covering authentication, recipes, meal plans, grocery lists, nutrition tracking, sustainability scoring, reviews, achievements, social shares and content moderation.
  2. Developed a deterministic sustainability engine scoring recipes on carbon footprint from a database-backed ingredient emission-factor table, with substring ingredient matching, an in-memory impact cache and hardcoded fallback factors.
  3. Integrated LLM features through OpenRouter (Llama 3.3 70B) with automatic failover to Groq and structured fallback data, so suggestions and nutrition estimates degrade gracefully rather than failing.
  4. Designed a 15-table PostgreSQL schema through 20 versioned SQL migrations, covering users, recipes, meal plans, nutrition logs, ingredient impacts, substitutions, reviews, review helpfulness, community activity, a following graph and achievements, with composite indexes for feed and trending queries.
  5. Built a community layer with an activity feed, member discovery, ratings and reviews, achievement milestones and social sharing, including server-rendered Open Graph preview images with bot detection and a first-party image cache.
  6. Implemented JWT authentication with bcrypt hashing, Helmet security headers, CORS policy and rate limiting, plus a content moderation service for user-generated recipes and reviews.
  7. Wrote 18 Jest/Supertest backend suites including a dedicated security suite, and Vitest/React Testing Library suites for the AI, nutrition calculation and cultural filtering services.

Stack

React 19TypeScriptZustandTailwind CSSViteRechartsAxiosNode.jsExpress 5PostgreSQLNeonDrizzle ORMJWTbcryptjsHelmetexpress-rate-limitOpenRouterGroq APIVercel OGPixabay APIJestSupertestVitestRenderVercel

Skills applied

  • REST API design
  • Relational schema design and versioned migrations
  • Deterministic scoring model design
  • LLM integration with provider failover
  • Authentication and authorisation
  • API security hardening
  • Content moderation
  • Open Graph and social preview generation
  • Caching strategies
  • Automated backend and frontend testing
  • CI/CD deployment