Перейти к содержимому

Allotment Marrow

v1.0

A community allotment society app on an oat-and-leaf bento grid: drag a waiting-list name onto an empty plot and watch it sprout.

$69

Адрес страницы: /

Уже внутри

Что вы получаете
  • Светлая и тёмнаяБерёт цвета вашей темы
  • ПК, планшет и телефонЭкраны, для которых сделано
  • Пакеты…
  • Размер кода…
  • Бережёт батарею30 кадров/с, в покое простаивает
  • Пауза в фонеВне экрана или в другой вкладке
  • Меньше анимацииСпокойно для тех, кто просит

Проверяется при каждом изменении

Безопасность проверена 3 дек.
  • Проверка типовСтрогий TypeScript
  • Линтер и форматESLint · Prettier
  • Тесты и сборкаСкриншоты в светлой и тёмной теме
  • Аудит безопасностиНет уязвимостей высокого и критического уровня
  • Возраст пакетовКаждая версия опубликована 7+ дней назад
  • Загрузка в покоеМеньше половины ядра в покое, ≤ 30 кадров/с

Код

allotment-marrowReact
  • allotment-marrow.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.
    • harvest.tsxThe harvest log: the season's kilos month by month as the hero, the top crops, this week, today's weigh-ins as they come in at the hut, and the log itself (add, edit, delete). The Water tab holds the troughs and the rain gauge. ?new=1 (and &plot=A7) opens the add form.
    • overview.tsxThe Overview: the season as one bento. The site plan is the hero, where a name from the waiting list drags onto an empty plot; around it the plots-let ring, today's watering with the rain gauge, the harvest counter, the next work day's countdown, rent, the shed and the seed swap.
    • plot-detail.tsxOne plot: who holds it and since when, its rent, its season's harvest by week and by crop, its harvest log and its notes. Edit, let, mark rent paid, end the tenancy or delete it from here.
    • plots.tsxPlots: the whole site plan as the hero (drag a name from the waiting list onto an empty plot), the counts under it and every plot as a list you filter by status or unpaid rent. A plot's own page is #/plots/A7.
    • reports.tsxReports for the committee: harvest by crop as the hero, plots let over the year, rent collected week by week since the rent year began, and the season's totals. Switch between this season and last; download the crop totals as CSV.
    • settings.tsxSettings: the society's own (rent for each plot size, days an offer stays open) and Appearance (style, theme and language).
    • shed.tsxThe tool shed: what is lent out now as the hero (return each, late ones marked), what is in, and every tool (lend, edit, add, delete). The Seeds tab is the seed swap stock. ?new=1 opens the add form.
    • sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one card over the backdrop, without the top bar, and the society's name under it.
    • waiting.tsxThe waiting list: the offers out as the hero (accept or decline each), the queue's counts and the whole queue in order. Drag a name by its grip to a new place, offer the next empty plot, add, edit or remove someone. ?new=1 opens the add form.
    • workday.tsxOne work day: when and where with its live countdown, who signed up (add or take someone off) and the task list (tick, add, delete). Edit or delete the day from here.
    • workdays.tsxWork days: the next one as the hero with its live countdown and sign-ups, the season's hours, and every work day in order (the past ones done). A day's own page is #/workdays/wd3. ?new=1 opens the add form.
  • 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).
    • letting.tsxLetting a plot: the waiting list's names you drag onto an empty plot (or open to pick one by keyboard), the save through the API with Undo, and the plot that just got its sprout.
    • seeds.tsxThe Shed page's Seeds tab: the seed swap stock, each variety with its packets (give one out, take one in), edit, add or delete a variety; low ones marked.
    • 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 society's mark, the compact pill nav whose accent pill glides to the page you pick (on its own row below 74rem, in the phone menu below 48rem), search, the theme switch and the account menu. Plain at rest; once the page scrolls it frosts itself with a thin bottom edge.
    • water.tsxThe Harvest page's Water tab: litres drawn from the troughs over 30 days as the hero, the rain gauge filling as it rains, today, this month, the wet days and the water log (add, delete).
  • 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.
        • center.tsThe center row motion: the middle row on screen rises first, then the ripple spreads up and down.
      • 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.
    • bento.tsxThe bento grid every page is laid out on: one CSS grid of tiles, 4 columns once the app is 64rem wide and 2 below, placed by grid-template-areas so each width closes into a rectangle. A Tile is one cell: the same corner, edge line and padding everywhere, a small heading, and either one link or none.
    • charts.tsxThe small charts the tiles hold: rounded bars with the current one in the accent, a smooth line with a soft area under it, a ring and a meter. Each draws in with the page (data-build) and follows Chart Studio (data-chart).
    • clock.tsThe one shared clock every live tile runs on: at most 30 frames a second, only while the tab shows, each tile only while it is on screen, and none at all with reduced motion.
    • command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
    • derive.tsThe sums the tiles show, worked out from what the API sent: holder names, harvest by week, month and crop, water by day, the next work day and the rent book.
    • 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-name.tsDrag a name from the waiting list onto a drop spot (an empty plot, a place in the queue): mouse and pen at once, touch after a short hold (a swipe still scrolls), the lifted copy kept under the press point and following 1:1, the spot under it lit, then the copy glides into the exact spot before the save; Escape or a drop on nothing glides it home.
    • 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."). 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.
    • 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-bits.tsxThe drawn live pieces: a sprout that grows on a newly let plot, a rain gauge whose water fills and ripples, and a work-day countdown, all on the shared clock.
    • live.tsThe live site while the app is open: now and then a harvest is weighed in at the hut and rain ticks into the gauge, through the API, so every tile and list shows the new numbers. Paused in a hidden tab and by the top bar's Pause.
    • 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.
    • plot-map.tsxThe site plan: ten beds of twelve plots, each a cell you can open. Let plots show a sprout, empty ones are dashed drop spots for a name from the waiting list, offered ones wait with a clock, and rent owed shows as a dot with its word in the tooltip.
    • 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.
    • 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 society: 120 plots in ten beds, their holders, the waiting list, a year of harvests, water and rain, work days, the tool shed and the seed swap. Built once from a fixed seed around today's date, so every chart reaches today and today is never empty.
  • 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}).

allotment-marrow.tsx

The page: the sections in order.

Загрузка…
Подходит для
Allotment societies, community gardens and growing clubs running plots, a waiting list, a tool shed and a seed swap.
Как это работает
Drag a name from the waiting list onto an empty plot: it glides in, a sprout grows and the plots-let ring updates live.
Как использовать
Edit words in content.ts and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.