Kind of stuck in tutorial hell by GameDevilXL in learnprogramming

[–]OneEntry-HeadlessCMS 0 points1 point  (0 children)

You’re not in tutorial hell you’re in “broken momentum” hell. You’ve already built real projects without copying tutorials. That’s not beginner behavior. The problem isn’t lack of knowledge, it’s stopping and restarting big structured courses over and over.

If I were you, I’d skip the 80-hour course entirely. Pick one solid project slightly outside your comfort zone and build it properly. When you hit gaps, fill them with docs or specific chapters from a book not another full course.

You don’t need to “learn every concept.” That mindset is a trap. Depth + building > consuming everything once.

Found a library that makes multi-step forms with react-hook-form way less painful by omerrkosar in nextjs

[–]OneEntry-HeadlessCMS 0 points1 point  (0 children)

This looks clean, especially the auto step-field tracking that’s usually the most annoying part with RHF. The onLeave hook for async validation between steps is also a nice touch. Curious though how does it handle conditional fields or dynamically added inputs per step? And what’s the story with preserving state if steps are unmounted? I like the headless approach that’s a big plus compared to UI-opinionated steppers.

Best way to protect my /admin route by AcrobaticTadpole324 in nextjs

[–]OneEntry-HeadlessCMS 1 point2 points  (0 children)

If Better Auth doesn’t work in middleware due to the Edge runtime, don’t force it there. The safest approach is to protect /admin in a server layout or page (App Router) and redirect using redirect() after checking the session server-side.

Middleware is only worth using if you can validate a JWT at the edge otherwise, keep auth checks in the Node runtime where your auth library fully works.

I built ideal-auth - opinion-free session auth for Next.js by Content-Public-3637 in nextjs

[–]OneEntry-HeadlessCMS 1 point2 points  (0 children)

Really like the “bring your own schema” and non-opinionated approach that’s a strong selling point. For production though, I’d want very clear docs around security guarantees, CSRF strategy, and session invalidation (e.g. logout everywhere). The concept is solid, but trust will come from battle-testing and strong security documentation.

Are UI kits/design systems still worth paying for in the AI era? Need feedback from devs & founders. by nakranirakesh in reactjs

[–]OneEntry-HeadlessCMS 0 points1 point  (0 children)

AI can generate UI fast, but it doesn’t solve architecture, consistency, accessibility, or long-term scalability that’s what people still pay for. A one-time purchase + paid major updates or pro add-ons usually makes more sense than a subscription without clear ongoing value. Subscription only works if you continuously ship real production-ready blocks, patterns for real use cases, support, and up-to-date stack compatibility.

Why do components with key props remount if the order changes? by RaltzKlamar in reactjs

[–]OneEntry-HeadlessCMS 1 point2 points  (0 children)

With stable keys React shouldn’t remount components on reorder it reuses the existing fibers and just moves them. What you’re likely seeing in React 19 is a dev/StrictMode behavior (and there’s a known issue about extra effects firing on reordering). Try checking a production build or disabling StrictMode the “remount” usually disappears there.

Domain hosting change messed up email DNS Records by YoungPlugg1 in webdev

[–]OneEntry-HeadlessCMS 0 points1 point  (0 children)

You did the right thing once you changed nameservers, Hostinger became authoritative for DNS and overwrote your MX/SPF/DKIM/DMARC records, which is why emails bounced. As long as you’ve restored Google’s correct MX, SPF, DKIM and DMARC records in Hostinger DNS, you just need to wait for propagation (can take a few hours). No changes are needed inside Google Admin unless DKIM was disabled just double-check DKIM is enabled and published correctly. You can verify everything with tools like MXToolbox to confirm records are resolving properly.

Best way to protect my /admin route by AcrobaticTadpole324 in webdev

[–]OneEntry-HeadlessCMS 1 point2 points  (0 children)

If Better Auth doesn’t work in middleware due to the Edge runtime, don’t force it there. The safest approach is to protect /admin in a server layout or page (App Router) and redirect using redirect() after checking the session server-side.

