Running Tempo
v1.0A running club's web app on a warm bento: drag the coral mileage ring to set the week's goal, with group runs, plans, members, races and reports.
כתובת העמוד: /
מובנה
מה מקבלים- בהיר וכההמשתמש בצבעי ערכת העיצוב שלכם
- מחשב, טאבלט וטלפוןהמסכים שהוא נבנה בשבילם
- חבילות…
- גודל הקוד…
- חסכוני בסוללה30 fps, במנוחה כשהכול דומם
- נעצר כשהוא מוסתרמחוץ למסך או בלשונית אחרת
- הפחתת תנועהרגוע למי שמבקש
נבדק בכל שינוי
אבטחה נבדקה ב-3 בדצמ׳- בדיקת טיפוסיםTypeScript strict
- Lint ועיצוב קודESLint · Prettier
- בדיקות ובנייהצילומי מסך בהיר וכהה
- בדיקת אבטחהללא התראות חמורות או קריטיות
- גיל החבילותכל גרסה פומבית 7 ימים לפחות
- מעבד במנוחהפחות מחצי ליבה במנוחה, ≤ 30 fps
קוד
running-tempoReact
- running-tempo.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.
- groups.tsxGroup runs: the next one counting down, the eight coaches and what they lead, and the week's schedule by day and pace group. Tap a run for its sign-ups; New group run adds one.
- member.tsxOne member: their week against their own goal and the club's, their streak, PBs at each distance, recent runs (log one for them, tap one to edit) and their plans and races. Edit or remove them from the top.
- members.tsxMembers: the four pace groups, how many ran this week, the club's goal (the one set on the Overview ring) and the table: search, group, sort and pages. Add member adds one.
- overview.tsxOverview: a bento of today. The goal ring hero (drag it to set the week's goal), the next group run counting down, the top streak, runs this week, members out running now, the club's pace, races coming up and the PB wall.
- plan.tsxOne training block: how far it has come, its weeks of sessions (tick one off as it is run) and the members on it (assign or take someone off). Edit or delete it from the top.
- plans.tsxTraining plans: this week's sessions across every block, the totals, and each block as a card with its week and how far it has come. New plan makes one.
- race.tsxOne race: when and where, who from the club is entered (enter someone or withdraw them) and, once it is run, their times: a time faster than their best becomes a PB. Edit or delete it from the top.
- races.tsxRaces: the next one counting down, PBs from the last races, how many of the club are entered in each one coming up, and the calendar by month. Add race puts one on it.
- reports.tsxReports: club mileage per week against last season and the week's goal (the one set on the Overview ring), this week by pace group, group-run attendance per week, and the PBs of this season.
- runs.tsxRuns: the club's 12 weeks of mileage, this week's numbers (the runs count moves as members out now finish), and the log: search, effort and range filters, each run with its route sketch, tap one to edit or delete it.
- settings.tsxThe settings page: the club (its name and the goal each new week starts from) and Appearance (style, theme and language).
- sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one tile beside a coral tile with the week's club mileage, without the sidebar and top bar. The coral tile folds away on phones.
- 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).
- dock.tsxThe phone's bottom tab bar: a framed floating pill with the four main pages and More (the sidebar in a sheet). Framed, so it adds nothing on scroll.
- goal-hero.tsxOverview's hero tile: this week's club mileage on the goal ring. Drag the ring to set the week's goal; the days-left tiles recompute as it moves and the goal saves when it settles (Members and Reports show it).
- group-dialog.tsxOne group run: its details and route, who signed up (add or remove someone; full runs refuse), and cancel, restore, edit or delete it (with Undo). Also the form for a new one.
- member-dialog.tsxAdd a member or change one: name, email, pace group and their own weekly goal.
- overview-tiles.tsxOverview's tiles around the hero: the next group run counting down, the top streak, runs this week, members out running now, the club's pace, races coming up and the PB wall.
- page-head.tsxWhat every page starts with: its heading and one line under it, its actions at the end; and the still tiles a bento shows while it loads.
- plan-dialog.tsxMake a training block or change one: its name, the race it builds to, the coach, the Monday it starts and how many weeks (4, 8, 12 or 16; a new block fills its weeks with sessions).
- race-dialog.tsxAdd a race to the calendar or change one: its name, city, day and distance.
- run-dialog.tsxLog a run or edit one: member, day, distance, time (the pace works itself out as you type), route and effort; an edit can delete it, with Undo.
- sidebar.tsxThe slim sidebar: the Tempo mark, search with the command palette shortcut, and one link per page with its icon; the current page sits on a coral-tinted pill.
- 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: where you are, search, Log a run, the theme switch and the account menu. Plain at rest; once the page scrolls it frosts itself (blur, a ground fill and a thin bottom edge).
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- wave.tsThe wave card style: cards arrive in a wave by grid position from the top-left.
- rowsWhat several sections share.
- count.tsThe count row motion: each row on screen brightens from faint while its numbers (<Ticker>) count up, rounded every frame.
- 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 tiles, faded out in Solid; with followBackground it paints your background instead.
- charts.tsxThe app's two charts: rounded bars (muted, the current one in the primary) and a line with a soft area under it, both with labels that never crowd.
- clock.tsThe one live clock every moving tile shares: at most 30 ticks a second, only while a tile that listens is on screen and the tab is visible, and never under reduced motion (the tiles then show still values).
- command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
- dates.tsDays as local YYYY-MM-DD strings, and the club week (Monday to Sunday) they fall in.
- 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.
- goal-ring.tsxThe goal ring (the app's signature): the week's club mileage as an arc on a 0-6,000 km dial, and a knob you drag around it (or press the ring, or use the arrow keys) to set the week's goal. The knob follows the pointer 1:1; a press on the ring glides it there with no overshoot.
- grids.tsEach page's bento: the named tile areas at phone (2 columns), tablet and small laptop (4, from a 64rem wide app) and desktop (6, from 80rem). Every row is filled, so the grid closes into a rectangle at each width.
- 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.
- pace.tsRunning numbers the language's way: distances ("8.4"), paces ("4:52"), times ("1:02:33"), and reading a typed time back.
- route-sketch.tsxA route drawn small: its line on a 100 x 60 grid, with a dot where it starts.
- router.tsThe page switcher: reads the app's page from the address hash (#/settings, #/?status=open).
- runners.tsThe members out running now, moved on the shared clock: each tick asks the API where they are, and a finished run (logged by the API) refreshes what shows the week.
- 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.
- tile.tsxA bento tile: one card look on every page, placed in its page grid's named area; the hero is tinted with the primary, a tile with an href is one link.
- 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.tsThe fake API: every page loads through these functions (saves are in data/save.ts), so wiring a real backend happens here only.
- db.tsThe fake backend's tables (the seed, changed by every save) and the sums the API answers from: streaks, weekly mileage, attendance.
- runs.tsThe pretend run log: twelve weeks of members' runs up to today, generated from each member's pace group and pace.
- save.tsThe fake API's saves: runs, group runs, plans, members, races, the club goal, and the members out running right now. Swap each body for a call to your backend.
- seed.tsThe pretend club: 300 members, 8 coaches, the routes, the weekly group runs, training plans and races, dated from today so every week is full.
- types.tsThe shapes the fake API answers with: members, runs, group runs, plans and races of one running club.
- 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}).
running-tempo.tsx
The page: the sections in order.
טוען…
- מתאים ל
- Running clubs and coaches who plan group runs and training blocks, log members' runs and follow goals, streaks, races and PBs.
- איך זה עובד
- Drag around the mileage ring to set the week's goal: the ring glides, the days left recount, and runs land live.
- איך משתמשים
- Edit words in locales/, colors in theme.ts and the club in data/seed.ts, and swap the bodies in data/api.ts for your backend.