Asimov4/makehub — pull request #7 by devnook (2013-10-27 00:17:59+00:00)
Title: Refactoring routing and how projects are stored in github.

I thought about our way of storing the projects in github, and it is a bit problematic. Having a custom string in "description" makes it difficult to differentiate projects and not-seo-friendly (e.g. implementing search will be difficult).

I checked how other projects (dabblet.com, jsfiddle) worked around this problem and they usually use file name to mark gists as belonging to their project.
I propose the solution as follow:

+ project id in makehub = gist id
+ project title = gist description
+ gist filename is always 'makehub'
+ we use api.github.com to retrieve gist content (rather than /raw in gists.github.com)

The urls structure follows (roughly) REST:
GET /project/{id} - display a project
POST /project/{id} - edit a project
POST /create - add new project

Demo: https://c9.io/devnook/makehub

What do you think?