Cinema Reel
v1.0A glass box office for a four-screen cinema with a bar: a dark auditorium, a curved screen bar and seat maps that glow crimson.
Адрес страницы: /
Уже внутри
Что вы получаете- Светлая и тёмнаяБерёт цвета вашей темы
- ПК, планшет и телефонЭкраны, для которых сделано
- Пакеты…
- Размер кода…
- Бережёт батарею30 кадров/с, в покое простаивает
- Пауза в фонеВне экрана или в другой вкладке
- Меньше анимацииСпокойно для тех, кто просит
Проверяется при каждом изменении
Безопасность проверена 3 дек.- Проверка типовСтрогий TypeScript
- Линтер и форматESLint · Prettier
- Тесты и сборкаСкриншоты в светлой и тёмной теме
- Аудит безопасностиНет уязвимостей высокого и критического уровня
- Возраст пакетовКаждая версия опубликована 7+ дней назад
- Загрузка в покоеМеньше половины ядра в покое, ≤ 30 кадров/с
Код
cinema-reelReact
- cinema-reel.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.
- bar.tsxThe bar: orders (tap the menu into a ticket, send it to the bar or a screen, serve it), the menu itself and the stock left in the cellar, as tabs in the address.
- films.tsxFilms: every print as a poster card (status, runtime, rating, distributor and tickets sold this week), filtered by status and searched by title; a film's own page at #/films/<id>.
- overview.tsxThe overview: tonight at a glance (stats, every screen's day on one timeline, the next show's seats) over the week, the top films, low stock and who is on shift.
- reports.tsxReports for a week, 30 days or a quarter: admissions and takings, a trend line, where the money goes (distributors, house, VAT, bar), how full each screen ran by weekday and tickets by film, with a CSV download.
- settings.tsxThe settings page: Appearance (style, theme and language) beside the cinema's own settings (screen names, ticket prices, the gap and trailers between shows).
- showtimes.tsxShowtimes: one screen's week as a drag grid (a day list on phones), the form for a new showtime, and a show's own page with its seat map at #/showtimes/<show>.
- sign-in.tsxThe sign-in page (#/sign-in): a glass card under a curved bar of screen light, over the dark auditorium, with the logo, the tagline and the form.
- staff.tsxStaff: the week's wage cost and hours, then tabs for the rota (who works each screen, the bar and the box office) and the people; a person's own page at #/staff/<id>.
- 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).
- bar-items.tsxThe bar's menu and stock tabs: every item with its price (edit or delete it, or add one in the form), and how much of each is left against its restock level.
- bar-orders.tsxThe bar's orders tab: the menu as tiles to tap into a ticket, the ticket (quantities, where it goes, the total) and today's orders to serve or void.
- film-detail.tsxA film's page: its poster and credits, then tabs for the details and distributor terms, this week's showtimes and what it has taken.
- film-form.tsxThe film form in the app's dialog: title, credits, runtime and rating, the run's dates and the distributor's terms, each checked with its own error line.
- overview-more.tsxThe overview's last row: admissions this week as pill bars (pre-sales pale), the top films, what the bar is running low on and who is on shift now.
- overview-top.tsxThe overview's first rows: four stat cards, today's timeline across the four screens with a line at now, and the seat map of the next show.
- person-detail.tsxA person's page: name, role and contact, this week's hours and pay, and their shifts, with edit and delete.
- rota.tsxThe week's rota: a row for each screen, the bar and the box office, a column a day, every shift a chip with who and when (a day list on phones). A chip opens its shift.
- screen-bar.tsxThe shell's top: a curved glass screen bar (logo, the pages under a gliding light, search, theme, account) with today's four screens in a strip beneath it.
- show-detail.tsxA show's page: the film, screen and time with sold, admitted, held and takings, then tabs for the seat map, the bookings (admit at the door) and the show's details.
- show-form.tsxThe showtime form in the app's dialog: film, screen, day and start, with when it ends (ads and trailers counted) and a clash with another show caught before saving.
- show-seats.tsxA show's seats tab: the seat map, and a bar under it to book the picked seats (ticket type, name, total), hold them or release them. Booked seats light up in a ripple from the first one picked.
- 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.
- staff-forms.tsxThe staff forms in the app's dialog: a person (name, role, contact, rate, start date) and a shift (who, which day, when and where), each with its own error lines.
- week-grid.tsxOne screen's week as a grid: a column a day, a card per show as tall as it runs. Drag a card to a new day or time (it lifts under your finger, follows 1:1 and glides into the 15-minute slot), or move a focused one with the arrow keys.
- 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.
- mask.tsThe mask row motion: each part of a row on screen (its children) slides up from behind its own mask.
- 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 dark auditorium drawn behind the glass — three soft crimson clouds, a projector beam sweeping slowly from the booth and rows of seat backs fading up from the floor. With followBackground it paints your background instead.
- charts.tsxThe charts, each in a recessed glass well: rounded pill bars with a soft rim (the current one lit crimson), a glowing line with its area, a spark line and a donut.
- 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.
- 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 glass with a bright fixed rim and an inset highlight (theme.ts GLASS, a plain CSS blur), or a tinted flat card with the same rim.
- 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 light: shared by the screen bar's page light, every segmented switch 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.
- now.tsThe one clock every live part reads: the cinema's minute of the day, ticking every 15 seconds while the tab shows.
- poster.tsxA film's drawn poster: a duotone sky in a turn of the primary's hue, a big shape picked from the title (a sun, a moon, peaks, waves or a door of light) and the title set in the marquee face.
- 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 screen as a curved glass bar of light, its glow falling on rows of seats that glow crimson when booked, gold when held and ring white when picked. One tab stop; the arrow keys walk the seats.
- 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 small parts every page shares: a segmented switch whose lit bead glides to the pick, card headings, a "more" link, a meter, a 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-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-films.tsThe pretend programme: the films, the four screens, this week's showtimes and the bookings each show starts with.
- seed-ops.tsThe pretend bar (menu, stock and today's orders) and the staff with this week's shifts.
- types.tsThe shapes of the cinema's data: films, screens, showtimes, seats and bookings, the bar, staff and settings.
- views.tsWhat each page shows, worked out from the cinema's records: tonight's numbers, a film's takings, a show's seats and the reports. One rule per number, so a tile and the list it opens always agree.
- 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}).
cinema-reel.tsx
The page: the sections in order.
Загрузка…
- Подходит для
- Independent cinemas and small venues that sell seats, run a bar and staff a rota from one screen.
- Как это работает
- Drag showtimes across the week, pick seats under a glowing screen to book or hold them, and watch admissions and the bar.
- Как использовать
- Edit words in content.ts and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.