Colony Starter architecture requests


Hi, @ryanchristo. I have been migrating my app-in-progress to layer on top of Colony Starter so that I can stay up to date with colony more easily, without having to manage all the dependencies, etc. myself. It’s generally going ok but i have two requests:

Is it possible to move the colonyNetwork code outside of the src folder? Generally the src folder is for code that is specifically a part of an app, not a dependency of an app. Having it in the src folder affects code lookup and other things and can slow down operation of a code editor/IDE like VSCode.

Of course you could just move it to another folder outside of src, but for long term viability and usefulness you may want to look into turning it into a npm installed package itself. Two examples of other CLIs that do this are:

  • Vue-cli (an awesome, very well designed cli tool), has a component called vue-cli-service that handles various commands that are needed. You could create a colony-cli-service that handled things like starting ganache and trufflepig, etc. It is described here:
  • Zeppelin OS has its use zos cli, which I am also using as a part of my project because I like their upgradeable contract system:

I hope we reach a point some time soon where there is one cli that works with all contract libraries and packages that are needed, but we are definitely not there yet. :slight_smile:

Is it possible to anticipate that users of Colony Starter will want to make and deploy their own additional contracts on top or along side Colony? If you could set up Colony Starter with the assumption that people will be adding more contracts and deploying them with Truffle or Zos that would be great. I have added what I need for now, but that has involved installing two versions of Truffle, for example. It would be great if only one install of Truffle, etc. was needed.

Thanks for considering these things that will make Colony Starter a richer tool for a wider range of developers.


Hey @bmiller59!

Yes, done. and new versions published.

Not sure how this got overlooked for so long. The path of the colonyNetwork submodules in each package have been changed to a lib directory outside of the src directory.

I really like the idea of having a service package that would handle things like starting and running ganache and trufflepig and I gave some thought to a similar idea awhile back but decided for now that each package would act like a boilerplate and autonomous of the colonyStarter CLI. I would be interested in revisiting the idea.

Would you mind creating an issue in the colonyStarter repo with a brief summary of this idea so that I can come back to it when I have a little more time on my hands? Maybe you can help me build it?

Yes. I have thought about creating a separate package that would be focused on developing contracts alongside the colonyNetwork contracts, one that would be less focused on colonyJS itself and more focused on developing extensions to the colonyNetwork contracts.

At the moment, if someone wanted to develop their own contracts alongside the colonyNetwork smart contracts that could be used within one of the colonyStarter projects, I would recommend creating a separate repository for those contracts and then adding the repository as a submodule that would live in the ‘lib’ directory alongside the colonyNetwork submodule.

The colonyStarter packages right now are focused on using colonyJS and I would love to create packages in the future that are more focused on developing contracts alongside the colonyNetwork contracts. In order to avoid making the current packages too complex, I think packages focused on developing smart contracts should live within their own packages, which would help keep things modular and avoid adding too much complexity to the current packages that are focused on using colonyJS and building dApps.


Thanks, Ryan! I appreciate the quick response on the lib location.

Also, I will create ticket for the service idea. I’m open to working on it as time allows. Let’s stick a pin in it for now. :slight_smile:

It could be fine by me if there were a Colony Starter option that was meant for people who wanted to augment with additional contracts. I see a hierarchy something like this:

  • Colony Basic (just core level, like it is now)
  • React Starter (similar to now)
  • Contract Starter (could be based off of Colony Basic or React Starter and be set up for contract writing/testing/etc)

With something like that you can keep the starters simple for those who want that but allow others to step into more complex dapp development that may require additional contracts.

You may remember I have proposed a few feature additions to Colony in the forum that I need need which do not seem to be priorities for the moment. That is understandable. But I would encourage you to make it easy for for people to build more complex dapps that may require additional contracts. If those contract extensions are not going to be added to Colony, then that would be the second best solution.

I do think it needs to be complicated. It’s mostly just exposing truffle and ganache, etc at the top level so that the dapps can leverage the same contract writing/deploying infrastructure that colonyNetwork is already using.

Thanks again.