Skip to content
vala edited this page Dec 4, 2014 · 1 revision

Para is a CMS-like Ruby on Rails engine that allows you to create an admin panel for your app.

One of the main goals of this project, is to have a tool that gives you as much flexibility as you may need to make your admin panel custom, while shipping with many features that lets you bootstrap it quickly, and being enough for simple use cases.

Architecture

Para is powered by the concept of Components. They're the entry point for the admin creation.
In the admin panel, they're grouped inside Component Sections, which lets you organize the admin so the main menu stays readable.

Some components are already included in Para's core, but you'll often have to generate your own components, in your app, to be able to create your admin structure. For example, you may want to create dashboards, CRUDs with other informations, or simply to create a Home page administration, which often refers to many different resources.

For more informations on creating components, you can read the Creating components page.

Creating a simple CRUD

Let's say your app is a simple blog page that displays posts.
So you'll need to create a post model and let administrators write blog posts from the admin panel.

Create your Post model in the console with rails g model post title content
Run the created migration with : rake db:migrate

Launch your app with rails s and, in your browser, go to the admin panel at http://localhost:3000/admin.

In the main menu, click on "Create a new Section", give it the name "Blog" and validate the form.

Now, you have a new section in the main menu, click on the title "Blog", then click on "Actions" -> "Add a component" -> "Resources list".

Give it the name "Posts" and select and select in the dropdown Post.
Validate the form and you can now manage your posts.

Customizing the forms and tables

For our example, the generated form and table may be enough, but most of the time, you'll want to hide some fields or customize the way they're rendered. Find out how in the Customizing forms and Customizing tables

Creating a more complex admin structure

The example with the basic CRUD admin component

Clone this wiki locally