Skip to content

es2323/SnapBack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  SnapBack โ€“ Employee Fatigue Monitoring System

SnapBack is a fatigue monitoring web application designed to promote workplace wellness by blending quick cognitive games with daily check-in surveys. It offers tailored dashboards for employees, managers, and HR staff to visualise fatigue trends and intervene early when necessary.


๐Ÿš€ Features

๐Ÿ‘ฉโ€๐Ÿ’ผ Multi-Role Login

  • Employee: Access daily check-ins, play fatigue games, and view performance insights.
  • Manager: View team-wide fatigue trends, role-based alerts, and check-in compliance rates.
  • HR: Generate downloadable CSV reports with department-wide analytics.

๐ŸŽฎ Fatigue Detection Games

  • Reaction Game: Measures reaction time over 10 rounds; difficulty increases progressively.
  • Focus Game: Identify the odd word out under time pressure and distraction.
  • Games are randomly selected and opened in separate windows upon clicking "Start Game".

๐Ÿ“ Daily Check-In Survey

  • Interactive sliders for rest, alertness, and motivation.
  • Radio button for physical discomfort.
  • Submits to backend and contributes to fatigue score calculation.

๐Ÿ“Š Smart Dashboards

  • Employee Dashboard: Personalised fatigue score blending game results and survey responses.
  • Manager Dashboard:
    • Avg. fatigue score across team.
    • High-fatigue alerts from past 3 days.
    • 7-day trend graph.
    • Role-based breakdown.
  • HR Dashboard:
    • Generate CSV reports for department fatigue and key trends.

๐Ÿ› ๏ธ Technologies Used

Stack Tooling
Backend Flask, SQLite
Frontend HTML, CSS (custom), Chart.js
Game Engine pygame for local game execution
Visualisation Chart.js (line graphs)
Reports CSV via Flask send_file

๐Ÿงฉ System Architecture

  • Modular Blueprints: Flask routes organised into auth.py and main.py.
  • MVC-lite: Templates (Views), Routes (Controllers), Database (Model).
  • Game Integration:
    • run_game.py selects and launches a game in a subprocess.
    • Games submit results via REST POST to /submit_score.

๐Ÿงช Example Users for Testing

Email Password Role Team
levi@example.com pass123 employee Team A
manager1@example.com managerpass manager Team A
hr@example.com hrpass hr HR

About

Web app tracking employee fatigue via cognitive games and wellness surveys

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors