今日已更新 76 条资讯 | 累计 21295 条内容
关于我们

今日精选

HOT

最新资讯

共 21295 篇
第 130/1065 页
AI 资讯 Dev.to

Designing a Multi-Tenant Storefront With Wildcard Subdomains

At my workplace, I worked on an ERP platform used by fashion businesses to manage customers, body measurements, products, orders, invoices, inventory, staff, and other day-to-day operations. Each business also had a public storefront where customers could browse products and check out. The storefront started as a simple sharing feature. Businesses could publish products, copy a link, and send it to customers outside the main workspace. That worked well because the storefront was mostly a product catalogue, and most of the sales process still happened after the customer contacted the business. As the platform evolved, the storefront became much more than a catalogue. Customers were discovering businesses through shared links, browsing products, placing an order, and tracking orders directly from the storefront. That introduced new technical requirements around branded storefronts, SEO, server-rendered metadata, public checkout, pricing, and analytics. This article explores how I designed the storefront around wildcard subdomains, immutable shop identities, server-side shop resolution, and a scalable analytics pipeline. Table of Contents Giving the Storefront Its Own Identity Business Names, Reserved Names, and Subdomains Resolving a Storefront Active and Inactive Storefronts Location and Currency Product Pages and Share Previews Storefront Event Ingestion Processing Raw Events Counting Unique Visitors With HyperLogLog Domain Routing and Local DNS 1. Giving the Storefront Its Own Identity The original storefront was fairly simple. It was a React application that fetched a business and rendered its products. Beyond that, there wasn't much to it. There were no branded storefronts, analytics, subdomains, or even a separate identity beyond the business itself. Introducing those capabilities meant the storefront needed its own data model. I introduced a dedicated shop entity to represent the public storefront. The business remained the source of operational data such as cu

Rahman Nugar 2026-07-12 02:39 3 原文
AI 资讯 Dev.to

Designing an Async Image API Client That Does Not Lie About Completion

