clean-gin icon indicating copy to clipboard operation
clean-gin copied to clipboard

Make folder structure modular.

Open dipeshdulal opened this issue 1 year ago • 0 comments

Modular Folder Structures

Currently, routes, services, repository, etc have been added in their separate folders. This make it less modular, harder to re-use and less maintainability.

Thinking of making this structure something like this;

pkg
  |-- authentication (model, handler, service, route, repository, serializer etc.)
  |-- users
  |-- .... 
  |-- common (some common things re-usable by multiple modules)
internal
  |-- framework's internal wiring code 
domain
  |-- users.go (interfaces for users package)
  |-- authentication.go (interfaces for authentication package)

While we are at it, we need to look at the go's recommended folder structure for packages. Following something like this

dipeshdulal avatar Mar 05 '23 03:03 dipeshdulal