Infrastructure medium complexity backend
1
Dependencies
1
Dependents
3
Entities
0
Integrations

Description

Backend infrastructure that exposes a per-user iCal feed endpoint secured with a user-specific token. Serializes PostgreSQL activity and event data into valid iCalendar (RFC 5545) format consumable by iOS Calendar, Google Calendar, and other CalDAV-compatible clients. Applies privacy masking for encrypted assignment entries.

Feature: Calendar Synchronization

calendar-api-infrastructure

Responsibilities

  • Expose GET /api/v1/users/{id}/calendar.ics endpoint secured by user-specific bearer token
  • Serialize activities, events, and reminders into RFC 5545 iCalendar format
  • Apply privacy masking: replace encrypted assignment titles and descriptions with generic labels
  • Validate iCal token from query parameter and reject unauthorized requests

Interfaces

serveICalFeed(userId: string, token: string): ICalResponse
buildICalEvent(source: Activity | Event | Reminder): VEvent
applyPrivacyMask(event: VEvent, isEncrypted: boolean): VEvent
validateICalToken(userId: string, token: string): boolean
generateICalToken(): string
buildICalCalendar(events: VEvent[]): string

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (3)

Data entities managed by this component