luckyshot / CRMx

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. CRMx allows unlimited users to work in the same or different environments very flexibly. CRMx works through a RESTful API which allows third-party services and other software to interact neatly. CRMx also has a User Access Control system (UAC) to define permissions for each user and have maximum control over the organization.
https://xaviesteve.com/
MIT License
101 stars 39 forks source link
bootstrap business crm crm-online crm-system freelance hacktoberfest mysql-database php productivity sales

CRMx

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.

Screenshots

Table view

From here you have an overall view of your contacts:

Table view

Search as-you-type

Type in the search box to start filtering, results update dynamically as you type:

Search as-you-type

Smart filtering

CRMx detects your custom form field types and adds shortcut lists on the top navigation automatically:

Smart filtering

Person view

View a person details, edit them directly and also add timed comments:

Person view

Smart links

Buttons appear next to the person fields to email, search Google or Skype-call in one click

Smart links

Technology

Settings

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.

Installation

Open config.php to modify the app settings:

User accounts

User accounts are created by adding them to the $users PHP array. These are the fields you can customize:

Logging in

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

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.

Form field types

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.

Textbox

Just name and title are needed:

'name' => 'email',
'title' => 'Email address'

Select dropdown

Specify 'type' => 'select' and a list of elements:

'name' => 'color',
'title' => 'Favorite color',
'type' => 'select',
'list' => array( "Red", Green", "Blue" )

Others formats

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'

Example

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,

Deleting fields

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.

REST API

Home /

Request data (GET)

(none)

Response (HTML)

The home page in HTML format (including the default people and form JSON lists embedded to save server requests).


Login /login/:pass

Request data (GET)
Response (JSON)

On success redirects to Home, on fail shows a message.


Search /search/:q

Searches people for that query and returns a JSON array.

Request data (GET)
Response JSON
{
    "id":"46",
    "name":"Richard",
    "form":{
      "title":"CEO",
      // your defined form fields
    }
  },{
    "id":"37",
    "name":"Peter",
    "form":{
      "title":"Director",
      // your defined form fields
    }
}

Load person /get/:id

You can pass an ID or a name, returns results for a single person (if more than one match returns the most recently modified).

Request data (GET)
Response (JSON)
{
  "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"
}

Save person /save

Request data (POST)
Response (JSON)
{
    "status": "success" OR "error",
    "message": "Contact saved successfully."
}

Delete person /delete

Request data (DELETE)
Response (JSON)
{
    "status": "success" OR "error",
    "message": "Contact deleted successfully."
}

Add comment /comment

Request data (POST)
Response (JSON)
{
    "status": "success" OR "error",
    "message": "Comment added."
}

Delete comment /comment/:id

Request data (DELETE)
Response (JSON)
{
    "status": "success" OR "error",
    "message": "Comment deleted."
}

Plugins

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.

Multi-language

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'.

MySQL table details

people table

(You don't need to create any tables, CRMx will create them automatically)

Changelog

4 April 2013

1 April 2013

29 March 2013

28 March 2013

To Do

License

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.

Credits

Author: Xavi Esteve (@xaviesteve)