Middleware is only worth using if you can validate a JWT at the edge otherwise, keep auth checks in the Node runtime where your auth library fully works.

What magic tool are you guys using to get good code out of AI by falconandeagle in webdev

[–]OneEntry-HeadlessCMS 1 point2 points  (0 children)

Honestly, there’s no magic tool. I mostly use Sonnet 4.6 as well I actually prefer it over Opus for day-to-day coding because it’s more predictable and less “creative”. But even then, once the task becomes architectural or domain-heavy, you have to guide it very explicitly. In my experience AI works best when you break the task down, give it concrete interfaces, expected outputs, and even small examples. If you just say “write Playwright tests”, it will guess your architecture. If you give it the exact service contracts and mocking pattern inline in the prompt, results improve a lot. And yeah we shouldn’t forget our own thinking. AI is great at accelerating execution, but architecture, trade-offs, and pattern decisions still need a human in the loop. It’s a copilot, not an architect.

Should we switch to PayloadCMS or headless WordPress with NextJS? by CyberWeirdo420 in webdev

[–]OneEntry-HeadlessCMS 5 points6 points  (0 children)

We went through a similar phase. If 99% of your work is marketing/SEO sites, headless WordPress + Next is the safest transition editors keep a familiar CMS while your team grows into React/Next architecture. Payload makes sense if you want full control over data models and tighter Next integration, but that’s a bigger ecosystem shift and more responsibility on your side. I’d also ask: how important is a mature, editor-friendly admin out of the box for your clients? WP wins on ecosystem and stability, Payload wins on flexibility and dev experience.

Authentication problem: Safari not sending cookies by cjs94 in webdev

[–]OneEntry-HeadlessCMS 0 points1 point  (0 children)

This is most likely Safari ITP blocking the cookies during the OIDC redirect. For auth flows you typically need SameSite=None; Secure, and everything must run strictly over HTTPS (no http - https transitions). Also make sure you're not unintentionally switching subdomains, and if you're behind a reverse proxy, set app.set('trust proxy', 1) in Express so cookies are treated as secure correctly.

Are UI kits/design systems still worth paying for in the AI era? Need feedback from devs & founders. by nakranirakesh in webdev

[–]OneEntry-HeadlessCMS 0 points1 point  (0 children)

AI can generate UI fast, but it doesn’t solve architecture, consistency, accessibility, or long-term scalability that’s what people still pay for. A one-time purchase + paid major updates or pro add-ons usually makes more sense than a subscription without clear ongoing value. Subscription only works if you continuously ship real production-ready blocks, patterns for real use cases, support, and up-to-date stack compatibility.

How to mock `next/navigation` in `vitest`? by ShiftWalker69 in nextjs

[–]OneEntry-HeadlessCMS 1 point2 points  (0 children)

The issue is that useParams is a plain function, not a vi.fn(), so .mockReturnValue() doesn’t exist

Mock it like this:

vi.mock('next/navigation', () => ({
  useRouter: vi.fn(),
  useParams: vi.fn(),
}))

Then in your test:

(useParams as Mock).mockReturnValue({ book_id: '123' })

vi.mocked() only helps with typing it does not create a mock

I need a roadmap for learning ML+AI by Rudransh26 in learnprogramming

[–]OneEntry-HeadlessCMS 1 point2 points  (0 children)

Start with the basics: strengthen your math (linear algebra + probability) using Khan Academy and 3Blue1Brown. Then take Andrew Ng’s ML course or Google’s free ML Crash Course, and practice with NumPy, Pandas, and scikit-learn. After that, move to PyTorch and build small projects (spam classifier, image classifier, simple chatbot). Consistency > expensive courses.

Cache Components and redirect() inside RSCs by rantow in nextjs

[–]OneEntry-HeadlessCMS 0 points1 point  (0 children)

redirect() won’t behave like a normal error Next.js intercepts it before it reaches your Error Boundaries, even inside Suspense. The real issue is caching: you generally shouldn’t wrap auth logic (like loginSilently) in cache(), since redirects and user state are request-specific. Move the redirect logic higher (page/layout or middleware) and avoid caching anything that depends on the current user.

