SShortSingh.
Back to feed

Next.js Tools Run Astronomy Math and 1080x1350 Share Cards Entirely in the Browser

0
·9 views

A developer describes building three client-side consumer tools in Next.js, including a moon phase calculator, a birth-date soulmate calculator, and a no-contact stage locator. The team moved all calculations, SVG visuals, and PNG share-card export into browser TypeScript to avoid serverless cold-start delays and image-rendering costs. They replaced a simple synodic-month modulo with Jean Meeus's lunar anomaly corrections, since the Moon's elliptical orbit can shift phase estimates by 12 to 18 hours. A 180-degree geometry bug in the phase-matching logic was caught only through headless Chrome screenshots, and the developer also shared tips on Canvas text wrapping and Canvas-based PNG download. The author reports instant interactions, zero image-generation costs, and zero layout shift on mobile.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Day-One Perforce Stream and Config Checklist for Small Unreal Engine Teams

Small UK Unreal teams often move from Git to Perforce once large binary assets become a problem, but the initial configuration is easy to get wrong. The guide recommends sketching a simple stream layout first, with one always-buildable mainline, isolated development streams only for long-running work, and release streams cut at milestones. Unreal binary assets such as .uasset and .umap should use exclusive checkout so two people cannot overwrite each other's edits, while source and config files stay as text for normal merging. It also advises setting up a .p4ignore file for generated folders, agreeing on how artists get editor binaries without compiling C++, and managing access through groups and virtual streams for contractors.

0
ProgrammingDEV Community ·

Hushavyr Adds Offline Pre-Commit Security Checks to VS Code

Hushavyr is an open-source VS Code extension that runs security checks locally before code is committed. Its Command Palette commands can find hardcoded secrets by file path and line number, without exposing the credential values. Developers are advised to rotate any committed credential and can optionally scan Git history with a Gitleaks integration. A security scan without AI and a local AI review of uncommitted changes via Ollama are also available, with the built-in checks working without a Copilot subscription. The article's author is listed as Matthaios Stavrou, the project's maintainer.

0
ProgrammingDEV Community ·

Big Four Tech Firms Spend $202B on Infrastructure in One Quarter, Doubling a Year Earlier

Microsoft, Alphabet, Amazon and Meta together spent about $201.9 billion on property and equipment from July to September 2026, roughly 108% more than the same quarter a year earlier. The four companies have collectively guided to about $720 to $740 billion in capital spending for 2026, against roughly $376 billion on a cash basis in 2025. Amazon accounts for the largest share at around $220 billion, while Alphabet is growing fastest, with its guidance running about twice its 2025 level. Analysts note that capital spending now consumes a much larger share of revenue and operating cash flow, and that rising memory and component prices are adding to costs. The figures are compiled from quarterly cash flow statements, though each company counts capital spending differently.

0
ProgrammingDEV Community ·

Grok Bot 1.4.0 Routines Now Trigger on Events Rather Than Timers

Grok Bot version 1.4.0 changes how automated routines operate, replacing fixed timer checks with triggers that fire when something happens in a connected app. Previously, routines woke at set intervals and checked for changes even when none had occurred, which wasted usage. The update also lets routines complete purchases within user-defined limits, flags discounted products with price comparisons, and can request data broker opt-outs with per-site status reports. Additional changes include a unified view of routines across bots, team controls for managers, and in-thread replies for Slack bots.