Scala CRM Seed
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

CRM Seed

Build Status Join the chat at

The Try in PWD below allows you to quickly deploy the entire CRM stack with a click of the button. This will allow you to quickly test the stack to see if it meets your needs (it is require user on

Try in PWD

Scala seed project for starting new customer relationship management system.

Brief description

Almost every customer relationship management (CRM) software in different domains usually require to develop functions for managing customer contacts as part of it. These functions include create, edit, share customer information, grouping contacts with categories and filtering with some criteria, user access management to contacts inside software, etc. Proposed project could be used as seed project for building fully functional CRM software.


Project has a multilayer architecture with loosely coupled layers, which allows easy to change the behaviors of each layer without significant changes in others. In such design, there is no big deal to change UI presentation, or to add custom behaviour to data model dictated by business-logic, or to modify access to data storage. It was designed with the thought of being ready to customisations.

Project consists of two major parts: back end written with Scala and Play Framework as RESTful service, and web-UI developed as one page web app on Angular.


Use cases

Originally CRM refers to practices, strategies and technologies that companies use to manage and analyse customer interactions and data throughout the production lifecycle, with the goal of improving business relationships with customers, assisting in customer retention and driving sales growth. CRM software consolidates customer information and documents into a single CRM database so business users can more easily access and manage it. An integral part of every CRM is management of customer information.

Project contains all typical use cases for user management and customer management.

User management panel contains:

  • user authorisation
  • users list
  • user invitation
  • user activation/deactivation

Contacts panel contains:

  • create/edit/delete contact
  • filter/search contacts
  • group/ungroup contacts

Running in presentation mode

For make an opinion and to play around with application you can simply use prepared docker images of all application parts. To do so, run docker-compose from application directory

$ docker-compose up

Application will be listening on localhost port 80.
Go to the running app

You can login with:

email: admin
password: admin

Running in dev mode


To compile application server-side the Scala SDK required. Database and UI part of application are dockerized. Look at docker-compose-dev.yaml for information.


Building server application (from project directory)

$ sbt compile

Running tests

To run tests

$ sbt test


Run docker-compose with docker-compose-dev.yml compose file:

$ docker-compose --file docker-compose-dev.yml run

And don't forget to specify in docker-compose file a ip address of your host in variable BACKEND_URL in format In opposite case crm_ui will don't know where to find a server.

Run application server with:

$ sbt run

Application will be started at localhost

Default admin account:

email: admin
password: admin



Web UI use HTTP request to the server for data interaction with json.

Customer contacts managements:

GET     /api/v1/contacts/all
GET     /api/v1/contacts/owner
GET     /api/v1/contacts/:id
POST    /api/v1/contacts/create
PUT     /api/v1/contacts/update/:id
PUT     /api/v1/contacts/update/:id/advertiser/:advId
POST    /api/v1/contacts/delete
DELETE  /api/v1/contacts/delete/:id
DELETE  /api/v1/contacts/delete/:id/advertiser
GET     /api/v1/contacts/contactsbook/owner
GET     /api/v1/contacts/contactsbook/owners
GET     /api/v1/contacts/contactsbook/owner/:id

Customer groups managements:

GET     /api/v1/contacts/group/get/:id
POST    /api/v1/contacts/group/create
POST    /api/v1/contacts/group/add
POST    /api/v1/contacts/group/delete
POST    /api/v1/contacts/group/update
DELETE  /api/v1/contacts/group/delete/:id
GET     /api/v1/contacts/group/contactsbook/:id

Full list can be found in conf/routes and conf/auth.routes files.


In order to restrict access to information, the authorization module is integrated. There is a few predefined user roles, with invitation system for new users. Authorization are build with Silhouette library, supports different authentication methods. Configuration parameters are stored in conf/aplication/silhouette.conf file. Default administration account are stored in conf/aplication/root.conf file. Note: for production use is strictly recommended to change all parameters with [changeme] values in silhouette configuration file.


Application use Slick library for interaction with database. Such approach allow easy substitution of RDBM from one to another. All db specific parameters are stored in conf/application/databases.conf file.


Adding a new user to the system occurs by sending an invitation to him by email. For sending email gmail smtp are used. To using this feature you have to provided any real google account credentials, by editing file conf\application.mailer.conf

play.mailer.user = "your-email"
play.mailer.password = "your-email-password"
play.mailer.mock = false

or provide environment variable PLAY_MAILER_USER, PLAY_MAILER_PASSWORD and PLAY_MAILER_MOCK with appropriate values.

Built With

  • Play - Lightweight framework to build application with Scala
  • Slick - Modern database query and access library for Scala
  • Silhouette - Authentication library for Play Framework applications that supports different authentication methods
  • Scalty - Library with useful wrappers for monads transformer EitherT[Future, AppError, T] for Scala


We are welcomes questions via our issues tracker. We also greatly appreciate fixes, feature requests, and updates; before submitting a pull request, please visit contributor guidelines.


This project is licensed under the Apache 2.0 License - see the LICENSE file for details