Dev.to
I built a zero-dependency TypeScript env validator
Every Node.js developer has been burned by this at least once: const port = parseInt ( process . env . PORT ); // NaN if PORT is missing const db = process . env . DATABASE_URL ; // string | undefined — not safe! Your app starts fine locally, then crashes in production because someone forgot to set an env var. The error shows up 3 hours later, not at startup. The solution I built @harmand66/typesafe-env — a tiny, zero-dependency library that validates and types your environment variables at boot time. import { createEnv } from ' @harmand66/typesafe-env ' ; const env = createEnv ({ PORT : { type : ' number ' , default : 3000 }, DATABASE_URL : { type : ' string ' , required : true }, DEBUG : { type : ' boolean ' , default : false }, }); // ✅ TypeScript knows PORT is a number env . PORT + 1 // 3001 — not "30001" env . DATABASE_URL // string — guaranteed, never undefined If anything is missing or wrong, your app fails immediately at startup with a clear message: All errors at once — no more fixing them one by one. Why not Zod? Zod is great but it's 57kb and requires a lot of boilerplate for this specific use case. @harmand66/typesafe-env is zero dependencies and does one thing well. Try it npm install @harmand66/typesafe-env GitHub: https://github.com/giannielloemmanuele-lgtm/typesafe-env npm: https://www.npmjs.com/package/@harmand66/typesafe-env Would love any feedback or contributions! 🙏
giannielloemmanuele-lgtm
2026-06-29 17:38
👁 9
查看原文 →
Dev.to
Building AR Hide and Seek — Shipping a Solo Indie LiDAR Game to the App Store
The idea came from an extremely serious game of hide and seek with my cousins. We were adults, which made it ridiculous, but also strangely perfect. Someone was hiding behind a couch in plain sight, surviving only because the seeker did not look carefully enough. That made me wonder: what if looking carefully was not enough? What if the seeker could not freely look around the room? What if they could only see the world through their phone screen, while virtual obstacles blocked parts of their view? That became the core idea behind AR Hide and Seek: a local multiplayer hide and seek game where 2-5 players use the space they are already in. The hiders physically hide somewhere in the room, while the seeker views the environment through an iPhone. The phone fills the space with digital clutter, making familiar rooms harder to read. One phone. One seeker. Real hiding places. Virtual obstacles. Why LiDAR? LiDAR on iPhone Pro models gives the phone a real-time depth map of the environment, with centimeter-level understanding of the space around it. That means virtual objects can be placed in ways that respect real-world geometry: a crate can sit on the floor, a wall can align with an actual wall, and obstacles can feel like they belong in the room rather than floating on top of it. For a game where the virtual environment needs to feel like it genuinely fills the space, that difference matters immediately. Without reliable depth information, objects can drift, clip, or hover in ways that break the illusion. The tradeoff is device requirement. LiDAR is only available on iPhone Pro models, which narrows the audience. But for this game, the better AR experience was worth it. The seeker sees a version of the room cluttered with virtual obstacles. The hiders are still physically hiding behind real furniture; the phone does not make them disappear. It simply makes finding them harder. Designing the Core Loop The mechanic is simple on paper, but it took a surprising amount of tu
Mohamad Akkad
2026-06-29 17:36
👁 9
查看原文 →
Dev.to
How Factory Data Actually Gets from Machines and PLCs to the Cloud
Industry 4.0 data collection sounds simple until you look closely at the factory floor. In theory, the flow is clean: machine → gateway → cloud → dashboard In practice, it is usually less tidy. Factories may have PLCs, CNC machines, sensors, meters, inspection systems, production lines, and older equipment all working together. Some devices use Ethernet. Some still rely on serial interfaces. Some data is useful every second. Some data only matters when a machine changes state, crosses a threshold, or triggers an alarm. This is where an industrial edge gateway becomes useful. A gateway such as Robustel EG5120 can sit between factory equipment and upper-layer systems, helping collect selected machine or PLC data, handle it locally where needed, and forward useful information toward cloud or enterprise platforms. That does not mean the gateway replaces PLCs, SCADA, MES, or the cloud. It simply means factory data often needs a practical middle layer before it becomes useful somewhere else. Factory data is not one clean data stream One thing that gets underestimated in Industry 4.0 projects is how mixed the data sources can be. A PLC may provide equipment status, alarms, and process values. A CNC machine may expose cycle information or maintenance indicators. Sensors and meters may generate temperature, vibration, energy, or environmental data. Inspection systems may produce quality-related events or selected result data. A production line may generate throughput signals, downtime events, or operating states. These are all “factory data,” but they do not behave the same way. A machine fault may need quick attention. An energy reading may only need periodic reporting. A repeated sensor value may not need to be sent upstream every time. A quality inspection output may be useful as metadata, but not every raw file is practical to upload continuously.So the first question is not only: Can we connect this machine? A better question is: What data do we actually need, where sho
Jerry H.
2026-06-29 17:35
👁 10
查看原文 →
Dev.to
AI Search and SEO Are Not the Same Thing — Here's the Difference That Actually Matters
I used to think AI search readiness was just SEO with a new name. It's not. The more time I spend on this, the clearer the distinction becomes. The core difference Traditional SEO optimizes for ranking in a list of links. You want to be the #1 blue link on Google for "best project management software." The user clicks through to your page, you get the traffic, you monetize. AI search optimizes for being the source of an answer. When someone asks Perplexity or ChatGPT "what's the best project management software?", the AI reads multiple sources, synthesizes an answer, and cites the ones it used. The user may never click through. The fundamental units are different: SEO operates on pages and rankings AI search operates on facts, claims, and citations You can be #1 on Google for a keyword and never appear in a single AI-generated answer. And you can be cited in AI answers without ranking in the top 10 for anything. What still matters Some things carry over from SEO: Technical quality — Fast pages, HTTPS, crawlable content. AI crawlers care about this just like Googlebot. Clear content structure — Headings, lists, tables. Well-structured content is easier for AI models to parse. Internal linking — AI crawlers follow links like any other crawler. Good information architecture matters. Backlinks from authoritative sources — Being cited by Wikipedia, academic papers, and major publications signals trust to AI models just like it does to search engines. What matters for AI search that barely matters for SEO A few things that are critical for AI search but don't move the needle much for traditional rankings: LLMs.txt / LLMs-full.txt — These files don't affect your Google ranking at all. But they give AI models a clean, structured map of your site. I've seen sites with great LLMs.txt files get cited more consistently than sites with better backlink profiles but no AI-readable summary. Structured data for disambiguation — In SEO, schema markup helps with rich snippets. In AI s
JSON-LEE
2026-06-29 17:34
👁 9
查看原文 →
Dev.to
AI Crawlers Are Scanning Your Site Right Now - How to Check and Control Access
AI crawlers now appear in many server logs alongside traditional search bots. Some are used for search retrieval, some for training, and some for broader web indexing. If you care about AI search visibility, you need to know which ones can access your public pages. The most common accidental blocker is simple: a robots.txt rule or CDN bot setting that prevents AI crawlers from reaching the content you want discovered. The major AI crawler tokens to check Here are crawler tokens you may see in logs or robots.txt rules: Crawler token Company Notes GPTBot OpenAI Documented OpenAI crawler token OAI-SearchBot OpenAI Documented OpenAI search-related crawler token ChatGPT-User OpenAI Documented OpenAI user-triggered agent token ClaudeBot Anthropic Documented Anthropic crawler token Claude-SearchBot Anthropic Documented Anthropic search-related crawler token Google-Extended Google Google control token for Gemini Apps and Vertex AI use CCBot Common Crawl Web corpus crawler used by many downstream systems PerplexityBot Perplexity Commonly referenced Perplexity crawler token Crawler names and purposes change. Always confirm against official platform documentation before making sitewide access decisions. First, check what is actually happening Before you change anything, find out who is already crawling. If you have server logs: grep -E "GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-SearchBot|Google-Extended|CCBot|PerplexityBot" access.log If you use Cloudflare, check bot and security events and filter by user agent. Three quick diagnostic steps: Open https://yourdomain.com/robots.txt and look for broad Disallow: / rules. Confirm the sitemap is listed in robots.txt or discoverable at /sitemap.xml . Use our AEO Checker to validate robots.txt and flag restrictive AI crawler rules. The most common mistake The blunt rule that makes sites invisible to many crawlers: User-agent: * Disallow: / This blocks every well-behaved crawler that follows the wildcard rule. If you see it on
JSON-LEE
2026-06-29 17:33
👁 8
查看原文 →
Dev.to
Introducing UIAble — A Free, Open-Source UI Library
Today, we’re excited to launch UIAble v1.0, an open-source component library built for developers, by developers. We explored a lot of UI libraries built on Shadcn. Most of them feel nearly identical — same structure, same aesthetic, same tradeoffs. That’s what pushed us to build something different. Not another library that looks like Shadcn with a coat of paint, but a design system with its own identity and a clearer sense of what it’s actually for. Why UIAble exists After enough frontend projects, one thing becomes obvious: the same UI patterns get rebuilt again and again. Inputs. Dialogs. Tables. Alerts. Dropdowns. OTP fields. Form validation states. Not because they’re hard to build, but because most existing libraries never quite fit real project requirements. Some are too opinionated. Some pile on unnecessary abstraction. Some become rigid after initial setup. And some make simple UI unnecessarily complicated. That friction is what led to UIAble. Not to launch another oversized library, just to build a cleaner, more practical foundation for modern frontend development. What UIAble actually is UIAble is a free, open-source UI component library built with Tailwind CSS , Shadcn-style architecture , and Base UI principles . The idea is straightforward: reusable components should stay flexible, readable, and easy to maintain. Instead of pulling projects into a rigid ecosystem, UIAble gives you components you can copy directly into your codebase, edit freely, and scale without fighting the library. No lock-in. No unnecessary abstraction. No dependency trap. What makes it different in practice A few things actually matter here. You get the code. UIAble doesn’t hide logic behind layers of packaging. You see the component. You edit it. You ship it. That alone changes how teams work with UI. It’s built for real product UI, not showcase pages. A lot of UI kits look great in demos and fall apart in production. UIAble focuses on the unglamorous stuff, forms that don’t bre
Rakesh Nakrani
2026-06-29 17:33
👁 8
查看原文 →
Dev.to
OpenAI is investigating issues with Codex usage limits
OpenAI is investigating issues with Codex usage limits Tibo wrote that the Codex team spent Sunday in a war room, digging through logs and looking for anything that could have caused faster usage drain for some users. As the investigation continues, OpenAI has issued a full reset of Codex usage limits for everyone. The funny part: this week at OpenAI is called RESET week. In US corporate culture, that usually means a lighter week to slow down, clear the calendar a bit, and recharge.
alex getman
2026-06-29 17:32
👁 7
查看原文 →
HackerNews
Anthropic CEO: Open-Source AI is getting dangerous (2023)
therein
2026-06-29 17:11
👁 4
查看原文 →
Wired
Truckloads of Tesla Batteries Keep Getting Stolen Before They Even Leave the Factory
Nine major suspected cargo thefts happened at Tesla’s Nevada battery factory in January alone, according to sheriff’s records obtained by WIRED.
Paresh Dave
2026-06-29 17:00
👁 11
查看原文 →
Dev.to
Two-day hackathon kicks off AI Engineer World’s Fair
While the World’s Fair officially kicks off today a bunch of keen developers were in early, taking...
Iain Thomson
2026-06-29 16:06
👁 10
查看原文 →
Dev.to
For AI coding, the kids are alright
The AI Engineer World's Fair has attracted a lot of adults, and they brought their kids too, for...
Iain Thomson
2026-06-29 16:06
👁 10
查看原文 →
Dev.to
Pragmatism in an Age of Infinite Code and Unavoidable Bottlenecks
Leading into the AI Engineer event in San Francisco, I’m looking forward to having my mind blown....
Ben Halpern
2026-06-29 16:05
👁 9
查看原文 →
Dev.to
What to Expect at the AI Engineer World’s Fair 2026
The AI Engineer World’s Fair returns to Moscone West in San Francisco from June 28 through July 2,...
Rachael Berkey
2026-06-29 16:05
👁 8
查看原文 →
Dev.to
The AI Engineer World’s Fair Spreads Globally
It has been less than three years since Shawn "swyx" Wang coined the term AI engineer in an open...
Iain Thomson
2026-06-29 16:05
👁 9
查看原文 →
InfoQ
AI Tools Accelerates Coding, but Not Overall Software Delivery, GitLab Research Finds
GitLab's 2026 AI Accountability Report highlights an AI Paradox: although 78% of developers say they code faster, overall software delivery has not accelerated due to downstream testing and review bottlenecks and new challenges for enterprise governance and traceability. By Sergio De Simone
Sergio De Simone
2026-06-29 16:00
👁 10
查看原文 →
Wired
This Humanoid Robot Is a Terrifyingly Competent Office Intern
Flexion Robotics, a startup founded by ex-Nvidia engineers, has a clever way of training robots to do useful work.
Will Knight
2026-06-29 16:00
👁 8
查看原文 →
HackerNews
US Grid Constraints: Towards 40GW+ of Behind-the-Meter Datacenter by 2028?
felixdoerp
2026-06-29 15:36
👁 4
查看原文 →
Dev.to
My commit message said "You've hit your session limit"
How I ended up running a local LLM to generate my git commit messages
Shyamala
2026-06-29 15:15
👁 8
查看原文 →
OpenAI Blog
Mapping Europe’s AI Workforce Opportunity
A new OpenAI report maps how AI could reshape jobs across the EU, highlighting which occupations may face automation, growth, or workflow changes.
2026-06-29 15:00
👁 7
查看原文 →
Dev.to
Agent-Ready Commerce, Part 5: Keeping ACP, MCP, and AP2 Adapters Thin
Protocol adapters are one of the easiest places for agent-commerce architecture to drift. An adapter begins with the narrow responsibility of translating an external protocol request into something the commerce platform understands. For example, an MCP-style tool may ask for return terms, an ACP-style interaction may ask whether checkout can be prepared, an AP2-related flow may carry payment authority information, and an internal feed may publish product capabilities. Those are adapter concerns at the boundary. The problem starts when the adapter does more than translate. It checks product availability from catalog fields. It interprets policy text. It decides whether checkout is ready. It treats a payment artifact as authority. It turns a domain blocker into a softer protocol response. Each shortcut may solve an integration problem locally, but it also creates a second place where commercial meaning is decided. When several adapters exist, those local decisions begin to diverge. The MCP tool may block return-policy quotation, the ACP adapter may expose the product as purchasable, the feed may publish it as checkout-ready, and the AP2-related flow may reject delegated payment. At that point, the platform does not only have multiple integrations. It has multiple interpretations of the same commercial state. This is the adapter problem in agent-ready commerce: semantic drift at the protocol boundary. The adapter should know how to speak the protocol. It should not decide product truth, policy meaning, eligibility, checkout validity, or payment authority. Those decisions belong inside the commerce platform, where they can be shared, tested, evidenced, and audited. This is the fifth article in the Agent-Ready Commerce series. Part 1 introduced the broader architecture model: Facts → Eligibility → Authority → State transition → Evidence → Audit Part 2 focused on commercial truth. It argued that catalog data is not enough. A platform needs source-backed, freshness-aware p
Dimitrios S. Sfyris
2026-06-29 14:58
👁 9
查看原文 →