Ir para o conteúdo

Barber Pomade

v1.0

A barbershop's front desk on a warm grey bento with brass accents: drag the next walk-in onto a free chair and its cut timer starts, with bookings, services, products, barbers and reports.

$69

Endereço da página: /

Já incluído

O que você recebe
  • Claro e escuroUsa as cores do seu tema
  • Desktop, tablet e celularAs telas para as quais foi feito
  • Pacotes…
  • Tamanho do código…
  • Leve para a bateria30 fps, em repouso quando parado
  • Pausa quando ocultoFora da tela ou em outra aba
  • Reduzir movimentoCalmo para quem pede

Verificado a cada mudança

Segurança verificada em 3 de dez.
  • Verificação de tiposTypeScript strict
  • Lint e formataçãoESLint · Prettier
  • Testes e buildCapturas de tela claras e escuras
  • Auditoria de segurançaSem alertas de gravidade alta ou crítica
  • Idade dos pacotesToda versão pública há 7+ dias
  • CPU em repousoMenos de meio núcleo em repouso, ≤ 30 fps

Código

barber-pomadeReact
  • barber-pomade.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.
    • barber.tsxOne barber (#/barber/:id): their chair now with the live cut timer, today's cuts and takings, then tabs for today's book, their rota and four weeks of commission (?tab=).
    • barbers.tsxBarbers: who cut most this week (their takings day by day), the week's rota at a glance and the team list with each chair's state now, the week's takings and the commission owed.
    • bookings.tsxBookings: one day of the book (?day=), a week strip to move between days, filters by barber and service, how many are booked, the no-shows, each barber's first free slot and the day board.
    • overview.tsxOverview: the floor at a glance. The five chairs with their cut timers, the queue you drag onto a free chair, today's takings rolling up, the next bookings and four numbers that open their pages.
    • product.tsxOne product (#/product/:id): its name and brand with Sell, Restock, Edit and Delete, the stock against its low mark, price, cost and margin, then tabs for the stock moves and two weeks of sales (?tab=).
    • products.tsxProducts: what the shelf sells. Product takings over two weeks, what is running low, what the stock is worth and the list to sell from, take deliveries in and change.
    • queue.tsxQueue: everyone waiting, in order, with Call, Seat, Edit and Walked out; drag a chip to reorder it or onto a free chair beside it. Under it the wait for someone walking in now, who was served today, the average wait and who walked out.
    • reports.tsxReports over 7, 14 or 30 days (?range=): takings day by day against the days before, the barbers ranked, the busiest hours, services against products and tips, and the average ticket. Download CSV saves the days as a file.
    • services.tsxServices: the menu of cuts, beards and extras with their price and time. The service that earned most this month, how the cuts split between the three kinds, and the list to add, change or remove from (?cat= filters it).
    • settings.tsxSettings: Appearance (style, theme and language) and the shop itself: its name, opening hours, the gap between cuts and the commission new barbers start on.
    • sign-in.tsxThe sign-in page (#/sign-in): the form on a card over the backdrop, and from 768px a brass panel beside it with the shop's day at a glance, without the top bar.
  • 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).
    • barber-dialog.tsxAdd or change a barber: name, phone, their chair, commission, hours and the days they are on the rota.
    • booking-dialog.tsxBook a client in or change a booking: who, their phone, the barber, the service, the day and the time. An open booking also offers Check in, No-show and Cancel.
    • chairs.tsxThe five chairs: a busy one shows its barber, the client and the cut timer ring with Done and +5 min; a free one is a drop spot for a walk-in (it glows while one is held) with Seat next for a tap; a chair whose barber is off today shows that. Cards in a row on wide screens, rows on phones and on the Queue page, with the buttons on a line under the text.
    • checkout-dialog.tsxCheckout for a finished cut: the service, a tip, any products off the shelf, the total, then Take payment frees the chair and rolls the takings.
    • confirm-dialog.tsxAsks once before something is removed for good; a refusal from the shop (a service still booked) shows in place.
    • day-board.tsxOne day of the book as a board: a column per barber working, every booking a block at its time and length, the hours they are off shaded and a live now line on today. Tap a block to change it, an empty spot to book there. On narrow screens the same day reads as a list by time.
    • floor.tsxThe shop floor's state, shared by Overview and Queue: the chairs and the queue loaded once, the drag that seats a walk-in (or reorders the queue), and the dialogs that check out a chair, add or edit a walk-in and pick a chair to seat someone on.
    • overview-tiles.tsxOverview's tiles: the chairs-now hero, the walk-in queue with its live wait estimate, today's takings by the hour, the next bookings and four small numbers that each open their page.
    • product-dialog.tsxThe shelf's dialogs: add or change a product (name, brand, price, cost, stock, when it counts as low), sell some over the counter on a barber, or take a delivery in.
    • queue-list.tsxThe walk-in queue as draggable chips: who, what for, how long they have waited (live) and the wait still ahead; on the Queue page also Call, Seat, Edit and Walked out. Drag a chip along the list to reorder it, or onto a free chair to seat them.
    • service-dialog.tsxAdd or change a service on the menu: its name, whether it is a cut, a beard or an extra, its price and how long it takes in the chair.
    • 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 brand, the page links with a brass pill that glides to the page you are on, search, the theme switch and the account menu; the menu button on narrow screens. Plain at the top of the page, it frosts over once the page scrolls under it.
    • walkin-dialog.tsxAdd or edit a walk-in (name, service, the barber they ask for), and the tap path for seating one: pick a free chair from a list.
  • partsWhat several sections share.
    • buildWhat several sections share.
      • cardsWhat several sections share.
        • text.tsThe text card style: cards fade in while titles, labels and numbers (data-build="text") slide up from behind a mask; numbers show their final text.
      • rowsWhat several sections share.
        • avatar.tsThe avatar row motion: each row's face (data-build="face") pops first, then the row's other parts follow 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; in a list row it is the row's face (the avatar row motion pops it first).
    • 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.
    • command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
    • cut-ring.tsxA chair's cut timer: a ring that fills as the cut runs, the time left in its middle; past its time it turns amber and counts the minutes over.
    • 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.
    • 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).
    • 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.
    • live.tsThe one live clock every timer, ring and waiting counter reads: it ticks once a second, stops while the tab is hidden, and a part off screen skips the ticks until it scrolls back.
    • 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.
    • seat-drag.tsDrag a walk-in along the queue or onto a free chair: mouse and pen at once, touch after a short press (a swipe still scrolls), the lifted chip kept under the grab point, the others sliding aside (FLIP), the page scrolling near its edges, Escape to cancel, and a keyboard path (Space lifts, arrows move, Space drops). Lanes are "queue" and one per free chair; a chair holds one.
    • 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.
    • tile.tsxThe bento's pieces: every page's grid areas, the one tile look (a heading, then one idea), the page head above the grid and the still tiles that stand in while a page loads.
    • 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 through these functions (saves are in data/save.ts), so wiring a real backend happens here only.
    • clock.tsThe shop's clock: the demo always opens on today at 13:20, mid-afternoon on a busy day, and runs on in real time from there.
    • save.tsThe fake API's saves: the queue, the chairs, checkout, bookings, the menu, the shelf, the barbers and the shop. Each waits like a network call while Slow network is on; throw an Error with the words to show and the form shows it.
    • seed.tsThe pretend shop: five barbers, the menu, the shelf, 60 days of takings, this week's bookings, today's sales so far, the chairs and the walk-in queue as the demo opens (13:20). Everything lives in `db`; data/api.ts reads it and data/save.ts changes it.
    • types.tsThe shapes of the shop's data: barbers and their chairs, services, products, bookings, the walk-in queue, who sits in each chair now, sales and the days before today.
    • wait.tsThe queue's wait estimate: when each chair frees (the cut in it, then the bookings coming up), and who in the queue sits where, in order. Recomputed on every read, so it moves as cuts finish and people join.
  • 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}).

barber-pomade.tsx

The page: the sections in order.

Carregando…
Ideal para
Barbershops with a few chairs that take bookings and walk-ins, sell products and pay barbers commission.
Como funciona
Drag the next walk-in onto a free chair: they slide over, the chair's cut ring starts and the queue's wait recounts live.
Como usar
Edit words in locales/, colors in theme.ts and the shop in data/seed.ts, and swap the bodies in data/api.ts for your backend.