Code Monkey home page Code Monkey logo

taxcalculator's Introduction

Tax Calculator App

This is a Tax Calculator application built with ReactJS and TypeScript. It allows you to calculate the tax amount based on a yearly salary for the years 2019 to 2022. The app includes a Main component that contains a form with two fields: Salary and Tax Year. When you click the "Calculate" button, it calls an API to fetch the tax rates for each income band.

Installation

To run the project locally, follow these steps:

  1. Clone the repository: git clone https://github.com/jbpadilha/taxcalculator.git
  2. Navigate to the project directory: cd taxcalculator
  3. Install the dependencies: npm install

Usage

To start the application, run the following command:

npm run start

This will start the development server, and you can access the app in your browser at http://localhost:3000.

Folder Structure

The project follows a specific folder structure to organize the code:

  • src: The root folder of the application.
    • components: Contains reusable components used throughout the app.
    • __test__: Contains testd components
    • helpers: Contains utility functions and helper modules.
    • models: Contains TypeScript interfaces and types used in the app.
    • server: Contains server-related files or configurations.

Design Pattern

The app uses the Adapter design pattern to connect to the API. The Adapter module utilizes Axios, a popular HTTP client, to make requests to the API and handle the response. This pattern provides a layer of abstraction and allows for easier integration with different APIs.

Unit Testing

Unit tests are implemented using React Testing Library and Jest. The tests ensure that the components and functionality of the Tax Calculator app work as expected. To run the tests, use the following command:

npm run test

Available Years

The Tax Calculator app supports tax calculations for the years 2019 to 2022. Select the desired year from the Tax Year dropdown menu to calculate taxes based on the corresponding tax rates.

Contributing

Contributions to the Tax Calculator app are welcome! If you have any suggestions, improvements, or bug fixes, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. Feel free to use, modify, and distribute the code for personal or commercial purposes.

Contact

If you have any questions or need further assistance, please feel free to contact the project maintainer at [email protected].

Thank you for using the Tax Calculator app!

taxcalculator's People

Contributors

jbpadilha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.