Image generation is where a seemingly simple API client starts to accumulate production bugs. A request may finish inline for one model, return a task for another, or take a longer path when the input includes edits and uploaded files. Treating every successful HTTP response as a completed image is the fastest way to ship broken retry logic and incorrect user-facing status. This post adapts the TokenLab article TokenLab Async Image Generation Tasks for Production Apps . The canonical article contains the full implementation discussion; this version focuses on the contract decisions that matter when building an integration. The response is a delivery decision, not just a payload An image endpoint can return either a completed representation or an asynchronous task. The client should inspect the response envelope and normalize the delivery mode before it touches application state: type Delivery = | { mode : " sync " ; terminal : true } | { mode : " async " ; task_id : string ; status : string ; terminal : false }; The important invariant is that mode and terminal state come from the API contract. Do not infer completion from a missing progress field, a truthy data property, or a fast response time. Progress is useful when present, but it is not the completion signal. Poll by task identity, not by the original request When the server returns an async task, persist the task ID and the provider-neutral status. A worker can then poll the task endpoint with bounded backoff: async function waitForTask ( id : string ) { for ( let attempt = 0 ; attempt < 60 ; attempt += 1 ) { const task = await getTaskStatus ( id ); if ( task . status === " succeeded " ) return task . result ; if ([ " failed " , " cancelled " , " expired " ]. includes ( task . status )) { throw new Error ( `Media task ${ id } ended as ${ task . status } ` ); } await sleep ( Math . min ( 1000 * 2 ** Math . min ( attempt , 5 ), 30 _000 )); } throw new Error ( `Media task ${ id } exceeded the polling budget` );

hedging8563 2026-07-12 02:35 6 原文
AI 资讯 Dev.to

I Built a Browser From Scratch, and It Finally Renders the World's First Website Like Chrome Does

A while back I set myself a slightly unhinged goal: build a web browser from scratch in Node.js and Electron no external HTML/CSS/layout libraries, everything hand-rolled. URL parser, TCP/TLS socket, HTTP pipeline, HTML tokenizer, DOM builder, CSS tokenizer, CSS parser, style matcher, layout engine, canvas renderer. All of it, from zero. so,I called it Courage Browser . This week, after dozens of daily sessions, I hit a milestone that felt disproportionately satisfying: Courage now renders info.cern.ch the very first website ever put on the internet almost pixel-for-pixel identical to real Chrome. It sounds small. It is not small. Getting there meant chasing down bugs across nearly every layer of the browser. Why info.cern.ch If you haven't seen it, info.cern.ch is CERN's preserved copy of Tim Berners-Lee's original website. It's about as simple as HTML gets — one heading, a paragraph, a bulleted list of links. No CSS file, no JavaScript, no styling of any kind beyond what a browser applies by default. Which is exactly why it's a great test case. If your browser can't get a page with zero author CSS to look right, it has no business trying to render anything more complex. Default styling headings being bold, links being blue and underlined, bullets showing up in the right place has to work before anything else does. The bugs I found by just... comparing screenshots I put a screenshot of Courage's render side-by-side with Chrome's and started listing differences. Two jumped out immediately: The <h1> wasn't bold in Courage, even though it clearly should be. The links had underlines but weren't blue , they were rendering in the default text color. Neither of these had anything to do with what I was originally working on that day (CSS attribute selectors, for an upcoming GitHub-rendering push). But they were visible, they were wrong, and they were small enough to fix in one sitting. So I did. Bug #1: styles computed before they were applied Courage has a defaultRules ar

Nitin Kumar Yadav 2026-07-12 02:35 3 原文
AI 资讯 Dev.to

Building an Instagram AutoDM System at Scale: Webhooks, Event Driven Architecture, and Lessons Learned

Instagram creators love engagement. Every comment is an opportunity to start a conversation, share a product, deliver a resource, or convert a viewer into a customer. The problem is that manually replying to hundreds or thousands of comments doesn't scale. At Vyral , we set out to build an Instagram AutoDM platform capable of serving thousands of creators while handling bursts of traffic generated by viral Reels. Instead of building a traditional chatbot, we designed an event driven system powered by Instagram webhooks, AWS services, and asynchronous processing. This article walks through the architecture, the engineering challenges we encountered, and the lessons we learned while designing a system that can process large spikes of comment events reliably. The Problem Imagine a creator with 2 million followers. A Reel starts trending. Within minutes: 10,000+ comments arrive Thousands of users comment the same keyword Instagram sends webhook events continuously Every eligible comment should trigger a personalized DM From an engineering perspective, this isn't a chatbot problem. It's an event processing problem. The system needs to answer questions like: Which comments qualify? Has this comment already been processed? What happens if Instagram sends the same webhook twice? What if the user deletes the comment? What if our service is temporarily unavailable? How do we avoid overwhelming downstream APIs? Those questions shaped the architecture far more than the messaging logic itself. Why We Chose Webhooks Instead of Polling Polling Instagram every few seconds would have introduced unnecessary latency and API usage for Vyral AutoDM . Instead, Instagram pushes events whenever something happens. The flow looks like this: Instagram │ ▼ Webhook Endpoint │ ▼ Event Validation │ ▼ Event Queue │ ▼ Workers │ ▼ Business Rules │ ▼ Send DM This architecture offers several benefits: Low latency Lower infrastructure cost Better scalability Natural decoupling between components Most i

Neeru Jaroliya 2026-07-12 02:31 3 原文
开发者 Dev.to

The Key That Unlocks Everything: Prototype Pollution in JavaScript

Imagine a hotel where every room key is cut from a master template. When a guest checks in, the front desk hands them a key that opens only their room. Simple enough. Now imagine a guest who, during check-in, sneaks a tiny modification into the key-cutting machine itself — changing the template so that every new key cut from that moment on also opens the manager's office, the safe, and the server room. The guest didn't break a lock. They didn't clone anyone's key. They changed the factory that makes all keys. That factory is JavaScript's Object.prototype . And the attack is called Prototype Pollution .

Khue Pham 2026-07-12 02:26 5 原文
AI 资讯 Dev.to

PassionQA: Turning My Passion for Software Quality into AI-Powered Test Intelligence

This is a submission for Weekend Challenge: Passion Edition What I Built As a QA engineer, I spend a lot of time reading requirements, questioning unclear business rules, and thinking about what could break before a feature reaches users. That part of quality engineering is something I genuinely enjoy, and it inspired me to build PassionQA . PassionQA is an AI-powered quality intelligence platform that turns product requirements into practical QA insights and executable test cases. The workflow is simple: Upload or paste a BRD (Excel or text) Run AI-assisted quality analysis Review the complete QA output in one dashboard: Requirement health and release readiness Missing rules and ambiguous requirements Positive, negative, boundary, security, and accessibility test cases Bug-risk insights and heatmap Requirements Traceability Matrix (RTM) Excel and PDF exports My goal was to reduce the repetitive part of requirement analysis so testers can spend more time thinking critically about product risk and quality. Demo Try it quickly Live app: https://passion-qa.vercel.app Click Explore Demo Preset to analyze the built-in insurance example. The application uses Gemini when available and automatically falls back to the local analysis engine if Gemini is unavailable. Or click Launch Platform (Free) , upload your own BRD, and select Run Quality Analysis . For my demo, I used an insurance Policy BRD. PassionQA analyzed the requirements, highlighted quality gaps, and generated executable positive, negative, boundary, security, and accessibility test scenarios across the policy workflow. Video Demo The demo shows the complete flow from Policy BRD upload to AI analysis, test-case generation, risk insights, RTM, and report export. Demo video: https://drive.google.com/file/d/1sAoOauTGCk66xAzY46zF8_lWBQbVM8Gr/view?usp=sharing Code GitHub repository: https://github.com/DhanashriQAEngineer/PassionQA/ Some of the key parts of the project are: src/lib/gemini.ts --- Gemini analysis and loc

Dhanashri Ugalmugale 2026-07-12 02:20 3 原文
开发者 HackerNews

Ask HN: Why isn't Google indexing information about the AT Protocol?

I've been observing this for a while, where very basic queries about atproto stuff doesn't show up. But yesterday I found a query that makes it VERY obvious: "list of public atproto relays". Here's DuckDuckGo: 1. https://firehose.directory 2. https://atproto.at/relays 3. https://atproto.wiki/en/wiki/reference/core-architecture/relay 4. https://pulsar.feeds.blue 5. https://leaflet.pub/12022731-ae4f-4a13-9f7a-5738b7a83c2e Of those results, Google only has 3, the only one on the list that... doesn'

iameli 2026-07-12 01:44 3 原文