-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best scalable project structure #2249
Comments
Same question: How to organize project structure ?
That's all what I think. Hope you could give me some advice, thanks a lot. |
Thanks for you answer, In my case frontend and backend are not same server, backend on standalone server and my app will consume it. And my question not about frontend and backend in one project but i need know how i manage scalable files and folder structure on my project |
I think you should follow the official documention: just move to modularize from MVC. nest g mo users
nest g co users
nest g mo products
nest g co products ... It will create the right structure for you. btw, thanks for your comment, maybe I shouldn't put both frontend and backend apis together. |
Oh, now i understand. will i move project structure like this
That's right ? |
That's right, but it seems thers is no |
@wxs77577 you can always use monorepo approach - create 2 projects in 1 repo and share common things between them as libraries/packages @liebalogh without
|
I create global interceptor, that will transform object to response template. And What file should on core folder ? |
Core would be for example where your actual business logic and rules live. |
I would like Angular with Nestjs in a same repo, the folder both are src . I am thinking a repo with two folder ?
But this cannot manage same package.json together . Anyone has solution ? |
umm.. looks great , although I am not going with AngularUniversal , cause I don't want SSR . |
@karocksjoelee for big project is better to separate between Api and Frontend |
@sbacem it depends. Either approach has its own pros and cons honestly |
@kamilmysliwiec
I'm thinking about moving the database/logger module inside a core module and maybe the Date manager as well but for the last, I'm not sure, I think it's better to let it in a shared module containing helpers for example... But is could also live in the core one, What do you think? What would be the "best" way to architecture it? |
I have a question concerning the module's folder structure : Let's say I have a BasePet module. Would you suggest to encapsulate even more the module's folders ? |
If you will use libs, it will be much simple to separate the application logic etc:
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I have big e-commerce apps, i planning move previous codebase from express (Typescript) to NestJS.
After reading documentation and try create nestjs project, I'm confused with project structure. In my opinion generated project structure not scalable, it strange when large codebase have project structure like that.
Currently on my backend have Controller, Model, Event, Middleware, Validator, interface, static file server (subdomain), websocket, here my current project structure
I'm not angular developer so i dont know how to manage project structure like that
How i for best project structure on awesome nestjs framework ?
The text was updated successfully, but these errors were encountered: