I'd second the recommendation that you have a look at the commonjs stuff that olegp mentions above (
http://news.ycombinator.com/item?id=1262380 ) and seeing if there's an opportunity there to be a prototype / working platform for such an endeavour. (Assuming that there's a good degree of fit between your platform ideas and commonjs)