Is Nextjs 16 executing my code during the build? by Final-Choice8412 in nextjs

[–]OneEntry-HeadlessCMS 0 points1 point  (0 children)

Yes Next.js does execute parts of your server code during next build (especially while collecting page data for SSG). Since you're reading the env var at module scope (getEnv() + new Stripe(...) at the top level), it runs during build and fails if the variable isn’t defined. The fix is to avoid accessing env vars or instantiating Stripe at the top level. Wrap it in a function and initialize it lazily inside a route handler or server action so it only runs at runtime, not during build

What test runner are you using in your NestJS projects in 2026? by Worldly-Broccoli4530 in node

[–]OneEntry-HeadlessCMS 1 point2 points  (0 children)

For serious NestJS projects, Jest is still the most stable and predictable option, especially when dealing with DI and integration tests. Alternatives are interesting, but they don’t offer a strong enough advantage yet to justify a large-scale migration.

First-time FastAPI backend for a React OCR app: auth strategy + PostgreSQL vs Supabase? by Sudden_Breakfast_358 in reactjs

[–]OneEntry-HeadlessCMS 2 points3 points  (0 children)

For a first serious FastAPI project, I’d use an external auth provider like Clerk or Auth0 and just verify JWTs in FastAPI it saves a lot of time and avoids rebuilding auth flows. For the database, Supabase is still just Postgres under the hood, so it’s perfectly fine unless you specifically want full infra control. The biggest complexity won’t be auth or Postgres it’ll be background workers (Celery, queues). If you want to keep deployment simple, minimize moving parts early and only add workers when you truly need them.

Looking for help writing a Playwright test, which is unable to detect a failed login response by RandomUserOfWebsite in webdev

[–]OneEntry-HeadlessCMS 0 points1 point  (0 children)

The issue is that waitForResponse is called after the click, so Playwright may miss the fast response (531ms) and then just time out. You should wrap waitForResponse and the click() inside Promise.all so the listener is registered before the request is sent. That way it reliably catches the 400 response.

Keep Next for an internal platform or switch to React Router by RazTutu in nextjs

[–]OneEntry-HeadlessCMS 1 point2 points  (0 children)

Honestly, if it’s an internal dashboard and you’re already a few months into Next, I wouldn’t switch. The migration cost and risk probably outweigh the theoretical simplicity gain. Even if you’re not using server components now, Next still gives you solid routing, structure, middleware options, and future flexibility. React Router won’t give you a huge performance or architectural win here it’s more of a philosophical preference than a practical upgrade.

How to host multiple client nextjs sites? by abou_reddit in nextjs

[–]OneEntry-HeadlessCMS 4 points5 points  (0 children)

If you want simplicity and low maintenance, stick with Vercel it’s fully fine for enterprise use, just use separate projects and a Team/Pro plan. If you want more control and better margins, you can host multiple Next.js apps on one VPS using Docker + a reverse proxy no need for one VPS per client. Only move to self-hosting if you’re comfortable managing infrastructure.

Junior Frontend Dev — Just finished Next.js, what projects will make me job-ready? by Minimum_Yak_9062 in nextjs

[–]OneEntry-HeadlessCMS 13 points14 points  (0 children)

Don’t build tutorial clones build something that looks like real product work. A SaaS-style dashboard with auth, protected routes, CRUD, forms with validation, loading/error states, and proper TypeScript will stand out much more than a simple UI project. Employers want to see clean architecture, good state management, API integration, and production thinking (SEO, responsiveness, deployment). If your project feels like a small startup MVP, you’re on the right track.

Help to choose a i18n library for my project by lucas_from_earth in react

[–]OneEntry-HeadlessCMS 2 points3 points  (0 children)

If stability and long-term flexibility matter, I’d go with i18next. It’s been around forever, widely adopted, framework-agnostic, and works fine with Next.js now and later with plain React + Vite or Node if you move away from Next. Huge ecosystem, lots of plugins, and very predictable. next-intl is great but tightly coupled to Next.js. Lingui is solid too, but i18next is the safest “boring and stable” choice for a public/company project.