Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A sample couchapp built using soca
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
css
data
db
external
hooks
images
js
lib
sass
templates
test
.gitignore
Gemfile
Gemfile.lock
Jimfile
README.textile
Thorfile
config.js
favicon.ico
rewrites.js

README.textile

WTH is this?

Vim Underground is a couchapp, that is, a web application served from CouchDB itself. While most of the application makes use of CouchDB’s awesome features, it uses node.js and ruby sparingly to overcome certain limitations of CouchDB and to speed up development.

CouchDB

CouchDB displays most of the data for the site through several views and lists. Templates, inside the templates directory, provide the underlying HTML. The lib directory contains modules that one can use inside of lists, shows, views, and updates. Speaking of which, the db folder houses those functions, along with filters that the app consumes to notify of new articles and to keep up to date with the latest script activity from the vim-scripts atom feed.

Ruby & Soca

VU uses soca for pushing changes to CouchDB. Additionally, seeding the database requires thor, along with compass for the look and feel of the site. See the Gemfile for other ruby dependencies.

The Jimfile lists all JavaScript dependencies. Rather than letting soca concatenate all our scripts into one big file, VU uses yepnope.js instead to load them asynchronously. Scripts are divided into three sections: core, plugins, and application. Core includes all mandatory scripts, such as Sammy.js and jquery.couch. Plugins includes scripts like sammy.mustache and h5validate. Lastly, application contains helpers, models and app.js.

NodeJS

VU uses CouchDB external processes for things like sending emails and new article submission notifications. In addition, there’s a screen scraper script in data/tasks for scraping vim plugin information from the vim site.

Pubsubhubub

VU is a subscriber to the vim-scripts atom feed. To subscribe, follow the instructions here. Make sure to specify the callback as http://yourapp.com/feeds/feed-name.

TODO

  • Layout for mobile
  • Search functionality

License

The Vim Underground logo is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported. All code is licensed under the wtfpl , reproduced here for convenience:

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.
Something went wrong with that request. Please try again.