Skip to content

MeghaScaria/attendance-system

Repository files navigation

Biometric Attendance Tracking System - Web Interface

A professional web interface for managing attendance records of children in a charitable trust using biometric fingerprint scanning.

Features

  • Secure Login System: Username and password authentication
  • Dashboard Overview:
    • Real-time statistics (total children, present/absent counts, attendance rate)
    • Weekly attendance charts
    • Monthly overview
    • Recent check-in activity
  • Attendance Management:
    • Individual child profiles with photos
    • Check-in/check-out timings
    • Monthly attendance tracking
    • Search and filter functionality

Getting Started

Default Login Credentials

  • Username: admin
  • Password: admin123

Or

  • Username: staff
  • Password: staff123

Running the Application

  1. Simply open index.html in a web browser
  2. No server setup required for basic functionality (uses local storage for authentication)
  3. For production deployment, you'll need a web server (see suggestions below)

File Structure

.
├── public/             # Frontend files (HTML, CSS, JS)
│   ├── index.html      # Login page
│   ├── dashboard.html  # Main dashboard
│   ├── attendance.html # Attendance records page
│   ├── absentees.html  # Absentees page
│   ├── directory.html  # Directory page
│   ├── styles.css      # All styling
│   ├── script.js       # Authentication and shared functions
│   ├── dashboard.js    # Dashboard-specific functionality
│   ├── attendance.js   # Attendance page functionality
│   ├── absentees.js    # Absentees page functionality
│   ├── directory.js    # Directory page functionality
│   └── api-config.js   # API configuration
├── backend/            # Backend server code
│   ├── server.js       # Main server file
│   └── package.json    # Backend dependencies
├── data/               # Data files
│   ├── employee-types.json  # Employee type mappings
│   └── employee-names.json   # Employee name mappings
├── docs/               # Documentation files
└── README.md           # This file

Integration with Biometric System

Current State

The website currently uses mock data for demonstration. To integrate with your Arduino-based biometric system:

Integration Steps

  1. Backend API Setup:

    • Create a backend server (Node.js, Python Flask/Django, PHP, etc.)
    • The backend should receive data from your Arduino system
    • Store attendance data in a database (MySQL, PostgreSQL, MongoDB)
  2. Arduino to Backend Communication:

    • Your Arduino code (Biometric_system.c) needs to send HTTP requests or use serial communication
    • Options:
      • ESP8266/ESP32: Add WiFi module to send HTTP POST requests directly
      • Raspberry Pi: Use as intermediary - receives serial data from Arduino and forwards to backend
      • Serial to Web Server: Create a local service that reads serial port and sends to API
  3. API Endpoints Needed:

    POST /api/login              - User authentication
    GET  /api/dashboard/stats    - Get dashboard statistics
    GET  /api/attendance/list    - Get list of all children with attendance
    POST /api/attendance/checkin - Record check-in (called by biometric system)
    POST /api/attendance/checkout - Record check-out
    GET  /api/attendance/child/:id - Get specific child's attendance history
    
  4. Update JavaScript Files:

    • Replace mock data in dashboard.js and attendance.js with API calls
    • Use fetch() or axios to communicate with backend
    • Handle real-time updates (consider WebSockets for live updates)

Example Integration Code Structure

// In attendance.js - replace mock data with API call
async function fetchAttendanceData() {
    try {
        const response = await fetch('/api/attendance/list?date=today');
        const data = await response.json();
        return data.children;
    } catch (error) {
        console.error('Error fetching attendance:', error);
        return [];
    }
}

// In dashboard.js - replace mock stats with API call
async function fetchDashboardStats() {
    try {
        const response = await fetch('/api/dashboard/stats');
        const stats = await response.json();
        updateStats(stats);
    } catch (error) {
        console.error('Error fetching stats:', error);
    }
}

Suggestions for Improvement

1. Security Enhancements

  • ✅ Implement proper password hashing (bcrypt)
  • ✅ Add JWT tokens for session management
  • ✅ Enable HTTPS in production
  • ✅ Add CSRF protection
  • ✅ Implement rate limiting on login attempts
  • ✅ Add role-based access control (admin vs staff permissions)

