Zum Inhalt springen

Meals Basil

v1.0

A family meal planner on a bento grid: drag recipes into the week, and the shopping list, budget and macros follow live.

$69

Seitenadresse: /

Eingebaut

Das bekommst du
  • Hell und dunkelNutzt deine Theme-Farben
  • Desktop, Tablet und HandyDie Bildschirme, für die es gebaut ist
  • Pakete…
  • Codegröße…
  • Schont den Akku30 fps, ruht im Stillstand
  • Pausiert, wenn verdecktAußerhalb des Bildschirms oder anderer Tab
  • Weniger BewegungRuhig für alle, die es wollen

Bei jeder Änderung geprüft

Sicherheit geprüft am 3. Dez.
  • TypprüfungTypeScript strict
  • Lint und FormatESLint · Prettier
  • Tests und BuildScreenshots in Hell und Dunkel
  • Sicherheits-AuditKeine hohen oder kritischen Hinweise
  • PaketalterJede Version seit 7+ Tagen öffentlich
  • CPU im LeerlaufUnter einem halben Kern in Ruhe, ≤ 30 fps

Code

meals-basilReact
  • meals-basil.tsxThe page: the sections in order.
  • content.tsEvery word and number: brand, nav links, each section's copy and lists.
  • theme.tsThe colors as CSS variables, and the shared class strings.
  • README.mdHow to install it, and where to change the text, colors and form.
  • pagesOne file per page: the sections it shows, in order.
    • nutrition.tsxNutrition: the week's average day against the goals (the macros ring), each day's calories, every day's macros and the goals themselves, per person.
    • overview.tsxThe Overview: today's meals as the hero, the week's macros ring, the list's progress, the cooking timer and the budget left, then the week, spend, low stock and the favorites.
    • pantry.tsxThe pantry: what is in stock (it comes off the shopping list), what to use soon, what is running low, and every row by aisle with add, edit and throw out.
    • planner.tsxThe planner: the week's board of breakfast, lunch and dinner. Drag a recipe from the tray into a slot and it glides in; the list tile grows by what is missing for it and the macros ring re-fills, live.
    • recipe.tsxOne recipe: the dish and its servings stepper (the ingredients scale with it), the macros per serving, the ingredients or steps (each timed step starts the cooking timer), the timer itself and when it was cooked and planned.
    • recipes.tsxRecipes: the family's favorite as the hero, the book at a glance, then every recipe as a card, filtered by meal and tag (the cards glide to their new places). ?new=1 opens the new recipe form.
    • reports.tsxReports: twelve weeks of grocery spend against the budget, the numbers that matter, the most-cooked recipes and what got thrown away.
    • settings.tsxSettings: the household (how many eat, the weekly budget, who shares the list) and Appearance (style, theme and language).
    • shopping.tsxThe shopping list: built from the week's plan less what the pantry holds, grouped by aisle and ticked off (by you, or live by whoever is at the store), with extras and putting the shopping away.
    • sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one card over the backdrop, without the rail and top bar.
  • sectionsOne file per page section.
    • account-menu.tsxThe account menu under the avatar in the top bar: who is signed in, Settings and Sign out; the arrow keys move through it, Escape, Tab or a click outside closes it.
    • appearance.tsxSettings → Appearance: the style (Glass or Solid) and the theme (System, Dark or Light), each choice shown as a small preview, and the language (System or one of locales/list.ts).
    • live-tiles.tsxThe tiles more than one page shows: the week's macros ring (it re-fills as meals are planned) and the cooking timer every page shares.
    • overview-tiles.tsxThe Overview's own tiles: today's meals (the hero), the list's progress with the shopper live, the budget left, the week strip, spend, low stock and the most-cooked recipes.
    • pantry-dialogs.tsxThe pantry's dialogs: add or edit what's in stock (item, amount, when to buy more, use-by date) and throw something out (it goes to the waste report).
    • planner-board.tsxThe planner's week board (days by meals; on phones the days run down) and the tray of recipes to drag onto it. A slot takes a dragged recipe or a planned meal moved from another slot; a click or Enter opens the slot instead.
    • planner-dialogs.tsxThe planner's two dialogs, the way in without dragging: a slot's (its meal's servings, swap or remove it, or pick a recipe for an open slot) and a recipe's "Add to…" (pick the day and the meal).
    • rail.tsxThe slim icon rail on wide screens (logo, one icon per page with its name in a tooltip, search at the foot) and the phone's floating tab bar with a More sheet; the current page's pill glides to it.
    • recipe-editor.tsxThe recipe form, new or edit: name, meal, time, nutrition per serving, tags, the ingredients (from the store's catalog) and the steps, each with its own error line.
    • sign-in-form.tsxThe sign-in form: email and password with their errors under them, show or hide the password, keep me signed in, and the demo account to fill in; a wrong pair says so above the fields.
    • top-bar.tsxThe top bar: the kitchen and today's date (the logo on phones), search, New recipe, the theme switch and the account menu. Plain at rest; once the page scrolls it frosts itself over the tiles.
  • partsWhat several sections share.
    • buildWhat several sections share.
      • cardsWhat several sections share.
        • wave.tsThe wave card style: cards arrive in a wave by grid position from the top-left.
      • rowsWhat several sections share.
        • mask.tsThe mask row motion: each part of a row on screen (its children) slides up from behind its own mask.
      • core.tsxThe page's build-in: on first load and on every page switch the cards arrive in the app's card style and their contents build: bars grow, lines draw, rings fill, the list rows on screen ripple in in the app's row motion, numbers count. The two picks are wired in ./index.ts.
      • index.tsThe app's two build-in picks, wired here and nowhere else: its card style (cards/) and its row motion (rows/). npm run new-app copies only the two it is given (--cards, --rows).
    • appearance.tsHow the app looks right now: dark or light, Glass or Solid, from Settings → Appearance, the page around it and the Style setting.
    • avatar.tsxA person's initials in a round badge, tinted with the primary.
    • backdrop.tsxThe Glass style's backdrop: what shows through the see-through panels, faded out in Solid; with followBackground it paints your background instead.
    • chart-path.tsA chart's line and area paths in each curve Chart Studio has (straight, smooth, step), and the classes that let a Chart Studio curve swap them in CSS.
    • charts.tsxThe app's small charts: rounded bars (muted, the current one in the primary) and a smooth line with a soft area under it, both labelled under the plot and building in with the page.
    • command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
    • countdown.tsA countdown that keeps true time: it stores when it ends, not a tick count, so a background tab or a slow device never makes it drift.
    • dialog.tsxA centered modal dialog (a form, a confirm): rises in, plays its way out, Escape or a tap outside closes it, and the focus goes back where it was.
    • dish-art.tsxA recipe's picture, drawn: its vessel (a bowl, a plate, a toast, a wrap, a soup, a tray) holding food in its main color. Every color is a mix of the theme's shades, so it follows each preset and theme.
    • drag-plan.tsDrag a recipe tile (or a planned meal) into a day's meal slot: mouse and pen at once, touch after a short press (a swipe still scrolls). The lifted copy stays under the press point and follows the pointer 1:1, the slot under it lights up, and on release the copy glides into that exact slot (or back home on Escape or a miss). The page scrolls near its edges.
    • field.tsxA labeled form field (a text input or a select) with its error line under it, tied together for screen readers.
    • flip.tsFLIP for a box of items that move when a filter, a sort or new data changes them: each item with a data-flip id glides from where it was to where it is now, and new ones fade and grow in. Positions are kept relative to the box, so a page scroll never reads as a move.
    • format.tsHow numbers and dates are written: by Intl, the current language's way ("1,240", "1.240"; "Nov 19", "19 nov."). Add a helper here when a page needs money, times or a list.
    • icons.tsxThe logo and the line icons, drawn on a 24-unit grid with round ends.
    • kitchen.tsWhat runs live in the kitchen: the one cooking timer every page shares, and the shopper at the store ticking the list off on the shared live clock.
    • language.tsThe app's language: the words every page reads (useWords), how dates and numbers are written (parts/format.ts) and the reading direction. Picked in Settings → Appearance (or System: the page's own language) and kept in this browser; English is built in, any other language loads only when it shows (locales/list.ts).
    • live-clock.tsxOne shared clock for everything live: it ticks only while something on screen listens, the tab is visible and live isn't paused, and the bare button that pauses it. What a tick does (move the demo's time, bring in an event, reload) is the app's, passed to liveClock.
    • moments.tsThe animations the sidebar, the sign-in card, menus, dialogs, the phone sheet and toasts play, timed by their moments in theme.ts.
    • motion.tsMotion helpers: the reduced-motion check, live, and run-once-in-view.
    • ring.tsxThe macros ring: three arcs (protein, carbs, fat), each filled to its share of the day's goal, around the calories in the middle. It fills in with the page and re-fills live when the plan changes.
    • router.tsThe page switcher: reads the app's page from the address hash (#/settings, #/?status=open).
    • scroll-to-view.tsScrolls an element into view moving only its own scroll container, never the page around it.
    • select-box.tsxA native select dressed to match the app: no browser arrow, a drawn chevron instead.
    • session.tsWhether someone is signed in: a first visit is signed in as the demo account; Sign out holds until the next sign-in, and a sign-in without Keep me signed in lasts only this tab.
    • sheet.tsxThe phone sheet: a modal panel that springs in from the left with the sidebar; Escape, a tap outside or its close button slides it away.
    • states.tsxThe data states every page shares: a calm skeleton while loading, an error with Try again, and an empty note with a way out.
    • store.tsThe app-wide state several parts share: the theme mode and style (kept in the browser) and the toasts.
    • ticker.tsxA number that counts up while its page builds in, and rolls to its new value whenever it changes.
    • tile.tsxThe bento pieces every page is built from: the page's head (title, one line, its actions), a tile in a grid area, and a tile's title row with its link.
    • timer-ring.tsxA countdown ring: the arc draws itself in, then sweeps smoothly as time runs out while the time in the middle counts down, drawn straight to the page each frame without re-rendering.
    • toasts.tsxThe toasts: short notes that confirm what just happened, at the bottom end.
    • use-api.tsLoads data through the fake API with loading, error and retry, remembering each answer so a page you come back to shows at once.
    • use-dialog.tsOpens and closes a native <dialog> as a modal; on close it plays its way out first (data-closing), so dialogs, sheets and the palette never vanish in one frame.
  • dataThe pretend data and the fake API: swap it for your backend.
    • account.tsThe demo account: who is signed in (the account menu shows them) and the email and password the sign-in page takes.
    • api.tsThe fake API: every page loads and saves through these functions, so wiring a real backend happens here only.
    • recipes.tsThe pretend kitchen: every grocery item the recipes use (its aisle, unit and price) and the family's recipe box.
    • seed.tsThe pretend household: this week's plan (seeded from the real date so today is always full), last week's, the pantry, the extra list items, past spend and waste.
    • store.tsThe kitchen's state in memory and what follows from it: the shopping list (the plan's ingredients minus the pantry), nutrition per day, the week's cost and the reports. data/api.ts reads and changes it.
  • localesEvery word the app shows, one JSON file a language; list.ts names them.
    • en.jsonOne language's words, with the keys of en.json.
    • es.jsonOne language's words, with the keys of en.json.
    • list.tsThe languages the app offers, in the picker's order: one JSON file each, en.json the source. To remove one, delete its file and its line; to add one, copy es.json, translate it and add a line. English is built in; the rest load only when picked. TypeScript checks each file has en.json's keys, scripts/check/check-locales.mjs the rest (no extra keys, plural forms, {slots}).

meals-basil.tsx

The page: the sections in order.

Lädt…
Gut für
A family or meal-prep cook planning a week of meals for four on a grocery budget, with a shared list and a pantry.
So funktioniert es
Drag a recipe into a day's slot: it glides in, the list grows by what's missing and the macros ring re-fills.
So nutzt du es
Edit words in locales/ and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.