Start by creating companies in the Admin section and invite users from those companies. When you create a multi-company project, add the companies which should participate. In a multi-company project you can decide if a file or a task list is private or not. If you have multiple companies you can decide which one of them can see a private file. For example if you have multiple versions of a file you can mark them as private in the initial drafts. Once you reach a version that can be shared with outside companies, if the file is no longer marked as private, it will be shared by selected companies.
To share files with your clients and prtners, simply add users from outside companies to your project to access the secure extranet (SSL 256 bits - https access) with a controlled access.