惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
Arctic Wolf
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
博客园 - 【当耐特】
F
Fortinet All Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 三生石上(FineUI控件)
The Register - Security
The Register - Security
Google DeepMind News
Google DeepMind News
Schneier on Security
Schneier on Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
罗磊的独立博客
B
Blog RSS Feed
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Heimdal Security Blog
O
OpenAI News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
Help Net Security
Help Net Security
I
InfoQ
P
Privacy International News Feed
W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
S
Secure Thoughts
G
GRAHAM CLULEY
NISL@THU
NISL@THU
SecWiki News
SecWiki News
S
Schneier on Security
D
Docker
T
Threatpost
Cloudbric
Cloudbric
C
CERT Recently Published Vulnerability Notes
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
T
Tailwind CSS Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hacker News - Newest:
Hacker News - Newest: "LLM"
Security Latest
Security Latest
Recorded Future
Recorded Future
I
Intezer
MyScale Blog
MyScale Blog
阮一峰的网络日志
阮一峰的网络日志
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
美团技术团队

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
From Next.js 15 to SvelteKit: Why We Rewrote Rsale.net's Frontend
Maksim Baran · 2026-05-03 · via DEV Community

Hey dev.to! Maksim here again, author of the previous article "From Idea to MVP: Building a Classified Platform in Serbia" about Rsale.net, a classified platform for Serbia. In that post I described the stack: Next.js 15 + React 19 + ASP.NET Core microservices + AI translation.

A few months later, the frontend has been fully rewritten on SvelteKit 2 + Svelte 5 (runes). The Next.js codebase is gone. In this article I'll walk through why we did it, what we gained, and where it hurt.

Project status: the backend is still being finished, the site shows test data. But the new frontend is already in production-ready shape.

TL;DR

We migrated from Next.js 15 / React 19 to SvelteKit 2 + Svelte 5 runes. Bundle size dropped, DX improved, the Server/Client Component dualism disappeared, and i18n became a 50-line file instead of a separate library. No regrets.

Why we left Next.js

Next.js 15 is a great framework. But on a real project, a classified board with three languages, ISR, SignalR chat, geolocation, image upload, a sell wizard, three pain points piled up.

1. The Server/Client Component dualism. In the previous article I called it the "Server-First + Client Wrapper" pattern. Sounds elegant on a slide. In practice every new component requires a decision: 'use client' or not? Can I import it from a server component? Why did the bundle suddenly grow by 40 kB? Why does this hook break SSR?

// Next.js 15, a typical "wrapper" because we need one onClick
'use client';
import { ServerThing } from './server-thing';
export function Wrapper({ children }) {
  return <div onClick={...}>{children}</div>;
}

Enter fullscreen mode Exit fullscreen mode

In SvelteKit there is no such dichotomy. A component is just a component. SSR happens by default, hydration too, and reactivity works the same on the client and the server.

2. Bundle size and React runtime. React 19 + the Next.js runtime + next-intl + zustand + framer-motion, even with aggressive code-splitting the baseline JS for an empty page was around 99 kB. For a classified board where users open 20–30 listings in a session, that's a real cost on Serbian 4G.

Svelte is a compiler. There is no "framework runtime" shipped to the browser, only the code your components actually need.

3. RSC, caching and the "magic". fetch overrides, revalidate, unstable_cache, dynamic = 'force-dynamic', ISR with on-demand webhooks, Next.js gives a lot, but every "why isn't this updating" debugging session takes an hour. SvelteKit's model is honest and explicit: the load function, export const prerender, export const ssr, export const csr. That's it.

Why SvelteKit

Compiler instead of runtime. Svelte compiles components to plain JS that mutates the DOM directly. No virtual DOM, no reconciler, no Fiber. For a content-heavy site, that's a free performance win.

Svelte 5 + runes. Runes ($state, $derived, $effect) replaced the magic $: and stores from Svelte 4. The model is closer to Solid/MobX, explicit, debuggable, and works the same in .svelte and .svelte.ts files.

Here's our auth store. It's a regular .svelte.ts file, no writable, no providers, no useContext:

// src/lib/stores/auth.svelte.ts
let currentUser = $state<AuthUser | null>(null);

export const auth = {
  get user() { return currentUser; },
  get isAuthenticated() { return currentUser?.isAuthenticated ?? false; },
  get isAdmin() { return currentUser?.role === 'admin' }
};

export function notifyAuthChanged() {
  getChannel()?.postMessage('auth:changed');
}

Enter fullscreen mode Exit fullscreen mode

Any component just imports auth and reads auth.user, reactivity is automatic. Compare with React: useContext + Provider + useSyncExternalStore for cross-tab sync.

File-based routing without [locale] everywhere. In Next.js the i18n routing scheme is app/[locale]/..., every route lives under a dynamic segment. In SvelteKit we handle locale in hooks.server.ts via cookie + Accept-Language and prefix URLs with a helper lp('/category/cars'). Route folders stay clean: routes/category/[id], not routes/[locale]/category/[id].

i18n in 50 lines instead of a library. We dropped next-intl and wrote our own thing. Three dictionaries, one t() function, runes for reactivity:

// src/lib/i18n/index.svelte.ts
export type Locale = 'sr' | 'ru' | 'en';
const allTranslations: Record<Locale, Translations> = { sr, ru, en };

let currentLocale = $state<Locale>('sr');

export function setLocale(locale: Locale) {
  currentLocale = locale;
  document.cookie = `locale=${locale}; path=/; max-age=31536000; SameSite=Lax`;
}

