BranislavBeno / Ronja-CRM-Server

MIT License
1 stars 1 forks source link

Application Tests Application Deploy
Security Rating Coverage Lines of Code

Ronja CRM server

Application is a simple REST-API server, which provides basic CRUD operations over a connected database for a simple CRM system and by default, listens on port 8087.

Installation

Preferred way of installation is to pull and run prepared docker image docker pull beo1975/ronja-server:1.3.3.
Precondition is to have docker installed on the hosting OS.

Alternatively is possible to build and run the application as a fat jar on any hosting OS with Java 21 installed.

Application expects running instance of MySQL database engine. It's recommended to install and run MySQL as a docker image by usage of prepared docker-compose.yml file. No other services are required.

Usage

For sending requests and receiving responses use Postman, curl or any web browser.

API description

Following endpoints are available for usage:

Customers

Request body example for customer:

{
  "companyName": "FirstCorp",
  "category": "LEVEL_1",
  "focus": "BUILDER",
  "status": "ACTIVE"
}

Allowed values for:

Representatives

Request body example for representative:

{
  "firstName": "Employee",
  "lastName": "First",
  "position": "CFO",
  "region": "EMEA",
  "notice": "",
  "status": "ACTIVE",
  "lastVisit": "2021-11-08",
  "scheduledVisit": "2022-12-21",
  "phoneNumbers": [
    {
      "contact": "+456789123",
      "primary": true,
      "type": "work"
    }
  ],
  "emails": [
    {
      "contact": "john@example.com",
      "primary": true,
      "type": "work"
    },
    {
      "contact": "bob@example.com",
      "primary": false,
      "type": "home"
    }
  ],
  "customer": {
    "id": 1,
    "companyName": "FirstCorp",
    "category": "LEVEL_1",
    "focus": "BUILDER",
    "status": "ACTIVE"
  },
  "contactType": "PERSONAL"
}

Allowed values for:

Metal prices