π Location-Based Attendance Verification (Streamlit + GPS + Microsoft Forms)
This project provides a location-restricted attendance system built with Streamlit.
Users must be physically present near the seminar/classroom to access the attendance form. If they are inside the allowed GPS radius, they are automatically redirected to a Microsoft Form. Otherwise, access is denied.
π Live App
π Open here: https://attendance-8avu5rhldpsugjrcgvx7qj.streamlit.app/
β How It Works
User opens the Streamlit page
Browser requests GPS permission
Distance is calculated using Haversine formula
If inside allowed radius β redirect to Microsoft Form
If outside β access denied
π Logic IF distance β€ allowedRadius: redirect to MS Form ELSE: block access
β¨ Features
β Automatic GPS verification β Distance calculation (meters) β Microsoft Forms redirect β No form shown before verification β Works on mobile & desktop β Simple, lightweight β Easy deployment on Streamlit Cloud
π Configuration
Inside app.py you can change:
Target location const targetLat = 39.132473; const targetLng = -84.5170492;
Radius (meters) const allowedRadius = 90;