A responsive and user-friendly React frontend application that lets users interactively input their personal details to estimate insurance premium costs. It seamlessly connects to the FastAPI backend for real-time predictions. This project is built using React and Vite for fast development and performance.
- 🔹 Clean and intuitive UI for insurance prediction
- 🔹 Form input for user data (age, BMI, smoker status, etc.)
- 🔹 Connects to a REST API backend for live predictions
- 🔹 Built with React (Vite) for fast hot-reload development
- 🔹 Easily extendable for styling or feature upgrades
insurance-prediction-frontend-react/
├── public/ # Static assets
├── src/ # Application source code
│ ├── components/ # React components
│ ├── App.jsx # Main app component
│ └── index.jsx # App entry point
├── .gitignore
├── package.json
├── vite.config.js
└── README.md
git clone https://github.com/harinandanmv/insurance-prediction-frontend-react.git
cd insurance-prediction-frontend-reactnpm installnpm run devYour app will open at:
http://localhost:5173
This app expects the backend API (FastAPI) to be running and accessible (e.g., at http://localhost:8000).
Update the API base URL inside your React config or .env file accordingly to ensure the prediction requests reach the backend.
| Technology | Role |
|---|---|
| React | Frontend UI |
| Vite | Dev server & build tooling |
| JavaScript | Language |
| CSS | Styling |
| REST | API communication |
- User opens the application in a browser
- Fills out details (age, BMI, smoker status, etc.)
- Clicks Predict
- App sends input to backend API
- Displays predicted insurance cost
Contributions are welcome! Whether it’s bug fixes, UI improvements, or deployment enhancements — feel free to open issues or PRs.
This project is licensed under the MIT License — see the LICENSE file for details.