Skip to content


Subversion checkout URL

You can clone with
Download ZIP
100644 105 lines (83 sloc) 4.7 KB
fbc1977 @brentkirby add readme and license
brentkirby authored
1 #Transit
2 ### Simple Content Management
500a7f3 @transitcms Initial commit
transitcms authored
fbc1977 @brentkirby add readme and license
brentkirby authored
4 Transit is a backend agnostic approach to content management, using the power of Backbone.js. Typical CMS platforms are all-in-one solutions, containing both
5 a back-end application, and front-end interface. Transit aims to be only the latter.
7 ###Goals
9 1. Provide a solid interface for managing content inline within a page
10 2. Compatibility with any REST based backend, using JSON as its data structure.
11 3. Allow easy integration into any backend environment by utilizing conventions over configuration
12 4. Support full customization of the interface, both functionally and aesthetically. This is achieved through the use of `handler` functions and javascript templates.
14 --
15 ###Architecture
17 **Contexts and Deliverables**
19 The model architecture is based around a primary "Deliverable", which contains one or more "Contexts". Deliverables are typically things like a page, or
20 a blog post, but can be anything which contains multiple Contexts.
22 Contexts can be any type of structured content. Examples could be headings (h1-h6), general text blocks (paragraphs/lists/basic formatting), audio files, videos,
23 image galleries... or any other content which can be described in HTML. Each deliverable has a `has_many` relationship to a collection of contexts,
24 which can be organized and arranged in any particular order. As an example, consider a `Post` deliverable, which contains some content and a video:
26 ```html
27 <article id="post">
28 <h2>The Post Title</h2>
29 <div data-context-id="xxx" class="content">
30 <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit....</p>
31 </div>
32 <h3 data-context-id="xxx">A Sub Heading</h3>
33 <video data-context-id="xxx" src="some_random.mp4" poster="poster.jpg" />
34 </article>
35 ```
36 In the example above, the Post's contexts would consist of the body copy (div.content), the sub-heading (h3), and a video. Items like the post title (h2)
37 would be described within the Post itself. A JSON representation of the Post "Deliverable" would be as follows:
39 ```json
40 {
41 "id" : 1,
42 "_type" : "Post",
43 "title" : "The Post Title",
44 "contexts":[
45 {
46 "id" : 1,
47 "_type" : "TextBlock",
48 "body" : "Lorem ipsum dolor sit amet, consectetur adipisicing elit....",
49 "position": 1
50 },
51 {
52 "id" : 2,
53 "_type" : "Heading",
54 "body" : "A Sub Heading",
55 "node" : "h3",
56 "position": 2
57 },
58 {
59 "id": 3,
60 "_type" : "Video",
61 "source" : "some_random.mp4",
62 "poster" : "poster.jpg",
63 "position": 3
64 }
65 ]
66 }
67 ```
69 Each model, whether deliverable or context, contains a `_type` attribute (yeah, we use Mongoid a lot) which represents the type of model to be used.
70 This is particularly useful when data is loaded, as Transit will automatically map each item to the appropriate Backbone model within your app
71 (falling back to a generic `Context` model) before adding it to the deliverable's `contexts` attribute. Contexts also include a `position`
72 attribute, which determines the ordering of each context within the deliverable.
74 The `id`, `_type` and `position` attributes are the only two that are required, additional attributes would be dependent on your particular integration.
76 Transit also includes an Asset model, which is used for general, user-uploaded files and images.
78 **Interface**
80 The UI is designed around the concept of a unified toolbar, which functions similar to a typical "tabbed" interface. The toolbar can contain one or more
81 panels, which can be added and removed as necessary depending on the content to be managed.
83 --
84 ### Managing Content
86 ...more information coming
88 --
89 ### Contributing
91 Transit is written in [CoffeeScript](, and is designed to function as a NPM package (currently the library has not been pushed).
92 Tests are written using [jasmine]( and coffeescript.
94 To contribute, fork the [repository on GitHub]( and [send a pull request]( Be sure to
95 include the issue # of your fix or feature implementation (if applicable), as well as any relevant tests/specs. Pull requests without associated (and passing) tests
96 will not be merged.
98 To assist with backend integration, additional libraries are either planned or in development. This includes a Rails engine (nearing completion), and a
99 restful PHP backend (in planning). If you'd be interested in contributing to either of these, please shoot us a message on Github.
101 --
102 ### License
104 Transit is &copy;2011-2012 kurb media, llc. Licensed under the [MIT license]( Do whatever you'd like,
105 but contributing any cool features / functionality you may add would simply make you awesome.
Something went wrong with that request. Please try again.