# bimal029/javafx_nepalese_datepicker architecture

> Architecture diagram of the GitHub repository bimal029/javafx_nepalese_datepicker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bimal029/javafx_nepalese_datepicker
- Repository: https://github.com/bimal029/javafx_nepalese_datepicker

## Overview

##### Project type and purpose
- From the README and project name (“javafx_nepalese_datepicker”), this is a small JavaFX-based UI component library (an open-source control) that provides a date-picker tailored to the Nepali calendar.
- Its primary goal is to let any JavaFX application embed a “Nepalese DatePicker” control that handles Nepali-Gregorian date conversions, displays the Nepali month grid, and emits date-selection events.

##### (minimal) file structure
- src/main/java/...             ← control implementation, conversion logic, model, event classes
- src/main/resources/...        ← FXML, CSS, images, localization bundles
- build.gradle or pom.xml       ← build and packaging scripts
- src/test/java/...             ← unit tests for conversion algorithms, UI tests
- Lack of a “frontend/backend” split indicates this is a single-module library (not a multi-service system).

##### README for additional insights
- Architecture notes (e.g. “Model–View–Skin” pattern)
- Public API overview (e.g. “NepaleseDatePicker class exposes these methods…”)
- Dependencies (Java 11+, JavaFX 17+)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External Dependencies
    subgraph "External Platforms"
        JRE["JRE"]:::external
        FX["JavaFX Runtime"]:::external
    end
    JRE --> FX

    %% Library Module
    subgraph "NepaleseDatePicker Library Module"
        direction TB
        subgraph "UI Layer" 
            direction TB
            Control["NepaleseDatePicker Control"]:::ui
            Skin["NepaleseDatePicker Skin"]:::ui
            FXML["datepicker.fxml"]:::resource
            CSS["datepicker.css"]:::resource
        end
        subgraph "Model Layer"
            NepaliModel["NepaliCalendarModel"]:::model
        end
        subgraph "Service Layer"
            Conversion["DateConversionService"]:::service
        end
        subgraph "Event Layer"
            Event["DateSelectedEvent"]:::event
        end
        subgraph "Resources"
            EN["MonthNames_en.properties"]:::resource
            NP["MonthNames_np.properties"]:::resource
        end
    end

    %% Build & Packaging
    subgraph "Build & Deployment"
        Gradle["build.gradle / pom.xml"]:::build
        JAR["JAR Artifact"]:::build
        Repo["Maven Central / Local"]:::build
    end
    Gradle -->|builds| JAR -->|publishes| Repo

    %% Consumer Application
    App["Consumer JavaFX App"]:::external

    %% Unit Tests & Docs
    subgraph "Tests & Docs"
        TC1["DateConversionServiceTest"]:::test
        TC2["DateSelectedEventTest"]:::test
        RD["README.md"]:::doc
        LIC["LICENSE"]:::doc
    end

    %% Interactions
    App -->|instantiates| Control
    FX -->|provides UI framework| Control
    Control -->|"uses"| NepaliModel
    Control -->|"convert(gregorian→nepali)"| Conversion
    Control -->|"emits onDateSelected()"| Event -->|handled by| App
    Control -->|loads| FXML
    Control -->|applies style| CSS
    Control -->|uses i18n| EN
    Control -->|uses i18n| NP

    Repo -->|consumed by| App

    %% Click Events
    click Control "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/main/java/com/example/nepalesedatepicker/NepaleseDatePicker.java"
    click Skin "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/main/java/com/example/nepalesedatepicker/skin/NepaleseDatePickerSkin.java"
    click FXML "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/main/resources/com/example/nepalesedatepicker/skin/datepicker.fxml"
    click CSS "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/main/resources/com/example/nepalesedatepicker/skin/datepicker.css"
    click NepaliModel "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/main/java/com/example/nepalesedatepicker/model/NepaliCalendarModel.java"
    click Conversion "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/main/java/com/example/nepalesedatepicker/service/DateConversionService.java"
    click Event "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/main/java/com/example/nepalesedatepicker/event/DateSelectedEvent.java"
    click Gradle "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/build.gradle"
    click EN "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/main/resources/com/example/nepalesedatepicker/i18n/MonthNames_en.properties"
    click NP "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/main/resources/com/example/nepalesedatepicker/i18n/MonthNames_np.properties"
    click TC1 "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/test/java/com/example/nepalesedatepicker/service/DateConversionServiceTest.java"
    click TC2 "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/src/test/java/com/example/nepalesedatepicker/event/DateSelectedEventTest.java"
    click RD "https://github.com/bimal029/javafx_nepalese_datepicker/blob/main/README.md"
    click LIC "https://github.com/bimal029/javafx_nepalese_datepicker/tree/main/LICENSE"

    %% Styles
    classDef ui fill:#C6E5FF,stroke:#2196F3,color:#000
    classDef model fill:#E8F5E9,stroke:#4CAF50,color:#000
    classDef service fill:#FFF3E0,stroke:#FF9800,color:#000
    classDef event fill:#F3E5F5,stroke:#9C27B0,color:#000
    classDef external fill:#ECEFF1,stroke:#607D8B,color:#000
    classDef build fill:#F5F5F5,stroke:#9E9E9E,color:#000
    classDef resource fill:#FFFDE7,stroke:#FBC02D,color:#000
    classDef test fill:#FFEBEE,stroke:#E91E63,color:#000
    classDef doc fill:#E0F7FA,stroke:#00ACC1,color:#000
```
