Bar Vermouth
v1.0A cocktail bar's back office on frosted glass over a garnet mesh: menu, recipes with batching, stock, bookings, staff and reports.
Page address: /
Built in
What you get- Light and darkUses your theme colors
- Desktop, tablet, and phoneThe screens it is built for
- Packages…
- Code size…
- Light on battery30 fps, idle when still
- Pauses when hiddenOff-screen or other tab
- Reduce motionCalm for people who ask
Checked on every change
Security checked Dec 3- Type checkTypeScript strict
- Lint and formatESLint · Prettier
- Tests and buildLight and dark screenshots
- Security auditNo high or critical advisories
- Package ageEvery version public 7+ days
- Idle CPUUnder half a core at rest, ≤ 30 fps
Code
bar-vermouthReact
- bar-vermouth.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.
- bookings.tsxBookings: one night at a time — covers, tables in use and the busiest hour, then the floor by the hour (drag to move) or the list; add, edit, seat and cancel.
- bottle.tsxOne bottle: its level against par, then tabs for what the drinks poured of it, its count history and its supplier; edit, order or delete it.
- menu.tsxThe menu: every drink as a card in its own glass with price, pour cost and tags; filter by section or 86'd, search, 86 a drink and bring it back, add, edit and delete, and set the printed order.
- overview.tsxTonight: covers, drinks, takings and pour cost; the bar's live order rail; drinks by the hour; the bookings still to come, the bottles running low, the top drinks, who is on, what is 86'd and the week's covers.
- recipe.tsxOne recipe: the drink in its glass with price and pour cost, then tabs for its spec, the batch carafe, the costing line by line, its sales and the batches made.
- recipes.tsxRecipes: every drink's spec at a glance, its cost and pour cost against the target; sort, search and open one.
- reports.tsxReports for the last 7, 30 or 90 nights: takings, covers, drinks and pour cost; covers per night, pour cost per night against the target, the top drinks and the share by menu section.
- settings.tsxSettings: the bar's own numbers (target pour cost, opening hours) and Appearance (style, theme and language).
- sign-in.tsxThe sign-in page (#/sign-in): the form on a glass card over the mesh, and beside it on wide screens a drawn coupe of vermouth with the house line and tonight's numbers; no rail or top bar.
- staff.tsxStaff: the week's rota (who works which night, at which station and hours; add, change or remove a shift) and the team (roles, phones, start dates; add, edit, remove).
- stock.tsxStock: the back bar's bottles with their level against par (filter by category, search, add and edit), the reorder list by supplier and the stock count.
- 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).
- batch-panel.tsxBatch a drink: the carafe fills layer by layer as you scale from 1 to 40 serves, beside the line-by-line amounts, the volume, the cost and what it takes from stock; Save batch takes those bottles off the shelf (Undo puts them back).
- booking-board.tsxThe floor by the hour: one row per table, one column per hour from 17:00 to 01:30, each booking a block you can drag to another table or time (snapped to the half hour), with a line at the service time tonight.
- booking-form.tsxThe booking form, new or edit: guest, date, table, arrival and stay, covers, notes and status; checked on save (covers fit the table, the table is free then) with its own messages. Editing also offers Cancel booking.
- bottle-form.tsxThe bottle form, new or edit: name, category, size, par, cost, supplier, ABV and what's on hand, checked on save with its own messages.
- drink-form.tsxThe drink form, new or edit: name, section, glass, price, method, ice, garnish, tags and notes, checked on save with its own messages.
- sidebar.tsxThe rail: the logo, search with the palette shortcut, and the pages as frosted bottle-shaped tabs in two groups; a garnet bottle pours from tab to tab to mark where you are. Between 1024 and 1280 only the icon bottles 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.
- spec-editor.tsxA drink's spec: each ingredient in ml with its color, the method, ice, garnish and dilution; in edit mode every line can change, go or be added, checked on save.
- staff-forms.tsxThe two Staff forms: a shift (who, day, hours, station; remove it) and a team member (name, role, phone, start date; remove them), each checked on save with its own messages.
- stock-views.tsxTwo Stock views: the reorder list (everything under par, grouped by supplier, to mark ordered and then receive) and the stock count (type what's on the shelf, save the changed ones).
- top-bar.tsxThe top bar: the menu key on narrow screens, where you are, the service clock, Pause motion, search, the theme switch and the account menu. Clear at rest; it frosts once the page scrolls under it.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- sheen.tsThe sheen card style: cards rise, plus one soft light sweep across each card as it lands.
- rowsWhat several sections share.
- zigzag.tsThe zigzag row motion: odd rows slide in from the left, even ones from the right, from faint.
- 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 mesh of four soft clouds behind the glass — garnet, amber, rose and pale gold, like light through a glass of vermouth — drifting slowly for a few minutes, then still. With followBackground it paints your background instead.
- batch-glass.tsxThe batch vessel: a tall glass carafe that fills layer by layer, each ingredient in its own color with the dilution water on top, as you scale a batch from 1 to 40 serves. Drag the level, or use the arrow keys.
- charts.tsxThe charts, each in a recessed glass well: pill bars (the current one in garnet), a glowing line with its area, horizontal bars and a ring. Every one reads its colors from the chart shades (they follow your Chart Studio) and shows a value on hover or focus.
- command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
- confirm.tsxA confirm dialog for a risky action (delete, cancel a booking): the reason, the action in red and a way back.
- 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-board.tsDrag bookings on the tables × hours board: mouse and pen at once, touch after a short hold (a swipe still scrolls), the lifted copy kept under the grab point and following 1:1, the slot snapping to the half hour on the table under it, the board scrolling near its edges, a glide into the slot on drop, 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.
- glass-art.tsxThe drawn glassware and bottles: each drink in its own glass (coupe, Nick & Nora, rocks, highball, flute, wine) filled with its color, and a back-bar bottle filled to its level.
- 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 pour of vermouth: the rail's bottle marker, every segmented control and tab row.
- 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.
- 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 shared pieces every page is built from: a panel (glass or flat), a page head, a segmented control and tab row with the pour marker, KPI tiles, a stock meter and a "See all" link.
- 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-bottles.tsThe pretend back bar: 186 bottles in twelve groups, each line "name|cost per bottle|abv|liquid color|top", with the group's size, par, supplier and color as defaults.
- seed-drinks.tsThe pretend autumn menu: 28 drinks in four sections, each with its spec in ml, method, ice and garnish, and how popular it is (for the pretend sales).
- seed-night.tsThe pretend floor and team: 12 tables for 40 seats, bookings for the two weeks around today, nine people and their shifts, tonight's first bar orders and 90 nights of trade.
- types.tsThe shapes the fake API answers with: drinks and their specs, bottles, counts, bookings, staff and shifts, batches, bar orders and the nights of sales behind the reports.
- 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}).
bar-vermouth.tsx
The page: the sections in order.
Loading…
- Good for
- A small cocktail bar's manager and bartenders: the menu, specs, the back bar's bottles, tonight's tables and the rota.
- How it works
- Orders tick in and bottles drain; a batch glass fills layer by layer and saving it takes the spirit out of stock.
- How to use
- Edit words in content.ts and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.