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

今日精选

HOT

最新资讯

共 36732 篇
第 1675/1837 页
AI 资讯 Dev.to

Building KindaSeen with FastAPI, Next.js, and PostgreSQL

“Did We Already Watch This?” — Building KindaSeen with FastAPI and Next.js A few months ago, my friends and I kept running into the same question whenever we talked about movies, dramas, anime, or variety shows: “Did we already watch this before?” Sometimes we remembered the title but forgot whether we had finished it. Other times, we completely forgot we had already seen it at all. That simple problem inspired me to build KindaSeen, a full-stack personal media repository designed to help users track and organize the media they’ve consumed in one centralized platform. The goal of the project was not only to create a useful application, but also to gain hands-on experience building a real-world full-stack system with modern web technologies. What KindaSeen Currently Supports User authentication with Supabase CRUD operations for personal media records TMDB-powered search functionality Watchlist system Favorites system Persistent PostgreSQL storage Dockerized backend deployment Separate frontend/backend deployment workflow Tech Stack Frontend Next.js React Tailwind CSS Shadcn/ui Vercel deployment Backend FastAPI PostgreSQL Docker Render deployment External Services Supabase Authentication TMDB API integration One of the main goals of this project was to simulate a more realistic production workflow by using a decoupled frontend/backend architecture instead of building everything inside a single monolithic application. In this article, I’ll share: Why I chose this architecture How I integrated TMDB into the application Challenges I faced during deployment What I Learned From Building KindaSeen Why I Chose This Architecture Instead of building a monolith using Next.js API routes, I decided to decouple the application into a Next.js frontend and a FastAPI backend. This decision was driven by three main factors: AI Compatibility & Future Proofing : While researching the job market, I noticed that most companies building AI products heavily rely on Python. By choosing FastA

Sheng-Lin Yang 2026-06-02 14:26 11 原文
AI 资讯 Dev.to

Cursor vs Offset Pagination: A Frontend Engineer's Perspective in 2026

We talk about pagination as if it's purely a backend concern – the database does the heavy lifting, the API returns pages, and the frontend just renders them. But in 2026, that mental model is outdated. The frontend now owns more of the data-fetching lifecycle than ever: server components prefetch, client caches hydrate, optimistic updates mutate, and streaming responses trickle in chunk by chunk. The choice between cursor pagination and offset pagination has real consequences for how you write your React components, how your cache behaves, how scroll feels on the phone, and what happens when a user navigates back. This post is about those tradeoffs – from the frontend seat. The Landscape Has Changed A few things are different in 2026 that make this conversation more nuanced than it was three or four years ago: React Server Components are mainstream. Data fetching happens on the server in many apps, which shifts where pagination state lives and how navigation works. TanStack Query is the de-facto standard for client-side async state, with first-class infinite query support baked in. The "infinite scroll vs pagination" debate is mostly settled — infinite scroll wins for feeds and content-heavy apps; numbered pages win for dense data tables. Your pagination strategy should serve that decision, not fight it. LLM-powered search and filtering are becoming common, and those use cases have their own quirks around pagination stability. Edge caching and CDN-level pagination mean that certain offset-paginated responses can be cached by URL – a genuine advantage offset still holds. What Frontend Engineers Actually Care About When you strip away the SQL theory, here's what the pagination choice actually affects on the frontend: 1. Cache Key Design With offset pagination, the cache key is simple and predictable: posts?page=3&limit=20 . Every page is independently cacheable by URL — your CDN loves this. TanStack Query, SWR, and Apollo all handle this naturally. // Offset — clean,

Abdul Halim 2026-06-02 14:21 8 原文
AI 资讯 Dev.to

Running Claude in CI: A GitHub Actions + Claude Code SDK Auto-PR-Reviewer That Costs $0.03 per Review

