Bounce Castle
v1.0A bouncy-castle hire app in puffy clay: catalog, bookings, van routes, safety checks with an inflating castle, repairs and reports under bobbing balloon tabs.
Alamat halaman: /
Sudah termasuk
Yang Anda dapat- Terang dan gelapMemakai warna tema Anda
- Desktop, tablet, dan ponselLayar yang didukung
- Paket…
- Ukuran kode…
- Hemat baterai30 fps, diam saat tidak bergerak
- Berhenti saat tersembunyiDi luar layar atau tab lain
- Kurangi gerakanTenang bagi yang memintanya
Dicek di setiap perubahan
Keamanan dicek 3 Des- Pengecekan tipeTypeScript strict
- Lint dan formatESLint · Prettier
- Tes dan buildTangkapan layar terang dan gelap
- Audit keamananTanpa advisori tinggi atau kritis
- Usia paketSetiap versi sudah publik 7+ hari
- CPU saat diamDi bawah setengah core saat diam, ≤ 30 fps
Kode
bounce-castleReact
- bounce-castle.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.
- booking.tsxOne booking: the party, the address and what goes out, then tabs for details, payment and safety checks; edit, take the deposit or full payment, or cancel.
- bookings.tsxBookings: a month calendar with a dot per party and what is still free, the picked day beside it with every inflatable free or booked, or a list with status and deposit filters; filters live in the address so Back keeps them.
- catalog.tsxThe catalog: every inflatable drawn in clay with its size, ages, day price and state, filtered by kind and state (kept in the address), plus add.
- home.tsxThe Overview: the big weekend calendar, the four numbers that matter, both vans today, what is out now, checks still to run and the trend charts; every block leads to the list behind it.
- inflatable.tsxOne inflatable: its big clay drawing and facts, then tabs for specs, its bookings and its repairs; edit, take out of service or delete.
- repairs.tsxRepairs: a board of tickets from open to back in service (patches, seams, cleaning, blowers, anchors), each moved on with one press; log a ticket, take an inflatable out of service with it, edit or delete.
- reports.tsxReports: revenue week by week, weekend fill, how often each inflatable goes out, revenue by kind and the busiest towns, over 8, 12 or 16 weeks.
- routes.tsxRoutes: a day board with one lane per van; drag drops and pickups into order or to the other van (or Alt + arrow keys), times follow at once, Undo puts the day back.
- safety.tsxSafety checks: today's pre-hire checks, the clay castle you inflate with the blower pressure dial, the checklist, anchors and wind, then sign-off (or fail it to Repairs); the recent log under it.
- settings.tsxThe settings page: the business (deposit, the safe pressure band, the wind limit, start time), the vans and crew, and Appearance (style, theme and language).
- sign-in.tsxThe sign-in page (#/sign-in): a clay card with the logo and the form beside a puffed-up castle, over the fairground backdrop, 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).
- booking-form.tsxThe new / edit booking dialog: customer, address, date, and the inflatables free that day (booked ones are shown and locked), with the total and deposit worked out as you pick.
- castle-dial.tsxThe safety check's hero: a clay castle that inflates as you drag the blower pressure dial (turrets flop when soft, stand when full, bulge when too firm) and wobbles when the pressure enters the safe band.
- inflatable-form.tsxThe add / edit inflatable dialog: name, kind, size, ages, price and the color pair it is drawn in, with a live clay drawing of it.
- month.tsxThe month calendar on Bookings: Monday-first weeks, each day with a dot per party and how many inflatables are still free; tap a day to see it.
- 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 logo, a row of puffy balloon tabs that bob on one shared clock (the current page's balloon is cherry and squishes when you land on it), search, the theme switch and the account menu. Narrow screens show the current page's balloon and a menu button.
- ui.tsxThe small pieces every page shares: the page heading, a clay card, a number tile, pill tabs, status chips and a confirm dialog.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- burst.tsThe burst card style: cards spread out from the middle of the page, the nearest first.
- rowsWhat several sections share.
- unfold.tsThe unfold row motion: each row on screen opens down from its top edge, 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 behind the clay cards: a drawn fairground field (puffy clouds, rolling hills, a striped tent and bunting), still, faded out in Solid; with followBackground it paints your background instead.
- bob.tsThe one shared clock for idle motion: the balloon tabs bob on it, at most 30 redraws a second, resting while the tab is hidden, the bar is off screen, no balloon is shown or motion is reduced.
- charts.tsxThe charts: puffy bars that grow from the baseline, a thick line that draws itself over a soft area, and a donut; colors from --bounce-castle-chart-1..5, shapes from the chart variables (Chart Studio).
- 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.
- icons.tsxThe logo and the line icons, drawn on a 24-unit grid with round ends.
- inflatable-art.tsxThe inflatables drawn in clay: one drawing per kind (castle, slide, obstacle course, ball pit, dome, combo), in one of four color pairs, mixed from the brand colors so a preset or your theme recolors them.
- 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.
- 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.
- 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.
- use-drag.tsDrag a card between ordered lanes (the van routes): the card lifts at the grab point and follows the pointer 1:1, a gap opens where it would land, the others glide out of the way, and on drop it glides into its place; Escape puts it back.
- 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.
- bookings.tsThe pretend bookings: every hire from mid March to mid July, made by a seeded generator so the numbers are believable and the same on every visit.
- inflatables.tsThe pretend fleet: twelve inflatables with their size, ages, day price and how each is drawn (parts/inflatable-art.tsx).
- ops.tsThe pretend day-to-day: the vans and crew, delivery stops, safety checks, repairs and the business settings.
- summaries.tsThe numbers the Overview and Reports show, worked out from the bookings, stops, checks and repairs (data/api.ts hands them the current state).
- 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}).
bounce-castle.tsx
The page: the sections in order.
Memuat…
- Cocok untuk
- A small bouncy-castle or party-hire company with a couple of vans and a handful of crew.
- Cara kerjanya
- Book castles on a calendar, drag stops between vans, then pump a clay castle into the safe band and sign it off.
- Cara memakai
- Edit words in locales/ and content.ts and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.