This project is a Machine Learning-powered Public Health Dashboard that provides COVID-19 data analysis and infectious rate predictions using FastAPI (Python) for the backend and Next.js (React) for the frontend.
- 🟢 Next.js (React + TypeScript)
- 🎨 Tailwind CSS (for UI styling)
- 🔄 Axios (for API calls)
- 🐍 FastAPI (Python)
- 📊 Scikit-learn (Machine Learning)
- 🔥 Uvicorn (ASGI server)
- 🐳 Docker & Docker Compose
- 🌎 Vercel (Frontend)
- 🛠 AWS/GCP (Backend, optional)
git clone https://github.com/your-username/machine-learning-project.git
cd machine-learning-projectcd backend
python -m venv venv
source venv/bin/activate # (Windows: venv\Scripts\activate)
pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 8080 --reload🔹 API will be running at: http://127.0.0.1:8080
cd ../frontend
npm install
npm run dev🔹 App will be available at: http://127.0.0.1:3000
docker-compose up --build🔹 This will start both backend (8080) and frontend (3000) together.
✅ View COVID-19 Data (cases, deaths, vaccinations, etc.) ✅ Predict Infection Rate based on user input ✅ Machine Learning-powered infectious rate estimation ✅ Modern & responsive UI with Tailwind CSS ✅ REST API for data retrieval & predictions ✅ Deployed using Docker & Cloud Services
Endpoint: GET /covid-data/
{
"covid_stats": [
{ "country": "USA", "cases": 1000000, "deaths": 50000, "hospitalizations": 20000, "vaccinations": 900000 }
]
}Endpoint: POST /predict-infection-rate/
{
"country": "USA",
"population": 331000000,
"confirmed_cases": 1000000,
"deaths": 50000,
"vaccinations": 900000
}{
"predicted_infection_rate": 2.45
}machine-learning-project/
│── backend/ # FastAPI Backend
│ ├── main.py # API Server
│ ├── models.py # ML Models
│ ├── routes.py # API Endpoints
│ ├── requirements.txt # Dependencies
│── frontend/ # Next.js Frontend
│ ├── app/ # Pages & Components
│ ├── lib/api.ts # API Calls to Backend
│── docker-compose.yml # Docker Setup
│── README.md # Documentation
docker build -t fastapi-ml .
docker run -p 8080:8080 fastapi-mlcd frontend
vercel deploy- Fork the repository
- Create a new branch (
feature-xyz) - Commit your changes (
git commit -m "Added new feature") - Push to GitHub & create a Pull Request
This project is MIT licensed. Feel free to modify and distribute.
💡 Happy Coding! 🚀