A modern, cross-platform calendar application built with Kotlin Multiplatform and Compose Multiplatform, supporting Android, iOS, and Desktop (Windows, macOS, Linux). Features Material 3 Expressive design, multiple calendar views, event management, and holiday integration.
XCalendar is a feature-rich calendar application that provides multiple viewing modes (day, week, month, 3-day, and schedule views) with seamless event management capabilities. Built using modern Kotlin Multiplatform development practices, it offers a native experience across Android, iOS, and Desktop platforms.
| Android | iOS | Desktop |
|---|---|---|
![]() |
![]() |
![]() |
| View | Android | iOS | Desktop |
|---|---|---|---|
| Month View | ![]() |
![]() |
![]() |
| Week View | ![]() |
![]() |
![]() |
| Day View | ![]() |
![]() |
![]() |
| 3-Day View | ![]() |
![]() |
![]() |
| Schedule View | ![]() |
![]() |
![]() |
| Feature | Android | iOS | Desktop |
|---|---|---|---|
| Add Event | ![]() |
![]() |
![]() |
| View Event | ![]() |
![]() |
![]() |
| Android | iOS | Desktop |
|---|---|---|
![]() |
![]() |
![]() |
| Static | Animated |
|---|---|
![]() |
![]() |
-
Multiple Calendar Views
- ๐ Month View - Traditional monthly calendar layout
- ๐ Week View - 7-day weekly schedule
- ๐ Day View - Detailed single-day view
- ๐ 3-Day View - Compact 3-day overview
- ๐ Schedule View - List-based event schedule with infinite scroll
-
Cross-Platform Support
- ๐ค Android (API 30+)
- ๐ iOS (arm64, x64, Simulator)
- ๐ฅ๏ธ Desktop (Windows, macOS, Linux)
-
Event Management
- โ Create, edit, and delete events
- ๐จ Multiple calendar support (Personal, Work, Family, Birthdays, Gym)
- โฐ Event reminders and notifications
- ๐ Recurring event support (daily, weekly, monthly, yearly)
- ๐ Location-based events
- ๐ All-day event support
-
Calendar Integration
- ๐ฅ Multi-user support
- ๐ฏ Primary and secondary calendar management
- ๐๏ธ Calendar visibility controls
- ๐จ Color-coded calendar categories
-
Holiday Support
- ๐๏ธ Built-in holiday data (currently supports India)
- ๐ Holiday display across all views
- ๐ Calendarific API integration for live data
-
Modern UI/UX
- ๐จ Material Design 3 Expressive implementation
- ๐ Dynamic color theming with MaterialKolor
- โจ Expressive motion animations
- ๐ Responsive adaptive layouts
- ๐ Smooth gesture-based navigation
- ๐ฑ Native platform integration
- ๐ Automatic dark/light theme (follows system)
| Category | Technology | Version |
|---|---|---|
| Language | Kotlin | 2.3.0 |
| UI Framework | Compose Multiplatform | 1.10.0-rc02 |
| UI Design | Material 3 Expressive | 1.10.0-alpha05 |
| Database | Room | 2.8.4 |
| SQLite | SQLite Bundled | 2.6.2 |
| Networking | Ktor Client | 3.3.3 |
| DI Framework | Koin | 4.1.1 |
| DI Compiler | Koin KSP | 2.3.1 |
| Navigation | Navigation3 | 1.0.0-alpha06 |
| Date/Time | kotlinx-datetime | 0.7.1 |
| Image Loading | Landscapist Coil3 | 2.8.2 |
| Dynamic Colors | MaterialKolor | 4.0.5 |
| Caching | Store5 | 5.1.0-alpha07 |
| Adaptive UI | Compose Adaptive | 1.3.0-alpha03 |
| Build Config | BuildKonfig | 0.17.1 |
| Collections | kotlinx-collections-immutable | 0.4.0 |
| Logging | Kermit | 2.0.8 |
| Build System | Gradle (AGP) | 8.13.2 |
| Android SDK | Compile/Target SDK | 36 |
| Platform | HTTP Client | Additional |
|---|---|---|
| Android | Ktor OkHttp | Koin Android, Activity Compose 1.12.2 |
| iOS | Ktor Darwin | - |
| Desktop | Ktor OkHttp | Kotlinx Coroutines Swing 1.10.2 |
XCalendar/
โโโ ๐ assets/ # Static data & screenshots
โ โโโ calendars.json # Calendar categories
โ โโโ events.json # Sample events
โ โโโ screenshots/ # README images
โโโ ๐ composeApp/
โ โโโ build.gradle.kts # Module configuration
โ โโโ schemas/ # Room database schemas
โ โโโ src/
โ โโโ ๐ commonMain/kotlin/com/debanshu/xcalendar/
โ โ โโโ CalendarApp.kt # Main app composable
โ โ โโโ common/ # Extensions, utilities, mappers, logging
โ โ โโโ data/
โ โ โ โโโ localDataSource/ # Room DB, DAOs, entities
โ โ โ โโโ remoteDataSource/ # Ktor APIs, models, error handling
โ โ โ โโโ store/ # Store5 caching layer
โ โ โโโ di/ # Koin DI modules
โ โ โโโ domain/
โ โ โ โโโ model/ # Domain models
โ โ โ โโโ repository/ # Data repositories
โ โ โ โโโ states/ # UI state management
โ โ โ โโโ usecase/ # Use cases (calendar, event, holiday, user)
โ โ โ โโโ util/ # Domain utilities & error mapping
โ โ โโโ ui/
โ โ โโโ CalendarViewModel.kt
โ โ โโโ components/ # Reusable UI components
โ โ โโโ navigation/ # Navigation3 setup
โ โ โโโ screen/ # Calendar view screens
โ โ โโโ state/ # State holders (Date, Schedule)
โ โ โโโ theme/ # Material3 Expressive theme
โ โ โโโ transition/ # Shared element transitions
โ โ โโโ utils/ # UI utilities & formatters
โ โ โโโ viewmodel/ # Feature-specific ViewModels
โ โโโ ๐ androidMain/ # Android-specific code
โ โโโ ๐ iosMain/ # iOS-specific code
โ โโโ ๐ desktopMain/ # Desktop-specific code
โโโ ๐ iosApp/ # iOS Xcode project
โโโ ๐ gradle/
โ โโโ libs.versions.toml # Version catalog
โโโ local.properties # API keys (gitignored)
Event - Calendar events with full scheduling support
data class Event(
val id: String,
val calendarId: String,
val calendarName: String,
val title: String,
val description: String?,
val location: String?,
val startTime: Long, // Epoch milliseconds
val endTime: Long,
val isAllDay: Boolean,
val isRecurring: Boolean,
val recurringRule: String?, // iCal RRULE format
val reminderMinutes: List<Int>,
val color: Int // ARGB color
)Calendar - User calendar categories
data class Calendar(
val id: String,
val name: String,
val color: Int,
val userId: String,
val isVisible: Boolean,
val isPrimary: Boolean
)Holiday - Regional holiday information
data class Holiday(
val id: String,
val name: String,
val date: Long,
val countryCode: String
)| Entity | Table | Foreign Key |
|---|---|---|
| UserEntity | users | - |
| CalendarEntity | calendars | users.id |
| EventEntity | events | calendars.id (CASCADE) |
| EventReminderEntity | event_reminders | events.id |
| HolidayEntity | holidays | - |
| SyncFailureEntity | sync_failures | - |
Storage Locations:
- Android:
app_data/databases/calendar.db - iOS:
Documents/calendar.db - Desktop:
- Windows:
%APPDATA%/XCalendar/calendar.db - macOS:
~/Library/Application Support/XCalendar/calendar.db - Linux:
~/.local/share/XCalendar/calendar.db
- Windows:
- Static Data: Events and calendars served from
assets/directory - Dynamic Data: Holiday information fetched from Calendarific API (when API key is configured)
- Local Storage: Room database for offline data persistence
- API Integration: Ktor client for remote data fetching
- Caching Layer: Store5 for efficient data caching with bookkeeping
- Logging: Kermit multiplatform logging for debugging
- SwipeablePager: Gesture-based navigation for calendar views
- SwipeableCalendarView: Interactive calendar with swipe gestures
- BaseCalendarScreen: Shared screen for Day/Week/3-Day views
- CalendarBottomNavigationBar: View switcher with FAB for adding events
- ScheduleStateHolder: Infinite scroll pagination for schedule view
- Modal Bottom Sheets: Add/Edit event dialogs
- EventViewModel: Feature-specific ViewModel for event operations
- Store5 Caching: Event and Holiday stores with bookkeeping and validation
- Use Cases: Clean architecture use cases for calendar, event, holiday, and user operations
- JDK 23 (required for JVM target 23)
- Android Studio Ladybug (2024.2.1) or later
- Kotlin 2.3.0+
- Xcode 15+ (for iOS builds, macOS only)
-
Clone the repository
git clone https://github.com/Debanshu777/XCalendar.git cd XCalendar -
Configure API Key (Optional)
For live holiday data, add to
local.properties:API_KEY=your_calendarific_api_keyGet a free API key at Calendarific
Note: API key works across all platforms (Android, iOS, Desktop) via BuildKonfig
-
Open in Android Studio
- Open the project in Android Studio
- Sync Gradle files
- Wait for dependencies to download
Android:
# Build debug APK
./gradlew :composeApp:assembleDebug
# Install on connected device
./gradlew :composeApp:installDebugiOS (macOS only):
# Build framework for simulator
./gradlew :composeApp:linkDebugFrameworkIosSimulatorArm64
# Build framework for device
./gradlew :composeApp:linkDebugFrameworkIosArm64Then open iosApp/iosApp.xcodeproj in Xcode and run.
Desktop:
# Run directly
./gradlew :composeApp:run
# Build executable JAR
./gradlew :composeApp:desktopJar
# Package for distribution
./gradlew :composeApp:packageDmg # macOS (.dmg)
./gradlew :composeApp:packageMsi # Windows (.msi)
./gradlew :composeApp:packageDeb # Linux (.deb)Clean build:
./gradlew cleanThe app uses Navigation3 for type-safe navigation:
CalendarApp (Main Container)
โโโ CalendarTopAppBar
โ โโโ Month/Year Title (expandable)
โ โโโ Search Button
โ โโโ Today Button
โ โโโ User Avatar
โโโ NavigationHost (Content Area)
โ โโโ MonthScreen (default)
โ โโโ WeekScreen
โ โโโ DayScreen
โ โโโ ThreeDayScreen
โ โโโ ScheduleScreen
โโโ CalendarBottomNavigationBar
โ โโโ View Selector Icons
โ โโโ Add Event FAB
โโโ Modal Bottom Sheets
โโโ AddEventDialog
โโโ EventDetailsDialog
- Month View: Tap dates to navigate to day view, swipe to change months
- Week/Day/3-Day Views: Tap events for details, swipe to navigate between dates
- Schedule View: Infinite scroll with month/week headers and event grouping
- Bottom Navigation: Switch calendar views, add events via FAB
- Top App Bar: Expand for mini calendar, tap date badge to go to today
| Component | Purpose |
|---|---|
CalendarViewModel |
Main UI state, calendar and user operations |
EventViewModel |
Event CRUD operations and state |
DateStateHolder |
Current date, selected date, view month |
ScheduleStateHolder |
Infinite scroll pagination |
CalendarUiState |
Immutable state snapshot |
Data Flow:
Data Sources (Room + Ktor API)
โ Store5 (caching + bookkeeping)
Repository (domain mapping)
โ Flow<List<T>>
Use Cases (business logic)
โ Flow<List<T>>
ViewModel (combine, debounce)
โ StateFlow<CalendarUiState>
UI Composables (collectAsState)
The app comes with pre-configured calendar categories:
- Personal: Personal events and appointments
- Work: Professional meetings and deadlines
- Family: Family-related events
- Birthdays: Birthday reminders and celebrations
- Gym: Fitness and workout schedules
- API: Calendarific (free tier available)
- Region: India (IN) - more regions planned
- Storage: Room database with offline caching
- Fallback: Static data when API unavailable
- Configuration: Add
API_KEYtolocal.properties
- Reminders: Multiple reminder options (15min, 30min, 1hr, 1day, 1week)
- Recurring Events: Support for daily, weekly, monthly, and yearly patterns (iCal RRULE format)
- Location: Optional location information for events
- All-day Events: Mark events that span entire days
The project includes comprehensive testing infrastructure:
- Test Tags: UI components tagged for automated testing
- State Testing: ViewModel and state management testing
- Component Testing: Individual UI component testing
- Lazy Loading: Efficient event loading with LazyColumn/LazyVerticalGrid
- Infinite Pagination: Schedule view loads data as you scroll
- State Optimization:
distinctUntilChanged()prevents redundant updatesdebounce(30ms)batches rapid state changesImmutableListfor stable recomposition
- Flow Sharing:
shareIn(WhileSubscribed(5000))for efficient data sharing - Compose Stability: Configuration via
stability_config.conf - Memory Management: Scoped coroutines with proper lifecycle handling
- Calendar sync with Google Calendar, Outlook
- Push notifications for reminders
- Dark/Light theme switching
- Desktop application support
- Custom calendar colors
- Event sharing capabilities
- Multi-language support
- Widget support (Android/iOS)
- Real-time calendar sync
- Multiple holiday region support
- Web application support
Contributions are welcome! Please feel free to submit a Pull Request.
- Follow Kotlin coding conventions
- Use Compose best practices
- Maintain clean architecture principles
- Add appropriate test coverage
- Static Data: Events and calendars are currently served from
assets/directory - API Layer: Remote data sources can be modified to integrate with actual calendar APIs
- Holiday API: Requires API key in
local.propertiesfor live holiday data - Fallback Strategy: App gracefully falls back to static data when API is unavailable
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Kotlin Multiplatform
- UI powered by Compose Multiplatform
- Material 3 Expressive Design
- Database management with Room
- Dependency injection using Koin
- Dynamic theming with MaterialKolor
- Holiday data from Calendarific
- Navigation with Navigation3
- Caching with Store5
- Logging with Kermit
XCalendar - Modern calendar experience across platforms ๐ฑ๐ฅ๏ธ๐ป




























