RSS

Blog

Opensourcing the KnpLabs marketplace − a Silex application

By Geoffrey Bachelet
26 October 2011
In the Development category

As you might know already, developers at KnpLabs are given some time every week where they can work on pet projects. Unfortunately, it seems that the creative minds here have a lot more ideas than we can handle, so we started writing a small application to keep an eye on those nice ideas, discuss them, and ultimately decide what we're going to work on or not.

That small application is called the Marketplace, and is built on top of Silex. Today, we're opensourcing it, not only hoping that it will be useful to some of you (actually, the feature set is so minimal that I doubt it could be useful to anyone else than us), but also to show it off as an example of Silex application.

So, what are you going to find in the Marketplace? The main goal is to manage projects, promote discussion about them, and ultimately, reach a consensus on which are the most interesting and promising. We also needed some kind of identification and very basic access control.

Thus, the feature set currently includes the following:

  • Google OpenID integration, using LightOpenID
  • The simplest authentification system you'll ever see
  • A basic CRUD
  • An even more basic comment system
  • The ability for people to vote for projects
  • And a way to add links related to the project (github repository, etc)

We also wanted it to be pretty, so we decided to use twitter bootstrap for the CSS and a bit of javascript. We also included Gravatar support to make things even prettier.

If you're into learning things, and are looking for code to read, you may also find interesting that the Marketplace relies on the latest Silex version, thus using Providers for almost everything. We tried to segregate controllers in meaningful controller providers (not always easy, since everything is very coupled right now), and to encapsulate re-usable logic into service providers.

We also tried to leverage a few opensource bricks, and you'll find usage example of the following:

Anyway! Enough talking, you will find the sources on github, so feel free to read it (I suggest starting with the README), comment on it and, why not, contribute! We sincerely hope you're going to find the Marketplace useful, be it by using it, or by reading its sources and learn a few things about Silex :-)

Of course, we're going to add some features when we need them, and I plan to add acceptation tests using Behat very soon, so stay tuned!

  • 2012-03-20 Human374

    Thank you so much!

  • 2012-01-04 Julian Reyes Escrigas

    Excellent, have more options and are really useful. I'd like an easy integration with CI tools

  • 2011-10-27 Peter Siska

    Awesome, thanks for sharing this!

  • 2011-10-26 Danie; Tiecher

    Ha! Discussed a similar idea with my peers the week before. This will come in handy for us, thanks!

  • 2011-10-26 Ade

    Neat. I like what you've done with Silex and how the application has been structured.