⚠️ この記事はアフィリエイト広告(プロモーション)を含みます。リンク先で発生した収益の一部が運営者に支払われますが、読者の購入価格には一切影響ありません。 By the end of this article you will have a GitHub Actions workflow that, on every pull_request , runs the Claude Code SDK headlessly, reads only the diff, and posts inline review comments via the GitHub API. I'll show the exact YAML and Python that run in my own repos, the token math that keeps each review at roughly $0.03, and the three failures that cost me a weekend before it worked. Why I stopped piping the full repo into Claude on GitHub Actions My first version did the obvious thing: clone the repo, concatenate every changed file in full, and ask Claude to "review this PR." It worked on toy PRs and exploded on real ones. A 9-file refactor sent ~48,000 input tokens and the review drifted into commentary about code the PR didn't touch. The fix that changed the economics: feed Claude the unified diff with 3 lines of context , not the files. A git diff against the merge base is typically 5–15x smaller than the files it touches. On claude-haiku-4-5 , a median PR in my projects now costs about $0.028 per review (measured across 60 PRs: 4,100 input tokens + 900 output tokens average). The expensive version was hitting $0.40+ on Sonnet because file context dominated. The other lesson: the diff alone is not enough context to judge correctness, but it is enough to catch the 80% of review nits that humans waste time on — unhandled errors, missing null checks, off-by-one, leftover debug prints, secrets in code. So I scoped the prompt to exactly that, and told it to stay silent when unsure. Silence is a feature; a reviewer that comments on everything gets muted by the team within a week. The GitHub Actions workflow YAML that triggers Claude on pull_request This is the full .github/workflows/claude-review.yml . It runs on every PR, restores a uv-cached venv, and calls a Python entrypoint. Note the permissions block — without pull-requests: write the comment-posting step fails with a 403 that GitH

スシロー 2026-06-02 14:21 10 原文
AI 资讯 Dev.to

Persistent Agent Memory with Azure AI Foundry: A Complete Developer Guide

Meta Description: Learn how to build AI agents with persistent memory using Azure AI Foundry Memory Service. A complete developer guide covering concepts, memory types, scope, provisioning, and a full Python implementation with the Foundry Hosted Agent Framework. Persistent Agent Memory with Azure AI Foundry: A Complete Developer Guide Table of Contents Introduction What Is Azure AI Foundry Memory? Memory Types Deep Dive Memory Architecture: How It Really Works Access Patterns: Tool vs. Low-Level API Understanding Scope Hands-On: Provisioning a Memory Store Hands-On: Building the Foundry Hosted Memory Agent Running & Deploying the Agent Security Best Practices Quotas, Limits & Regional Availability Conclusion + Next Steps Introduction Imagine you've just shipped a polished AI assistant for your SaaS product. Users log in, ask questions, and get sharp, helpful responses. The launch goes well. Then the complaints start rolling in. "Why does it keep asking me for my name every single session?" "I told it last week that I'm vegetarian — why is it recommending steak again?" "It feels like talking to someone with amnesia." This is the stateless agent problem — one of the most frustrating gaps between the promise of conversational AI and the lived reality of production deployments. Every conversation starts from a blank slate. The agent has no idea who it is talking to, what that person prefers, or what was discussed yesterday, last week, or a month ago. The result is a user experience that feels hollow and repetitive — the opposite of the intelligent, personalized assistant your users were promised. The solution is persistent memory, and Azure AI Foundry Memory is Microsoft's production-grade answer to exactly this problem. Introduced as part of the Azure AI Foundry platform, the Memory Service gives agents the ability to remember facts across sessions, distill long conversation histories into concise summaries, and retrieve the right context at the right moment — all wit

Manoranjan Rajguru 2026-06-02 14:20 12 原文
AI 资讯 Dev.to

Tired of unrealistic to-do lists? I wrote an open-source MilkScript that turns RTM into a personal Agile Coach ⏱️🌡️

