Dealing with full-stack frameworks (like nextjs)? #797
Unanswered
zeronumbers
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a tiny note how to make nextjs work with given folder structure, but there is no mention what to do with server code.
Many cases are possible here, suppose there is feature x, and it uses an api, which in turn uses database. All of those go into the feature x folder? Does database go into model folder? route.ts goes into api(feature x segment) folder?
So is server and client code stored together or they must be separate like completely outside of fsd folders, or maybe inside but with some distinction?
What about things like middleware or instrumentation which have one file per project and are expected to be in specific place (in case of nextjs), is there a reason to keep them still in fsd folders just to import them into a single file?
Another case is db tables, given drizzle orm you need a schema file that describes tables. Where such schema file should be located, and should it contain all tables, or each table must have it's file and it should be located where it is used?
There is this example https://github.com/yuki-katayama/next-fsd-front-and-clean-architecture-backend is it good/bad?
Beta Was this translation helpful? Give feedback.
All reactions