feat: add CalDAV synchronization with automatic sync

- Add CaldavService with tsdav/ical.js for CalDAV server communication
- Add CaldavController, CaldavRepository, and caldav routes
- Add client-side CaldavConfigService with sync(), config CRUD
- Add CalDAV settings UI with config load/save in settings screen
- Sync on login, auto-login (AuthGuard), periodic timer (calendar), and sync button
- Push single events to CalDAV on server-side create/update/delete
- Push all events to CalDAV after chat event confirmation
- Refactor ChatService to use EventService instead of direct EventRepository
- Rename CalDav/calDav to Caldav/caldav for consistent naming
- Add Radicale Docker setup for local CalDAV testing
- Update PlantUML diagrams and CLAUDE.md with CalDAV architecture
This commit is contained in:
2026-02-08 19:24:59 +01:00
parent 81221d8b70
commit 325246826a
44 changed files with 7074 additions and 126 deletions

View File

@@ -22,18 +22,26 @@ package "Screens" #87CEEB {
class RegisterScreen
class CalendarScreen
class ChatScreen
class SettingsScreen
class EditEventScreen
class EventDetailScreen
class NoteScreen
}
' ===== COMPONENTS =====
package "Components" #FFA07A {
class AuthGuard
class BaseBackground
class Header
class BaseButton
class CardBase
class ModalBase
class EventCardBase
class EventCard
class ProposedEventCard
class EventConfirmDialog
class DeleteEventModal
class ChatBubble
class TypingIndicator
}
' ===== SERVICES =====
@@ -64,6 +72,13 @@ package "Services" #90EE90 {
+rejectEvent()
+getConversations()
+getConversation()
+updateProposalEvent()
}
class CaldavConfigService {
+getConfig()
+saveConfig()
+deleteConfig()
+sync()
}
}
@@ -71,11 +86,10 @@ package "Services" #90EE90 {
package "Stores" #FFD700 {
class AuthStore {
' +user
' +token
' +isAuthenticated
' +login()
' +logout()
' +setToken()
' +loadStoredUser()
}
class EventsStore {
' +events
@@ -86,10 +100,16 @@ package "Stores" #FFD700 {
}
class ChatStore {
' +messages
' +isWaitingForResponse
' +addMessage()
' +addMessages()
' +updateMessage()
' +clearMessages()
}
class ThemeStore {
' +theme
' +setTheme()
}
}
' ===== MODELS =====
@@ -97,6 +117,7 @@ package "Models (shared)" #D3D3D3 {
class User
class CalendarEvent
class ChatMessage
class CaldavConfig
}
' ===== RELATIONSHIPS =====
@@ -104,24 +125,39 @@ package "Models (shared)" #D3D3D3 {
' Screens -> Services
LoginScreen --> AuthService
CalendarScreen --> EventService
CalendarScreen --> CaldavConfigService
ChatScreen --> ChatService
NoteScreen --> EventService
EditEventScreen --> EventService
EditEventScreen --> ChatService
SettingsScreen --> CaldavConfigService
' Screens -> Components
CalendarScreen --> EventCard
ChatScreen --> ProposedEventCard
ChatScreen --> EventConfirmDialog
ChatScreen --> ChatBubble
ChatScreen --> TypingIndicator
EventCard --> EventCardBase
ProposedEventCard --> EventCardBase
EventCardBase --> CardBase
ModalBase --> CardBase
DeleteEventModal --> ModalBase
' Auth
AuthGuard --> AuthStore
AuthGuard --> CaldavConfigService
LoginScreen --> CaldavConfigService
' Services -> ApiClient
AuthService --> ApiClient
EventService --> ApiClient
ChatService --> ApiClient
CaldavConfigService --> ApiClient
' Services/Screens -> Stores
AuthService --> AuthStore
EventService --> EventsStore
CalendarScreen --> EventsStore
ChatScreen --> ChatStore
SettingsScreen --> ThemeStore
@enduml