Skip to content

Server Software for the Customer Database App, Providing a JSON-RPC-API and Read-Only CardDAV-API for Syncing

Notifications You must be signed in to change notification settings

schorschii/CustomerDB-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customer Database Server

With this PHP web app you can set up your own server for the Android and iOS app "Customer Database".

Play Store App Store

Highlights

  • multi-tenant capable
  • read-only CardDAV API (e.g. for syncing with your email client or router phone book (for DECT phone))

System Requirements

  • Linux OS (Debian recommended)
  • Apache 2 Webserver + PHP 7
  • MySQL/MariaDB Database Server

Installation (On A Root Server)

  1. Install Apache 2, PHP 7 (with php-curl) and MySQL/MariaDB on a Linux server.
  2. Download the latest release and unpack it into /srv/www/customerdb.
  3. Set your Apache (virtual host) web root directory to /srv/www/customerdb/web by editing the corresponding configuration file inside /etc/apache2/sites-enabled.
  4. Create a database on your MySQL server and import the schema from sql/customerdb.sql.
  5. Edit/create conf.php from the example file (conf.php.example) and enter your MySQL credentials. Please do not use the root user but create a new user which is only allowed to operate on the specific database.
  6. Select "Own Server" in the settings of your Customer Database app and enter the full URL to the web/api.php script. Example: http://192.168.2.10/api.php.
  7. Create an account. You can do this in the app (if the API and registration is enabled in conf.php) or by using the command line tool on the server (php console.php createuser <username> <password>).

Installation (On A Managed Server)

  1. Download the latest release and unpack it into your webspace.
  2. Create a database on your MySQL server and import the schema from sql/customerdb.sql using phpMyAdmin or a similar web-based tool from your hosting provider.
  3. Edit/create conf.php from the example file (conf.php.example) and enter your MySQL credentials.
  4. Select "Own Server" in the settings of your Customer Database app and enter the full URL to the web/api.php script. Example: http://example.com/web/api.php.
  5. Ensure that the API and registration is enabled in conf.php. Now create a sync account inside the app.
  6. After you created your personal account on your server, you may now want to disable the registration in conf.php.

Further (Optional) Steps

Especially if your server is available from the internet (and not only locally in your home network):

  • it is highly recommended to setup HTTPS on your web server
  • it is highly recommended to setup fail2ban on your web server (see lib/fail2ban for more information)
  • you may want to disable the user registration in the conf.php file (you can also disable the API or the web frontend here)

Upgrade

For upgrading your server to a newer version, please read Upgrade.md.

(API) Documentation

Please have a look at the docs folder.

Development Status

Currenty, these scripts only provide the API. It is planned to provide a full web frontend for creating and editing customer records in the web browser.