I just started using TypeScript for a Node API and I’m unsure about folder structure and organizing code. What has worked well for you?
Use tsconfig-paths
for aliasing @root/controllers
, etc. Makes imports clean.
Create a types/
or interfaces/
folder for global types.
Group files by feature/domain: users/
, auth/
, products/
. Inside each: controller, service, model.