Hello all. I have developed a customer relationship management system using Drupal as my platform. This program has been running within the walls of a single organization for a while now with much success. I would like to bring on some more clients and have been throwing around ideas on how to manage the information for specific clients within the bounds of one code base.

The question I would like to pose here is; what is the best way, from a database perspective, to organize individual client data within the Drupal schema? This one client has over 34K contacts in the database and I am thinking that bringing on more clients would bloat the node table making the entire system slower and slower for all of the clients. I am just brainstorming here, but maybe there is a way to dynamically generate a subsite that creates a new set of tables fresh for the new customer. This way individual client information is nicely organized and not bunched up with all other clients. Has anybody come across this requirement?

Ideally, I envision a client coming to a site say at myapp.com and registering for an account and getting a subsite at mycompany.myapp.com with a fresh database for managing their own information. Very similar to many web services we use today, much like 37Signals.com.

Any ideas out there?

Comments

gutomec’s picture

I'm looking for exactly the same as you.
Does anyone know how to do this?

nickgs’s picture

I am glad someone else has this need. I am throwing around a few ideas. I am thinking develop a module that exposes the customer registration form and during the workflow of this form execute a set of scripts (a preconfigured profile perhaps?) that would create a subsite (sites/myCompany), output a fresh settings.php, create a virtual host, and execute the install.php for this new site. I would like to share some core tables with the entire site but most of the content types should be unique to the users.

If anyone has any input please share. I will keep this thread updated with my findings.

Thanks.

Nick
nickgs.com

AlexJ’s picture

I'm looking for a very similar system, initially not as complex as the one you are envisioning here, I was wondering how to expand the profile to being a workable sub site of sorts, so I'm starting to examine Advanced Profile Kit http://drupal.org/project/advanced_profile and associated modules. But I would also see some of my proposed users wanting to develop to the sub-site status, so your concept seems more attractive. Unfortunately I'm not a developer yet, just learning various code now.

johnpitcairn’s picture

Subscribe...