SShortSingh.
Back to feed

Developer Builds Temporary Message-Sharing API Using NestJS, PostgreSQL, and Redis

0
·64 views

A developer has published a detailed walkthrough of a temporary message-sharing API built with NestJS, PostgreSQL, Prisma, and Redis. The API lets users create short-lived messages with configurable rules such as expiration windows, visit limits, optional password protection, and one-time access. Each message is assigned a randomly generated short code, and expiration is stored as an absolute timestamp to simplify validity checks at retrieval time. Redis is used for caching, while a scheduled cron job handles automatic cleanup of expired records, and rate limiting is enforced via the NestJS throttler module. The project was intentionally kept small and modular to give each layer — controller, service, database, and cache — a clearly defined responsibility.

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
ProgrammingHacker News ·

AMD Details Zen 6 Family Focus on Feeding Its Cores

A Chips and Cheese analysis examines AMD's upcoming Zen 6 processor family and how it is designed to keep its execution cores supplied with data. The piece centers on the memory and cache subsystem, which determines how effectively the processor avoids stalls. It is drawn from a technical write-up posted to Hacker News, where it gathered modest early attention. The source provides only the article link and discussion metrics, so specific architectural figures are not reflected in this summary.

0
ProgrammingDEV Community ·

Store Timestamps in UTC and Display Them in Local Time

A CRM entry showing only '10:30' can be misread by staff in different timezones because it does not indicate which zone it represents. The article distinguishes between instants, such as an enquiry acceptance time, which should be stored in UTC or a timezone-aware type, and local scheduling intentions, which need a local date, time, and IANA timezone identifier. It recommends converting instants to a documented display timezone with a locale-aware formatter and labeling the zone where confusion is possible. Recurring schedules must preserve timezone rules because fixed UTC offsets fail to account for daylight-saving changes, and ambiguous or nonexistent local times should be handled by a documented policy. The author also advises keeping event occurrence, receipt, and next-attempt times as separate fields and testing edge cases such as daylight-saving transitions and invalid dates.

0
ProgrammingDEV Community ·

Answering Claude Code and Codex prompts from your phone

Coding agents like Claude Code and Codex pause and wait for approval when they need permission to run a command, which can stall work if you're away from your computer. Claude Code offers a built-in Remote Control feature, started with /remote-control in a session and accessed through the Claude app or claude.ai/code, but it requires a paid plan and an active terminal process. Codex is set up through the ChatGPT desktop app's Control this Mac or PC option, paired to your phone via QR code and answered in the ChatGPT mobile app. For any agent, an alternative is enabling SSH on the computer and attaching to a tmux session from a phone terminal app. All these methods require the host computer to stay awake and online, and each agent has its own separate setup.

0
ProgrammingHacker News ·

Neil Fraser Reports the .name Domain Has Been Grandfathered

A post on neil.fraser.name, dated November 10, 2026, discusses the status of the .name top-level domain as having been grandfathered. The item was shared on Hacker News, where it received 26 points and 3 comments. The source text available is limited to the link and discussion metadata, so the full details of the grandfathering decision are not confirmed here. Readers are directed to the original post for the author's complete account.