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

标签:#web

找到 1681 篇相关文章

AI 资讯

Htmx fragment caching with Accept-Version

IF YOU'VE been developing htmx apps for a while, you might have tried to cache the HTML fragments generated by your server as htmx responses. Caching htmx fragments is the equivalent of caching JSON responses in a SPA. Eg, you might have a fragment response from GET /users/:id that renders a user detail view. You might want to cache this view to avoid expensive queries in the backend if you know the user details haven't changed. But when you start caching htmx fragments, a problem pops up: the style doesn't match the rest of your app. You might be rapidly iterating on the app and making adjustments (small or big) to its CSS. You quickly start to notice that annoyingly frequently, your user fragments are not updating to the latest style. Sure, you can do a hard reload and force the fragment to have the latest style. But surely there must be an easier way? Content negotiation Enter the version headers: Accept-Version : a request header set by your frontend to instruct the backend what version of a resource it wants Version : a response header set by your backend to inform the frontend what version of the resource it is serving. Basically, the backend and frontend have to agree on the version, otherwise they automatically do a hard reload. You can think of this as a lightweight form of content negotiation. Here's a pseudo-code for a backend middleware that shows the rules: if Accept-Version header not in request then continue with request pipeline else if Accept-Version header value = the expected version then continue with request pipeline else if request method is GET then respond with 200 OK empty body and a response header HX-Redirect: request target else continue with request pipeline finally add response header Version: expected version end The meat of this middleware is the redirect if the expected and actual versions don't match. This ensures that the response htmx fragment style can't drift out of sync with the rest of the app. Now, let's look at some of the d

2026-06-30 原文 →
AI 资讯

Dev Log: 2026-06-28

TL;DR Centred a sidebar brand mark in the collapsed rail (open-source starter kit) — pure CSS, no JS. A CRM app got a "daily cockpit" dashboard (hot leads + overdue follow-ups) plus a full favicon/PWA icon set. An analytics product's ingest pipeline learned to handle messy uploads — files with no date column and no numeric measure — and a nasty metrics bug got squashed. A spread day across three repos. Quick tour. Centring a collapsed sidebar logo (CSS only) Kickoff , my open-source Laravel starter kit, had a small visual snag: when the sidebar collapses to a narrow rail, the header switches to a column — but the brand mark sat off-centre. The content area is ~72px, yet the logo kept its width and a leftover space-x margin, nudging it left of the nav icons. No JavaScript needed. Make the logo and toggle full-width, centre their content, and zero the leftover child margins when collapsed: [ data-flux-sidebar ][ data-collapsed ] .sidebar-header .app-logo { width : 100% ; justify-content : center ; padding-inline : 0 ; } /* kill the leftover space-x margin pushing it off-centre */ [ data-flux-sidebar ][ data-collapsed ] .sidebar-header .app-logo > * { margin : 0 ; } Lesson: when a flex container changes direction, old horizontal margins don't disappear — they just push things in the new axis. Tag the element, scope the override to the collapsed state, done. A CRM "daily cockpit" A CRM app I work on got a dashboard rebuild: instead of a generic landing screen, the first thing you see is what needs action today — hot leads and overdue follow-ups. The cockpit framing matters more than the widgets: surface the work, don't make people hunt for it. Also shipped a full favicon/PWA icon set and a branded responsive landing page, with feature tests so the brand pass didn't quietly break routing. Ingest that survives real-world files The bigger chunk of the day went into an analytics/dashboard product's ingest pipeline. Real uploads are messy, so the pipeline now copes with the

2026-06-30 原文 →
AI 资讯

Why AI Makes Judgment More Valuable For Freelancers In 2026

