Skip to content
Lucas Castro edited this page Sep 8, 2017 · 3 revisions

Getting Started

The Base Project is a template of project that we use to create custom made softwares following some patterns we have adopted during almost 5 years working for small to mid-sized companies.

In general, those projects have 3 main goals:

  1. Provide CRM features
  2. Provide Process Management features
  3. Provide Financial Management features

So, our wish is to take easy the creation of new projects with requirements similar to this, providing templates, libraries and how-tos.

In this document, we are going to create a new project based on our Template project in order you can start to personalize it.

Cloning the Template project

Let's assume we are creating a new project called "My CRM" in "my_crm" folder:

git clone https://github.com/castroebarros/base.git my_crm
cd my_crm
git remote rm origin

As you can see, the origin branch is not the actual origin of our application, so we ran a git command to delete that remote entry.

Installing the dependencies

The project is configured with a bunch of gems like pg, will_paginate, simple form, nested form, jquery-rails, paperclip and more.

If you it's so much for you feel free to remove some gems from Gemfile.

bundle install

Database settings

  1. Open the config/database-example.yml file:
  2. Fix the username and password of PostgreSQL
  3. Rename the database names from "base" to a more suitable name for your project
  4. Save as config/database.yml.
  5. Run rake db:create
  6. Run rake db:migrate
  7. Run rake db:seed

TO-DO: replace database-example.yml for a database.yml with the defaults PostgreSQL credentials.

Try

Start the server:

rails s

Now we can open the browser: http://localhost:3000

Application's name and logo

With the BaseHelper we can configure the name and the logo of our new application:

module BaseHelper
  def app_name
    "My Crm"
  end

  def logo
    'logo.svg'
  end
end

The logo is used only on login page, and app_name is used in both: login page and header of application.