Pennylane tech test

It's dinner time! Create an application that helps users find the most relevant recipes that they can prepare with the ingredients that they have at home

by Maxence Tisserant (@tisserm)

(the features are only available to authenticated users, so please sign up)

Features

All recipes

Search through a paginated list of recipes, filter by rating and cooking time. You can also save recipes from this page without opening them.

Recipe Finderâ„¢

Input ingredients and see which recipes contain them. The recipes are ordered by how many ingredients they match. Your ingredients (called pantry here) are stored in localStorage so you can jump back and forth between pages.

Recipe #show

See all the ingredients needed for the recipe or schedule it for later. You may also leave a comment with an image of your result (with Turbo Stream support, because why not).

My Recipes

Tried a recipe you enjoyed? Save it and find it on this page.

Meal Planner

Plan your meals for the week or month ahead. Scheduled recipes are displayed on the page, and this month's planned recipes also appear on your dashboard.

Dashboard

Every month an ingredient is chosen to be highlighted. On your dashboard you will see the best recipes featuring this ingredient and your planned recipes of the month.

User stories

  • As a user, I want to discover popular recipes, so that I can find new dishes to try without searching blindly.
  • As a user, I want to find recipes based on ingredients I already have at home, so that I can cook a meal without going to the store.
  • As a user, I want to save my favorite recipes, so that I can quickly find them again later.
  • As a user, I want to share cooking tips with other users, so that the community can benefit from my experience.
  • As a user, I want to plan my meals for the month ahead, so that I can stay organized.
  • As a user, I want to discover new recipes to try, so that I can expand my cooking knowledge.

Technical details

  • Rails 8.1 app running with Ruby 4.0
  • Postgres database (see schema.rb for the full schema). The recipes are imported from data/recipes-en.json using app/services/recipes_importer.rb
  • Uses Tailwind CSS + Hotwire as the frontend "framework"

Ideas that did NOT make it to the app

  • Allowing users to rate a recipe to change the rating
  • Allowing users to create and edit their own recipes
  • Allowing users to receive recommended recipes matching what they already saved

AI disclosure

I used OpenCode to help me with the styling of the elements (basically only CSS classes) but did the rest myself (DOM architecture, Turbo frames, Stimulus, etc.). Also, I did NOT use any AI for the backend (controllers, models, DB queries, etc.), I want this test to reflect my own skills.