AI makes it easier to build the wrong thing with confidence. That is the part I think a lot of beginner builders and freelancers miss. The obvious story is that AI makes execution faster. That is true. I can ask an AI coding tool to explain an error, compare implementation options, inspect a project, write code, refactor a screen, generate a QA checklist, or help me pick up where I left off. That is a huge change. But speed is not the whole story. When the tool gets faster, your judgment becomes more important, not less. You have to decide what the project is allowed to become. You have to decide which tradeoffs are acceptable. You have to decide whether the output actually matches the user's job. You have to decide when the AI is solving the real problem and when it is decorating the wrong one. In my freelance work, AI changed the job from searching and stitching to directing, reviewing, and verifying. That sounds cleaner than it feels. Directing means you need to know what outcome you want. Reviewing means you need to notice when the answer is plausible but wrong. Verifying means you cannot treat a green checkmark, a pretty screen, or a confident explanation as proof that the app actually works. The beginner mistake is believing AI removes the need to think clearly. The better rule is this: AI removes some friction from execution, then hands you more responsibility for scope. The Faster Tool Still Needs A Smaller Job When I started using AI heavily for software work, the old research loop changed immediately. Before modern AI tools, a lot of software work meant digging through documentation, old forum posts, Stack Overflow answers, YouTube videos, outdated examples, and half-related blog posts until something clicked. You stitched pieces together and hoped the tutorial you found still matched the version of the framework you were using. Now you can ask the tool directly. That is better. It is also dangerous if you confuse a fast answer with a good product decision

2026-06-30 原文 →
AI 资讯

Enhance your CSS Reset with your Design System

If you're starting a web project, you're probably starting with a CSS reset, and for most of us, that means reaching for a trusted community solution - dropping it in and moving on. If you're building a design system, though, that habit may be working against you. The existing solutions The community reset ecosystem is genuinely good. Each tool approaches the browser compatibility problem from a slightly different angle. Some examples include: Eric Meyer's Reset is a classic: it zeros out margins, padding, and font sizes across every element, giving you a completely blank slate. It's minimal and predictable, which made it influential. Normalize.css smooths over inconsistencies while preserving the ones that are actually useful. sanitize.css and modern-normalize continue that evolution - incorporating contemporary best practices like box-sizing: border-box , improved form element handling, and accessibility-aware defaults. The problem isn't that any of these are bad. The problem is that they're all deliberately, necessarily generic. They can't know anything about your typeface, your color palette, your spacing scale, or how your interactive elements should behave. That's by design - they're tools for everyone, which means they're perfectly tailored for no one. The problem If you're building a design system, generic is exactly what you don't want your reset to be. The moment you drop in one of these resets and start building, you find yourself doing a second round of work. You apply your typeface to body . You reset margins on headings. You make form elements inherit fonts. You define focus styles. You're re-resetting - applying your design language on top of a layer that just cleared out the browser's defaults and replaced them with... more defaults you'll override. Worse, that duplication doesn't stay in one place. Every component you build either re-declares these foundational styles or silently assumes they're already set upstream. You end up with either redundanc

2026-06-30 原文 →
AI 资讯

How a 24-Hour Freelance Project Landed Me a Job (Without an Interview)

Most developers expect to go through multiple interview rounds, coding assessments, or take-home assignments before getting hired. That wasn't my experience. I ended up working with the YouTuber I had admired for years without an interview, without an exam, and without even sending a resume. Here's how it happened. It Started Long Before the Opportunity I started freelancing when I was in Class 9. At first, it wasn't about building a career. I simply enjoyed creating websites and wanted to gain experience while earning some money. Over the years, I worked with different clients, solved different problems, and learned something from every project. Those freelance gigs taught me much more than writing code—they taught me how to communicate with clients, deliver on time, and take ownership of my work. The Opportunity A few months ago, one of my favorite YouTubers posted in his WhatsApp community that he was looking for someone to build a website. I happened to be a member of that group. As soon as I saw the message, I reached out and told him I could build it. Instead of spending time wondering whether I was "good enough," I decided to let my work answer that question. Building It in Under 24 Hours Once I received the project, I focused entirely on delivering it as quickly as possible without compromising quality. I completed the website in less than 24 hours. After reviewing it, he requested a few modifications. I implemented them immediately and delivered the updated version. At that point, I assumed the project was finished. The Unexpected Offer A few days later, he contacted me again. He had another web application that had been stuck because a previous developer couldn't complete it. He asked if I could take over. That conversation eventually turned into a job offer. No coding interview. No aptitude test. No technical assessment. Just trust built through delivering one project well. What I Learned Looking back, I don't think I got the job because I replied quickly

2026-06-29 原文 →
AI 资讯

Every Sanity page builder has the same bug

