We are in the process of creating a open source persistent browser based web game (PBBG) framework which will have all the features to get you started and let you start developing your unique features without having to write all the basics. We have taken a modular approach, you can use only the modules you want. If you wanted just a forum you could enable only the core, user and forum modules.

We are building our framework using Kohana which is an open source, object oriented (H)MVC web framework built using PHP5 by a team of volunteers that aims to be swift, secure, and small. We are using Kohana 3.3 with many modules, including the following:

1.) ORM is a a powerful Object Relational Mapping (ORM) module that uses the active record pattern and database introspection to determine a model's column information.
2.) Mustache is a template specification we use for our templates, we use Kostache's implementation.

It is modular because you can turn off features you don't require. If you only enable core, user and forum you can have a forum on its own with no game features.

Removing the PHP backend would be complicated but maybe possible. The frontend is mainly Twitter Bootstrap and Mustache template files which would be usable by a different backend. Not too sure if it would be worth the effort removing the PHP backend though.