Vineyard Cellar
v1.0A family wine estate's cellar book under a barrel-vault glass header, its pages hanging as wine-label tags, with a rack map of glass barrels that slosh as they fill.
Sayfa adresi: /
Yerleşik
Neler alırsınız- Açık ve koyuTema renklerinizi kullanır
- Masaüstü, tablet ve telefonTasarlandığı ekranlar
- Paketler…
- Kod boyutu…
- Pil dostu30 fps, dururken boşta
- Gizliyken dururEkran dışında veya başka sekmede
- Hareketi azaltİsteyenler için sakin
Her değişiklikte kontrol edilir
Güvenlik kontrolü: 3 Ara- Tür denetimiKatı TypeScript
- Lint ve biçimESLint · Prettier
- Testler ve derlemeAçık ve koyu ekran görüntüleri
- Güvenlik denetimiYüksek veya kritik uyarı yok
- Paket yaşıHer sürüm 7+ gündür herkese açık
- Boşta CPUDururken yarım çekirdekten az, ≤ 30 fps
Kod
vineyard-cellarReact
- vineyard-cellar.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.
- barrel-detail.tsxOne barrel: its wine level, where it sits and what it holds, the topping, racking and sample log, and its lot; log an entry, top up, move or retire it.
- barrels.tsxBarrels: the rack map of one hall at a time, with a filter that lights the barrels to top up or one vintage, and the picked barrel beside it; drag to move, or Move from the panel.
- block-detail.tsxOne block: its sugar climbing toward the pick target, the facts, every ripeness walk and every pick; log a walk, record a pick, edit or remove the block.
- blocks.tsxBlocks: every block of vines as a card — grape, size, age, the last ripeness walk against its pick target and when it is (or was) picked; filter by colour or status, add a block.
- bottling.tsxBottling: every wine as a small label with its bottles in stock, and the runs — planned ones to finish (which puts the bottles in stock and the lot in bottle), done ones as the record; plan, edit or drop a run.
- lot-detail.tsxOne lot from harvest to blend: its stage track, where the fruit came from and which barrels hold it, tasting notes, lab results and the blend; move it on, write a note, enter lab results, set the blend.
- lots.tsxLots: every lot on its way from harvest to bottle, as a pipeline of five stages; filter by vintage, move a lot on a stage, add a lot.
- overview.tsxOverview: harvest season at a glance — which block to pick next, how full the cellar is, today's tastings, barrels to top up, lots by stage, four numbers, sales and the cellar log.
- reports.tsxReports: yield per block against last vintage, how full the cellar has been month by month, and sales by wine and by month; download it all as a CSV.
- settings.tsxThe settings page: the estate (its name and the tasting room's seats per slot) and Appearance (style, theme and language).
- sign-in.tsxThe sign-in page (#/sign-in): an arched glass card like a cellar door, the keystone logo at its crown, over the backdrop, without the vault header.
- tastings.tsxTastings: the week ahead as a strip of days, the picked day's three slots with their groups, seats and guide, then the flights poured and the guides; book, change or remove a group.
- 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).
- barrel-forms.tsxThe barrel forms: move a barrel to a free spot (the keyboard way to do what dragging does), add a barrel, and log a topping, racking or sample.
- barrel-panel.tsxBeside the rack map: the barrel picked (its wine sloshing, lot, oak, fill, last topping; top up, move, open) or, with none picked, the hall's numbers.
- block-forms.tsxThe block forms: add or edit a block, log a ripeness walk, record a pick into a lot. Each checks its own fields and says what is wrong under them.
- booking-form.tsxBook, change or cancel a tasting: the group, how many guests, the day and slot (the fake API turns it down when the slot is full), the flight, the guide and a note.
- cellar-actions.tsThe cellar's everyday saves, shared by Overview, the rack map and a barrel's page: top a barrel up, move it to a new spot (with Undo).
- lot-forms.tsxThe lot forms: add or edit a lot, write a tasting note, enter lab results, and set a blend's parts (they must add up to 100%).
- overview-cards.tsxOverview's cards: the harvest ripeness strip, the cellar fill gauge, today's tastings, barrels to top up, lots by stage, the four numbers, sales by month and the cellar log.
- rack-map.tsxThe rack map: one hall's five racks of twenty spots, each barrel a glass round showing its fill. Drag a barrel to a free spot to move it; click one to see it beside the map.
- run-form.tsxPlan or edit a bottling run: which wine from which lot, the day, how many bottles, the label print and the closure.
- 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.
- vault-header.tsxThe vault header: an arched glass ceiling across the top with the keystone logo at its crown, the estate on one side and search, theme and account on the other; under the arch the pages hang as glass wine-label tags on cords, and a drop of wine glides to the current one. On phones the tags move into a sheet.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- iris.tsThe iris card style: each card opens as a circle from its center.
- 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 backdrop: a drawn mesh of four soft clouds in wine, plum, rosé and candle light behind the glass, with the faint lines of a vaulted cellar; dusky in dark, near-white pastel in light, drifting very slowly. With followBackground it paints your background instead.
- barrel.tsxA barrel seen end-on as a glass round: the wine inside at its fill level, its surface tilted by the shared slosh clock (parts/slosh.ts), two hoops and a gloss.
- charts.tsxThe charts, each plotted in a recessed glass well: pill bars with a soft rim (the current bar in wine), a smooth line with a glow that draws itself in (the kit's BuildLine), and a small sparkline.
- 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-rack.tsDrag a barrel to an empty rack spot: 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 rack scrolling near its edges, a glide into the exact spot, Escape to put it back.
- 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.
- glass.tsxGlass panels: frosted with a bright fixed rim and an inset highlight (theme.ts GLASS, a plain CSS blur), or tinted with no blur for the many smaller cards.
- icons.tsxThe logo (a vault keystone holding a grape cluster) 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).
- liquid-marker.tsThe selected marker that moves like a drop of liquid: shared by every segmented control, tab row and the nav droplet.
- 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.
- slosh.tsThe one shared clock the wine in every barrel moves on: a slow slosh that settles, at most 30 frames a second, then stops.
- 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.
- ui.tsxThe small parts every page shares: the segmented switch with its wine bead, the page heading, card headings, stat cards, a seat meter, the confirm dialog and the save helper.
- 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-data.tsOne hook per thing the fake API serves, and how a page waits for all of its loads 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-cellar.tsThe pretend cellar and tasting room: 340 barrels on the racks of four halls with their topping and racking log, the guides, flights, a fortnight of tasting bookings and a year of sales.
- seed-lots.tsThe pretend estate's lots from harvest to bottle (the wines and runs: seed-wines.ts).
- seed-wines.tsThe pretend estate's wines in stock and their bottling runs.
- seed.tsThe pretend estate's vineyard and wines: twelve blocks on 30 ha with this season's ripeness walks and picks (the lots, wines and runs: seed-lots.ts).
- types.tsThe shapes the fake API answers with: vineyard blocks, barrels, lots, wines, bottling runs and tastings.
- 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}).
vineyard-cellar.tsx
The page: the sections in order.
Yükleniyor…
- Şunlar için uygun
- Small wine estates: blocks and ripeness, a barrel rack map, lots from harvest to blend, bottling runs and tasting-room bookings.
- Nasıl çalışır
- Drag a glass barrel to a free rack spot and the wine sloshes as it settles; ripeness bars rise block by block toward the pick target.
- Nasıl kullanılır
- Edit words in locales/ and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.