Every Sanity marketing site ends up with a page builder. An array of sections, an insert menu, a render loop that maps block._type to a component. You've built it. I've built it. We've all built the same thing. And every one of them ships with the same bug. You add a new section. You wire it into the schema. You add a renderer. You add a component. You add the type. And then — because there are five places to touch and you're a human — you forget one. The section renders blank in production. Or it never shows up in the insert menu. Or it fetches no fields because you missed the GROQ projection, so it renders as nothing at all. No error. No red. Just a hole on the page where a section should be. The annoying part isn't the bug. It's that you'll hit it again on the next project, in exactly the same way, because you rewrote the whole thing from scratch — again. The section tax Here's what "add a section" actually costs in a typical Sanity + Next.js page builder: Schema — a new *Section object type, registered in your schema index. GROQ — a new conditional in the page-builder projection so the block's fields actually come down. Component — the React component that renders it. Renderer map — an entry mapping _type → component. Types — the block variant in whatever union your frontend renders. Miss #2 and the block arrives empty. Miss #4 and it silently skips. Miss #5 and TypeScript shrugs because your union is hand-maintained and now lies. Three different failure modes, all of them quiet, all of them "works on my machine until it doesn't." Now look at those five places and ask: which of them is actually unique to your site? The component is. It's welded to your design system — your spacing, your tokens, your brand. Nobody can reuse it and nobody should. The other four are plumbing . "Look up _type in a map, call the renderer, keep the map in sync with the schema and the query." That code is byte-for-byte the same idea on every project you've ever built. So why is it livi

2026-06-29 原文 →
AI 资讯

Semantic HTML and Accessibility: Building Better Websites

Semantic HTML and Accessibility: Building Better Websites Introduction Semantic HTML is the practice of using HTML elements that clearly describe the purpose of the content on a webpage. Instead of using many <div> elements, semantic tags such as <header> , <nav> , <main> , <section> , <article> , and <footer> make the page easier to understand. Semantic HTML is important because it improves accessibility, helps search engines understand web pages, and makes code easier to read and maintain. Before: Non-Semantic HTML <div class= "header" > <h1> My Portfolio </h1> </div> <div class= "navigation" > <a href= "index.html" > Home </a> <a href= "about.html" > About </a> </div> <div class= "content" > <p> Welcome to my portfolio website. </p> </div> After: Semantic HTML <header> <h1> My Portfolio </h1> </header> <nav> <a href= "index.html" > Home </a> <a href= "about.html" > About </a> </nav> <main> <section> <p> Welcome to my portfolio website. </p> </section> </main> Accessibility Issues I Found 1. Images Missing Alternative Text Before: <img src= "images/profile.jpg" > After: <img src= "images/profile.jpg" alt= "Profile picture of Grace Loko" > Adding alternative text allows screen readers to describe images to users with visual impairments. 2. Navigation Was Not Semantic Before: <div> <a href= "index.html" > Home </a> <a href= "about.html" > About </a> </div> After: <nav> <a href= "index.html" > Home </a> <a href= "about.html" > About </a> </nav> Using the <nav> element helps assistive technologies identify the website navigation. 3. Form Inputs Had No Labels Before: <input type= "text" placeholder= "Your Name" > After: <label for= "name" > Name </label> <input type= "text" id= "name" name= "name" > Labels improve accessibility by helping screen readers identify each form field. Conclusion This accessibility audit helped me understand the importance of semantic HTML and accessible web design. By replacing non-semantic elements with semantic tags, adding image alt text,

2026-06-29 原文 →
AI 资讯

🚀 SoloEngine v0.3.0 Release — Checkpoint Mechanism & Message Queue

[v0.3.0] - 2026-06-29 🚀 Added Checkpoint Mechanism — ReActCore introduces three checkpoints during streaming: content_ended (after text content), before_tool_calls (before tool calls), and after_tool_calls (after tool calls), enabling precise interception and state synchronization of the execution flow. Message Queue System — Added a new MessageQueue class in run.py , supporting async enqueue, drain, and remove operations. Users can now queue messages while the LLM is running; queued messages are sent automatically after the current task completes. The frontend introduces a QueueBar component to display queued messages, with CSS spinning animation, single-line ellipsis, and hover-to-delete functionality. Queue Message Merging — MessageQueue.drain_all() now merges consecutive messages with the same name into a single message, preventing fragmented user input when multiple queue entries share the same sender. Queue WebSocket Events — The execution event protocol introduces three new event types: message_queued , queue_drained , and queue_returned ( useRunWebSocket.ts ). The frontend processes queue state updates in real time. Stop & Queue Integration — When the user clicks Stop, pending queued messages are returned to the input box via queue_returned . Checkpoint stops cleanly clear the queue and automatically start the next message. System Notification Messages — Introduced the SystemMessage type (with notification role) to separate error messages from assistant content. Errors are now rendered as independent notification bubbles, no longer embedded within assistant message cards. tiktoken Real-Time Token Estimation — ReActCore initializes a tiktoken encoder on startup for real-time token counting during streaming. Unknown models fall back to o200k_base . 🔧 Improved Custom Model Name Auto-Complete — The model name field in ModelManager has been upgraded from Select to AutoComplete , allowing users to type custom model names not in the predefined list. Message Block T

