Posts

Image
Modern, AI-Powered News & Weather Platform for Sri Lanka Click to browse Website API‑Driven News Backbone The core of the application is a news aggregation layer that consumes a production‑ready news API and exposes it through Next.js server components and API routes . You’ve: Designed a typed integration in TypeScript , with clear interfaces for articles (headline, summary, category, images, timestamps, etc.). Implemented category‑aware fetching for sports, business, entertainment, international, and general news, powering multi‑category feeds, article pages, related stories, and the breaking news ticker. Added query‑parameter based control (limit, filters, etc.) to tune responses for different UI contexts: compact ticker vs. full pages vs. related article sections. Wrapped all calls in robust error handling and fallback logic to keep the UI usable even when the upstream API is slow or partially failing. Introduced a caching strategy (via server components,...

How Contactless ATM Cards Work Without a Battery

Image
   How Contactless ATM Cards Work Without a Battery When you tap your bank card on a  POS terminal  or an ATM, it feels almost magical. There is no visible power source on the card, yet it powers up, talks to the machine, and completes a secure transaction in under a second. The reason this works is simple but elegant: the card is  passive . It does not have a battery. Instead, it harvests a tiny amount of energy from the electromagnetic field generated by the payment terminal. What Actually Happens When You Tap When you bring your contactless card close to a terminal, the two devices communicate using a technology called  Near Field Communication (NFC) , which typically operates at 13.56 MHz over a very short distance (a few centimeters). The terminal generates an alternating electromagnetic field around its reader. Your card enters this field and couples to it using a small coil antenna inside the plastic. This coupling allows the card to draw j...