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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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