2026-06-29 原文 →
AI 资讯

Building a Legal AI Platform on Aurora DSQL and Vercel

I built this project as an entry for the H0: Hack the Zero Stack with Vercel v0 and AWS Databases Hackathon. #H0Hackathon Inspiration Justice moves slowly. I learned that firsthand as my family navigated a legal dispute. What struck me wasn't just the stress — it was that things were quite disorganised. Documents were paper-based or buried somewhere in emails. Updates came through WhatsApp messages. Simple documents took a really long time to draft and send. The system was fragmented and difficult to navigate. Companies like Harvey tackle document drafting well, but legal research tools and LLM wrappers can hallucinate case law, citing judgments that don't exist. I knew that if I was going to build something for this space, it had to be grounded in real, verifiable law. That led me to Laws Africa, which provides structured access to actual South African legislation and court judgments. I also noticed a problem that lawyers experience daily: the mechanical work. Logging into court portals to file a case. Hunting through OneDrive, Google Drive, and Dropbox for the right version of a document. Sifting through hundreds of emails to find something relevant to a matter. Onboarding a new client when the intake form is a PDF someone emails you. These are not AI problems. They are automation problems — and lawyers or their secretaries are doing them manually every single day. That became Agently. What Agently Does Agently is a legal workspace that handles the full lifecycle of a matter, from the moment a client submits an intake form to the day the case closes. Matter Management. Every client engagement lives in a structured matter. Documents, emails, notes, contacts, workflows, and AI conversations are all scoped to it. A lawyer can open a matter and immediately see everything relevant. AI Agent with Real Legal Research. The AI connects to Laws Africa's knowledge bases — South African legislation, court judgments, and municipal law — so research is grounded in actual legal

2026-06-29 原文 →
AI 资讯

Why I Built a JSON Toolkit That Never Touches a Server

Most of the time, when I need to inspect a complex JSON payload, I copy the raw string from my terminal or network tab, open a browser tab, and paste it into one of the many "JSON Formatter" sites that clutter the first page of Google. It’s a ritual we all do. We paste, we click "Format," and we wait. For small payloads, this is fine. But when you are debugging a massive API response, a deeply nested configuration file, or a large dataset, that ritual breaks down. The browser freezes. The site asks you to upload a file. Worse, many of these tools send your data to a server for processing. If that JSON contains API keys, user PII, or internal schema definitions, you are essentially trusting a third-party service with your proprietary data every time you hit "pretty print." I got tired of the latency and the privacy overhead. So I built JSONForge . The core premise is simple: do everything locally. No server-side processing. No file uploads. No network requests for the core logic. Everything happens in your browser, powered by WebGPU for heavy lifting and a small model that runs in your browser for schema inference. The WebGPU Advantage JSON parsing is computationally cheap for a modern CPU, but rendering and diffing large structures is not. When you have a 5MB JSON file, the DOM manipulation required to display it as a tree view can cause significant jank. By offloading the parsing and formatting logic to the GPU via WebGPU, JSONForge handles massive payloads without blocking the main thread. You can open a file, click "Pretty Print," and see the result instantly, even if the file is hundreds of kilobytes or larger. The UI remains responsive because the heavy computation is parallelized on the graphics card. This also means the tool works offline. If you are on a plane, or your internet drops in the middle of a debugging session, your toolkit doesn’t vanish. You can continue to diff, validate, and format without interruption. Schema Generation Without the Server Roun

2026-06-29 原文 →
AI 资讯

How to Turn Any Bootcamp Into Real Learning

