How mrl-creator/attendance-workspace works
Attendance Workspace is a self-hosted app for managing courses, groups, students, staff, sessions, and attendance. Users work through the browser client, which calls a Cloudflare Worker API; the API enforces permissions and persists workspace data in D1. The main workflow covers workspace setup and access, organizing records and instructor assignments, creating session rosters, recording attendance, reviewing history, and exporting reports. Import tools support CSV, XLSX, and selectable-text PDF. Source excerpts show only portions of client and API behavior, so some documented capabilities are included without speculative implementation links.
Main entry points: index.js Worker API · client.js Browser application · report-utils.js Report generation · xlsx-viewer.js Excel viewer and import
Components 18
User experience
- Browser application
src/client.js - Worker API
src/index.js - Workspace database
migrations/0001_initial.sql
Access and workspace
- Accounts and sessions
src/index.js - Role permissions
src/policy.js - Workspace setup
src/workspace-utils.js
Attendance operations
- Courses and groups
src/index.js - Instructor assignments
src/index.js - Session rosters
src/index.js - Attendance marks
src/index.js - Attendance history
src/attendance-utils.js - Audit and recovery
src/index.js
Import and reports
- CSV parsing
public/csv.js - Import mapping
src/import-utils.js - Excel viewer and import
src/xlsx-viewer.js - PDF text extraction
src/pdf-utils.js - Report generation
src/report-utils.js
Other components
- Workspace user
Connections 21
- Workspace user → Browser application: uses
README.md - Browser application → Worker API: requests
src/client.js - Worker API → Workspace database: queries
src/index.js - Worker API → Accounts and sessions: handles sign-in
src/index.js - Worker API → Role permissions: checks roles
src/index.js - Worker API → Workspace setup: validates email
src/index.js - Worker API → Courses and groups: manages records
README.md - Worker API → Instructor assignments: manages assignments
README.md - Worker API → Session rosters: creates sessions
src/index.js - Worker API → Attendance marks: manages marks
README.md - Browser application → Attendance history: builds history
src/client.js - Browser application → CSV parsing: parses CSV
src/client.js - Browser application → Import mapping: maps rows
src/client.js - Browser application → Excel viewer and import: reads workbooks
src/client.js - Browser application → PDF text extraction: converts PDF text
src/client.js - Browser application → Report generation: builds report sheets
src/client.js - Worker API → Report generation: exports attendance CSV
src/index.js - Worker API → Audit and recovery: records deletions
src/index.js - Browser application → Excel viewer and import: views worksheets
README.md - Browser application → Report generation: offers PDF reports
README.md - Worker API → Audit and recovery: supports recovery snapshots
README.md