Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 2.56 KB

File metadata and controls

69 lines (51 loc) · 2.56 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

AI-powered calendar application built with Groovy and JavaFX. The app provides both manual event management and AI-driven natural language commands for calendar operations. Main entry point is App.groovy which delegates to ChatWindow.

Build & Development Commands

# Run the application
gradle run

# Clean and build
gradle clean build

# Create distributable app (requires Java modules)
gradle jlink

# Create project directory structure
gradle createDirs

Environment Configuration

Required for AI functionality:

  • AI_CALENDAR_API_ENDPOINT: AI service endpoint (defaults to OpenRouter)
  • AI_CALENDAR_API_KEY: Your API key for the AI service

Architecture

Core Components

  • App.groovy: Application entry point, delegates to ChatWindow
  • ChatWindow.groovy: Main UI with calendar grid, chat interface, and timeline integration
  • CalendarService.groovy: Core calendar data management and CRUD operations
  • AIService.groovy: AI integration and command parsing
  • Event.groovy: Event data model (POJO with UUID-based IDs)
  • DailyTimelineView.groovy: Timeline UI component for selected day view
  • AIResponsePayload.groovy: AI response wrapper

AI Command System

The AI uses embedded ACTION commands within conversational responses:

  • CREATE: ACTION: CREATE_EVENT title="Title" startTime="YYYY-MM-DDTHH:MM" endTime="YYYY-MM-DDTHH:MM" description="Desc"
  • UPDATE: ACTION: UPDATE_EVENT eventId="id" title="Title" startTime="YYYY-MM-DDTHH:MM" endTime="YYYY-MM-DDTHH:MM" description="Desc"
  • DELETE: ACTION: DELETE_EVENT eventId="id"

Data Flow

  1. ChatWindow handles UI and user interactions
  2. Manual events go directly to CalendarService
  3. AI commands are processed by AIService, parsed for ACTION commands, then forwarded to CalendarService
  4. CalendarService maintains in-memory event list with mock data initialization
  5. UI components refresh automatically after data changes

Technology Stack

  • Groovy 3.0.10 with @CompileStatic annotations
  • JavaFX 17.0.10 for desktop UI
  • Java 11 language target
  • Apache HttpClient 5.1.4 for AI service calls
  • Gradle with jlink plugin for distribution

Key Implementation Notes

  • Events use UUID-based IDs for uniqueness
  • CalendarService initializes with mock events for demo purposes
  • All Groovy classes use @CompileStatic for performance
  • JavaFX components handle real-time calendar updates
  • Error handling includes user feedback dialogs