Skip to content

sharcty/CelebrateIt

Repository files navigation

CelebrateIt

A modern Angular application that helps you discover public holidays from countries around the world. Built with Angular 19 and Angular Material for a beautiful, responsive user experience.

Features

  • 🌍 Global Holiday Discovery: Browse public holidays from countries worldwide
  • 🔍 Smart Search: Find countries quickly with autocomplete search functionality
  • 📱 Year Navigation: Explore holidays for different years (current year ± 5 years)
  • ⚡ Real-time Data: Fetches live holiday data from the Nager.Date API
  • 🔄 Random Holiday Showcase: Discover interesting holidays from around the world

Screenshots

App Screenshot

App Screenshot

App Screenshot

App Screenshot

Tech Stack

  • Frontend Framework: Angular 19
  • UI Library: Angular Material 19
  • Language: TypeScript 5.7
  • Styling: SCSS
  • State Management: RxJS Observables
  • Routing: Angular Router
  • Forms: Angular Reactive Forms
  • Linting: ESLint with Prettier
  • Build Tool: Angular CLI

Run Locally

Clone the project

  git clone https://link-to-project

Go to the project directory

  cd my-project

Install dependencies

  npm install

Start the server

  npm run start

Open your browser

Navigate to http://localhost:4200 to view the application.

Environment Variables

The application uses environment configuration files located in src/environments/:

Production Environment (environment.ts)

export const environment = {
  API_URL: 'https://date.nager.at/api/v3',
};

Development Environment (environment.development.ts)

export const environment = {
  API_URL: 'https://date.nager.at/api/v3',
};

API Reference

The application integrates with the Nager.Date API to fetch holiday data.

Endpoints Used

Get Available Countries

GET https://date.nager.at/api/v3/AvailableCountries

Returns a list of all available countries with their country codes.

Response:

[
  {
    "countryCode": "US",
    "name": "United States"
  }
]

Get Public Holidays for a Country

GET https://date.nager.at/api/v3/PublicHolidays/{year}/{countryCode}

Parameters:

  • year (number): The year to fetch holidays for
  • countryCode (string): ISO 3166-1 alpha-2 country code

Response:

[
  {
    "date": "2024-01-01",
    "localName": "New Year's Day",
    "name": "New Year's Day",
    "countryCode": "US",
    "fixed": true,
    "global": true,
    "counties": null,
    "launchYear": null,
    "types": ["Public"]
  }
]

Get Next Public Holidays Worldwide

GET https://date.nager.at/api/v3/NextPublicHolidaysWorldwide

Returns upcoming public holidays from around the world.

Data Models

Country Interface

interface Country {
  countryCode: string;
  name: string;
}

Holiday Interface

interface Holiday {
  date: string;
  localName: string;
  name: string;
  countryCode: string;
  fixed: boolean;
  global: boolean;
  counties: string[] | null;
  launchYear: number | null;
  types: string[];
}

Acknowledgements

  • Nager.Date API for providing comprehensive holiday data
  • Angular Material team for the excellent UI components
  • The Angular team for the amazing framework

Made with ❤️ using Angular

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors