BaseApp: a quick start for your Rails App

BaseApp is no longer maintained. There is a very good alternative called bort.

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
  • DZone
  • Reddit
  • email

17 Responses to “BaseApp: a quick start for your Rails App”

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

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

  3. Juan José Vidal Agustín says:

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

  4. @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/

  5. Chester says:

    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.

  6. @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.

  7. chris says:

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

  8. chris says:

    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 :-)

  9. Donovan says:

    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.

  10. Stefano says:

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

  11. Pattabhi says:

    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

  12. Imtiaz says:

    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

  13. OHaleck says:

    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?

  14. 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.

  15. Michael says:

    I’m sorry to hear you’re not going forward with BaseApp. As an experienced web developer new to Ruby on Rails it’s the most useful starting point I have found. I was able to get it going on Rails 2.3.2 with the changes below, thanks to the very helpful post at http://vladzloteanu.wordpress.com/2009/07/13/rails-startup-app-basecamp-user-authentication/. To summarize:

    - To get past the

    “Missing the Rails 2.2.2 gem. Please `gem install -v=2.2.2 rails`, update yo…”

    edit config/environment.rb and comment the following line:

    RAILS_GEM_VERSION = ‘2.2.2′ unless defined? RAILS_GEM_VERSION

    - To get past the

    “uninitialized constant Rails::Plugin::OpenIdAuthentication”

    run:

    script/plugin install git://github.com/rails/open_id_authentication.git –force

    - To get past the

    “uninitialized constant ApplicationController”

    run:

    rake rails:update:application_controller

  16. Josh says:

    Thanks a ton! This is extremely useful!!

Leave a Reply