Skip to content

This project is a solution to the Frontend Mentor Age Calculator challenge. Built with TypeScript and styled using SCSS, the app automatically corrects invalid date inputs, ensuring accurate age calculations. It features real-time validation and correction for non-existent dates and is thoroughly tested with Jest to ensure reliability.

Notifications You must be signed in to change notification settings

TedJenkler/Age-calculator-typescript-scss-jest

Repository files navigation

Frontend Mentor - Age Calculator App Solution

This is a solution to the Age Calculator App challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of Contents

Overview

The Challenge

Users should be able to:

  • View an age in years, months, and days after submitting a valid date through the form.
  • Users should not be able to input an incorrect date; if February 31 is entered, it should be corrected automatically.
  • View the optimal layout for the interface depending on their device's screen size.
  • See hover and focus states for all interactive elements on the page.

Screenshot

Screenshot of the Age Calculator App

Links

My Process

Built With

  • Vite - A frontend build tool for fast development with a modern workflow.
  • React - A JavaScript library for building user interfaces.
  • SCSS - For advanced styling and creating flexible, maintainable stylesheets.
  • TypeScript - For adding type safety and enhancing the development experience with static types.
  • Jest - A testing framework for ensuring the correctness of JavaScript and TypeScript code with features like test runners, assertions, and mocking.

What I Learned

During this project, I gained more experience in the following areas:

  • SCSS: Enhanced understanding of SCSS features like mixins, maps, variables, and responsive design.
  • TypeScript: Improved skills in TypeScript, including type definitions, interfaces, and generics for better type safety and code quality.
  • Jest: Acquired proficiency in using Jest for testing JavaScript and TypeScript applications.

Continued Development

  • Improving Accessibility: Plan to enhance accessibility by incorporating best practices for SEO and ARIA (Accessible Rich Internet Applications) attributes to ensure the app is usable by everyone, including those using assistive technologies.

Useful Resources

  • SCSS Documentation - For comprehensive details on SCSS syntax and features.
  • TypeScript Documentation - For learning TypeScript syntax, features, and best practices.
  • Vite Documentation - For understanding and configuring Vite as a build tool and development server.
  • Jest Documentation - For learning how to use Jest for testing JavaScript and TypeScript applications, including setup, configuration, and best practices.

Author

About

This project is a solution to the Frontend Mentor Age Calculator challenge. Built with TypeScript and styled using SCSS, the app automatically corrects invalid date inputs, ensuring accurate age calculations. It features real-time validation and correction for non-existent dates and is thoroughly tested with Jest to ensure reliability.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published