A module is a collection of files that together build a feature. A feature could be a login, viewing a User profile etc. A theme would contain template files and assets (img, css etc). The problem ...
There are a million-and-one file-system structures that go into the myriad of Open Source projects available. Things like modules, language files, domains, third-party libraries, migrations, ...