/tip-calculator

This is a tip calculator project that allows you to calculate the tip based on the percentage of the bill and also split the bill equally among a specific number of people. It's a simple and practical tool for figuring out how much each person should contribute in a restaurant or any situation where a bill needs to be divided.

Primary LanguageTypeScriptMIT LicenseMIT

Tip Calculator

This is a tip calculator project that allows you to calculate the tip based on the percentage of the bill and also split the bill equally among a specific number of people. It's a simple and practical tool for figuring out how much each person should contribute in a restaurant or any situation where a bill needs to be divided.

Features

  • Calculate Tip: Enter the total bill amount and select the desired tip percentage to calculate the tip amount to be added.
  • Split by Person: In addition to calculating the tip, you can specify the number of people and evenly split the total bill amount, including the tip, among them.

How to Use

  1. Open the Tip Calculator in your web browser.

  2. Enter the total bill amount in the appropriate field.

  3. Select the desired tip percentage using the provided radio buttons.

  4. Choose the number of people for splitting the bill (optional).

  5. Click the "Calculate" button to get the tip amount and the total amount to be paid per person (if the split by person option is chosen).

Technologies Used

  • Vite: A fast build tool for front-end projects, optimizing development speed.
  • React: A JavaScript library for building interactive and dynamic user interfaces.
  • Redux: A state management library for efficiently sharing and controlling the application's state.
  • TypeScript: A superset of JavaScript that adds optional static typing, making the code more robust and secure.
  • Styled Components: A library that allows you to write CSS styles directly in React components, improving style modularity.
  • Tailwind CSS: A utility-first CSS framework for building custom designs quickly.
  • Shadcn/ ui: Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.

Objective

The project is relatively simple, primarily developed with the purpose of gaining knowledge in state management using Redux and implementing static typing with TypeScript. Although I had some prior exposure to these concepts, this was the first time I created a project from scratch using these technologies. The choice of a more basic project, without API integration, was made to focus on the process of building and enhancing these specific skills.

Contribution

Contributions are welcome! If you wish to contribute to this project, follow these steps:

  1. Fork the repository.

  2. Create a branch for your feature (git checkout -b new-feature).

  3. Commit your changes (git commit -m 'Add new feature').

  4. Push to the branch (git push origin new-feature).

  5. Open a Pull Request on GitHub.

This project was developed by Yan.

License

This project is licensed under the MIT License - see the LICENSE file for more details.