Rails Jetpack

istock_000003620952xsmallRails Jetpack is an advanced starter app for Rails. A lot of web apps use a lot of the same code, so it makes sense to put together a solid foundation that can be used as a starting point for future apps.

It’s based on the idea of convention over configuration. It makes many decisions for you and attempts to offer a best practices foundation.

NOTE: Jetpack is not recommended for beginners. It steps off the “golden path” of Rails at times and will cause you confusion if you’re just starting with Rails.

Goals:

  1. Money maker.
  2. Production-ready.
  3. Clear usage instructions.
  4. Ready-to-go 1st Draft Design i.e. first draft of app shouldn’t require much change to the design, either than a few color tweaks.
  5. Best practices.
    • Solid test coverage
    • RESTful architecture
  6. Don’t stray too far from Rails “golden path” (current deviations include: HAML, jQuery & Rspec + Cucumber)
  7. 100% Ruby 1.9 compatibility

NOTE: The project is in it’s early stages.

What’s Included?

  • Gems & Plugins
    • Rails 2.3.2
    • Cucumber
    • Rspec
    • Authlogic
      • OpenID
    • configatron
    • Haml
    • Compass
    • Pretty buttons
    • paperclip
    • factory_girl
    • Rcov
    • resource_controller
    • searchlogic
    • hoptoad
    • mocha
  • sample-database.yml
  • Users mvc
  • User Sessions mvc (handles login, logout & sessions)
  • Forgot Password feature for users
  • jQuery + UI javascript libraries

Planned

  • Roles for users
  • Moonshine
  • ActiveMerchant w/ subscription billing (implementation being explored.)

Usage guidelines

Cucumber

Cucumber is a BDD framework. To learn more about cucumber, visit http://cukes.info. Existing features & cucumber rests are located in the /features directory.

TODO: Add examples.

Rspec

Rspec is a substitute for Test Unit.

TODO: Add links to rspec resources. TODO: Add examples.

Authlogic

Authlogic is an authentication engine. It powers the the email/password login system as well as facilitates the OpenID integration.

TODO: Add how to use authlogic to protect a controller and specific actions as well as using current_user.

jQuery + UI

jQuery is a beautiful javascript framework. jQuery is to javascript what Rails is to Ruby.

TODO: Add info on adding plugins.

Configatron

Configatron is a simple configuration system. You can simple add settings to config/application.yml and retrieve this info anywhere in your app using the configatron object.

TODO: Add examples for configuring the email system and the payment gateway.

HAMLSASS

HAML is a templating system, similar to ERB. To use it, just name your views .html.haml instead of .html.erb.

SASS is the css complement to HAML.

TODO: Add advantages over ERb. TODO: How HAMLSASS work together. TODO: Add links to pages that show how to use it.

Compass

Compass is a complement to Haml.

Paperclip

Paperclip helps you upload files & images. For info, visit http://railscasts.com/episodes/134-paperclip

TODO: Add complete example.

TODO: Show adding profile image uploading using paperclip.

{ 2 comments… read them below or add one }

Marcus May 22, 2009 at 4:15 pm

I'm really excited to use Jetpack. It looks way easier than Greasemonkey to use. Very, very cool. Keep up the good work!

melvinram May 22, 2009 at 7:33 pm

Thanks Marcus.

Leave a Comment