Saltar al contenido

Pantry Larder

v1.0

A household larder app on warm linen with tomato red: fridge, freezer and pantry stock, a live use-soon timeline you drag things off, the shopping list, receipts, waste log and reports.

$69

Dirección de la página: /

Incluido

Lo que obtienes
  • Claro y oscuroUsa los colores de tu tema
  • Escritorio, tableta y móvilLas pantallas para las que está hecho
  • Paquetes…
  • Tamaño del código…
  • Ahorra batería30 fps, en reposo cuando está quieto
  • Se pausa si no se veFuera de pantalla o en otra pestaña
  • Movimiento reducidoTranquilo para quien lo pide

Revisado en cada cambio

Seguridad revisada el 3 dic
  • Comprobación de tiposTypeScript estricto
  • Lint y formatoESLint · Prettier
  • Pruebas y buildCapturas en claro y oscuro
  • Auditoría de seguridadSin avisos altos ni críticos
  • Antigüedad de paquetesCada versión es pública desde hace 7+ días
  • CPU en reposoMenos de medio núcleo en reposo, ≤ 30 fps

Código

pantry-larderReact
  • pantry-larder.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.
    • item.tsxOne thing in stock (#/stock/<id>): its live countdown and actions as the hero, how much is left, its use-by, price and place (move it in one tap), and Details / History tabs.
    • list.tsxThe shopping list (#/list): add a thing, tick what is in the basket, change how many, then put the ticked things away (they go into stock in their usual place) or clear them; beside it how far along you are, what it should cost, what runs low and the last weeks' shops.
    • overview.tsxThe overview (#/): the use-soon timeline as the hero, saved this month, the fridge dial, the fridge, freezer and pantry, waste this month, the shopping list, waste by month, tonight's best recipe and the latest receipt.
    • receipts.tsxReceipts (#/receipts): the latest receipt line by line, spend this month, how many shops, spend by store, and every receipt (open one to change it). Add receipt puts all its lines into stock at once; #/receipts?new=1 opens it straight away.
    • reports.tsxReports (#/reports): over the last 6 or 12 months (?range=12), what was saved by using things in time as the hero line, the four totals, waste per month, spend per month, and waste by place and by kind of food.
    • settings.tsxSettings (#/settings): the household, the fridge and freezer targets the dials read, the month's savings goal, whether things that run out go on the list by themselves, the usual days until use-by for each kind of food, then Appearance.
    • sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one card over the warm backdrop, without the rail and top bar.
    • stock.tsxStock (#/stock): the fridge, freezer and pantry as filter tiles (and drop targets: drag a row onto one to move it), the fridge dial, what it is all worth, what goes off soon, the list itself, what runs low and the kinds of food.
    • use-soon.tsxUse soon (#/use-soon): everything that goes off this week in three lanes (today or gone off, the next three days, later this week) with one-tap Used and Bin, the counts and savings beside them, and four recipes that rescue the most.
    • waste.tsxThe waste log (#/waste): this month's waste against last month with six months of bars as the hero, why things were thrown away, which kinds of food go most, and the log itself, filtered by reason (?reason=), each entry editable.
  • 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).
    • dock.tsxThe phone's tab bar: a framed pill floating at the bottom with the four main pages and More (the sheet with every page).
    • item-actions.tsxWhat you can do with one thing in stock: mark it used (all of it or one), or bin it with why. Shared by the use-soon timeline, the Use soon lanes, the stock list and the item page; each save shows a toast with Undo.
    • item-dialog.tsxAdd a thing to the stock, or change one: its name, kind, place, how much, price and use-by (filled in from the kind's usual days in Settings), and whether to keep it stocked.
    • overview-tiles.tsxThe overview's smaller tiles: saved against the month's goal, the fridge dial, one tile per place, waste this month, the shopping list with ticks, waste by month and the latest receipt.
    • page-head.tsxWhat every page starts with: its heading and one line under it, its actions at the end; the still tiles a bento shows while it loads; and the page's states around its tiles.
    • rail.tsxThe slim icon rail: the logo, one icon per page with its name in a tooltip, and a tomato square that glides to the current page; the Use soon and List icons carry their counts. NavList is the same links as a list, for the phone's More sheet.
    • receipt-dialog.tsxAdd a receipt (every line goes into stock at once, each in its usual place with its kind's usual days), or change one already logged. Lines can be typed one by one or pasted in bulk ("2 Whole milk 1.35" a line).
    • recipe-tile.tsxA recipe as a tile: what it rescues (the ingredients about to go off, in the accent with a clock), what is missing, and Cook it, which uses one of each from stock and counts it as saved.
    • 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.
    • stock-list.tsxThe stock list: every thing in the chosen place, searchable and sorted by use-by or name. Each row opens its item; drag a row onto another place's tile to move it there; Use opens the used / binned choices.
    • top-bar.tsxThe top bar: the logo on phones, where you are, search, the theme switch, Add item and the account menu. Plain at rest; once the page scrolls it gets its own blur, a see-through ground and a thin bottom edge.
    • use-soon-hero.tsxThe overview's hero: everything that goes off in the next three days on a timeline that slides with the clock (each chip's countdown ticks live). Drag a chip onto Used and it pops away, the saved counter in the well grows, a kept thing that ran out goes on the list, and it saves; drop it on Binned to log it as waste. A click (or Enter) opens the same choices.
    • waste-dialog.tsxLog something thrown away by hand, or change a logged one: what, how much, what it cost, why and when.
  • partsWhat several sections share.
    • buildWhat several sections share.
      • cardsWhat several sections share.
        • rise.tsThe rise card style: cards rise and fade in (24px, a hair smaller), one after another.
      • rowsWhat several sections share.
        • turn.tsThe turn row motion: each row on screen swings in from behind, hinged on its left edge, from faint (its free edge never comes forward, so it never widens the page).
      • 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.
    • bar-chart.tsxA bar chart: bars grow in, and the picked bar (in the primary), its guide line and tooltip glide to the bar you point at or pick with the arrow keys; a new range morphs the bars instead of drawing them again.
    • clock.tsThe one live clock every moving tile shares: at most 30 ticks a second, only while a tile that listens is on screen and the tab is visible, and never under reduced motion (the tiles then show still values).
    • command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
    • 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.
    • drag-drop.tsDrag a thing onto a drop target (a chip onto Used or Binned, a stock row onto another place): mouse and pen at once, touch after a short press (a swipe still scrolls), the lifted copy kept under the grab point and following 1:1, the target lit while over it; on a target the copy pops away, anywhere else it glides home. Escape cancels.
    • field.tsxA labeled form field (a text input or a select) with its error line under it, tied together for screen readers.
    • format.tsHow numbers and dates are written: by Intl, the current language's way ("1,240", "1.240"; "Nov 19", "19 nov."; "£4.20", "4,20 £").
    • grids.tsEach page's bento: the named tile areas at phone (2 columns), tablet and small laptop (4, from a 64rem wide app) and desktop (6, from 80rem). Every row is filled, so the grid closes into a rectangle at each width.
    • icons.tsxThe logo, the line icons and the drawn food icons (one per kind of food), all on a 24-unit grid with round ends.
    • 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).
    • larder.tsThe kitchen as the pages read it: the one answer every page loads, a save that refreshes it, and the sums the tiles show (what goes off when, totals by month, recipes that use what is about to go off).
    • line-chart.tsxA line chart with a soft area under it, in the primary: the line draws itself in, the latest point marked, and new values roll the line to its new shape.
    • 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.
    • 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.
    • temp-dial.tsxA fridge or freezer dial: a 240° arc with the safe band in green, a needle at the sensor's reading that drifts live on the shared clock, and the reading in the middle.
    • ticker.tsxA number that counts up while its page builds in, and rolls to its new value whenever it changes.
    • tile.tsxA bento tile: one card look on every page, placed in its page grid's named area; the hero is tinted with the primary, a tile with an href is one link. Plus the small pieces tiles share: a live mark, a freshness badge, a progress bar, a ring and small bars.
    • 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.
    • seed.tsThe pretend household's kitchen: today's stock with use-by times counted from the real clock (so "today" is never empty), a year of receipts, waste and food used in time drawn from a seeded random so every month is filled and every series stays smooth, plus recipes and settings.
    • types.tsThe shapes the fake API answers with: stock, the shopping list, receipts, the waste log, what was used in time, recipes and the household's settings.
  • 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}).

pantry-larder.tsx

The page: the sections in order.

Cargando…
Ideal para
Households and food-waste apps that track what is in the fridge, freezer and pantry and want to throw less away.
Cómo funciona
Things slide along a live use-by timeline; drag one onto Used and the saved counter grows, and kept things that ran out join the list.
Cómo usarlo
Edit words in locales/ and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.