Build Your Own BMI Calculator API

The "BMI Calculator" project aims to develop a simple web and mobile application that calculates the Body Mass Index (BMI) based on user-provided inputs such as height and weight. The application will allow users to input their data in both metric and imperial units, and it will display the BMI result along with a health classification (e.g., underweight, normal, overweight, or obese). The BMI Calculator will provide an easy-to-use interface and offer features such as saving results, tracking progress, and additional health tips.

Detailed Description

Body Mass Index (BMI) is a commonly used measure to evaluate whether an individual has a healthy weight for their height. The BMI Calculator will offer users the ability to input their height and weight in either metric or imperial units and receive an instant BMI calculation. The app will display the calculated BMI along with a classification that interprets the result (underweight, normal weight, overweight, or obese). Additionally, users will have the option to save their results, track changes over time, and receive health-related tips or suggestions.

Here’s a detailed look at how users will interact with the BMI Calculator:

  1. Input Fields:

    • Height: Users can enter their height in either centimeters/meters (metric) or feet/inches (imperial).

    • Weight: Users can enter their weight in either kilograms (metric) or pounds (imperial).

    • Unit Toggle: Users can toggle between metric and imperial units for both height and weight.

  2. BMI Calculation:

    • Formula: The app will use the BMI formula:

    Screenshot 2024-09-25 at 2.12.00 AM.png

    • Result Display: The calculated BMI will be displayed instantly after the user inputs their data and hits the "Calculate" button.

  3. Health Classification:

    • Based on the calculated BMI, the app will provide a health classification, such as:

      • Underweight: BMI < 18.5

      • Normal weight: BMI 18.5 – 24.9

      • Overweight: BMI 25 – 29.9

      • Obese: BMI 30 or higher

  4. Additional Features:

    • Save Results: Users can save their BMI calculations for future reference and track progress over time.

    • History Tracking: Users can view a history of their past BMI results and changes over time.

    • Health Tips: Based on the user's BMI result, the app will provide general health and fitness tips, such as exercise recommendations or diet suggestions.

  5. Customization Options:

    • Personal Profile: Users can create a profile where they can save their height and weight for quick calculations in the future.

    • Notifications: Users can set reminders to check their BMI periodically.

  6. Responsive Design:

    • Mobile-Friendly: The app will be optimized for both web and mobile platforms, ensuring a smooth experience across devices.

    • Clean UI: The user interface will be simple and intuitive, with easy-to-read results and navigation.

Real-World Example

Consider a user named Alice who is interested in keeping track of her health. Alice opens the BMI Calculator app and inputs her height (165 cm) and weight (68 kg). After pressing the "Calculate" button, the app instantly calculates her BMI as 24.98 and classifies her as being in the "Normal weight" range. Alice decides to save the result and check her BMI again in the future. She receives a health tip suggesting that she maintain regular physical activity to stay within the healthy BMI range.

Table of Contents

  1. Introduction

  2. Objectives

  3. Functional Requirements

  4. Non-Functional Requirements

  5. Use Cases

  6. User Stories

  7. Technical Requirements

  8. API Endpoints

  9. Security

  10. Performance

  11. Documentation

  12. Glossary

  13. Appendix

1. Introduction

The "BMI Calculator" project will provide users with a quick and easy tool to calculate their Body Mass Index (BMI). Users will be able to input their height and weight in either metric or imperial units, and the app will display their BMI results and corresponding health classifications. The app will also offer additional features like result saving, progress tracking, and health tips.

2. Objectives

  • Allow users to input their height and weight in either metric or imperial units.

  • Calculate the BMI instantly and display the result along with a health classification.

  • Provide users with the ability to save and track their BMI progress over time.

  • Offer general health and fitness tips based on the BMI result.

  • Ensure a responsive and intuitive user interface for both web and mobile platforms.

3. Functional Requirements

Input Fields

  • Height: Accept height in centimeters/meters (metric) or feet/inches (imperial).

  • Weight: Accept weight in kilograms (metric) or pounds (imperial).

  • Unit Toggle: Allow users to switch between metric and imperial units for both height and weight.

BMI Calculation

  • Formula: Calculate BMI using the appropriate formula based on user input.

  • Result Display: Display the BMI result instantly after calculation.

Health Classification

  • Underweight: BMI less than 18.5.

  • Normal weight: BMI between 18.5 and 24.9.

  • Overweight: BMI between 25 and 29.9.

  • Obese: BMI 30 or higher.

Additional Features

  • Save Results: Allow users to save their BMI results.

  • History Tracking: Display a history of BMI results and trends over time.

  • Health Tips: Provide general health tips based on the user's BMI.

4. Non-Functional Requirements

  • Scalability: The app should handle an increasing number of users and saved results without performance degradation.

  • Performance: Ensure that BMI calculations and result displays occur instantly.

  • Security: Secure user data and saved BMI results, especially if personal information is stored.

  • Usability: Provide an intuitive interface with clear instructions and easy navigation for users of all ages.

5. Use Cases

  • User Inputs Height and Weight: A user enters their height and weight and calculates their BMI.

  • User Saves BMI Result: A user saves their BMI result and views their BMI history over time.

  • User Views Health Tips: A user receives health-related suggestions based on their BMI result.

6. User Stories

  1. As a user, I want to input my height and weight to calculate my BMI easily.

  2. As a user, I want to switch between metric and imperial units for height and weight input.

  3. As a user, I want to receive a clear result of my BMI along with a health classification.

  4. As a user, I want to save my BMI results so that I can track my progress over time.

  5. As a user, I want to receive health tips based on my BMI result to help me improve or maintain my health.

7. Technical Requirements

  • Programming Language: Use appropriate web and mobile development languages (e.g., JavaScript/React for web, Swift for iOS, and Kotlin for Android).

  • BMI Formula: Implement both metric and imperial BMI calculations.

  • Storage: Use local storage for saving BMI results or integrate with a backend database for storing user history.

  • Responsive Design: Ensure the app is responsive and works well on both web and mobile platforms.

8. API Endpoints

BMI Calculation

  • POST /bmi/calculate: Calculate BMI based on user input (height, weight, and units).

Result Storage

  • POST /bmi/save: Save the calculated BMI result.

  • GET /bmi/history: Retrieve the user's saved BMI results and history.

9. Security

  • Data Encryption: Encrypt user data (height, weight, BMI results) when saved.

  • Authentication (Optional): If users create accounts, implement secure authentication using JWT or OAuth.

10. Performance

  • Ensure that BMI calculations and result displays occur instantly.

  • Optimize the app to handle large amounts of saved BMI data without performance lag.

11. Documentation

  • Provide user manuals explaining how to use the BMI calculator, switch between units, and interpret the results.

  • Include API documentation if integrating with other health or fitness apps.

12. Glossary

  • BMI: Body Mass Index, a measure of body fat based on height and weight.

  • Metric Units: Measurement units using meters, centimeters, and kilograms.

  • Imperial Units: Measurement units using feet, inches, and pounds.

13. Appendix

  • Include UI mockups or screenshots showing the BMI calculator layout and how users will input data and view results.


Let me know if you need further modifications or additional details!

Join our community

Need to show-off or ask doubts? Join our Slack Community. Ask questions, help others and learn in public to make the best use of MBProject.

Ready? Start Building

Includes the necessary PRD, assets, design and frontend files, style guide and a README file to help you with each step of the project.

Start Building (Be Notified)

Tags

Easy

2 Tasks

General

Node.js

Want Your Certificate?

Complete all the tasks in the project to claim your certificate