Help us measure site usage?

With your permission, we use self-hosted analytics to understand page usage. It is optional and does not affect the Service. Learn more.

DartintermediatemobileAI generated

Recipe Planner

Build a Flutter meal planner: you keep a collection of recipes, assign them to the days of the week (breakfast, lunch or dinner), adjust the number of servings for each meal, and the app generates a shopping list for the week that combines the same ingredients from different recipes (200 g of flour plus 300 g of flour becomes 500 g), converts compatible units, and groups everything by shop section. Everything is stored on the phone with Drift, and Riverpod keeps screens in sync. You'll learn Drift with several related tables, Riverpod, a week-planner interface, scaling quantities, merging ingredients with unit conversions, and testing the logic that builds the list.

Estimate
~13h
Steps
7
Completed by
0
Proposed by
codeseed.app

Flutter · Riverpod · Drift

Project roadmap

  1. 01

    Define the data and rules

    ~1.5h

    Write DESIGN.md: recipes (name, servings and ingredients with an amount, a unit and a shop section), the plan (date, meal slot, recipe and servings), and the rules for the shopping list: scale each recipe to the planned servings, merge the same ingredient across recipes, convert units within the same kind (g and kg, ml and l, tsp and tbsp), and keep incompatible units on separate lines. Done when: DESIGN.md defines the data and list rules with an example.

  2. 02

    Create the database

    ~2h

    Create Drift tables for recipes, recipe ingredients, and plan entries, with foreign keys and cascading deletes for ingredients. Write queries: watch recipes, watch the plan for a week with each entry's recipe, and add, move and remove plan entries. Add a few sample recipes on first launch. Done when: DAO tests with an in-memory database pass.

  3. 03

    Manage recipes

    ~2h

    Build screens to list, add, edit and delete recipes, with an editable list of ingredients (name, amount, unit from a list, and section) and validation (a name, servings of at least 1, and amounts above 0). Warn before deleting a recipe that is in the plan. Done when: recipes with ingredients can be managed.

  4. 04

    Build the week planner

    ~2.5h

    Build a week view with days and meal slots, where users add a recipe to a slot, change its servings, move it to another slot, and remove it, and navigate to the previous and next weeks. Use Riverpod providers that watch the Drift queries. Done when: planning a week works, and the plan is kept after restarting.

  5. 05

    Generate the shopping list

    ~2.5h

    Write the list builder as pure Dart functions: scale ingredients to the planned servings, normalize names (trim and ignore case), convert units within the same kind to a base unit, merge, convert back to a friendly unit (1500 g becomes 1.5 kg), and group by section. Show the list with checkboxes that are saved, and a way to add extra items by hand. Done when: the list correctly combines ingredients from several recipes.

  6. 06

    Handle edge cases

    ~1h

    Handle ingredients with no amount (such as salt to taste, listed once), incompatible units for the same ingredient (listed separately), a recipe edited after being planned (the list updates), and an empty week. Done when: each case produces a sensible list.

  7. 07

    Test it

    ~1.5h

    Write unit tests for scaling, unit conversion, merging, grouping and the edge cases, DAO tests for the plan queries, and a widget test that plans two recipes and checks the list. Done when: flutter test passes.

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~13h · 7 steps

Tech stack

FlutterRiverpodDrift