- React
- Tailwind CSS
- Lucide React
- FastAPI
The calculator uses the following inputs to estimate the blood alcohol level:
- Gender - Male or Female (affects distribution ratio)
- Weight (kg) - Body weight for calculation
- Number of Drinks - Total drinks consumed
- Volume per Drink (ml) - Size of each drink
- Alcohol % - Alcohol content percentage
- Hours Since Last Drink - Time elapsed since last consumption
The frontend calculates grams of alcohol consumed and sends a payload to the backend:
{
weight: Number,
sex: "male" | "female",
alc_g: Number,
hrs: Number
}The backend processes this data using the Widmark formula and returns the estimated blood alcohol level.
| BAC Range | Status | Color |
|---|---|---|
| < 0.02% | Sober | Green |
| 0.02% - 0.05% | Slight Impairment | Yellow |
| 0.05% - 0.08% | Impaired | Orange |
| ≥ 0.08% | Legally Intoxicated | Red |
- BAC Calculator Backend - FastAPI backend for BAC calculations
- Ioannis Michadasis (Frontend) - GitHub Profile
- Apostolos Chalis (Backend) - GitHub Profile