We’ve all been there. You scroll through your feeds, see a flashy ad promising a high-paying tech job in 3 months, and think, “This is it. This is my golden ticket.” You buy the bootcamp, spend sleepless nights watching lectures, stack up a dozen colorful certificates on your LinkedIn, and then... nothing. No callbacks. No interviews. Just a lingering feeling of frustration and the nagging thought: Are bootcamps and online courses just a massive scam? I used to think so. When I was trying to break into tech, I bought courses like crazy. I collected certificates like they were Pokémon cards. Yet, my first real developer job didn't show up until five or six years later. And let me tell you a secret: it wasn’t the certificates that got me the job. It was because I finally figured out how to actually learn. The truth is, almost every bootcamp or course—even the mediocre ones—has something valuable to offer. The problem isn’t always the material; it’s how we interact with it. If you feel stuck in "tutorial hell," here is a positive, practical guide to changing your approach, reclaiming your time, and turning any learning material into real, career-changing expertise. 1. Curate Your Sources (Choose Your Battles Wisely) Before we talk about how to study, we need to talk about what to study. Even though you can extract value from almost any course, your time is highly valuable. Don't waste it on low-quality content. When choosing a course or bootcamp, look for these four green flags: The Instructor Has Real-World Mileage: Is the instructor a practitioner, or are they just reading the official documentation back to you? If they don't work with the technology daily, they won’t be able to explain the nuances, edge cases, and real-world trade-offs. A Project-First Curriculum: Avoid courses that are just endless lectures of "theory first, practice never." Look for curriculums that build actual applications. Good Pacing and Editing: We've all watched those tutorials where the ins

2026-06-29 原文 →
AI 资讯

How to Turn Any Bootcamp Into Real Learning

We’ve all been there. You scroll through your feeds, see a flashy ad promising a high-paying tech job in 3 months, and think, “This is it. This is my golden ticket.” You buy the bootcamp, spend sleepless nights watching lectures, stack up a dozen colorful certificates on your LinkedIn, and then... nothing. No callbacks. No interviews. Just a lingering feeling of frustration and the nagging thought: Are bootcamps and online courses just a massive scam? I used to think so. When I was trying to break into tech, I bought courses like crazy. I collected certificates like they were Pokémon cards. Yet, my first real developer job didn't show up until five or six years later. And let me tell you a secret: it wasn’t the certificates that got me the job. It was because I finally figured out how to actually learn. The truth is, almost every bootcamp or course—even the mediocre ones—has something valuable to offer. The problem isn’t always the material; it’s how we interact with it. If you feel stuck in "tutorial hell," here is a positive, practical guide to changing your approach, reclaiming your time, and turning any learning material into real, career-changing expertise. 1. Curate Your Sources (Choose Your Battles Wisely) Before we talk about how to study, we need to talk about what to study. Even though you can extract value from almost any course, your time is highly valuable. Don't waste it on low-quality content. When choosing a course or bootcamp, look for these four green flags: The Instructor Has Real-World Mileage: Is the instructor a practitioner, or are they just reading the official documentation back to you? If they don't work with the technology daily, they won’t be able to explain the nuances, edge cases, and real-world trade-offs. A Project-First Curriculum: Avoid courses that are just endless lectures of "theory first, practice never." Look for curriculums that build actual applications. Good Pacing and Editing: We've all watched those tutorials where the ins

2026-06-29 原文 →
AI 资讯

Contact Form 7 sent the email — but did it arrive? You have no way to know

