Connor Johnstone 51d5552156 Fix modal series editing to use correct backend endpoint
The modal update flow was calling the regular event update endpoint
instead of the series endpoint, preventing proper handling of the
three edit types (this event, this and future, all events).

## Changes:
- Add logic to detect when edit_scope is set for recurring events
- Route to update_series() when edit_scope is present and event has RRULE
- Map EditAction enum to backend update_scope strings:
  - EditThis → "this_only" (creates exception + EXDATE)
  - EditFuture → "this_and_future" (new series + UNTIL on original)
  - EditAll → "all_in_series" (update existing series)
- Pass occurrence date for single/future edits using original event date
- Fall back to regular update_event() for non-recurring events

Now the modal properly leverages the existing robust series endpoint
that handles RFC 5545 compliant recurring event modifications.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-31 19:06:11 -04:00
2025-08-31 17:55:06 -04:00

Modern CalDAV Web Client

Warning

This project was entirely vibe coded. It's my first attempt vibe coding anything, but I just sat down one day and realized this was something I've wanted to build for many years, but would just take way too long. With AI, I've been able to lay out the majority of the app in one long weekend. So proceed at your own risk, but I actually think the app is pretty solid.

A full-stack calendar application built with Rust, featuring a modern web interface for CalDAV calendar management.

Motivation

While there are many excellent self-hosted CalDAV server implementations (Nextcloud, Radicale, Baikal, etc.), the web client ecosystem remains limited. Existing solutions like AgenDAV often suffer from outdated interfaces, bugs, and poor user experience. This project aims to provide a modern, fast, and reliable web interface for CalDAV servers.

Features

Calendar Management

  • Interactive Calendar Views: Month and week views with intuitive navigation
  • Event Creation & Editing: Comprehensive event forms with all standard iCalendar properties
  • Drag & Drop: Move events between dates and times with automatic timezone conversion
  • CalDAV Integration: Full bidirectional sync with any RFC-compliant CalDAV server

Recurring Events

  • RFC 5545 Compliance: Complete RRULE support with proper parsing and generation
  • Flexible Patterns: Daily, weekly, monthly, and yearly recurrence with custom intervals
  • Advanced Options: BYDAY rules, COUNT limits, UNTIL dates, and exception handling
  • Series Management: Edit entire series or "this and future" events with proper UNTIL handling

Modern Web Experience

  • Fast & Responsive: Rust WebAssembly frontend for native-like performance
  • Clean Interface: Modern, intuitive design built with web standards
  • Real-time Updates: Seamless synchronization with CalDAV servers
  • Timezone Aware: Proper local time display with UTC storage

Architecture

Frontend (Yew WebAssembly)

  • Framework: Yew for component-based UI development
  • Performance: Rust WebAssembly for near-native browser performance
  • Models: RFC 5545-compliant VEvent structures throughout
  • Services: HTTP client for backend API communication
  • Views: Responsive month/week calendar views with drag-and-drop

Backend (Axum)

  • Framework: Axum async web framework with CORS support
  • Authentication: JWT token management and validation
  • CalDAV Client: Full CalDAV protocol implementation for server sync
  • API Design: RESTful endpoints following calendar operation patterns
  • Data Flow: Proxy between frontend and CalDAV servers with proper authentication

Key Technical Features

  • RFC 5545 Compliance: Complete iCalendar standard implementation
  • RRULE Processing: Advanced recurrence rule parsing and generation
  • Timezone Handling: Local time in UI, UTC for storage and CalDAV sync
  • Event Series: Proper handling of recurring event modifications and exceptions
  • Build System: Trunk for frontend bundling, Cargo workspaces for organization

Getting Started

Prerequisites

  • Rust (latest stable version)
  • Trunk (cargo install trunk)

Development Setup

  1. Start the backend server (serves API at http://localhost:3000):

    cargo run --manifest-path=backend/Cargo.toml
    
  2. Start the frontend development server (serves at http://localhost:8080):

    trunk serve
    
  3. Access the application at http://localhost:8080

Building for Production

trunk build --release

Development Commands

  • cargo check - Check frontend compilation
  • cargo check --manifest-path=backend/Cargo.toml - Check backend compilation
  • trunk serve - Start frontend development server with hot reload

Project Structure

calendar/
├── frontend/                    # Yew WebAssembly frontend
│   ├── src/
│   │   ├── app.rs              # Main app component with routing
│   │   ├── components/         # UI components
│   │   │   ├── calendar.rs     # Main calendar container
│   │   │   ├── month_view.rs   # Month calendar view
│   │   │   ├── week_view.rs    # Week calendar view  
│   │   │   ├── create_event_modal.rs # Event creation form
│   │   │   └── ...
│   │   ├── models/
│   │   │   └── ical.rs         # RFC 5545 VEvent structures
│   │   └── services/
│   │       └── calendar_service.rs # HTTP client & RRULE logic
│   ├── index.html              # HTML template
│   └── Trunk.toml              # Frontend build config
├── backend/                     # Axum REST API server
│   └── src/
│       ├── main.rs             # Server entry point
│       ├── handlers/           # API endpoint handlers
│       │   ├── events.rs       # Event CRUD operations
│       │   └── series.rs       # Recurring event operations  
│       ├── auth.rs             # JWT authentication
│       └── calendar.rs         # CalDAV client implementation
└── CLAUDE.md                   # Development instructions

CalDAV Compatibility

This client is designed to work with any RFC-compliant CalDAV server:

  • Baikal - Fully tested with complete event and recurrence support
  • Nextcloud - 🚧 Planned compatibility with calendar app
  • Radicale - 🚧 Planned lightweight CalDAV server support
  • Apple Calendar Server - 🚧 Planned standards-compliant operation
  • Google Calendar - 🚧 Planned CalDAV API compatibility

Note: While the client follows RFC standards and should work with any compliant CalDAV server, we have currently only tested extensively with Baikal. Testing with other servers is planned.

Description
A self-hostable calendar front-end for caldav servers
Readme 124 MiB
Languages
Rust 76.9%
CSS 22.4%
JavaScript 0.4%
Dockerfile 0.2%
HTML 0.1%