Implement RFC 5545-compliant calendar system with v2 API
This major refactor eliminates manual string parsing throughout the codebase and introduces proper RFC 5545 iCalendar specification compliance with significant code simplification benefits. ## Backend Improvements - Add complete RFC 5545-compliant data structures (VEvent, VTodo, etc.) - Create simplified v2 API endpoints with direct DateTime support - Eliminate ~150 lines of manual string parsing in handlers - Add structured attendee and alarm support - Maintain backward compatibility with existing v1 APIs ## Frontend Improvements - Replace 16+ parameter create_event calls with single structured request - Add automatic date/time conversion in EventCreationData - Eliminate enum-to-string conversions throughout event creation - Add v2 API models with proper type safety ## Technical Benefits - Direct DateTime<Utc> usage instead of error-prone string parsing - Proper RFC 5545 compliance with DTSTAMP, SEQUENCE fields - Vec<AttendeeV2> instead of comma-separated strings - Structured alarm system with multiple reminder types - Enhanced RRULE support for complex recurrence patterns ## Code Quality - Reduced create_event call from 16 parameters to 1 structured request - Added comprehensive integration plan documentation - Both backend and frontend compile successfully - Maintained full backward compatibility during transition 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ use std::sync::Arc;
|
||||
|
||||
mod auth;
|
||||
mod models;
|
||||
mod models_v2;
|
||||
mod handlers;
|
||||
mod calendar;
|
||||
mod config;
|
||||
@@ -44,6 +45,10 @@ pub async fn run_server() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.route("/api/calendar/events/create", post(handlers::create_event))
|
||||
.route("/api/calendar/events/update", post(handlers::update_event))
|
||||
.route("/api/calendar/events/delete", post(handlers::delete_event))
|
||||
// V2 API routes with better type safety
|
||||
.route("/api/v2/calendar/events/create", post(handlers::create_event_v2))
|
||||
.route("/api/v2/calendar/events/update", post(handlers::update_event_v2))
|
||||
.route("/api/v2/calendar/events/delete", post(handlers::delete_event_v2))
|
||||
.route("/api/calendar/events/:uid", get(handlers::refresh_event))
|
||||
.layer(
|
||||
CorsLayer::new()
|
||||
|
||||
Reference in New Issue
Block a user