Added support for server, db and frontend

... and many fixes plus reorganization of files and doc.