$ show kcsujeet/ilamy-calendar
This repository is a production-grade React calendar component library (`@ilamy/calendar`) designed as a lightweight (~13 KB gzipped) replacement for FullCalendar. It provides month, week, day, year, and agenda views with drag-and-drop, resource scheduling, RFC 5545 recurring events, iCal export, and internationalization. The core ships no CSS and relies on Tailwind CSS v4 with shadcn/ui tokens, making it themeable and tree-shakeable. Architecturally, the library follows a plugin-first pattern: the core implements a pluggable kernel (`IlamyPlugin` interface) that accepts opt-in plugins for recurrence, agenda, and drag-to-create. Each plugin contributes views, event transformations, mutation scopes, and UI slots through a runtime composer. The state management uses a single `CalendarProvider` context that composes four engine slices (config, navigation, data, interaction). The view system is built on two grid primitives (vertical-grid for time-based layouts, horizontal-grid for date-based layouts) that are shared across all views and test harnesses. The codebase demonstrates strong engineering discipline: a huge unit test suite (995+ tests) with regression pinning against issue numbers, deterministic Playwright E2E tests, a CI pipeline with lint/build/type-check/test gates, and agent-driven code review skills. However, there is some duplication of UI primitives between packages, and the dependency on a custom dayjs wrapper for timezone handling introduces fragility. The library is actively maintained with frequent releases and detailed changelogs.
The LLM identified 6 files worth highlighting for reuse:
Orchestrates plugin lifecycle: transforms events sequentially, manages event ownership via first-match, collects contributions (iCal export), renders slots, and aggregates views. Extracted and reused across any plugin-based React library with minimal modification.
Implements a vertical event layout algorithm that clusters overlapping events, assigns columns and offsets to prevent visual overlap, and computes dimensions for time-based views. Pure logic with no UI dependencies, reusable for any time-grid component.
Horizontal event layout using an occupancy grid for multi-day events. Handles truncation, continuation indicators, and column assignment. Fully extracted from React, reusable in any calendar or scheduling UI.
Defines business hours logic with multi-day unions, sub-hour boundaries, resource-specific overrides, empty-range handling, and split shifts. Thoroughly tested with malformed input fallbacks. Reusable across any scheduling application.
Generic pointer gesture recognizer supporting mouse, pen, and touch with long-press threshold, edge auto-scroll, and selection rectangle computation. No framework dependencyβadaptable to any DOM-based drag interaction.
Reusable vertical time grid with sticky headers, configurable slot durations, and composition with events layer. Used by day, week, and resource views. Demonstrates clean separation of grid structure and event rendering.