Contact Form 7 runs on millions of sites for a good reason: it's free, light, and gets out of your way. I shipped it on client sites for years. The problem isn't that CF7 is bad — it's that it answers exactly one question ("did the form submit?") and stays completely silent on the one that actually matters in production: did the notification arrive? Here's the call every developer who maintains WP sites has taken at least once: "I filled in your contact form last week and never heard back." You check. The form is fine. JavaScript fires, the success message shows, no console errors. CF7 did its job — it handed the message to wp_mail() and forgot it ever existed. There's no record the submission happened, and no log of whether the email was delivered, bounced, or quietly dropped by the host's unauthenticated sendmail. The lead is just gone, and you have nothing to debug with. The three gaps that bite in production No submissions database. CF7 sends an email and discards the data. If the email fails or lands in spam, the submission never existed. (Flamingo helps, but it's a bolt-on — separate screen, no filtering or export out of the box, not tied to your form config.) No delivery log. You can't tell whether mail was sent, rejected, or bounced. "I never got it" has no audit trail to check against. No native block. CF7 is still a shortcode — [contact-form-7 id="123"] . You can't drop it into a block template, control its layout with block spacing, or edit it inline in Gutenberg. You paste a shortcode and hope. None of these are dealbreakers for a throwaway contact form. All three are dealbreakers when a missed submission is a missed sale. Migrating without rebuilding by hand The reason most people put off switching isn't the feature gap — it's the thought of rebuilding every form field by field. That's the part I wanted to skip. The migration path I use reads CF7's stored form definitions directly and recreates them as native forms. What comes across automatically: All

2026-06-29 原文 →
AI 资讯

WCAG 2.2 AA Audit Readiness for Product and Engineering Teams

An accessibility audit is not only a compliance activity. For engineering teams, it is also a quality review of how real users interact with the product. If you are preparing for a WCAG 2.2 AA audit, the biggest mistake is waiting for the auditor to tell you what information is missing. You can make the process much smoother by preparing the right workflows, accounts, test data, and remediation owners upfront. Scope the product by user flow Do not start with only a list of URLs. URLs matter, but accessibility bugs often appear inside stateful interactions: Form validation Custom dropdowns Modal dialogs Keyboard focus management Error recovery Dynamic tables Authenticated dashboards Document downloads Instead of asking, "Which pages should we test?" ask: What tasks must users be able to complete? That usually gives you a better audit scope. Prepare accounts and stable data If a workflow requires authentication, roles, or sample records, prepare them before the audit starts. Useful prep includes: Admin, standard user, and limited-role accounts Stable sample records Forms with prefilled data where needed Test payment or transaction flows if applicable Known feature flags Environment notes This avoids spending audit time debugging access problems. Confirm the standards WCAG 2.2 AA may be the target, but the report may also need to reference WCAG 2.1 AA, Section 508, EN 301 549, GIGW, or IS 17802. Engineering teams should know this early because it affects reporting language and remediation priority. Make evidence developer-friendly A useful issue should be reproducible. Good audit findings usually include: Affected URL or screen Component or selector Steps to reproduce User impact WCAG success criterion Expected behavior Screenshot or notes This helps teams move from report to ticket without guessing. Plan remediation ownership Accessibility issues do not always map cleanly to one discipline. Examples: Missing form label: engineering Confusing error copy: content and pr

2026-06-29 原文 →
AI 资讯

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! 🙏

2026-06-29 原文 →
AI 资讯

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

2026-06-29 原文 →
AI 资讯

Building a Real-Time AI Voice Agent with OpenAI Realtime API and Next.js

Voice interfaces are rapidly becoming the next major interaction layer after mobile and web UI. Instead of clicking, users will increasingly talk to systems that understand intent, context, and can execute actions in real time. In this article, we’ll build a production-grade architecture for a real-time AI voice system using modern web technologies such as Next.js, WebRTC, and OpenAI’s streaming capabilities. We’ll also explore how this architecture powers modern conversational systems like an AI Voice Agent platform, where AI can handle real-time interactions for business use cases like bookings, support, and sales automation. 1. Why Voice AI is the Next Interface Shift Text-based chatbots solved the first wave of automation. But voice introduces: Faster interaction (no typing) Higher emotional expressiveness Better accessibility Natural multitasking Businesses are now adopting systems like Voice AI for Business to replace traditional call centers and static IVR menus. The key challenge is not just speech-to-text, but building a low-latency conversational loop that feels human. 2. System Architecture Overview A production-ready AI voice system typically consists of: Frontend (Next.js) Audio capture via Web Audio API Streaming audio chunks UI for conversation state Backend (Node.js / Edge Functions) Session management Authentication Tool execution layer AI Layer OpenAI Realtime API (streaming) Function calling Context memory Audio Pipeline Speech-to-text streaming Text-to-speech streaming Optional noise cancellation 3. Core Concept: Real-Time Streaming Loop The core of a voice agent is a continuous loop: User speaks Audio is streamed to server Model transcribes in real time Model generates response token-by-token Response is converted to audio instantly Audio is played back with minimal delay The goal is to keep latency under ~800ms for a natural experience. 4. Building the Frontend (Next.js + Web Audio API) We start by capturing microphone input: const stream = awa

2026-06-29 原文 →