Ski Powder
v1.0A ski resort's operations app in frosted glass over a drawn trail map: lifts, runs, passes, ski school, rentals and the snow report.
Dirección de la página: /
Incluido
Lo que obtienes- Claro y oscuroUsa los colores de tu tema
- Escritorio, tableta y móvilLas pantallas para las que está hecho
- Paquetes…
- Tamaño del código…
- Ahorra batería30 fps, en reposo cuando está quieto
- Se pausa si no se veFuera de pantalla o en otra pestaña
- Movimiento reducidoTranquilo para quien lo pide
Revisado en cada cambio
Seguridad revisada el 3 dic- Comprobación de tiposTypeScript estricto
- Lint y formatoESLint · Prettier
- Pruebas y buildCapturas en claro y oscuro
- Auditoría de seguridadSin avisos altos ni críticos
- Antigüedad de paquetesCada versión es pública desde hace 7+ días
- CPU en reposoMenos de medio núcleo en reposo, ≤ 30 fps
Código
ski-powderReact
- ski-powder.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.
- instructor.tsxOne instructor's page (#/school/<id>): their numbers, today's lessons with them, and their certifications to add or remove.
- lift-detail.tsxOne lift's page (#/lifts/<id>): its status switch, numbers and four tabs: the line profile with its chairs and the wait now, waits by hour, the crew, and its log.
- lifts.tsxLifts: every lift with its status switch, line and crew, filtered by status in the address, beside the waits now and today's hold log; a lift's own page opens at #/lifts/<id>.
- overview.tsxThe mountain today: the four numbers that matter at a glance, the trail map between today's snow and the lift lines, then passes, ski school and the rental shop.
- passes.tsxPasses: today's numbers, the pass products, the live feed of gate scans, and today's sales with a void that can be undone; ?sell=1 opens the sell dialog.
- rentals.tsxRentals: what is out and due back, stock by size, the fitting desk (?fit=1 opens a fitting) and today's fittings and returns.
- reports.tsxReports: skier visits, revenue by stream and the base depth over the last week, month or the whole season (the range lives in the address).
- run-detail.tsxOne run's page (#/runs/<id>): its open switch, numbers, where it sits on the trail map with its grooming, and the grooming history.
- runs.tsxRuns: the trail map beside what is open by difficulty and tonight's grooming plan, then every run with its open switch and grooming, filtered in the address; a run's own page opens at #/runs/<id>.
- school.tsxSki school: today's numbers, the board where lessons are dragged onto the instructors on duty (or moved with Space and the arrows), the team and the students by level; an instructor's own page opens at #/school/<id>.
- settings.tsxThe settings page: the resort's own details (name, lift hours, patrol phone) and Appearance (style, theme and language).
- sign-in.tsxThe sign-in page (#/sign-in): the form on one glass card over the snowy backdrop, with the mountain's numbers beside it, without the top bar and lift strip.
- snow.tsxSnow report: today's report to edit and publish (with the switch that makes it snow behind the app), how skiers will see it on the snow stake, and the last two weeks.
- 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).
- forms-mountain.tsxThe mountain's dialogs: add or edit a lift or a run, say why a lift stops, and the shared delete confirmation. Each checks its own fields (no browser popups) and saves through the fake API.
- forms-ops.tsxThe shop's dialogs: a pass product, selling a pass, a rental size, a fitting whose DIN works itself out as you type, and a return. Each checks its own fields and saves through the fake API.
- forms-school.tsxThe ski school's dialogs: add or edit a lesson and an instructor. Each checks its own fields and saves through the fake API.
- lift-strip.tsxThe lift strip docked along the bottom: every lift as a chip with its status shape (it morphs when the status changes) and its wait, a tap away from the lift's page.
- nav.tsxThe page nav: a floating row of glass pills under the conditions bar, the current page held by a liquid bead that springs between them; in the phone sheet the same pages as a column.
- 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 header: one floating glass panel with today's conditions (new snow, base, summit temperature, wind with its turning arrow, the report time) beside the logo and the actions, and the page nav under them.
- 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.
- fill.tsThe fill row motion: each row on screen draws in from left to right.
- 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 drawn mesh of four soft ice-blue clouds over a far range of drawn peaks, drifting very slowly, and snow falling through it only while today's report says it snows. With followBackground it paints your background instead.
- charts.tsxThe charts: pill bars and glowing lines in a recessed glass well, a sparkline for stat cards and a donut; every series in a chart shade, the current bar or point in the accent.
- clock.tsThe one shared clock every loop runs on (the lift chairs, the snowfall): at most 30 frames a second, resting when nothing listens or the tab is hidden, and a hook that keeps a loop still off screen, with reduced motion and with Motion off.
- 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 cards between ordered lanes (a tech's stops, a repair stage): 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 liquid: shared by every segmented control, tab row and the nav droplet.
- map-geometry.tsWhere things sit on the drawn piste map (a 1000 by 600 drawing): the ridge, the lifts' bottom and top stations, and each run's line worked out from the lift that serves it.
- 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.
- pause.tsThe header's Pause button: one switch that stills everything moving on its own (the backdrop drift, the snowfall, the chairs, the live gate scans).
- piste-map.tsxThe drawn piste map: the snowy range with its forest and village, every run in its difficulty's color and every lift on its cable, chairs gliding slowly up and down the open ones on the shared clock.
- 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 small parts every page shares: the glass panel, the liquid segmented switch, the lift status shape that morphs, the page head, a stat card, a switch, a meter 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: the resort's operations manager.
- api-ops.tsThe fake API's front of house: passes and scans, the ski school, the rental shop, the season's reports and the resort's details.
- api.tsThe fake API: every page loads and saves through these functions (this file: the mountain, api-ops.ts: the front of house), so wiring a real backend happens here only.
- db.tsThe pretend backend's state: the seed data, changed in place by every save, and the answer each load gives. Replace with your backend.
- seed-mountain.tsThe pretend mountain: 14 lifts with their crews, 40 runs, the hold log and two weeks of snow reports, on Saturday 16 January 2027.
- seed-ops.tsThe pretend front of house: pass products and today's sales and scans, the ski school's instructors and lessons, the rental shop's stock and fittings, the season so far day by day, and the resort's details.
- types.tsThe shapes of the resort's data: what the fake API answers and what a real backend would return.
- 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}).
ski-powder.tsx
The page: the sections in order.
Cargando…
- Ideal para
- Ski resorts, bike parks and mountain operators who run lifts, trails, ticketing, lessons and rentals from one screen.
- Cómo funciona
- Chairs glide along the cables on the trail map, snow falls behind the glass when the report says so, and lift chips morph as status changes.
- Cómo usarlo
- Edit words in content.ts and colors in theme.ts, and swap the bodies in data/api.ts and data/api-ops.ts for calls to your backend.