A modern, cross-platform calendar application built with Kotlin Multiplatform and Compose Multiplatform, featuring 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 Android development practices, it offers a native experience across both Android and iOS platforms.
Feature | Android | iOS |
---|---|---|
App Demo | ![]() |
![]() |
View | Android | iOS |
---|---|---|
Month View | ![]() |
![]() |
Week View | ![]() |
![]() |
Day View | ![]() |
![]() |
3-Day View | ![]() |
![]() |
Schedule View | ![]() |
![]() |
Feature | Android | iOS |
---|---|---|
Add Event | ![]() |
![]() |
View Event | ![]() |
![]() |
Component | Android | iOS |
---|---|---|
App Bar | ![]() |
![]() |
Sidebar | ![]() |
![]() |
-
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
-
Event Management
- โ Create, edit, and delete events
- ๐จ Multiple calendar support (Personal, Work, Family, Birthdays, Gym)
- โฐ Event reminders and notifications
- ๐ Recurring event support
- ๐ 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
-
Modern UI/UX
- ๐จ Material Design 3 implementation
- ๐ฑ Responsive design for different screen sizes
- ๐ Smooth animations and transitions
- ๐ฑ Native platform integration
- Frontend: Compose Multiplatform (Jetpack Compose)
- Backend: Kotlin Multiplatform
- Database: Room Database with SQLite
- Dependency Injection: Koin
- Networking: Ktor Client
- State Management: Kotlin Flow + StateFlow
- Navigation: Compose Navigation
- Build System: Gradle with Kotlin DSL
composeApp/src/commonMain/kotlin/com/debanshu/xcalendar/
โโโ ๐ฑ ui/ # UI components and screens
โ โโโ components/ # Reusable UI components
โ โโโ screen/ # Screen implementations
โ โ โโโ dayScreen/ # Single day view
โ โ โโโ weekScreen/ # Weekly view
โ โ โโโ monthScreen/ # Monthly view
โ โ โโโ threeDayScreen/ # 3-day view
โ โ โโโ scheduleScreen/ # Schedule/list view
โ โโโ theme/ # App theming and colors
โ โโโ CalendarViewModel.kt # Main view model
โโโ ๐๏ธ domain/ # Business logic layer
โ โโโ model/ # Data models
โ โโโ repository/ # Repository interfaces
โ โโโ states/ # State management
โโโ ๐พ data/ # Data layer
โ โโโ localDataSource/ # Local database (Room)
โ โโโ remoteDataSource/ # Remote API integration
โโโ ๐ง di/ # Dependency injection (Koin)
- Event: Calendar events with title, description, location, time, reminders
- Calendar: User calendars with visibility and primary settings
- User: User account management
- Holiday: Holiday information and display
- Static Data: Events and calendars served from
assets/
directory - Dynamic Data: Holiday information fetched from external API (when API key is configured)
- Local Storage: Room database for offline data persistence
- API Integration: Ktor client for remote data fetching
- SwipeableCalendarView: Interactive calendar with swipe gestures
- BaseCalendarScreen: Common calendar screen functionality
- Event Management: Add, edit, and delete event dialogs
- Navigation Drawer: Calendar and account management
- Top App Bar: Date navigation and view switching
- Android Studio Hedgehog or later
- Kotlin 1.9.0+
- JDK 21
- iOS development tools (for iOS builds)
-
Clone the repository
git clone https://github.com/yourusername/XCalendar.git cd XCalendar
-
Configure API Key (Optional)
- Open
local.properties
file - Add your API key:
API_KEY=your_api_key_here
- Visit
https://calendarific.com
for API - This enables live holiday data fetching
- Without API key, app falls back to static data
- Open
-
Open in Android Studio
- Open the project in Android Studio
- Sync Gradle files
- Wait for dependencies to download
-
Run on Android
- Connect an Android device or start an emulator
- Click the "Run" button or use
./gradlew :composeApp:assembleDebug
-
Run on iOS (requires macOS)
- Open
iosApp/iosApp.xcodeproj
in Xcode - Select your target device/simulator
- Build and run the project
- Open
Note: API key configuration is only available on Android builds. iOS builds will use static data.
# Build for Android
./gradlew :composeApp:assembleDebug
# Build for iOS
./gradlew :composeApp:linkDebugFrameworkIosArm64
# Clean build
./gradlew clean
App Entry Point
โโโ CalendarApp (Main Container)
โ โโโ Navigation Drawer
โ โ โโโ User Accounts
โ โ โโโ Calendar List
โ โ โโโ Settings
โ โโโ Top App Bar
โ โ โโโ Date Navigation
โ โ โโโ View Selection
โ โ โโโ Action Buttons
โ โโโ Content Area
โ โโโ Month Screen
โ โโโ Week Screen
โ โโโ Day Screen
โ โโโ 3-Day Screen
โ โโโ Schedule Screen
- Month View: Tap dates to navigate, swipe to change months
- Week/Day Views: Tap events for details, long press for options
- Schedule View: Scrollable list with month headers and event grouping
- Event Management: Floating action button opens add event dialog
- Calendar Switching: Drawer allows toggling calendar visibility
- DateStateHolder: Manages current date, selected date, and view month
- CalendarViewModel: Handles UI state, events, calendars, and user data
- Repository Pattern: Clean separation between data sources and business logic
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
- Currently supports Indian holidays
- Live API Integration: Holiday data fetched from external API when
API_KEY
is configured inlocal.properties
- Fallback Data: Static holiday data stored in
assets/
directory for offline use - API Configuration: Add
API_KEY=your_key_here
tolocal.properties
to enable live data
- Reminders: Multiple reminder options (15min, 30min, 1hr, 1day, 1week)
- Recurring Events: Support for daily, weekly, monthly, and yearly patterns
- 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 pagination
- State Optimization: Stable callbacks and memoization
- Flow Management: Optimized data streams with proper lifecycle management
- Memory Management: Efficient database queries and caching
- Calendar sync with Google Calendar, Outlook
- Push notifications for reminders
- Dark/Light theme switching
- Custom calendar colors
- Event sharing capabilities
- Multi-language support
- Widget support
- Real-time calendar sync
- Multiple holiday region 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.properties
for 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
- Database management with Room
- Dependency injection using Koin
XCalendar - Modern calendar experience across platforms ๐ฑ๐ป