
What2Eat is a small page for deciding what to eat next. Press the button, watch a few options pass by, and keep the final result or try again.
The 2021 version
I built the original with Vue 2 and Element UI loaded from CDNs, using Axios to fetch the food list from JSON. The main elements were a button, food pictures, and the selection animation. It was deployed on Vercel.
The project also accepted image pull requests. GitHub Actions ran a Python script to add contributed images to the site configuration. The early blog post retains the interface screenshot and usage link.
The 2025 rewrite
I rebuilt it with Vue 3, TypeScript, Vite, and Naive UI. Each food record contains a name, picture, emoji, background color, and tags. Image imports are handled by the build.
Multiple tags can narrow the choices before a draw. A food must match all selected tags; if none do, the page asks for different tags. Clicking a tag on the current result adds it to the filter.
The display switches between pictures and emoji. Animation is optional: enabled, it cycles through several candidates before settling; disabled, it returns one choice immediately. During the animation, food tags are hidden and filters disabled, then the complete result appears.

Image credits
Some food images come from pcrbot/whattoeat, and the early version also included shop avatars. The README credits the logo to John Frank Wayre / Helen Rae Cooper. I kept the image and logo credits with the project.
