Skip to content

Debanshu777/XCalendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

78 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

XCalendar ๐Ÿ“…

A modern, cross-platform calendar application built with Kotlin Multiplatform and Compose Multiplatform, featuring multiple calendar views, event management, and holiday integration.

๐ŸŽฏ What is XCalendar?

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.

๐Ÿ“ฑ Screenshots & Demo

App Overview

Feature Android iOS
App Demo Android Demo iOS Demo

Calendar Views

View Android iOS
Month View Android Month iOS Month
Week View Android Week iOS Week
Day View Android Day iOS Day
3-Day View Android 3-Day iOS 3-Day
Schedule View Android Schedule iOS Schedule

Event Management

Feature Android iOS
Add Event Android Add Event iOS Add Event
View Event Android View Event iOS View Event

Navigation & UI

Component Android iOS
App Bar Android App Bar iOS App Bar
Sidebar Android Sidebar iOS Sidebar

โœจ Key Features

  • 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

๐Ÿ—๏ธ Architecture & Technical Stack

Technology Stack

  • 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

Project Structure

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)

Data Models

  • 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

Data Sources

  • 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

Key Components

  • 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

๐Ÿš€ Getting Started

Prerequisites

  • Android Studio Hedgehog or later
  • Kotlin 1.9.0+
  • JDK 21
  • iOS development tools (for iOS builds)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/XCalendar.git
    cd XCalendar
  2. 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
  3. Open in Android Studio

    • Open the project in Android Studio
    • Sync Gradle files
    • Wait for dependencies to download
  4. Run on Android

    • Connect an Android device or start an emulator
    • Click the "Run" button or use ./gradlew :composeApp:assembleDebug
  5. Run on iOS (requires macOS)

    • Open iosApp/iosApp.xcodeproj in Xcode
    • Select your target device/simulator
    • Build and run the project

Note: API key configuration is only available on Android builds. iOS builds will use static data.

Build Commands

# Build for Android
./gradlew :composeApp:assembleDebug

# Build for iOS
./gradlew :composeApp:linkDebugFrameworkIosArm64

# Clean build
./gradlew clean

๐Ÿ“ฑ App Flow & Navigation

Main Navigation Structure

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

Screen Interactions

  • 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

State Management

  • 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

๐Ÿ”ง Configuration & Customization

Calendar Categories

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

Holiday Integration

  • Currently supports Indian holidays
  • Live API Integration: Holiday data fetched from external API when API_KEY is configured in local.properties
  • Fallback Data: Static holiday data stored in assets/ directory for offline use
  • API Configuration: Add API_KEY=your_key_here to local.properties to enable live data

Event Features

  • 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

๐Ÿงช Testing

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

๐Ÿ“Š Performance Features

  • 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

๐Ÿ”ฎ Future Enhancements

  • 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

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Guidelines

  • Follow Kotlin coding conventions
  • Use Compose best practices
  • Maintain clean architecture principles
  • Add appropriate test coverage

API Integration Notes

  • 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

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments


XCalendar - Modern calendar experience across platforms ๐Ÿ“ฑ๐Ÿ’ป

About

Google Calendar Clone using Compose Multiplatform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published