# jkuri/ngx-airbnb-calendar architecture

> Architecture diagram of the GitHub repository jkuri/ngx-airbnb-calendar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jkuri/ngx-airbnb-calendar
- Repository: https://github.com/jkuri/ngx-airbnb-calendar

## Overview

AirbnbCalendar is an Angular date-range calendar library. A host application attaches its directive to an input and supplies options; the directive creates the calendar component, which builds two months of date data and emits selected values back to Angular’s form model. The component template renders the calendar, while the options module supplies defaults and date-fns provides date operations. The README documents date bounds, formatting, locale, week-start, and auto-close options. The demo and build/test machinery are omitted; the view template is connected based on the component metadata.

Main entry points: [`projects/airbnb-calendar/src/lib/airbnb-calendar.directive.ts`](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.directive.ts) (Input directive), [`projects/airbnb-calendar/src/lib/airbnb-calendar.component.ts`](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.component.ts) (Calendar logic), [`projects/airbnb-calendar/src/lib/airbnb-calendar.module.ts`](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.module.ts) (Angular module), [`projects/airbnb-calendar/src/lib/airbnb-calendar.interface.ts`](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.interface.ts) (Calendar options)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_host(("Host input"))
node_directive["Input directive"]
node_component["Calendar logic"]
node_view["Calendar view"]
node_options["Calendar options"]
node_module["Angular module"]
node_api["Public exports<br/>[public-api.ts]"]
node_forms["Angular forms"]
node_datefns["date-fns"]

node_host -->|"attaches to"| node_directive
node_directive -->|"creates and listens"| node_component
node_directive -->|"merges options"| node_options
node_component -->|"merges options"| node_options
node_component -->|"renders"| node_view
node_component -->|"uses date operations"| node_datefns
node_directive -->|"patches form value"| node_forms
node_module -->|"declares and exports"| node_component
node_module -->|"declares and exports"| node_directive
node_api -->|"exports"| node_module
node_api -->|"exports"| node_options

click node_directive "https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.directive.ts"
click node_component "https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.component.ts"
click node_view "https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.component.html"
click node_options "https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.interface.ts"
click node_module "https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.module.ts"
click node_api "https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/public-api.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_host,node_forms,node_datefns toneIndigo
class node_directive,node_component,node_options,node_module,node_api toneTeal
class node_view toneBlue
```

## Components

### Other components

- **Host input**
- [Input directive](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.directive.ts): `projects/airbnb-calendar/src/lib/airbnb-calendar.directive.ts`
- [Calendar logic](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.component.ts): `projects/airbnb-calendar/src/lib/airbnb-calendar.component.ts`
- [Calendar view](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.component.html): `projects/airbnb-calendar/src/lib/airbnb-calendar.component.html`
- [Calendar options](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.interface.ts): `projects/airbnb-calendar/src/lib/airbnb-calendar.interface.ts`
- [Angular module](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/lib/airbnb-calendar.module.ts): `projects/airbnb-calendar/src/lib/airbnb-calendar.module.ts`
- [Public exports](https://github.com/jkuri/ngx-airbnb-calendar/blob/master/projects/airbnb-calendar/src/public-api.ts): `projects/airbnb-calendar/src/public-api.ts`
- **Angular forms**
- **date-fns**

## Connections

- Host input → Input directive: attaches to (evidence: `README.md`)
- Input directive → Calendar logic: creates and listens (evidence: `projects/airbnb-calendar/src/lib/airbnb-calendar.directive.ts`)
- Input directive → Calendar options: merges options (evidence: `projects/airbnb-calendar/src/lib/airbnb-calendar.directive.ts`)
- Calendar logic → Calendar options: merges options (evidence: `projects/airbnb-calendar/src/lib/airbnb-calendar.component.ts`)
- Calendar logic → Calendar view: renders (evidence: `projects/airbnb-calendar/src/lib/airbnb-calendar.component.ts`)
- Calendar logic → date-fns: uses date operations (evidence: `projects/airbnb-calendar/src/lib/airbnb-calendar.component.ts`)
- Input directive → Angular forms: patches form value (evidence: `projects/airbnb-calendar/src/lib/airbnb-calendar.directive.ts`)
- Angular module → Calendar logic: declares and exports (evidence: `projects/airbnb-calendar/src/lib/airbnb-calendar.module.ts`)
- Angular module → Input directive: declares and exports (evidence: `projects/airbnb-calendar/src/lib/airbnb-calendar.module.ts`)
- Public exports → Angular module: exports (evidence: `projects/airbnb-calendar/src/public-api.ts`)
- Public exports → Calendar options: exports (evidence: `projects/airbnb-calendar/src/public-api.ts`)
