CRMx is a super-flexible micro-CRM system for personal, freelance and small businesses. It can be customized very quickly for Customer Relationship Management, Lead Management System, Project Management, To-Do List or any other usage due to its flexibility in customization and scalable code.
- RESTful API: Works through a RESTful API which allows third-party services and other software to interact neatly.
- Unlimited users & environments: Allows unlimited users to work in the same or different environments very flexibly (including a User Access Control system (UAC) to define permissions for each user and have maximum control).
- Simple setup: Similar to Sublime Text, all the config is done in
config.php
which keeps the overall code tiny and much easier to maintain and scale. - Extremely scalable: CRMx is extremely small, with one PHP, one JS and one CSS files, with inline comments, you can see the code and start hacking it in 5 minutes. Oh, and you can also create CRMx plugins :)
From here you have an overall view of your contacts:
Type in the search box to start filtering, results update dynamically as you type:
CRMx detects your custom form field types and adds shortcut lists on the top navigation automatically:
View a person details, edit them directly and also add timed comments:
Buttons appear next to the person fields to email, search Google or Skype-call in one click
- Limonade PHP micro-framework (inc. custom MySQL lemon)
- MySQL
- JavaScript / jQuery / JSON
- Twitter Bootstrap (and LESS)
There is no Settings menu or user accounts, all is done in PHP variables (like Sublime Text) in the config.php
file, which makes the code app a lot smaller as well as easy to administer, maintain and scale.
Open config.php
to modify the app settings:
- Type in the MySQL user, password, server and prefix (There is no need to create the MySQL tables, these are created automatically)
- Customize the
$form
array (see Form field types below for more info) - Add your
$users
and their permissions - If you are installing CRMx in a subdomain:
- Modify the
option('base_uri', '/');
and add it there (forexample.com/crmx/
it should beoption('base_uri', '/crmx/');
, note the trailing slash) - Do the same in the
.htaccess
file, uncomment the#
and add the subdomain (following the example above it will beRewriteBase /crmx/
)
- Modify the
- Open CRMx and type in your user's password. You can also bookmark
http://YOURCRMXPATH.com/login/YOURPASSWORD
so that it autologins you every time.
User accounts are created by adding them to the $users
PHP array. These are the fields you can customize:
- name (string) Full name of the user
- pass (string) Add a very long random alphanumeric string of between 100 and 300 characters (the more the better, check
is_logged_in()
in the code for a generator) - level (string) Add flags to allow users certain privileges
- r read: useful when you want an external partner to submit contacts but not be able to access the CRM (i.e. external lead provider)
- s save: create and update contacts
- d delete: can delete contacts
- c comment: can comment on contacts
- dbprefix (string) Many users can work in different environments on the same database by using a different table. To do this, just specify a different MySQL prefix here (i.e.
sales_
) - sitename (string) You can customize the app title for each user
There is no login screen in CRMx. Users bookmark a long URL and click on it to login. You should specify a long and unique password (at least 50 characters) for each user and then send them the URL to bookmark, which looks like:
http://crmx.com/login/thesuperlongpassword
Environments allow users to work on separated CRMx (with their own contacts and form fields) while using the same app. Add that prefix to a user and another array in $form
. Simple as that.
It's very easy to customize CRMx to your own needs. You just need to modify the $form
PHP array in config.php
and the app will take care of the rest.
Just name and title are needed:
'name' => 'email', 'title' => 'Email address'
Specify 'type' => 'select'
and a list of elements:
'name' => 'color', 'title' => 'Favorite color', 'type' => 'select', 'list' => array( "Red", Green", "Blue" )
You can use other HTML5 form field types like: password
, hidden
, color
, date
, datetime
, datetime-local
, email
, month
, number
, range
, search
, tel
, time
, url
and week
.
'name' => 'website', 'title' => 'Website URL', 'type' => 'url'
This is how I have my personal CRMx config.php
set up:
$form = array( 'test_' => array( // table prefix // name (default, no need to specify) // title (default, no need to specify) array('name' => 'group', 'title' => 'Group', 'type' => 'select', 'list' => array( "-", "London", "Barcelona")), array('name' => 'type', 'title' => 'Type', 'type' => 'select', 'list' => array( "-", "Partner", "Client", "Lead")), array('name' => 'email', 'title' => 'Email', 'type' => 'email'), array('name' => 'phone', 'title' => 'Phone Number', 'type' => 'tel'), array('name' => 'company', 'title' => 'Company', 'type' => 'search'), array('name' => 'address', 'title' => 'Address', 'type' => 'search'), ), );
Hidden
To skip a form field to show in the main table, set the hidden
property to 1
. This is useful when you have a lot of fields or you want to disable a field you might want to use in the future.
'hidden' => 1,
Note that if you remove a field from config.php
it will still be in the database and will disappear when that person is updated. If you'd rather not loose any info, set hidden = 1
instead of deleting it.
(none)
The home page in HTML format (including the default people and form JSON lists embedded to save server requests).
pass
(string)
On success redirects to Home, on fail shows a message.
Searches people for that query and returns a JSON array.
q
(string)
{ "id":"46", "name":"Richard", "form":{ "title":"CEO", // your defined form fields } },{ "id":"37", "name":"Peter", "form":{ "title":"Director", // your defined form fields } }
You can pass an ID or a name, returns results for a single person (if more than one match returns the most recently modified).
id
(string)
{ "id": "46", "name": "Richard", "form": { "title": "CEO", // your defined form fields }, "comments":[ { "user": "Xavi Esteve", "date": "2013-03-24T16:03:19+00:00", "text": "..." } ], "created": "1364140289", "updated": "1364140289" }
id
(string)
{ "status": "success" OR "error", "message": "Contact saved successfully." }
id
(string)
{ "status": "success" OR "error", "message": "Contact deleted successfully." }
id
(integer)comment
(string)
{ "status": "success" OR "error", "message": "Comment added." }
id
(integer)
{ "status": "success" OR "error", "message": "Comment deleted." }
With plugins you can add extra functionality to CRMx without needing to modify the core files. Creating plugins is extremely easy and you can run PHP, JavaScript and/or CSS code. To create a plugin, add a new folder to the plugins
folder and files, all with your plugin name:
/plugins/salesforce salesforce.php salesforce.js salesforce.css
All files are optional, if you want to create a theme then a single CSS file should be enough. If you want to have a file that doesn't run automatically then name it differently than the plugin name.
The last step is to add the plugin name to the $plugins
array in config.php
.
In the lang
folder, create a new language file (use ISO 639-1 codes) or use an existing one.
Then, add 'lang' => 'es_es',
in the user's configuration.
Alternatively, you can change LANG_DEFAULT
so everyone will have the same language.
Having different languages is not only useful to change the language of CRMx but to customize the app further. For example, if you use CRMx as a Project Plan system you can rename 'Name' to 'Project' or 'Save contact' to 'Save project'.
(You don't need to create any tables, CRMx will create them automatically)
- id (int20, primary, autoincrement)
- name (string255, mandatory)
- form (text, json)
- comments (text, json)
- created (int11)
- updated (int11)
- Fixed sorting Titles (thanks Soomiq)
- Fixed Language files
- Fixed Save/New contact button
- Added sprite images
- Multilanguage
- Plugins
- Code clean up and improvements
- Favicon
- Generate MySQL tables automatically
- Multiword search
- Sort by column
- Delete comments
- Code optimization
- Code documentation and inline comments
- CRMx plugins to add extra functionality (canned responses, SalesForce integration, etc.)
- Table view instead of Sidebar
- Redesigned top nav
- Search also searches comments now
- Added icons and buttons
- Form is now two-column instead of one
- Smart links in detail view
- Improved docs, added screenshots
- Many more improvements and small tweaks
- Fixed bugs with notification message
- Other bugs fixed
- Reorganized all files
- Minified all JS into one file
- jQuery to use latest instead of 1.8.6
- Minified CSS into two files
- Responsive improvements
- MIT licensed
- Use same date format along MySQL
- Smooth scrolling anchors up/down page
- Write tests
CRMx has been created by Xavi Esteve and is licensed under a MIT License.
Copyright © 2013 Xavi Esteve
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Author: Xavi Esteve (@xaviesteve)
- Icons by Glyphicons (attribution)
- Twitter Bootstrap by Twitter, Inc (Apache license)
- Limonade PHP micro framework by Fabrice Luraine (MIT license)
- EasyDate by Parsha Pourkhomami (MIT license)
- AutoLink by Bryan Woods (open sourced)