Urgent.News

What's breaking now, across thousands of outlets.

Tech

How I built a countdown & days-since tracker with React 19, Supabase and Vercel

I wanted a place to count down to things – a trip, a birthday, a deadline – and to count up from things, like the day I started a habit. Most countdown sites I tried were full of ads or wanted an account before I could type a date. So I built my own: CountMyDays. It's a solo side project, and this post is about how it's put together and a few things that bit me along the way. The stack React 19 +…

I wanted a way to count down to events like a vacation or birthday, or count up from days since starting a new habit. Existing countdown websites were annoying with ads or requiring an account, so I created my own: CountMyDays. This post explains how it's built and some challenges I faced. The stack includes React 19, Vite, TypeScript for the front end, Supabase for PostgreSQL, magic-link authentication, Realtime, Vercel hosting, Tailwind styling, and a service worker for offline functionality.

The key aspects are how data moves between guest and signed-in users and keeping the timer accurate. Guests can start creating countdowns immediately, with their data stored in localStorage under a single key. After signing in, guest data is transferred to the Supabase countdowns table. Normalization and fallbacks handle schema changes.

Local storage is cleared only after the data insert succeeds. The timer is accurate because it's based on date math instead of intervals, using requestAnimationFrame to update the display only when the second changes. When a countdown reaches zero, it switches from counting down to showing elapsed time. Countdowns can be shared via a public link, and shared pages update instantly when the owner edits the countdown.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Making legacy regexes readable — without changing what they match

A pattern like this ships in real projects every day: ^(?\[(?:[A-Za-z0-9_.-]+)\])|^(?[A-Za-z_][A-Za-z0-9_]*)\s*=\s*(?"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^#\n]*)\s*(?:#.*)?$ An INI-line parser: a…

  • Legacy regexes are hard to understand due to complex structure
  • RegexTester.dev offers three readability modes: Pretty, Annotated, Minify
  • Formatting regex with x/extended flag preserves original behavior

Prestigious Technion Alumni Medal Awarded to IAI Chairman Boaz Levy

The prestigious medal recognizes Technion alumni for exceptional achievements, leadership, and contributions to science, technology, industry, and society.

  • Boaz Levy, IAI Chairman, receives Technion Alumni Medal on October 26.
  • Medal awarded for exceptional achievements in science, technology, and leadership.
  • Levy led IAI to record order backlogs and financial performance since 2020.

How I added English to my solo-dev Unity MMO without touching 130 UI files

My game, Battle of Pirates , is a free online pirate MMO for Windows: real-time naval PvP, fleets, fortress sieges, boss events.

  • Translated text after display, no server modifications needed
  • Skipped input fields to avoid translating player typing
  • English toggle added to login screen, patch released through launcher

More from Monday 26 October →