The adapters currently supported are sqlite, mysql, and postgres for use
with datamapper, activerecord, or sequel.

Generating Applications

Padrino's main concept is to generate a default "project" or "core application":

$ padrino g project my_project

You can then add, if needed, sub-applications to your existing Padrino
"project":

$ cd my_project
$ padrino g app gallery

You can also generate your own controllers, mailers, models, etc. for your
"gallery" app as well.

$ padrino g controller sample get:index --app gallery

Whenever generating a "mounted" app, Padrino will mount that application
automatically. As a reference, the above example "gallery" application will be
mounted to: /gallery.

You can easily change and configure your "mounted" application path and decide
where your applications will be mounted, by editing your config/apps.rb file.

Generating the Admin Section

Let's start by creating a new Padrino project using Active Record:

$ padrino g project blog -d activerecord

Install all project dependencies:

$ cd blog
$ bundle

Padrino ships with a beautiful Admin interface.

Remember that Padrino has been principally structured and designed for mounting
multiple applications at the same time. Under this perspective, our admin
section is nothing but a new Padrino application:

$ padrino g admin -e slim

Beside slim, you can also use erb or haml. You need to configure your database
settings in config/database.rb and run your migrations to add tables
and columns to your database:

Which email do you want use to log into admin? info@padrino.local
Tell me the password to use: foobar
=================================================================
Account has been successfully created, now you can login with:
=================================================================
email: info@padrino.local
password: ******=================================================================

You are now ready to start your webserver:

$ padrino start

Point your browser to http://localhost:3000/admin and log in by using the
email and password provided while seeding your database:

Adding a model

Let's add a new Post model to our blog:

$ padrino g model post name:string body:text

Run the migrations to add database table columns to our database for our newly
created Post model: