🎓 Smart Attendance AI
Inspiration
The inspiration for this project came from our daily experience at SMIT. We noticed that traditional attendance methods are slow, prone to proxy attendance, and create a significant manual workload for faculty. We wanted to build a "zero-friction" ecosystem where security is handled by data and automation, not manual lists.
What it does
Smart Attendance AI is a multi-role web platform that automates classroom management:Admin: Manages classrooms and subjects with a dedicated dashboard.Teacher: Opens a live QR scanner and uses Computer Vision for headcount validation.Student: Receives a domain-restricted, auto-generated Digital ID and QR code for instant scanning.
How we built it
We utilized a modern tech stack focused on security and rapid deployment:Backend: Developed with Python and Flask using the Application Factory Pattern.Database: SQLAlchemy with a local SQLite instance, featuring "Auto-Seed" logic for Render compatibility. Security: Domain-restricted login (@college_email.com and console-based OTP verification. Computer Vision: OpenCV was integrated to calculate the headcount ratio: Match = (AI Headcount/Digital Scans) x 100%
Challenges we ran into
Database Concurrency: We faced sqlite3.OperationalError: database is locked during the auto-registration of new students. We solved this by implementing sequential commits and increasing the database timeout. Deployment Synchronization: Solving "Timezone Drift" was critical; our Render server initially ran on UTC, causing time-window mismatches for classes. We resolved this by forcing the Asia/Kolkata timezone in the environment. The "Race Condition": We fixed a bug where the profile page loaded before the database finished creating a new student by adding session refreshes and fallback creation logic.
Accomplishments that we're proud of
Zero-Touch Enrollment: We successfully built a "Smart Parser" that extracts student names and IDs directly from their institutional emails, eliminating the need for a registration form. Render-Proof Deployment: Our app is fully autonomous on Render, handling its own database seeding and environment configuration without manual intervention.
What we learned
We mastered the art of building Role-Based Access Control (RBAC) and learned how to handle the limitations of SQLite in a production-like environment. Most importantly, we learned that a successful project requires a balance between complex backend logic and a seamless user experience.
What's next for Smart Attendance AI
Postgres Integration: Moving from SQLite to a dedicated PostgreSQL instance for better concurrency handling. Face Recognition: Moving beyond simple headcounts to full biometric face-matching for 100% accuracy. Mobile App: Transitioning the student portal into a native mobile application with push notifications for class starts.