Real-world backend application example based on Fat Free CRM, RhoConnect app, RhoConnect-rb plugin, and Rhodes client application. This project demonstrates how RhoConnect integration server might be used to work with an open source, Ruby on Rails customer relationship management platform (Fat Free CRM) and includes the following components:
- Fat Free CRM: https://github.com/fatfreecrm/fat_free_crm
- RhoConnect Server: http://docs.rhomobile.com/rhoconnect/introduction
- RhoConnect Rails Plugin: http://docs.rhomobile.com/rhoconnect/rails-plugin
- Rhodes Client application: http://docs.rhomobile.com/rhodes/introduction
Directory fat_free_crm_fork
includes forked source of Fat Free CRM with the following changes:
- file
config\initializers\rhoconnect.rb
shows how to configure rhoconnect rails plugin - file
fat_free_crm/app/models/entities/account.rb
includes required rhoconnect plugin code (plugin resources, methodspartition
andrhoconnect_query
) - file
fat_free_crm/app/models/entities/campaign.rb
includes required rhoconnect plugin code - file
fat_free_crm/app/models/entities/lead.rb
includes required rhoconnect plugin code - file
fat_free_crm/app/models/entities/opportunity.rb
includes required rhoconnect plugin code - file
fat_free_crm/app/models/polymorphic/task.rb
includes required rhoconnect plugin code - file
fat_free_crm/app/models/users/user.rb
includes required rhoconnect plugin code
All Fat Free CRM models have partitioned at application level (:app) and shared by all rhodes users. Only exception is task
model. By business logic tasks always user specific and it has :user partition.
RhoConnect has one source adapter for Account
model and shows how plugin REST API should be used in update/create/delete mothods.
Method query
demonstates usage of RhoConeect API method stash_result
. This method might be very usuful in the case of
large datasets on backend.
Application is generated by running rhodes
generator and has the following models:
- Account
- Campaign
- Contact
- Lead
- Opportunity
- Task
- Start Rhoconect Server (terminal #1)
$ bundle install
$ bundle exec rhoconnect start
- Start Fat Free CRM Server (terminal #2)
$ bundle install
$ rails server
TODO: Check Rhoconenct Web console
- Start Rhodes Client application (terminal #3)
$ rake run:rhosimulator
- Rhodes client needs more work in GUI, esp. in create/update forms
- RhoConnect app should demonstrate usage of associations between models