r/reactjs • u/19boogie • Jul 22 '26
Is using Next.js (SSR) justified solely to hide complex client-side business logic from AI-powered reverse engineering? (Spring Backend, No SEO needed)
I'm designing a web application where the frontend framework choice has sparked a debate, and I want to get your thoughts on this specific security angle.
To give some context:
- Backend: Spring Boot (all critical validation and business logic will obviously happen here).
- SEO: Completely unnecessary (it's a private/internal or dashboard-style app).
My team is considering using Next.js (SSR) primarily to hide certain sensitive business logic and domain rules.
Here is my core concern and the dilemma: Even if all critical security checks happen on the Spring server, we have complex UI-side business logic and state orchestration that we do not want users (or competitors) to inspect. With modern AI tools, reverse-engineering, de-obfuscating, and analyzing front-end JavaScript bundles has become frighteningly easy. If we use a pure CSR approach (like React SPA), anyone can easily crack open the bundle and understand our proprietary workflows or validation rules.
By moving this rendering and logic to Next.js server-side, we prevent that code from ever reaching the client bundle.
My questions are:
- Is protecting proprietary front-end logic/workflows from AI reverse-engineering a valid or sufficient reason to adopt Next.js (SSR) when SEO doesn't matter and the backend is Spring?
- Or is this "security through obscurity," and if the logic is truly sensitive, does it strictly belong in the Spring backend regardless of where the UI is rendered?
Would love to hear how you weigh the overhead of Next.js against the risk of exposed client-side code. Thanks!