01 — Project overview
FoodLens searches packaged foods through Open Food Facts while keeping protected nutrition data behind a Stripe test-mode subscription. The project is structured as a TypeScript monorepo with a Next.js frontend, an Express API, Prisma and MySQL persistence, Stripe Checkout and webhooks, and an automated backend test suite.
02 — Problem
Open Food Facts is community-maintained, so names, images, and nutrition fields can be incomplete. At the same time, subscription access cannot depend on a frontend lock alone.
03 — My role
- Designed the frontend-to-API boundary
- Implemented external product-data normalization
- Protected nutrition access on the server
- Documented setup, trade-offs, and review flow
04 — Technical architecture
- Frontend
- Next.js · React · TypeScript
- API
- Express · normalized Open Food Facts integration
- Data
- Prisma · MySQL · migrations and seed data
- Billing
- Stripe Checkout · signed webhooks · subscription synchronization
- Quality
- Automated backend tests · Docker Compose local environment
05 — Engineering challenge
Paid nutrition data must remain protected even when someone bypasses the interface, while incomplete upstream food data still needs to produce predictable application responses.
06 — Approach
I separated public product information from protected nutrition data, kept application-owned state in MySQL, normalized upstream responses into a stable model, and documented the system so each decision can be reviewed and tested.
07 — Solution
The Next.js frontend calls a TypeScript Express API that owns external-data normalization, MySQL persistence, Stripe subscription state, and authorization. A signed webhook flow synchronizes billing state and the backend test suite covers localization, validation, normalization, and free-versus-subscribed access.
08 — Backend & data
The Express API is the security boundary: it normalizes Open Food Facts responses, validates inputs, verifies Stripe webhook signatures, and returns 403 for protected nutrition requests without an active subscription.
09 — Key features
- Food search and details
- English, Dutch, German, and French interface support
- Recent-search persistence
- Stripe subscription checkout
- Server-side nutrition authorization
- Automated behavior tests
10 — Outcome
The public repository provides an inspectable full-stack implementation, setup guide, architecture diagram, API contract, automated test coverage areas, security decisions, and explicit limitations for technical review.
11 — What I learned
A paywall is an authorization problem, not a visual state. The backend must remain the source of truth, especially when access depends on external billing events.