caroline

Privacy respecting backend services with multiplatform Kotlin SDKs.

License

License

MIT
Categories

Categories

CRaSH General Purpose Libraries Utility
GroupId

GroupId

tools.caroline
ArtifactId

ArtifactId

caroline-sdk-crash-jvm
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

module
Description

Description

caroline
Privacy respecting backend services with multiplatform Kotlin SDKs.
Project URL

Project URL

https://github.com/DrewCarlson/Caroline
Source Code Management

Source Code Management

https://github.com/DrewCarlson/Caroline.git

Download caroline-sdk-crash-jvm

Dependencies

compile (2)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.31
org.jetbrains.kotlin : kotlin-stdlib-common jar 1.4.31

runtime (3)

Group / Artifact Type Version
tools.caroline : caroline-sdk-internal-jvm jar 0.0.1
org.jetbrains.kotlinx : kotlinx-coroutines-core-jvm jar 1.4.3-native-mt
org.jetbrains.kotlinx : kotlinx-serialization-json-jvm jar 1.1.0

Project Modules

There are no modules declared in this project.

Caroline

[WIP] This project is unfinished and not ready for use, most features described are not complete.

Maven Central

Caroline provides privacy respecting backend services with multiplatform Kotlin SDKs.

Services

The SDK provides the following features depending on your server deployment.

Monitoring

Logging - Stream your application logs in realtime or schedule uploads

Crash Reporting - Collect caught and fatal errors with custom data

Analytics - Track events with custom attributes

Application

Remote configuration - Distribute runtime configuration based on device attributes, percentage, etc.

Shared data store - Store and query data with custom access rules

Encrypted data store - Store and query data locally and sync it with e2e encryption

Authentication - Managed users with passwords or OAuth Providers (Github, Google, etc.)

Functions - Manipulate shared data based on cron or webhook triggers

SDK

// Configure SDK
val sdk = CarolineSDK {
    serverUrl = "https://caroline-server"
    projectId = "..."
    apiKey = "..."
}


// Logging
val logger = CarolineLogger.create(sdk, LogSchedule.WhenBufferFull)

logger.logInfo("An event to be logged.", mapOf("uid" to "..."))

Server

caroline-server supports various deployment modes depending on your backend requirements. By default, an all-in-one mode is used exposing all services from a single central instance.

If only some services are required, the server deployment can disable any unnecessary SDK backend components. Backend components can be deployed as individual services to scaling individual services.

Database

MongoDB provides the primary data storage. KMongo is used to interact with the database from server code.

Deploy

Deployment is straightforward with and without Docker, but for an all-in-one development instance, docker-compose is recommended. See the Dockerfile to understand running the server without Docker.

For critical deployments, managed database hosting is recommended. MongoDB Atlas is a good option and provides a free development database.

Docker

TODO: Finish this section

If required, start a Mongo instance:

 

Then start Caroline, pointing to the local Mongo instance:

docker run -d --name caroline \
    --env MONGO_URL=mongodb://mongodb \
    drewcarlson/caroline

Docker Compose

See docker-compose.yml for a complete example.

version: '3.1'
services:

  mongo:
    container_name: mongo
    image: mongo
    restart: unless-stopped

  caroline:
    container_name: caroline
    image: drewcarlson/caroline
    environment:
      PORT: 8080
      MONGO_URL: mongodb://mongo
    restart: unless-stopped
    ports:
      - 8080:8080
    links:
      - mongo

Download

Maven Central Sonatype Nexus (Snapshots)

repositories {
    mavenCentral()
    // Or snapshots
    maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
}

dependencies {
    // SDK Modules
    implementation("tools.caroline:caroline-sdk-admin:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-sdk-analytics:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-sdk-auth:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-sdk-config:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-sdk-core:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-sdk-crash:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-sdk-functions:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-sdk-logging:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-sdk-store:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-sdk-store-encrypted:$CAROLINE_VERSION")

    // Server Modules
    implementation("tools.caroline:caroline-server-core:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-server-projects:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-server-users:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-server-crash:$CAROLINE_VERSION")
    implementation("tools.caroline:caroline-server-logging:$CAROLINE_VERSION")
}

Versions

Version
0.0.1