Urgent.News

What's breaking now, across thousands of outlets.

Tech

I built a site where you throw tomatoes at any picture (Next.js, Vercel Blob, no sign-up)

I kept seeing those TikTok videos where a tomato flies at the camera, gets smaller as it goes, and splats on the screen. I wanted that exact feel in a browser, so I built Tomato Throw: you upload a picture, optionally give it a name, and get a link. Anyone who opens the link taps to throw tomatoes at it. No account, no email. Try it: https://tomatothrow.com Most of the site is small. A few parts…

While browsing TikTok, the creator of Tomato Throw noticed playful videos featuring a tomato flying toward the camera, shrinking as it moved, and splatting onto the screen. This animation piqued the creator's interest, leading to the development of Tomato Throw. The site allows users to upload a picture and share a link, where anyone can click to throw tomatoes at the image. There's no account creation or email required.

The flight animation was challenging to perfect. Initially, the creator used CSS transitions, which resulted in a sticker sliding across the screen. However, a realistic throw involves an arc, shrink, and spin simultaneously. To achieve this, keyframes were sampled along a quadratic Bezier curve and provided to the Web Animations API. The control point sits slightly above the target with random sideways drift, ensuring unique throws each time.

Splat effects are generated using an SVG blob, created from a seed to ensure identical splats every time. The preview image, which appears in platforms like X or Slack when sharing the link, is rendered on the server with next/og. To maintain consistency, the same shape function is used for both the page and the preview image. The renderer behind next/og only accepts plain SVG elements, so React components were not reused.

Vercel's serverless disk initially caused issues, leading the creator to move to a private Vercel Blob store. Each picture is stored as a single file named with the ID, base64-encoded name, and extension. The browser compresses large pictures before uploading, and GIFs are sent as-is. A Report button is present on each picture page, allowing users to delete the image. Three different reporters can delete the same picture without repeating the process. Manual deletion is also possible through a token-protected route.

The builder utilized WebAudio to synthesize sounds, eliminating the need for audio files. The layout employs 100dvh and container query units; however, mobile browser toolbars broke 100vh functionality. Pages for individual pictures are set to noindex but remain crawlable, as crawlers can still access the page even if indexing is disabled. The creator started with a picture of their own face, suggesting others do the same.

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

The count that refused to say zero

A delivery report counts the times a new build became live while a worker was still pointing at the old build. That number matters: a rising count is the trigger to roll the delivery mechanism back.

The Smart Ring Goes to Church

From glowing crosses to voice-transcribed prayers, the Elah and Glorify rings are reimagining traditional faith rituals for the wearable era.

From a database to a YouTube Short with Pillow and ffmpeg (no video editor)

Every night our server writes a plain-language post about the day's data and turns it into a short vertical video for YouTube Shorts, Instagram Reels and Facebook.

  • Python Pillow creates vertical slides with bold text
  • ffmpeg stitches slides into YouTube Shorts format
  • Open-source tools and free cloud VM power the process

More from Friday 20 November →