In my current project, I have a monorepo consisting of a Frontend (Angular) and a Backend (built with NestJS, which is based on NodeJS). I am looking to implement custom interfaces and classes for both the frontend and backend. For example, creating DTOs so that the frontend understands the parameters used by the backend.
I initially considered organizing these custom interfaces and classes in a common folder within the project structure shown below. However, this approach proved to be problematic as the common folder is outside the scope of Angular's tsconfig file, leading to issues with auto-completion functionality.
project
├── client (Angular)
├── server (NestJS)
└── common (shared interfaces and classes for both client and server)
Has anyone encountered a similar situation? Currently, I am duplicating my interfaces in both folders, but this is not ideal as any updates made to one interface require manually updating the other as well.