BaseApp: a quick start for your Rails App

For the impatient: http://github.com/ariejan/baseapp

Got issues? Feature requests or patches? http://baseapp.lighthouseapp.com/

Every Rails developer has at least once developed an application that needed user authentication and some basic UI features like tabs and a sidebar. Ask yourself now: “how often have you installed and extended the restful_authentication plugin?”.

Yes, I have done it quite a few times and everytime I find myself writing the same code over and over again. User login, password reset, ‘forgot password’ functionality. I’ve build the same basic UI over and over again. Added administrator users and roles.

Are you tired of doing the same old things over and over again? I was! So, I created BaseApp.

BaseApp is a Ruby on Rails application which contains a lot of code you want in your project by default. To give you an idea of what is does out of the box:

  • User Authentication including password recovery, account activation and account suspensio.
  • Admin interface where the admin user can easily manage users and tweak app settings
  • Default CSS-based UI with tabs and a sidebar. Very acceptable by default and easy to customise.

BaseApp is currently based on Rails 2.1.1. And although it’s a pretty complete package and ready to be used for your next project, it still needs a bit of work. Check out the README for features that should be in BaseApp.

Of course, BaseApp is open source so fork a copy at the GitHub and send me those patches (of pull requests)!

There are tons of feaures that can be included into BaseApp, so the next big thing is to include some sort of configuration that allows you to disable/enable certain BaseApp features.

So, go right ahead! Use it! Fork it! Send me those pull requests!

  • Twitter
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • Technorati
  • E-mail this story to a friend!

15 Comments so far

  1. Ariejan de Vroom on September 29th, 2008
  2. Iain Hecker on September 29th, 2008

    I’m having a look at it in getting it to Rails 2.2 including I18n. You’ll get a pull request soon ;)

  3. Ariejan de Vroom on September 29th, 2008

    @Iain: Oh, very nice! It’s quite high on my “think I want for BaseApp”-list. I’m looking forward to it!

  4. Juan José Vidal Agustín on September 30th, 2008

    I’ve problems with rake db:migrate
    How can I run your app?

  5. Ariejan de Vroom on September 30th, 2008

    @Juan: I noticed some files were not in the repository. This has been fixed.

    I’ve also opened up a lighthous project to post issues like these.

    http://baseapp.lighthouseapp.com/

  6. Chester on October 9th, 2008

    There seem to be quite a few problems with this. When I tried to signup I got an error.

    Also, I don’t see the point in having a layout there already. It’s just something that people would remove every time they crate a new project.

    Think I’ll stick with Bort for now.

  7. Ariejan de Vroom on October 9th, 2008

    @Chester:

    What error did you encounter? Did you post a bug report at LightHouse?

    On the default layout issue, I think it’s good to have something in place by default. It’s much nicer to be able to show your client something styled after a weeks work than just bare HTML.

  8. chris on October 10th, 2008

    Thanks … this is nice!
    Just one question, what is db/bootstrap/*.yml files for, and
    how do I use them ?
    thanks again.

  9. chris on October 10th, 2008

    never mind …
    i used: rake db:bootstrap:load
    ahhh … the fine tradition of no docs for Rails apps … is
    this why my hair is falling out :-)

  10. Donovan on April 25th, 2009

    Thank you! I just launched a test app with no problems at all.

    Two questions:

    1. How do the tabs work?

    2. Is this Rails 2.3 compatible?

    Much appreciated.

  11. Stefano on April 26th, 2009

    Great Job,
    I was wondering if this is compatible with Rails2.3 and if you plan on releasing it as a template.

  12. Pattabhi on May 1st, 2009

    Hi,

    Great work and reduces lot of work …

    Are there any scaffold generators packaged that will create controllers,models and views that look similar to the ones provided by default.

    Thanks

  13. Imtiaz on June 24th, 2009

    Getting following error with open id authentication after upgrading rails from 2.2 to 2.3 :(

    “NoMethodError in UsersController#create
    undefined method `using_open_id?’ for # ”

    after upgrading rails to 2.3 i wasn’t able to migrate database using rake db:migrate. after surfing a while i found a way which describes to install a open id authentication patch or comment out following line from init.rb (open_id_authentication plugin directory).

    NoMethodError in UsersController
    “ActionController::Base.send :include, OpenIdAuthentication”

    Anyway, i installed patch and after that migration and baseapp installation was successful but i can’t signup and login from baseapp. getting that open id error constantly. i’m stuck with this. please help if possible

  14. OHaleck on July 1st, 2009

    I had the NoMethodError during the migration too and I managed to deal with it by simply creating an empty module stub in init.rb just before the line that causes the error:
    config.to_prepare do
    module OpenIdAuthentication
    end
    ActionController::Base.send :include, OpenIdAuthentication
    end
    Now I have this whenever I try to login…
    I am on Rails 2.3. Can anyone help?

  15. Ariejan de Vroom on July 2nd, 2009

    BaseApp is no longer supported. I built it once, but with the pace that new gems, plugins and rails version come out and no way to easily upgrade current baseapps, I dropped support for it in favour of rails app templates.

    If you upgrade to Rails 2.3 you’re bound to run into trouble.

Leave a Reply