Vai al contenuto

Theater Velvet

v1.0

A box office for a 400-seat community theatre in velvet crimson on cream: drag across the seat map to hold seats and sell them.

$69

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

theater-velvetReact
  • theater-velvet.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.
    • box-office.tsxBox office: a quick sale (best seats together for a party, held or sold), today's numbers, and every order to find, refund or exchange, filtered by state in the address.
    • members.tsxMembers: the three tiers (price, how early they book, their discount), the next show's priority booking, renewals due, the year's income, then every member, filtered by tier in the address.
    • overview.tsxThe Overview: tonight's performance as the hero (seat map, countdown, fill), sales today, the bar, tonight's volunteers, the week's sales, what comes next, the run's fill and the members.
    • performance.tsxOne performance: the full seat map to hold and sell from with the sale beside it, takings by zone, then tabs for its orders and its rota.
    • performances.tsxPerformances: every night of the season. Tonight with its countdown, the coming fortnight's fill, then the list, filtered by show and coming or played in the address.
    • reports.tsxReports: takings by week, tickets and fill, fill by show, the bar by night, and the table by show, for four weeks or the season (the range is in the address).
    • settings.tsxSettings: the house (its name, how long a hold lasts, the interval), ticket prices by zone, and Appearance (style, theme and language).
    • show.tsxOne show: its poster and details, tickets by week and the fill, then tabs for its coming performances, its cast and the nights played.
    • shows.tsxShows: the season's productions. The one running now leads, four numbers beside it, then every show, filtered by status in the address.
    • sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one card over the backdrop, without the sidebar and top bar, with tonight's curtain time under it.
    • volunteers.tsxVolunteers: the rota (tonight's crew first, the open slots this week, the hours given, the coming nights) and the people, added and edited.
  • 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).
    • desk.tsxThe box office desk on a seat map: the hold being made (dragged seats), selling or letting it go, and the order behind a sold seat. useDesk keeps the hold per performance while you move between pages.
    • form-dialog.tsxA dialog around a form: it saves through `run` (which gets the form's fields and answers with the toast's words), shows the save's error in place and reloads the pages' data when it worked.
    • member-dialogs.tsxThe forms for members: one member's details and tier, and a tier's price, booking head start and discount.
    • order-dialogs.tsxThe box office's dialogs: a confirm for anything that can't be undone (refund, cancel, delete) and the exchange to another night.
    • order-list.tsxA list of orders: who, which night and seats, the total and its state, and what can be done with it (refund or exchange a sale, sell or let go a hold).
    • rota.tsxThe volunteer rota: each night's front of house, ushers and bar, an open slot dashed. A slot opens a small form to put someone on it or take them off.
    • show-dialogs.tsxThe forms for shows: a show's details, one cast member, and a new performance.
    • sidebar.tsxThe sidebar: logo, search with the command palette shortcut and the page links; the current page sits on a tile-colored pill that glides to the next one. Collapsed, only the icons 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.
    • tonight-hero.tsxThe Overview's hero tile: tonight's performance with the curtain countdown, the fill ring, and the seat map you drag to hold seats and sell them.
    • top-bar.tsxThe top bar: the menu button on narrow screens, where you are, search, the theme switch and the account menu. At rest it is bare; once the page scrolls it frosts with a thin bottom edge.
  • partsWhat several sections share.
    • buildWhat several sections share.
      • cardsWhat several sections share.
        • spotlight.tsThe spotlight card style: the page shows dim, then each card lights up in turn, 50ms apart, with a brief primary edge.
      • 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.
    • backdrop.tsxThe Glass style's backdrop: what shows through the see-through panels, faded out in Solid; with followBackground it paints your background instead.
    • charts.tsxThe charts: a fill ring, rounded bars (muted, the current one in the accent) and a smooth line with a soft area under it. Every series is a chart shade from theme.ts, so presets and your chart colors recolor them.
    • clock.tsThe one live clock every moving tile shares: it ticks once a second (the curtain countdown, hold timers) and drives the house's live sales and bar, and it stops while the tab is hidden or the app is off screen.
    • 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.
    • drawings.tsxThe drawn show posters: one motif per production on a deep accent card with a brass rule, so a preset recolors every poster.
    • 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).
    • 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-map.tsxThe seat map, the app's signature: 400 seats under the stage; drag across free seats to hold them (they ripple out from the press), a sale sweeps a light across, a seat sold online pulses.
    • 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 pieces every page is built from: the page head, the grid with each page's tile areas, the tile itself, tabs, a live dot and a meter.
    • 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-box.tsThe fake API's saves: the box office (hold, sell, release, refund, exchange), shows, performances, volunteers, members and the house settings. Each waits like a network call and changes data/db.ts.
    • api.tsThe fake API: every page loads and saves through these functions, so wiring a real backend happens here only.
    • db.tsThe theatre's live records (what the fake API reads and changes) and the sums every page shares: which seats are taken, prices, fill.
    • seed.tsThe pretend theatre: a 400-seat house (16 rows of 25), its season of shows and performances, members, volunteers and the house settings. Dates are counted from the real today, so tonight always has a show.
  • 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}).

theater-velvet.tsx

The page: the sections in order.

Caricamento…
Ideale per
Community and small theatres running shows, nightly seat sales, volunteer rotas, members and their priority booking.
Come funziona
Drag across free seats to hold them, Sell and they sweep to sold as the fill ring and takings rise; the curtain counts down.
Come si usa
Edit words in locales/ and colors in theme.ts, and swap the bodies in data/api.ts and data/api-box.ts for calls to your backend.