2. Additional Features

  • Export Functionality:

    • Export attendance reports to PDF/Excel
    • Generate monthly attendance sheets
  • Notifications & Alerts:

    • Email/SMS alerts for absent children
    • Daily summary reports to administrators
    • Late check-in notifications
  • Analytics Dashboard:

    • Attendance trends over time
    • Individual child performance tracking
    • Comparative analysis
    • Predictive analytics for attendance patterns
  • Child Profile Pages:

    • Detailed individual profiles
    • Attendance history graphs
    • Photo gallery
    • Medical records (if applicable)
  • Real-time Updates:

    • WebSocket integration for live attendance updates
    • Push notifications when children check in/out
  • Mobile App:

    • React Native or Flutter mobile app
    • Quick check-in/check-out for staff
    • Photo uploads directly from mobile

3. UI/UX Improvements

  • Dark Mode: Add theme switcher
  • Responsive Design: Already implemented, but can be enhanced further
  • Accessibility:
    • ARIA labels for screen readers
    • Keyboard navigation support
    • High contrast mode
  • Multi-language Support: Add localization for regional languages
  • Customizable Dashboard: Let users arrange widgets
  • Print-friendly Views: Optimized layouts for printing reports

4. Data Management

  • Backup & Restore: Automated daily backups
  • Data Archival: Move old records to archive storage
  • Audit Logs: Track all user actions
  • Data Validation: Frontend and backend validation
  • Bulk Operations: Import/export child data

5. Biometric System Enhancements

  • Multiple Fingerprint Registration: Store multiple fingerprints per child
  • Fingerprint Quality Checks: Ensure good quality scans
  • Face Recognition: Add as alternative/additional verification
  • Badge/RFID Support: Backup authentication method
  • Offline Mode: Queue check-ins when internet is down

6. Reporting Features

  • Custom Reports: Allow users to create custom report templates
  • Scheduled Reports: Automatically generate and email reports
  • Visual Charts: More chart types (pie charts, heatmaps, etc.)
  • Comparative Reports: Compare attendance across time periods

7. Technical Improvements

  • Database Optimization: Indexing, query optimization
  • Caching: Redis for frequently accessed data
  • CDN: For static assets in production
  • Progressive Web App (PWA): Make it installable on devices
  • Service Workers: Offline functionality
  • Image Optimization: Compress and optimize child photos

8. Administrative Features

  • User Management: Add/remove users, manage permissions
  • Child Management: CRUD operations for child records
  • System Settings: Configurable settings (check-in times, late thresholds)
  • Bulk Child Registration: Import from CSV/Excel
  • Holiday Calendar: Mark holidays and special days

Technology Stack Recommendations

Frontend (Current)

  • HTML5, CSS3, JavaScript (Vanilla)
  • Chart.js for graphs

Recommended for Production

Option 1: Modern JavaScript Framework

  • React.js or Vue.js for better state management
  • Redux or Vuex for state management
  • Material-UI or Ant Design for UI components

Option 2: Full-Stack Framework

  • Next.js (React-based) with API routes
  • Nuxt.js (Vue-based) with server-side rendering

Backend Options:

  • Node.js + Express + MongoDB/PostgreSQL
  • Python + Django/Flask + PostgreSQL
  • PHP + Laravel + MySQL

Database:

  • PostgreSQL (recommended for relational data)
  • MySQL (alternative)
  • MongoDB (if you prefer NoSQL)

Production Deployment Checklist

  • Set up proper backend server
  • Configure database
  • Set up API endpoints
  • Implement authentication (JWT tokens)
  • Enable HTTPS/SSL
  • Set up backup system
  • Configure domain and DNS
  • Set up monitoring and logging
  • Load testing
  • Security audit
  • GDPR/Privacy compliance (if applicable)
  • User training and documentation

Support & Maintenance

Regular Maintenance Tasks

  • Monitor system performance
  • Regular database backups
  • Update dependencies
  • Security patches
  • User feedback collection
  • Performance optimization

Testing Recommendations

  • Unit tests for critical functions
  • Integration tests for API endpoints
  • End-to-end tests for user flows
  • Load testing for concurrent users

License

This project is developed for educational/service learning purposes for a charitable trust.


Note: This is a prototype/demo version. For production use, implement proper backend security, database integration, and follow all security best practices.

About

Biometric Attendance Tracking System Web Interface for the NGO - Praja Kirana Seva, Bangalore

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors