A simple application that calculates the price with VAT (TVA) and includes an option to calculate the price after a discount. The interface features a form where the user can enter the price before tax (HTT), specify if a discount is applied, and see the final price after tax and discount. The program checks inputs and handles errors gracefully.
- Introduction
- Demo
- Requirements
- Installation
- Usage
- Features
- Technologies Used
- Project Structure
- Challenges and Learnings
- Future Improvements
- Contact
- License
This project is a web application designed to help users calculate the total price including VAT and optional discounts. The motivation for creating this project was to practice DOM manipulation, input validation, and user-friendly error handling in JavaScript.
Check out the live demo here.
- Modern web browser (e.g., Chrome, Firefox, Safari)
- Basic understanding of HTML, CSS, and JavaScript
To run the project locally, follow these steps:
# Clone the repository
git clone https://nada-tb-beginner-projects.github.io/Calculatrice-de-TVA-avec-remise.git
# Navigate to the project directory
cd calculatrice-tva-remise
To use the calculator:
# Open the index.html file in your web browser
index.html
Fill in the price before tax (HTT), select if you want to apply a discount, and enter the discount rate if applicable. Click "Calculer" to see the total price including VAT and any discount. Click "Effacer" to clear the form.
- Calculate price including VAT (TVA)
- Optional discount calculation
- User-friendly error messages
- Responsive design for various screen sizes
- HTML
- CSS
- JavaScript
Outline of the project directory:
calculatrice-tva-remise/
├── index.html # Main HTML file
├── style.css # CSS styles
├── main.js # JavaScript functionality
└── README.md # Project documentation
-
Retrieving User Input Data:
- Challenge: Retrieving user input data using DOM methods.
- Solution: Gained a strong understanding of the DOM structure and how to manipulate it using JavaScript.
-
Ensuring Data Security and User-Friendly Experience:
- Challenge: Ensuring data security and implementing a user-friendly experience.
- Solution:
- Input Validation: Implemented functions to check data integrity and security.
- User-Friendly Error Handling: Displayed error messages that guide the user, following the "Don't Make Me Think" principle.
- Enhance UI/UX design with additional styling and animations
- Add more interactive features such as user authentication and dynamic content loading
- Implement a backend for managing user data and interactions
- Optimize the code for better performance and maintainability
For any questions or feedback, you can reach me at:
- GitHub: Nada-TB
This project is licensed under the MIT License. See the LICENSE file for details.