Hey fellow productivity nerds, We’ve all been there: piling 50 hours of tasks into a 40-hour workweek, only to feel completely burnt out and defeated by Thursday. Remember The Milk is fantastic for capturing what needs to be done, but it doesn't inherently tell you if you actually have the time to do it. I got tired of constantly overflowing my schedule, so I spent some time leveraging MilkScript (RTM's automation engine) to build something I’m calling the RTM Agile Coach. It’s completely free and open-source. Basically, it transforms RTM from a passive checklist into an active, capacity-aware project manager. Here is what it actually does behind the scenes: ⏳ Precision Scheduling Engine: You tell it your working hours (e.g., 9 AM - 6 PM, Mon-Fri). It simulates your task list minute-by-minute. If a task hits 6 PM, it automatically carries the remaining hours over to the next working day. 📅 实时战略排期推演 (Schedule) • 预计完工: 2026-06-06 10:06:15 星期六 (注:排期表展示的预计完工是“最坏情况”(Worst Case):如果你白天完全没时间做这个任务,晚上要搞到几点。) 🟢 [06-02(二) 10:29 - 10:39] 检查* 回复-0.33🍅 (10m) 🟢 [06-02(二) 10:39 - 11:39] 查询 材料?-1.00🍅 (30m) 🟢 [06-02(二) 11:39 - 13:40] 2.2.5-如何 -2.00🍅 (60m) 🟢 [06-02(二) 13:40 - 15:40] 3-2-1-在 更新 -2.00🍅 (60m) 🟢 [06-03(三) 09:00 - 09:05] 3. 验证-0.17🍅 (5m) 🟢 [06-03(三) 09:05 - 09:35] 弄清楚 是什么-1.00🍅 (30m) 🟢 [06-03(三) 09:35 - 09:40] 3. 验证-0.17🍅 (5m) 🟢 [06-03(三) 09:40 - 11:40] 准备 材料-2.00🍅 (60m) 🟢 [06-04(四) 09:00 - 09:05] 3. 验证-0.17🍅 (5m) 🟢 [06-05(五) 09:00 - 09:05] 3. 验证-0.17🍅 (5m) ➖➖➖➖➖➖ 🧨 标准容量耗尽 (转入加班推演) ➖➖➖➖➖➖ 🧨 [06-06(六) 10:00 - 10:06] 3. 验证-0.17🍅 (5m) (加班) ↳ 📉 * 阻塞瓶颈 : 高顺位任务占据加班通道,后续2任务被迫顺延。 🧨 [06-06(六) 10:06 - 10:06] 4.发放 ** (0m) (加班) 🧨 [06-06(六) 10:06 - 10:06] 4.发放**** (0m) (加班) • 目标死线: 2026-06-06 23:59:59 星期六 🌡️ Visual Workload Heatmaps: It generates a literal heatmap inside an RTM note. At a glance, you can see which days are 🟩 (idle/comfortable), 🟧 (saturated), or 🟥 (dangerously overloaded). 🌡️ 每日实时战略负载热力 (Load Heatmap) 🟨 06-02(二): 69% [ 5.2/ 7.5h] 🟢空闲2.3h 🟩 06-03(三): 35% [ 3.2/ 9.0h] 🔒含日

yi grant 2026-06-02 14:19 5 原文
AI 资讯 Dev.to

Stop picking a homelab mini-PC by TDP. The number that decides the power bill is idle watts.

A homelab box that never sleeps runs 8,760 hours a year. So the spec that decides what it costs you is not the one on the box. It is the one nobody prints: how many watts it pulls sitting at the login prompt doing nothing. I kept hitting this while shopping for a Proxmox node, so I put the measured numbers in one place. More on that at the end. First, why the spec sheet lies to you. TDP is a thermal budget, not a power reading TDP is the heat the cooler has to handle at full tilt. It is a design target for the heatsink, not a measurement of what the chip draws, and it says almost nothing about idle. Your homelab box spends 95%+ of its life idle, so the number that runs up the meter is idle wall power, and that number is never on the product page. The arithmetic is unforgiving. One watt running continuously is 8.76 kWh a year. So the gap between a 7 W box and a 35 W box is not 28 watts, it is about 245 kWh a year, every year, for as long as the box is on. Plug in your own rate to get the dollars; the point is the gap compounds. Where TDP actively misleads you A few measured results from the dataset I'll link below, all from third-party wall-meter readings, not vendor claims: The new N100 wave is genuinely low. A Minisforum UN100C measures 5 to 7 W at idle. Beelink, GMKtec and Trigkey N100 boxes land in the 6 to 10 W range. For a Pi-hole, a few containers and some light VMs, this tier is hard to beat on running cost. AMD mini PCs idle far higher than their marketing suggests. A Minisforum UM790 Pro measures 25 to 45 W at idle. A Beelink SER6 Pro lands at 20 to 35 W. These are fast little machines, but if you picked one expecting "small box, small draw," the meter disagrees, and over a year that delta is real money. Newer and higher-TDP is not lower-idle. A Dell OptiPlex 7060 Micro idles just over 18 W on its 65 W-TDP desktop chip. The older 7070 with a six-core part sits around 13 W, and the low-power "T" SKUs lower still. The CPU's TDP class predicted idle better tha

Jordan Vance 2026-06-02 14:18 13 原文