diff --git a/README.md b/README.md index 582b391..947a2a9 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,53 @@ -# Calendar App +# Modern CalDAV Web Client -A full-stack calendar application built with Rust, featuring a Yew frontend and Axum backend with CalDAV integration. +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](https://github.com/agendav/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 -- Interactive calendar interface -- Event creation and management -- CalDAV server integration -- User authentication with JWT -- iCal format support -- Weekly recurrence patterns -- Responsive web design +### 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 (Rust WebAssembly) -- **Backend**: Axum (Rust async web framework) -- **Shared Models**: RFC 5545-compliant VEvent structures -- **Protocol**: CalDAV for calendar synchronization -- **Database**: SQLite (via migrations) -- **Build Tool**: Trunk for frontend bundling +### 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 @@ -28,38 +56,70 @@ A full-stack calendar application built with Rust, featuring a Yew frontend and - Rust (latest stable version) - Trunk (`cargo install trunk`) -### Development +### Development Setup -1. Start the backend server: +1. **Start the backend server** (serves API at http://localhost:3000): ```bash - cd backend - cargo run + cargo run --manifest-path=backend/Cargo.toml ``` -2. Start the frontend development server: +2. **Start the frontend development server** (serves at http://localhost:8080): ```bash - cd frontend trunk serve ``` -3. Open your browser to `http://localhost:8080` +3. **Access the application** at `http://localhost:8080` ### Building for Production ```bash -cd frontend 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 -This is a Cargo workspace with the following 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 +``` -- `frontend/` - Yew frontend application - - `src/` - Frontend source code - - `index.html` - HTML template - - `styles.css` - CSS styles - - `Trunk.toml` - Trunk build configuration -- `backend/` - Axum backend server -- `calendar-models/` - Shared RFC 5545 VEvent models -- `migrations/` - Database schema migrations \ No newline at end of file +## 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.* \ No newline at end of file