CRMed - Simple Contact Management for Small Biz
CRMed began as a way for a non-technical client to easily add email addresses to a MySQL database table which is referenced when customers sign up for a completely separate online store account - if the email is in the table, the user gets special permissions to order certain products. It's a Rails app. Here's how it works:
- Pre-approved adminstrative users login with a Google email account* to enter customer/patient/client info and optionally send those details to different web services.
- When a Client is created (first name, last name, email), a ClientDetail object is also created that tracks which remote services the info has been sent to.
- The administrator can add the Client info/details as a Gmail contact, to a Mailchimp list and send it to a separate MySQL database.
I couldn't find a great Rails-specific solution for using multiple databases with the same model, so started with a colleague's suggestion to use a scheduled job or task to send the data to the remote database. That seemed pretty straightforward and worked locally.. until realizing that the company hosting the MySQL database doesn't allow ssh connections (it's a commodity LAMP stack host). Since moving the MySQL database isn't an option or necessary right now and conflating this app with the online store's database seemed like a bad idea for a few reasons, the client_details_controller#mysql method uses Mechanize to log in to an .htaccess-protected PHP form on the same host as the MySQL database, then completes and submits the form to add the record to the database unless it already exists. For Mailchimp and Google Contacts, see models/client_details.rb for details.
For both business needs and my own enlightenment/experimentation/improvement, future features I hope to add include a calendar, Quickbooks integration, appointment scheduling and reminders and other CRM-y goodness.
*Railscast 241 was helpful with setting up basic Omniauth, also the code/references from Prepared.ly.