Перейти до вмісту

Swim Paddle

v1.0

A kids' swim school app in puffy claymorphism: a lane board where swimmer chips bob and splash into new lanes, timetable, badges and reports.

$69

Адреса сторінки: /

Вбудовано

Що ви отримуєте
  • Світла й темнаВикористовує кольори вашої теми
  • Комп’ютер, планшет і телефонЕкрани, для яких його створено
  • Пакети…
  • Розмір коду…
  • Економить батарею30 fps, у спокої не навантажує
  • Пауза, коли прихованоПоза екраном або в іншій вкладці
  • Зменшення рухуСпокійно для тих, хто цього просить

Перевіряється після кожної зміни

Безпеку перевірено 3 груд.
  • Перевірка типівСтрогий TypeScript
  • Лінтер і форматESLint · Prettier
  • Тести й збіркаСкриншоти у світлій і темній темах
  • Аудит безпекиБез високих чи критичних загроз
  • Вік пакетівКожна версія публічна 7+ днів
  • Процесор у спокоїМенше половини ядра у спокої, ≤ 30 fps

Код

swim-paddleReact
  • swim-paddle.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.
    • badges.tsxBadges (#/badges): the sticker shelf with how often each was awarded (tap one to see only it, kept in the address), the recent awards with their certificates, and Award a badge.
    • home.tsxOverview (#/): today's numbers, the pool deck plan with the classes in the water, what's next, badges this week, what needs a hand and the term's level-ups.
    • lanes.tsxLane board (#/lanes): pick a day, a lesson time and a pool in the address, then drag swimmers between the lanes and the waiting tray.
    • lessons.tsxTimetable (#/lessons): the week one day at a time, each lesson time a row of lesson cards, with pool, level and instructor filters in the address; the Waitlist tab; #/lessons/<id> is one lesson.
    • parents.tsxParents (#/parents): conversations with families, new ones first; #/parents/<id> opens one with quick replies and a reply box, and Message a class writes to every parent in a lesson.
    • reports.tsxReports (#/reports): level-ups per term, fill rate by week for each pool, the waitlist by level, and a table of every level this term.
    • settings.tsxThe settings page: the school's ratios, term and lesson length, then Appearance (style, theme and language).
    • sign-in.tsxThe sign-in page (#/sign-in): a drawn corner of the pool, two lanes and a rope of floats with swimmer chips in the water, beside the clay sign-in card.
    • swimmers.tsxSwimmers (#/swimmers): search by swimmer or parent, filter by status and level (kept in the address), and open a swimmer (#/swimmers/<id>).
    • team.tsxTeam (#/team): who is on deck today, cover for the lessons of anyone away, and every instructor with their levels, load and an away switch; #/team/<id> is one instructor.
  • 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).
    • award-dialog.tsxAward a badge: find the swimmer, pick a sticker from the shelf, award it; the new sticker pops in on the list behind.
    • certificate.tsxA badge certificate drawn as a clay card with the sticker on it, and Send to parent.
    • cover-today.tsxCover today: every lesson today whose instructor is away, with a pick of who is free to cover it, or who already does.
    • deck-plan.tsxThe pool deck plan: both pools drawn from above with their lanes, and the classes in the water at the picked lesson time today.
    • instructor-detail.tsxOne instructor (#/team/<id>): name, levels and away status up top with Edit and Delete, then the Week, Lessons and Qualifications tabs.
    • instructor-form.tsxThe new-instructor and edit-instructor form in a dialog: name, contact and the levels they teach.
    • lane-board.tsxThe lane board: one pool at one lesson time, each lane a class with its swimmers bobbing as puffy chips; drag one to another lane or to the waiting tray, and its place is booked.
    • lesson-detail.tsxOne lesson (#/lessons/<id>): its level, time and lane up top with Edit, Message class, Cancel this week and Delete, then the Roster, Register and Details tabs.
    • lesson-form.tsxThe new-lesson and edit-lesson form in a dialog: level, pool and lane, day and time, instructor and places, with a lane clash caught before it saves.
    • lesson-roster.tsxA lesson's roster: its swimmers with their skills, Move to waitlist on each, and Add swimmer from the waitlist of the lesson's level.
    • rope-nav.tsxThe lane rope: the pages as puffy bead groups strung on a twisted rope, with a coral float that glides along it to the page you're on.
    • school-settings.tsxSettings → School: the swimmers per instructor at each level, the term dates and the lesson length, saved together.
    • 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.
    • swimmer-detail.tsxOne swimmer (#/swimmers/<id>): name, level and lesson up top with Edit, Message parent and Delete, then the Profile, Skills, Badges and Lesson tabs.
    • swimmer-form.tsxThe new-swimmer and edit-swimmer form in a dialog: name, age, level, the parent's contact and care notes, checked before it saves.
    • swimmer-skills.tsxA swimmer's skills checklist for their level; with every skill ticked, Move up awards the level badge and books them into a lesson of the next level (or its waitlist).
    • top-bar.tsxThe top bar: the school's mark and term, search, the theme switch and the account menu, with the lane rope of pages under them; once you scroll, a frosted strip keeps the page from reading through.
    • waitlist.tsxThe waitlist: who is waiting for which level, longest first, with Offer place (a lesson of their level with room) and Remove.
  • partsWhat several sections share.
    • buildWhat several sections share.
      • cardsWhat several sections share.
        • rise.tsThe rise card style: cards rise and fade in (24px, a hair smaller), one after another.
      • rowsWhat several sections share.
        • zigzag.tsThe zigzag row motion: odd rows slide in from the left, even ones from the right, 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 puffy coral bead.
    • backdrop.tsxThe backdrop: a calm drawn pool floor of tiles under a few soft caustic ripples, a little stronger in Glass; with followBackground it paints your background instead.
    • bits.tsxThe small clay pieces every page shares: level pills, swimmer faces, capacity beads, page heads, pill tabs, stat tiles and the confirm dialog.
    • clock.tsThe one shared clock every idle loop (the swimmer chips' bob) reads: at most 30 ticks a second, none while the tab is hidden or nothing listens.
    • 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 chunky 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).
    • message-dialog.tsxA message to write and send in the app's dialog: to one parent or a whole class.
    • 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.
    • 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.
    • sticker.tsxA badge sticker: a puffy drawn shape in its level color with a white die-cut edge; one that was just awarded pops and wobbles in.
    • 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.tsxThe lane board's drag engine: a chip follows the pointer 1:1 in the floating layer, glides into its new lane with a splash ring, or glides home and shakes when the lane says no; Space, the arrow keys and Escape do the same from the keyboard.
    • use-school.tsThe school and the reports as every page loads them, and attempt(): runs a save, draws its change at once and says so, or shows why it failed.
  • 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.
    • school.tsThe swim school's shapes and its fixed lists: levels with their skills, the two pools, the badges and the team.
    • seed.tsThe pretend school, made once from a fixed seed: the team, a week of lessons in both pools, about 600 swimmers, the waitlist, badges and parent messages.
  • 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}).

swim-paddle.tsx

The page: the sections in order.

Завантаження…
Підходить для
Swim schools with a few pools, a dozen instructors and levelled lessons for kids, from Starfish to Orca.
Як це працює
Drag a swimmer chip to another lane: it follows 1:1, glides in with a splash, and the class, waitlist and reports update.
Як користуватися
Edit words in locales/, colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.