Cosmo Calendar Server is part of an open source project called Chandler which provides calendaring features, task and note management. Cosmo implements CalDAV protocol. It is being used as Calendar Server solution for WEB.DE, GMX.net, GMX.com and mail.com brands.
This project contains only CalDAV core part from Chandler with its dependencies up to date (initial project being closed in 2008).
It also brings a new approach in such a way that Cosmo is a CalDAV runtime environment. The project provides an API that contains abstractions over CalDAV and iCal specific objects, services implemented in Cosmo Core but also accessible to developers and a plugin mechanism that allows developers to write custom logic without having to alter Cosmo Core code.
There are two main logical components, each of them residing in its own artifact: cosmo-api and cosmo-core.
cosmo-api
contains:
cosmo-core
is the actual CalDAV server and runtime environment for developer custom components. It looks up for such components at
application context startup and registers them in order to be called during requests.
It also injects public services into developer components.
The application that uses cosmo-api and cosmo-core must be Spring Boot application.
Setting up a CalDAV server with cosmo-api and cosmo-core.
To be able to run the application one needs to configure the following:
org.springframework.security.core.AuthenticationProvider
annotated with @Component
org.unitedinternet.cosmo.db.DataSourceProvider
@SpringBootApplication
To be able to override one default implementation Spring @Primary
annotation can be used.
The cosmo-webapp application is just for demo purposes.
To launch it, in the project's root directory (cosmo-webapp) just run mvn spring-boot:run
.
The calendar server will start using an in-memory database (data will be lost when the application stops).
It will be available for CalDAV requests at http://localhost:8080/cosmo/dav/.
The application simply creates a user if it does not exists and it does not check the password.
To create a collection for a new user a MKCALENDAR request is needed like :
curl -X"MKCALENDAR" -H"Content-Type:application/xml" -u${your_email}:${your_passwd} http://localhost:8080/cosmo/dav/${your_email}/calendar
The newly created collection can be configured in Mozilla Lightning application for instance by using the URL: http://localhost:8080/cosmo/dav/${your_email}/calendar