export function t(key: TranslationKey, params?: Record<string, string | number>): string {
  let text = allTranslations[currentLocale]?.[key] ?? allTranslations['sr'][key] ?? key;
  if (params) {
    for (const [k, v] of Object.entries(params)) {
      text = text.replace(`{${k}}`, String(v));
    }
  }
  return text;
}

Enter fullscreen mode Exit fullscreen mode

That's it. No ICU MessageFormat (we don't need plural rules in this domain), no providers, no next-intl config files. Type-safety comes from TranslationKey = keyof typeof sr, TypeScript yells at any unknown key.

SSR by default, no 'use client'. Every +page.svelte is rendered on the server, gets hydrated on the client, and reactivity just works. No mental tax on whether to put 'use client' at the top.

<!-- routes/category/[id]/+page.svelte -->
<script lang="ts">
  import { t } from '$lib/i18n/index.svelte';
  import { auth } from '$lib/stores/auth.svelte';
  let { data } = $props();
</script>

<h1>{t('category.title')}</h1>
{#each data.products as product}
  <a href="/listing/{product.id}">{product.title}</a>
{/each}
{#if auth.isAuthenticated}
  <button>{t('add_favorite')}</button>
{/if}

Enter fullscreen mode Exit fullscreen mode

This component runs on the server and on the client. No directives, no wrappers.

Stack: before and after

Layer Was (Next.js 15) Now (SvelteKit 2)
Framework Next.js 15.4 SvelteKit 2.50
UI React 19 Svelte 5.51 (runes)
State Zustand $state in .svelte.ts files
i18n next-intl own 50-line module
Animations framer-motion CSS + Svelte transitions
Bundler Webpack/Turbopack Vite 7
Adapter Vercel/Node @sveltejs/adapter-node
Real-time @microsoft/signalr 9 @microsoft/signalr 10
DB layer (REST to ASP.NET) + Drizzle ORM for FE-side reads
Tests none Vitest + Playwright

SignalR for chat stayed, it's a client library, framework-agnostic. The ASP.NET Core backend with microservices and the AI Translation Service didn't change at all, the rewrite was purely frontend.

The migration in practice

What was easy:

  • Routing. app/[locale]/products/[id]/page.tsx became routes/products/[id]/+page.svelte. Conceptually 1:1.
  • Server-side data loading. Next's async function Page() became SvelteKit's load() in +page.server.ts. Same idea, cleaner separation.
  • API routes. route.ts with GET/POST became +server.ts with the same exports.

Where we had to think:

  • ISR analog. Next had revalidate: 600. SvelteKit doesn't have ISR out of the box with adapter-node (it does with adapter-vercel if you host there). For static pages (about, terms, blog index) we use export const prerender = true, for dynamic ones plain SSR-on-demand. With proper Cache-Control headers and a CDN in front, the practical effect is the same.
  • Image optimization. No next/image. We use sharp at upload time + a small <img> wrapper with srcset. Less magic, more control.
  • Sell wizard state. Our sell wizard was a tangle of Zustand slices. Moving it to a single sell-wizard.svelte.ts with $state actually shrank the code by about 40%.

What genuinely hurt:

  • Smaller ecosystem. No shadcn/ui, no react-hook-form. You write more by hand. For us this was a plus, fewer black-box deps, but on a deadline-driven project it would hurt.
  • Svelte 5 is fresh. Some libraries (Leaflet wrappers, for instance) hadn't been updated to runes yet. We use vanilla Leaflet directly, works fine.
  • Ecosystem search. "How do I do X in SvelteKit" Google results often return Svelte 4 / SvelteKit 1 answers. Always check the version.

Numbers (dev environment, same machine)

Metric Next.js 15 SvelteKit 2
Cold dev start ~8 s ~1.5 s
HMR update 300–800 ms 30–80 ms
Production build ~3 min ~25 s
Baseline JS (homepage) ~99 kB ~38 kB
Lighthouse Performance 90+ 95+

The build-time numbers are the ones that changed daily life the most. vite build finishes before you alt-tab to the browser.

What stayed from the previous architecture

  • ASP.NET Core microservices. Untouched. The frontend rewrite didn't ripple into the backend at all, that's the upside of a clean REST contract.
  • AI Translation Service. Still translates listings between Serbian, Russian and English on submit.
  • SignalR for chat. Library is frontend-agnostic, just a different import path.
  • Three-language UX with Cyrillic-first Serbian. That's a market decision, not a tech one.

Would I recommend the move?

If you're starting from scratch in 2026 and your project is content-heavy with SSR/SEO requirements, try SvelteKit first. The DX is genuinely better, the bundle is smaller, the mental model is simpler.

If you have a working Next.js project that ships features, don't migrate for the sake of migrating. We rewrote because we were still in MVP, there are only two of us (me and my backend friend), and 2–3 weeks of rewriting paid for itself in faster iteration after.

If your team is large and React-shaped, the hiring market reality is real. SvelteKit devs exist but there are fewer of them.

What's next

  • Finishing the backend (transition from test data to real listings).
  • On-demand cache invalidation: ASP.NET webhook to a SvelteKit endpoint that purges CDN entries.
  • PWA and offline-first for mobile.
  • Improving AI translation with category context.

The architecture lesson from both articles is the same: boring backend, sharp frontend choices. The stack you pick on the frontend is the one users actually feel.

If you're considering the same migration, drop questions in the comments. The site lives at rsale.net, still on test data, but the SvelteKit build is what's serving it.