This project is work in progress and not complete, yet. But after all this code runs in the simlar production environment.
Simlar is a cross-platform VoIP App aiming to make ZRTP encrypted calls easy.
You may start the simlar-server standalone, e.g., for development. For a useful setup you will at least need the following servers. Maybe some alternatives will work, too:
Java Development Kit 17
./gradlew build
As the simlar-server is a spring-boot application you may start it with an embedded tomcat server and an in-memory database.
./gradlew bootRun
./gradlew bootWar
The simlar-server uses the owasp-dependency-checker. Execute it with:
./gradlew dependencyCheckAnalyze
The simlar-server uses the gradle versions plugin. Run it with:
./gradlew dependencyUpdates
Run both:
./gradlew dependencyChecks
We use the IntelliJ IDEA Community Edition for development. To generate some files for this ide run:
./gradlew idea
Then simply open (not import) the directory in IntelliJ.
Because the simlar-server uses the Project Lombok, IntelliJ requires the Lombok Plugin to compile it. After installing the plugin it is required to enable annotation processing in Settings/Build, Execution,Deployment/Compiler/Annotation Processors.
In order to quiet IntelliJ's inspection warnings import the dictionary.
In Settings/Editor/Spelling choose the tab Dictionaries and add ides/intellij/dictionaries/simlar.dic
to the list of Custom Dictionaries.
A production environment needs a configuration file /etc/simlar-server/config.properties
.
E.g., to set the domain and the database.
Have a look at the example.
For development, you may place your configurations in src/main/resources/application-default.properties
.
The example configures the database and sets a log pattern with filenames and line numbers.
If you do not want to set up a database for development you may change the dependency type of the h2 database to providedRuntime
.
A docker file provides a defined build environment. You may create a simlar-server build container like this.
docker build --no-cache -t simlar-server-builder docker-files/
You may use the container to build the war file.
docker run --rm -v $(pwd):/pwd simlar-server-builder:latest bash -c "cd /pwd && ./gradlew --no-daemon --warning-mode all clean build dependencyUpdates dependencyCheckAnalyze"
However, caching gradle downloads speeds up the build, and some security options do not hurt.
docker run --cap-drop all --security-opt=no-new-privileges --rm -v $(pwd)-docker-gradle-cache:/home/builder/.gradle -v $(pwd):/pwd -e SIMLAR_NVD_API_KEY simlar-server-builder:latest bash -c "cd /pwd && ./gradlew --no-daemon --warning-mode all clean build dependencyUpdates dependencyCheckAnalyze"