تخطَّ إلى المحتوى

Hours Tally

v1.0

A freelancer's time tracker on an off-white bento: a big ticking clock with a ring you drag to set a focus block, live budget burn and invoices.

$69

عنوان الصفحة: /

مدمج

ما تحصل عليه
  • فاتح وداكنيستخدم ألوان سمتك
  • سطح المكتب والجهاز اللوحي والهاتفالشاشات المصمّم لها
  • الحزم…
  • حجم الكود…
  • خفيف على البطارية30 إطارًا في الثانية، ويهدأ حين يسكن
  • يتوقّف حين يُخفىخارج الشاشة أو في تبويب آخر
  • تقليل الحركةهادئ لمن يطلب ذلك

يُفحص مع كل تغيير

فُحص أمنيًا في 3 ديسمبر
  • فحص الأنواعTypeScript strict
  • التدقيق والتنسيقESLint · Prettier
  • الاختبارات والبناءلقطات شاشة بالوضعين الفاتح والداكن
  • تدقيق أمنيلا تحذيرات عالية أو حرجة
  • عمر الحزمكل إصدار منشور منذ أكثر من 7 أيام
  • المعالج عند السكونأقل من نصف نواة عند السكون، ≤ 30 إطارًا في الثانية

الكود

hours-tallyReact
  • hours-tally.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.
    • clients.tsxClients: this month's hours by client, how many are active, what they still owe, and a card per client (contact, projects, hours, earned, unpaid) that opens its projects. New and edit open the client form.
    • entries.tsxEntries: the week's hours against the goal day by day, billable share, what is still unbilled, and every entry grouped by day, filtered by range, project, client and billable (the filters live in the address, so they survive Back). Add, edit, split and delete (with Undo).
    • invoice.tsxOne invoice: its total and status, the due date and note (editable), the lines by project and every entry on it. Mark it sent, then paid; a draft can also be deleted (its entries go back to unbilled).
    • invoices.tsxInvoices: what is still owed and the last six months paid, the sent and draft counts, and every invoice filtered by status and client in the address. New opens the invoice form (also from ?new=1).
    • overview.tsxOverview: a bento of today. The timer hero (drag its ring to set a focus block, Stop saves the entry), today's hours ring, earned today, unpaid invoices, the week's bars, today's entries and the active projects' budget burn.
    • project.tsxOne project: its budget burn, earned and profit, and tabs for its entries, the last ten weeks, its tasks (add and remove) and its invoices. Track time starts the timer on it; Edit opens the project form.
    • projects.tsxProjects: the active projects' budget burn, the ones over budget, the earnings, and every project with its client, rate, status and burn bar, filtered by client and status in the address. New and edit open the project form.
    • reports.tsxReports over the last quarter or half year (in the address): hours tracked each week, earnings by month, hours by client, the budget burn of the busiest active projects and the profit each project made after the cost rate.
    • settings.tsxSettings: how time is tracked (rounding of each saved run, the default focus block, the day's hours goal) and the cost rate profit is figured at, beside Appearance (style, theme and language).
    • sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one card over the backdrop, without the rail and top bar.
    • week.tsxWeek plan: an hours goal for each day (step it up or down), the hours tracked so far against it, and planned project blocks you drag between the days (or move with the keys). Add, edit and delete a block, with Undo.
  • 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 tab bar: a framed pill floating at the bottom with four pages and More (the full list in a sheet). Hidden from tablet width up, where the rail shows.
    • entry-dialogs.tsxThe entry forms: add or edit one (project, task, day, from and to, note, billable; delete with Undo), and split one in two at a time, the second half on its own project and task.
    • glance-tiles.tsxThe Overview's three glance tiles: today's hours ring with its split by project, earned today with its top two projects (both ticking while the timer runs), and unpaid invoices with the three oldest still out.
    • invoice-dialog.tsxA new invoice: pick the client, tick the unbilled entries to bill (all ticked at first), set the due date and a note. It opens as a draft.
    • overview-tiles.tsxThe Overview's lower tiles: the week's bars, today's entries and the budget burn of the active projects (the running one live).
    • page-head.tsxA page's head (its h1, one line under it and its actions on the end) and the still skeleton tiles a page shows in its own bento while it loads.
    • project-dialogs.tsxThe project and client forms: a project's client, name, rate, budget hours, color, status and first tasks; a client's name, contact and email. Both delete too, unless something still needs them.
    • recent-chips.tsxThe timer's Recent chips: the last three project and task pairs tracked. A click saves the running time (if any) and starts the timer on that pair.
    • sidebar.tsxThe rail: the logo, search and one icon per page with its name in a tooltip; the current page sits on a violet pill that glides between icons. On a phone the same links show as a list in the More sheet (RailList).
    • 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.
    • timer-hero.tsxThe Overview's hero, the app's signature: a big ticking clock beside the time ring. Drag the ring to set a focus block; Start runs it on a project and task; Stop saves the entry, and a copy of the clock glides into Today's list where the new row lands, while the day ring, the week bar and the project's burn bar grow.
    • top-bar.tsxThe top bar: the logo on a phone, search, the running timer's chip (on every page: its project, the time ticking, Stop), the theme switch and the account menu. A plain bar: it gets its blur, ground and edge only once the page scrolls.
  • partsWhat several sections share.
    • buildWhat several sections share.
      • cardsWhat several sections share.
        • odometer.tsxThe odometer card style: cards rise while every number rolls digit by digit to its value.
      • rowsWhat several sections share.
        • spot.tsThe spot row motion: each row on screen lights up from faint as a soft primary glow passes it.
      • 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 panels, faded out in Solid; with followBackground it paints your background instead.
    • charts.tsxThe charts: rounded bars (muted, the current one in the primary, an optional goal tick on each), a smooth line with a soft area under it, a sparkline, a donut, and a budget burn meter. Each plot box carries data-chart so the chart studios find it; bars and lines build in with the page (theme.ts BUILD).
    • clock.tsThe demo's clock and the one shared live loop: "now" is pinned to Thursday 14:10 of the current week and runs on in real time, and every live part (the timer, the earned counter, the burn bars) draws on one loop of at most 30 frames a second that rests off screen, in hidden tabs and under reduced motion.
    • 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, money, durations and dates are written: by Intl, the current language's way ("1,240", "1.240"; "Nov 19", "19 nov."; "€1,240"; "4h 32m").
    • grids.tsEach page's bento: the named tile areas on a phone (2 columns), a tablet or small laptop (4, from a 64rem wide app) and a desktop (6, from 80rem). Every row is filled, so the grid closes into a rectangle at each width. Tiles take their area with `[grid-area:<name>]`.
    • 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.
    • 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.
    • tile.tsxA bento tile: the one card look (TILE), its grid area, an h3 heading with an optional pill link or button beside it, plus the small pieces many tiles share (a project's color dot, a status chip, a "See all" link).
    • time-ring.tsxThe timer's ring: three hours round, a soft arc for the focus block you drag (by its knob, anywhere on the ring, or the arrow keys, in 5-minute steps) and the live arc of time run so far, redrawn on the shared clock (parts/clock.ts).
    • 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 in data/ only. Each answer is a page's whole view, worked out from the store in data/db.ts.
    • db.tsThe fake backend's store: the seeded data held in memory for the visit, plus the small sums every answer shares (hours of an entry, what it earned, an invoice's total, which invoices are overdue). data/api.ts reads it, data/save.ts changes it.
    • save.tsThe fake API's saves: the timer, entries (edit, split, delete and undo), projects and tasks, clients, invoices, the week plan and settings. Each waits like a network call and changes the store in data/db.ts; the page then reloads what it shows (parts/use-api.ts refresh).
    • seed.tsThe pretend studio: Noor's 8 clients and 20 projects, half a year of time entries, the invoices sent from them, this week's plan and a timer already running. Generated from a fixed seed around the demo's "now" (parts/clock.ts), so every visit shows the same believable numbers.
    • timer.tsThe timer's answer and the projects a picker offers (timer, entry and plan forms), worked out from the store in data/db.ts. data/api.ts serves them.
    • types.tsThe shapes of the studio's data: clients, projects and their tasks, time entries, the running timer, invoices, the week plan and the work settings.
  • 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}).

hours-tally.tsx

The page: the sections in order.

جارٍ التحميل…
مناسب لـ
Freelancers and small studios who bill by the hour: track time per project and task, watch budgets burn, invoice clients.
كيف يعمل
Drag the clock's ring to set a focus block, it fills live; Stop glides the run into today's list and the budget bars grow.
طريقة الاستخدام
Edit words in locales/ and colors in theme.ts, and swap the bodies in data/api.ts and data/save.ts for calls to your backend.