Create simple information systems fastly by using code and feature conventions.
Base is the project that Castro & Barros uses as base to create information systems for small companies.
For a long time we have done some Rails projects for a lot of companies and we have noticed some patterns among these projects, like gems, javascript libraries, configurations, models, etc.
So we've decided to create a Rails template in order to reduce the time needed to start new projects. Yes, it worked well some times, but we felt that would be easier and productive to have a base project that would be cloned, instead of generate code and copy-and-paste some stuff.
We thought about create some Ruby gems to try make things more reusable, but we realized that would be still most important to have a good knowledge base.
That way, this project has two goals:
- serve as a template of project;
- serve as a place to share and improve conventions.
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:
- Provide CRM features
- Provide Process Management features
- 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.
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.
The project is configured with a bunch of gems like pg, will_paginate, simple form, nested form, jquery-rails and more.
If you it's so much for you feel free to remove some gems from Gemfile.
bundle install
- Open the config/database.yml file:
- Fix the username and password of PostgreSQL (if necessary)
- Rename the database names from "base" to a more suitable name for your project
- Run rake db:create
- Run rake db:migrate
- Run rake db:seed
Start the server:
rails s
Now we can open the browser: http://localhost:3000
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.
This is a open source under the terms of the MIT License.