BaseApp2 is a default Ruby on Rails project that kick-starts your Rails project. BaseApp2 is developed by, Danny Mcclelland based on the BaseApp application. BaseApp is released to the public under the MIT license. When an application is developed in Rails, it needed user authentication and some basic UI features like tabs and a sidebar. BaseApp is ruby on rails application that having following features ,
1. User Authentication including password recovery, account activation and account suspension.
2. Admin interface where the admin user can easily manage users and tweak app settings.
3. Default CSS-based UI with tabs and a sidebar. Very acceptable by default and easy to customize.
Another important feature of it is scalability and flexibility,So easy to change the application developed on it .
Features of BaseApp2 are
1. Layout
- Tabs
- Global links
- Optional sidebar
- Notice,warning and error flash messages
- Include external css, possible to edit as we wish.
2. Default dashboard page
3. Administration panel where you can:
- Manage users (add, delete, purge, suspend, activate, send new passwords)
- Manage settings
4. User authentication, with password recovery and login recovery and account activation (by email)
5. User Profiles:
- Location, Website, Full name fields by default, easily extensible.
- Gravatar for avatar support
6. Very useful Rails plugin available:
- restful_authentication
- acts_as_state_machine
- asset_packager
7. Mobile Ready
- Auto detect mobile users/visitors and display different views.
- Based on the JQTouch framework, making it easy to theme.
Quick Start your Development using BaseApp2
5 simple steps to start an application using BaseApp2.First, you can download BaseApp2 from https://github.com/dannyweb/BaseApp2 change the file name to Your project name,then do following
- Create your own config/database.yml
- Edit the config/config.yml file to suit your needs.
- Open a shell and run rake db:migrate to create your database and setup the prepared defaults.
- Start your server with ./script/server
- Open up http://localhost:3000 and login with username ‘admin’ and password ‘baseapp’.
If you want to use OpenID then you will need to run the following command:
ruby script/plugin install open_id_authentication
Configatron vs. Settings
In BaseApp2, Site setting can be configured in two way,
1. Using config/config.yml
All default configuration options that are not ‘user changeable’ should go in config/config.yml. This uses the Configatron gem (frozen in vendor/gems). To retrieve the site name you may use ‘configatron.site_name’ everywhere in your code.
2. Settings in database
It’s still possible to store user changeable settings in the database model Setting. Note: As long as there are no Settings in the database, the ‘Settings’ tab for the administrator is hidden. Once you add a Setting to the database through a migration (or otherwise), the Settings tab will show up.
BaseApp2 Structure
BaseApp2 is developed on the basis of MVC structure.
1. BaseApp2 Model
2.BaseApp2 View
3.BaseApp2 Controllers
Another part of BaseApp2 is its Plugin, It plays an important role in application development.