Stop arguing about folder structures β start shipping features.

Feature-Driven Architecture (FDA) is a scalable way to organize modern React or Next.js projects β built around features, not file types.
Instead of scattering logic across folders (components/, hooks/, api/, β¦), FDA makes each feature a self-contained mini-app with its own UI, logic, state, and API.
Itβs the architecture used in Klickbee CMS β but itβs framework-agnostic and works beautifully in any Next.js project.
| Problem | FDA Solution |
|---|---|
Bloated components/ folder |
Every feature owns its components |
| Refactors break unrelated code | Features are isolated & independent |
| Hard onboarding for new devs | Predictable, self-contained structure |
| No scalability for large teams | Each team can own a feature domain |
FDA gives you clarity, velocity, and maintainability β no more βwhere do I put this file?β debates.
src/
βββ app/ β Next.js App Router (public & admin routes)
βββ feature/ β Core feature modules
β βββ user/
β β βββ api/ β Next.js API handlers
β β βββ components/ β UI specific to user feature
β β βββ queries/ β React Query hooks
β β βββ stores/ β Zustand state
β β βββ schemas/ β Zod validation
β β βββ lib/ β Server actions / business logic
β βββ settings/...
βββ shared/ β Cross-feature logic (UI, hooks, lib)
βββ providers/ β React context providers
βββ styles/ β Global styles & tokens
βββ types/ β Shared TypeScript types
π Each feature is plug-and-play β add or remove one without touching the others.
| Concern | Location | Tech |
|---|---|---|
| Server actions | lib/ |
Next.js server actions |
| API handlers | api/ |
Next.js route handlers |
| Data fetching | queries/ + options/ |
React Query |
| Local state | stores/ |
Zustand |
| Validation | schemas/ |
Zod |
| Typing | types/ |
TypeScript |
// src/app/api/admin/user/route.ts
export { GET, POST } from "@/feature/user/api/apiUser";
// src/app/admin/user/page.tsx
import { useUsers } from "@/feature/user/queries/useUsers";
import { UserTable } from "@/feature/user/components/UserTable";
export default function Page() {
const { data } = useUsers();
return <UserTable users={data} />;
}
FDA thrives on community feedback. You can help by:
The first contributor to open a PR gets a permanent mention in the README β‘
Julien Mauclair β Founder of Klickbee CMS π§ Building scalable architecture for modern web teams. LinkedIn β’ Medium
MIT Β© 2025 β Use, remix, and build freely.
Organize by feature, not by type. FDA = clarity + scalability + autonomy. Stop managing chaos, start shipping features. π