How are you structuring your React apps in 2025? #1135
Answered
by
caribbean961
hiroshi960617
asked this question in
General
|
Are you sticking to feature-based folders? Using atomic design? Colocating server actions? Curious how others keep large codebases scalable in Next.js or Vite projects. |
Answered by
caribbean961
Jun 7, 2025
Replies: 1 comment
|
In 2025, I’m using a feature-based structure with a few modern additions: |
0 replies
Answer selected by
hiroshi960617
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In 2025, I’m using a feature-based structure with a few modern additions:
🗂 Each feature (e.g., users, products) has its own folder with components, hooks, utils, and server logic.
⚛️ Common components (buttons, modals, layout) live in a shared /components folder—loosely inspired by atomic design.
📡 Server actions and mutations are colocated near the pages that use them (Next.js 14+ pattern).
🧠 Custom hooks stay inside their feature folders for clarity and tight coupling.
📁 Global types, lib, and config folders sit at the root.