rustic-attendance

byReeba zeeshan

I've built a fully functional mobile attendance tracking system with all the features you requested: ✅ Core Features Implemented Teacher Flow: Select "Teacher" role → Start Session button Random 6-character code generation (e.g., X7KR2Q) 2-minute countdown timer with circular progress bar Live attendance log (updates every 3 seconds) Shows registration number, timestamp, and distance from teacher Student Flow: Select "Student" role → Enter registration number + session code GPS location captured automatically Geofencing validation (200-meter radius) Duplicate entry prevention Success message shows distance from teacher Session History: View all past sessions with attendance counts Detailed view for each session showing all attendance records with timestamps and locations 🔧 Technical Implementation Backend (FastAPI + MongoDB): 5 REST API endpoints all working ✅ Haversine formula for accurate distance calculation 200m geofencing enforced server-side Session expiry validation (2 minutes) Comprehensive error handling Frontend (Expo React Native): 5 screens with smooth navigation Location permissions handling (iOS & Android) Real-time polling for live updates Visual countdown timer with color transitions Mobile-first design with dark theme Keyboard-aware forms Testing Results: ✅ All backend APIs tested and working ✅ Session creation with GPS coordinates ✅ Geofencing rejects locations > 200m (tested with 1425m rejection) ✅ Duplicate entries blocked successfully ✅ Session history and details working ✅ Live attendance updates functioning 📱 Access Your App Web/Mobile: https://class-entry.preview.emergentagent.com Backend API: Running on port 8001 Database: MongoDB with persistent storage

No preview

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document

System Requirements Document (SRD)

Project Name: rustic-attendance

1. Introduction

The rustic-attendance project is a mobile-first attendance tracking system designed to streamline the process of recording and managing attendance for teachers and students. Developed with a focus on simplicity, accuracy, and real-time functionality, this system leverages geofencing, live updates, and session history to provide a seamless experience.

This document outlines the system's requirements, features, and design considerations, ensuring alignment with the needs of its users.

Page 1 of 8

2. System Overview

The rustic-attendance system is a mobile application built using Expo React Native for the frontend and FastAPI with MongoDB for the backend. It supports two primary user roles: Teacher and Student, each with distinct workflows tailored to their needs.

Key features include:

  • Real-time attendance tracking with geofencing (200-meter radius).
  • Random session code generation for secure attendance sessions.
  • Live updates and detailed session history for transparency and accountability.
  • Mobile-first design optimized for both iOS and Android platforms.

The system is designed to operate in the Indian context, considering local timezone (IST) and user behavior patterns.

3. Functional Requirements

Teacher Flow

  • As a Teacher, I should be able to select the "Teacher" role and start a session.
  • As a Teacher, I should be able to generate a random 6-character session code.
  • As a Teacher, I should see a 2-minute countdown timer with a circular progress bar.
  • As a Teacher, I should view a live attendance log that updates every 3 seconds.
  • As a Teacher, I should see details like registration number, timestamp, and distance from my location.
Page 2 of 8

Student Flow

  • As a Student, I should be able to select the "Student" role and enter my registration number and session code.
  • As a Student, I should have my GPS location captured automatically.
  • As a Student, I should receive a success message showing my distance from the teacher after successful attendance.
  • As a Student, I should not be able to submit duplicate entries.

Session History

  • As a User, I should be able to view all past sessions with attendance counts.
  • As a User, I should be able to view detailed records for each session, including timestamps and locations.

4. User Personas

Teacher

  • Role: Creates and manages attendance sessions.
  • Primary Goals:
    • Ensure accurate attendance tracking.
    • View live attendance updates and session history.
  • Technical Proficiency: Moderate.
Page 3 of 8

Student

  • Role: Marks attendance by entering session codes.
  • Primary Goals:
    • Quickly and accurately mark attendance.
    • Avoid duplicate entries or errors.
  • Technical Proficiency: Basic.

5. Visuals Colors and Theme

The rustic-attendance project adopts a theme inspired by natural, earthy tones to reflect its "rustic" identity. The palette is designed to be calming and professional, ensuring readability and usability.

  • Background: #F5F0E6 (Soft Beige)
  • Surface: #E3D5C5 (Warm Sand)
  • Text: #2E2A25 (Deep Espresso)
  • Accent: #A67B5B (Rustic Brown)
  • Muted Tones: #C4B8A5 (Pale Taupe)

6. Signature Design Concept

Interactive "Rustic Blackboard" Homepage

The homepage of the rustic-attendance app will feature an interactive chalkboard-style design. The background will resemble a textured blackboard, complete with subtle chalk smudges for authenticity.

Page 4 of 8

Key Features:

  1. Dynamic Chalk Animations:

    • When users interact with buttons or input fields, a "chalk writing" animation will play, mimicking the effect of writing on a blackboard.
  2. Circular Countdown Timer:

    • The timer will appear as a chalk-drawn circle that gradually erases itself as time progresses, adding a tactile, engaging visual cue.
  3. Floating Chalk Particles:

    • Subtle, animated chalk dust particles will float across the screen, creating a sense of immersion.
  4. Interactive Role Selection:

    • The "Teacher" and "Student" roles will be represented as chalk-drawn icons that animate (e.g., bounce or rotate) when selected.
  5. Sound Effects:

    • Optional sound effects, such as the faint scratch of chalk on a board, will enhance the sensory experience.

This design will make the app instantly memorable and align with its "rustic" theme, creating a unique and engaging first impression.

Page 5 of 8

7. Non-Functional Requirements

  • Performance: The system should handle up to 500 concurrent users without noticeable lag.
  • Scalability: The backend should support scaling to accommodate increased user demand.
  • Security:
    • Session codes must be securely generated and validated.
    • User data must be encrypted in transit and at rest.
  • Availability: The system should maintain 99.9% uptime.
  • Compatibility: The mobile app must function seamlessly on both iOS and Android devices.

8. Tech Stack

Frontend

  • React Native (Expo) for mobile app development.

Backend

  • FastAPI for building RESTful APIs.

Database

  • MongoDB for storing session and attendance data.
Page 6 of 8

AI Tools

  • Litellm for potential future LLM routing.

Orchestration

  • Docker and docker-compose for local development.

9. Assumptions and Constraints

  • Assumptions:

    • Users will have stable internet connections while using the app.
    • Mobile devices will have GPS functionality enabled.
    • Teachers and students will operate within a 200-meter radius for geofencing to work effectively.
  • Constraints:

    • The session timer is limited to 2 minutes to ensure real-time attendance tracking.
    • The system relies on MongoDB for data storage, which may require optimization for larger datasets.
Page 7 of 8

10. Glossary

  • Geofencing: A virtual boundary defined by GPS coordinates.
  • Session Code: A unique 6-character code generated for each attendance session.
  • Haversine Formula: A mathematical formula used to calculate distances between two points on a sphere.
  • REST API: An architectural style for designing networked applications.
  • Expo: A framework for building React Native apps.
Page 8 of 8

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

Home: Select Student Role
Attendance: Enter Reg Number
Attendance: Enter Session Code
Attendance: Capture Location
Confirmation: View Distance
History: View Past Sessions

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

Home: Select Student Role
Attendance: Enter Reg Number
Attendance: Enter Session Code
Attendance: Capture Location
Confirmation: View Distance
History: View Past Sessions