unical_serverpod_server 0.1.0-beta.0 copy "unical_serverpod_server: ^0.1.0-beta.0" to clipboard
unical_serverpod_server: ^0.1.0-beta.0 copied to clipboard

Reusable Serverpod module that provides calendar services: securely stored calendar accounts (CalDAV credentials), server-side CalDAV sync of events and tasks (built on unical + unical_caldav), and mu [...]

unical_serverpod_server #

A reusable Serverpod module that gives any Serverpod app calendar services, built on the pure-Dart unical stack:

  • Calendar accounts with credentials encrypted at rest (AES-256-GCM).
  • Server-side CalDAV sync of events and tasks (via unical_caldav) — secrets never reach the device.
  • Multi-device sync state: a canonical per-task store (UnicalTaskState).
  • Private or public calendars: private accounts belong to the authenticated user (session.authenticated.userIdentifier); public ones are readable by anyone.

Integrate #

In your server's pubspec.yaml:

dependencies:
  unical_serverpod_server: ^0.1.0

In config/generator.yaml:

modules:
  unical_serverpod:
    nickname: unical

Then dart pub get, serverpod generate, and apply this module's migration. Add unical_serverpod_client to your client package.

Configure the encryption key in config/passwords.yaml:

shared:
  unicalSecretKey: '<a strong random secret>'

Without it, the module refuses to store credentials (never persists them in clear text).

Endpoints #

  • CalendarAccountEndpoint: linkCalDav, linkGoogle, listAccounts, unlink.
  • CalendarSyncEndpoint: pushTask, pushEvent, pullTasks, listEvents, delete, syncedTasks.

Writes require the account owner; reads are allowed on public accounts or by the owner.

Scope / limitations (0.1) #

  • CalDAV is fully wired (Nextcloud/Fastmail/iCloud, etc.). Point task sync at a task-capable CalDAV server — Google's CalDAV is events-only.
  • Google: linkGoogle stores an encrypted refresh token, but server-side Google sync is not yet implemented (CalendarSyncEndpoint throws for Google accounts).
  • Runtime (Postgres + a live CalDAV server) is not covered by the shipped unit tests — those cover the pure glue (DTO mapping, encryption, strategy parity). End-to-end verification is the integrator's.
0
likes
140
points
5
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Reusable Serverpod module that provides calendar services: securely stored calendar accounts (CalDAV credentials), server-side CalDAV sync of events and tasks (built on unical + unical_caldav), and multi-device sync state. Any Serverpod app can add it to offer private (per-user) or public calendars.

Repository (GitHub)

License

MIT (license)

Dependencies

caldav, crypto, cryptography, serverpod, unical, unical_caldav

More

Packages that depend on unical_serverpod_server