Tea Oolong
v1.0A tea house back office on frosted glass over a jade and cream mesh: teas, steeping guides, web orders, tastings, leaf stock and a steeping timer cup.
Indirizzo della pagina: /
Incluso
Cosa ottieni- Chiaro e scuroUsa i colori del tuo tema
- Desktop, tablet e telefonoLe schermate per cui è pensato
- Pacchetti…
- Dimensione del codice…
- Leggero sulla batteria30 fps, inattivo quando è fermo
- In pausa se nascostoFuori schermo o in un’altra scheda
- Riduci movimentoCalmo per chi lo chiede
Verificato a ogni modifica
Sicurezza verificata il 3 dic- Controllo dei tipiTypeScript strict
- Lint e formattazioneESLint · Prettier
- Test e buildScreenshot chiari e scuri
- Audit di sicurezzaNessun avviso alto o critico
- Età dei pacchettiOgni versione pubblica da 7+ giorni
- CPU a riposoMeno di mezzo core a riposo, ≤ 30 fps
Codice
tea-oolongReact
- tea-oolong.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.
- order.tsxOne order: its lines, the customer and the shipping, with the next step for its status (pack, ship, cancel or restore), edit and delete.
- orders.tsxOrders: every web order, newest first, filtered by status or today and searched by customer or number; each opens its order. Add an order from here.
- overview.tsxOverview: today at the tea house. The steeping timer next to today's tastings, four numbers that open their lists, the orders arriving live, the leaves running low, this week's sales and the best sellers.
- reports.tsxReports: shop revenue and tasting covers over the last 7 days, 4 weeks or 12 weeks, the best-selling teas and the revenue of each tea type.
- settings.tsxThe settings page: the shop's defaults (when leaf counts as low, the seat price, the live feed) and Appearance (style, theme and language).
- sign-in.tsxThe sign-in page (#/sign-in): the form on a glass card over the jade mesh, and beside it on wide screens the house's line and today's first pour, without the side panel and top bar.
- steeping.tsxSteeping: the timer in full, the log of every infusion poured, and the house guide for each tea type and tea, each one a click from its editor.
- stock.tsxStock: the leaf on hand for every tea against its reorder point and how many weeks it lasts at the current pace; order leaf from the supplier and receive what arrives.
- tastings.tsxTastings: the tasting room's week. Seatings by day with their bookings and check-in at the door, every upcoming booking in one list, and the flights of tea each seating pours.
- tea.tsxOne tea: its profile and origin, its steeping guide (change temperature, leaf and every infusion's time, or steep it now), its stock with purchase orders, and its sales and steeps.
- teas.tsxTeas: every loose-leaf tea in the shop, filtered by type, searched by name or origin and sorted; each row opens the tea. Add a tea from here.
- 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).
- bookings.tsxThe Bookings tab: every booking from today on, searched by guest, with its seating; change one, cancel it or bring it back.
- brew.tsxThe steeping timer panel: pick the tea, set the time on the cup's dial, start it and watch the liquor deepen; a finished infusion is logged and the next one is ready. Overview shows it compact, the Steeping page in full.
- flights.tsxThe Flights tab: each flight a column of the teas it pours, in order. Drag a tea to reorder it or move it to another flight (or Space, the arrows, Space), add a tea, take one out, rename a flight, add or remove one.
- order-form.tsxThe add or edit order dialog: who it is for, and its lines (a tea and a weight each), the total worked out as you go. And the ship dialog: carrier and tracking number.
- seating-form.tsxThe tasting dialogs: add or change a seating (day, time, host, flight, seats, price per guest) and add or change a booking (guest, party, note).
- sidebar.tsxThe side panel: a frosted glass pane with the logo, search with the command palette shortcut, the page links under a liquid marker, and the tea types with their liquor colors and counts; collapsed, only the icons and cups show.
- 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.
- tea-form.tsxThe add or edit tea dialog: name, type, origin, harvest, price per 50 g, starting stock and reorder point, tasting notes. Checks its own fields and says what to fix.
- tea-stock.tsxA tea's Stock tab: leaf on hand against its reorder point over twelve weeks, weighing in a new count, ordering leaf from the supplier and receiving it.
- top-bar.tsxThe top bar: the menu button on narrow screens, the page you are on, the live feed's mark, search, the theme switch and the account menu. It sits clear on the mesh and frosts itself once the page scrolls under it.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- wipe.tsThe wipe card style: each card uncovers from its bottom edge.
- 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 jade and cream mesh with a toasted-gold light, the steam behind the glass; it drifts a few slow passes, then holds still. Faded out in Solid; with followBackground it paints your background instead.
- charts.tsxThe charts, each in a recessed glass well: pill bars (the current one in the accent), a glowing line with its area, and a donut. Every chart has a hidden table with the same numbers for screen readers.
- clock.tsThe one clock every running loop shares (the steeping cup): at most 30 redraws a second, none while the tab is hidden, and stopped when nothing listens.
- 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-lanes.tsDrag teas between ordered lanes (the flights): mouse and pen at once, touch after a short press (a swipe still scrolls), the lifted copy kept under the grab point, the others sliding aside (FLIP), the page and the board scrolling near their edges, Escape to cancel, and a keyboard path (Space lifts, arrows move, Space drops).
- 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).
- liquid-marker.tsThe selected marker that moves like a drop of tea: shared by every segmented control, tab row and the side panel's page marker.
- live.tsThe live feed: while the app is open and on screen, a new web order or a tasting check-in arrives every so often through the fake API; the pages reload in place and a toast says what came in. The newest order's id marks its row so it drops in.
- 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.
- 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.
- steep-cup.tsxThe steeping timer's cup: a glass tumbler whose liquor deepens from clear water to the tea's color as it steeps, the leaves at the bottom unfurling, steam rising while it runs. Around it a dial: the arc fills toward the knob, and dragging the knob (or the arrow keys) sets this infusion's time.
- steep.tsThe steeping timer's state, shared by the Overview and Steeping pages so a steep keeps running while you move around: which tea, which infusion, how long, and whether it runs. A finished infusion is logged through the fake API (the first one takes the leaf from stock).
- 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 pieces every page is built from: the glass panel, the page heading, the segmented control with its liquid bead, a number tile, the tea-type swatch, status chips and the stock meter.
- 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.
- derive.tsThe numbers the pages show, worked out from the shop's records in one place, so a tile and the list it opens always count by the same rule.
- seed.tsThe pretend shop the API starts from: 70 teas with stock and guides, twelve weeks of web orders, tasting seatings with bookings and flights, steeps and leaf orders, all seeded around today's real date with the clock pinned at 10:40 so today is never thin.
- teas.tsThe 70 loose-leaf teas the house sells: name, type, origin, harvest, price per 50 g and a tasting note; the guide starts from the type's own way to steep.
- types.tsThe shapes the fake API answers with: teas and their steeping guides, steeps, orders, tastings and leaf stock.
- 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}).
tea-oolong.tsx
The page: the sections in order.
Caricamento…
- Ideale per
- A tea house with a tasting room and a web shop of loose leaf: orders to ship, seatings to fill and leaf to reorder.
- Come funziona
- The glass cup deepens and its leaves unfurl as a tea steeps, each infusion logs, and orders and check-ins arrive live.
- Come si usa
- Edit words in content.ts and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.