> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cleverschool.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# Clubs & Extracurricular Fixtures

> [card] [Getting Started](./getting-started)

> [card] [Tutorials](./tutorials)

> [card] [Workflows](./workflows)

## Introduction

The **Clubs & Fixtures** module delivers a structured, comprehensive management platform for all extracurricular programmes, lunchtime clubs, and sports fixtures across the school. It connects club leadership, pupil rosters, scheduled sessions, match scores, instant student QR check-in, and school-wide participation analytics into a cohesive system.

***

### Conceptual Architecture Model

The module structures extracurricular activities, pupil engagement, and attendance tracking through an interconnected entity model:

```mermaid theme={null}
flowchart TD
    Club["<b>Extracurricular Club (Club)</b><br/>Name • Description • Day • Time • Location • Owner"]
    Meeting["<b>Club Meeting & Fixture (ClubMeeting)</b><br/>Date • Time • Opponent • Location • Home/Away • Scores • Notes"]
    Members["<b>Club Member Roster</b><br/>Enrolled Pupils (club_pupil)"]
    Attendees["<b>Attendance Register</b><br/>Active Session Attendees (club_meeting_pupil)"]
    QR["<b>Session QR Check-In</b><br/>Real-time student self-registration"]
    Badges["<b>Achievement Badges (Badge)</b><br/>Milestone recognitions (First Timer, Explorer, Regular)"]
    Stats["<b>Engagement Analytics Engine</b><br/>Aggregated House, Form & Year Group participation"]

    Club --> Meeting
    Club --> Members
    Meeting --> Attendees
    Members -.->|Enrolled Default| Attendees
    QR -->|Student Scan| Attendees
    Attendees --> Badges
    Attendees --> Stats
```

* **Clubs & Activities**: The central extracurricular definition, capturing meeting days, standard timings, locations, and the designated staff leader (`Club Owner`).
* **Meetings & Fixtures**: Individual session instances scheduled under each club. For sports teams, meetings represent fixtures with opponent details, home/away status, location, and final match results.
* **Member Rosters vs. Casual Attendees**: Clubs maintain an enrolled membership list (`club_pupil`) for regular attendees, while session registers (`club_meeting_pupil`) accommodate both registered members and guest attendees.
* **Dual Attendance Recording**: Staff can mark attendance directly through interactive web registers or project/print a dynamic session QR code for pupils to scan and check in using the **Pupil Portal**.
* **School-Wide Meetings Hub (`/clubs/meetings`)**: An aggregated operational table tracking all meetings across all clubs, featuring date range filtering, search by club or owner name, multi-row selection, and bulk reminder dispatches for unrecorded registers.
* **Engagement Analytics & Gamification**: Session attendance data immediately updates participation charts across houses, forms, and year groups while triggering automatic badge awards.

***

## Roles & Permissions Matrix

Role-based access control provides clear operational boundaries across the school:

> [tab] Administrator
>
> **System & Module Oversight**
>
> * Enable and configure the Clubs & Fixtures module in school administration.
> * Assign the `Clubs Manager` role to senior leaders, heads of PE, or extracurricular coordinators.
> * Receive administrative alerts prompting leadership delegation when no manager is assigned.
> * Inherits full administrative authority to create, edit, archive, or delete any club, fixture, or attendance record.

> [tab] Clubs Manager
>
> **Extracurricular Programme Leadership**
>
> * Full operational authority across all school clubs, fixtures, and student rosters.
> * Create and archive clubs, reassign club ownership, and manage global settings.
> * Access the school-wide **Meetings Hub** (`/clubs/meetings`) to audit register completion and dispatch bulk reminder emails to meeting owners.
> * Review school-wide participation trends and house competition analytics in the **Statistics Hub** (`/clubs/statistics`).
> * Monitor real-time student presence across all clubs on any given day (`/clubs/pupils/today`).

> [tab] Clubs Owner / Staff Leader
>
> **Club & Fixture Management**
>
> * Manage assigned clubs, update session descriptions, schedules, and locations.
> * Schedule upcoming meetings and sports fixtures with opponents and match details.
> * Project or print session QR codes for pupil check-in.
> * Take live attendance registers for enrolled members and casual visitors.
> * Record final fixture scores and match summaries.
> * Manage club membership rosters and enrol new students.

> [tab] Clubs Viewer / School Staff
>
> **Visibility & Safeguarding Information**
>
> * Browse all active clubs, meeting times, and locations.
> * Check real-time daily club registers (`/clubs/pupils/today`) to verify student whereabouts after school for duty, office, or bus transport coordination.
> * View participation analytics across houses and year groups.
> * *Note*: All authenticated staff members with the `school_staff` role automatically have viewing permissions.

***

## User Interface & Screen Tour

### 1. Main Clubs Directory (`/clubs`)

The central dashboard displaying all school clubs and sports teams:

* **My Clubs vs. All Clubs Toggle**: Quickly switch between clubs you personally lead and the complete school extracurricular directory.
* **Search & Filters**: Search clubs by title and filter by active or archived status.
* **Direct Navigation to Meetings**: Access the school-wide **Meetings** directory with a dedicated navigation button in the top action bar.
* **New Club Creation**: Appointed leaders and administrators can quickly create new clubs, specifying the name, scheduled weekday, start time, and location.

### 2. School-Wide Meetings & Fixtures Directory (`/clubs/meetings`)

A centralised control centre for monitoring all club sessions and fixtures across the school:

* **Date Range Picker**: Filter meetings by date range, defaulting to the last 7 days. Includes handy presets (*Yesterday*, *This Week*, *Last Week*, *Last 7 Days*, *This Month*, *Last Month*, *Year to Date*) and restricts selections to ending on or before today (`max="today"`).
* **Multi-Attribute Search**: Filter meeting records instantly by club name or club owner's name.
* **Sortable Column Headers**: Click column headings (**Club Name**, **Owner**, **Date**, **Participants**) to toggle ascending and descending sort order.
* **Direct Session Links**: Click any row to navigate directly to the detailed meeting register and fixture results page.
* **Row Selection & Select All**: Select individual meetings using checkboxes, select all records on the current page, or select all matching records across multiple pages.
* **Bulk Attendance Reminders**: Open the **Send reminders** confirmation modal to dispatch automated notification emails (`SendMeetingReminders`) to the owners of selected meetings where no attendance records have been logged.

### 3. Individual Club Management (`/clubs/club/{id}`)

The dedicated workspace for managing a specific club or team:

* **Club Overview**: Displays key scheduling metadata (owner, regular day, time, location, and description).
* **Meetings & Fixtures Table**: Lists all scheduled past and upcoming sessions, showing dates, opponents, home/away designations, results, and participant counts.
* **Member Roster Management**: View all enrolled pupils, add new students using real-time search, or remove members no longer attending.
* **Management Menu**: Edit club information or archive inactive clubs.

### 4. Meeting Detail & Live Register (`/clubs/club/meeting/{id}`)

The operational register and fixture results hub:

* **Session & Fixture Metadata**: Date, start time, end time, location, opponent, and home/away status.
* **Interactive Member Register**: Checkbox list of all enrolled club members to mark attendance with a single click.
* **Guest & Casual Attendance (`Other Attendance`)**: Search and mark attendance for pupils who are not regular members of the club.
* **Fixture Scoreboard**: Record home and away scores and post-match commentary.
* **QR Code Check-In**: Display the session QR code on screen or print copies for classroom posting.

### 5. Pupils in Clubs Directory (`/clubs/pupils`)

A comprehensive student engagement directory:

* Lists all pupils alongside their current club memberships and total session attendance counts.
* Filterable by name, year group, and form tutor.
* Export complete pupil club participation data directly to Excel or CSV (`PupilClubExport`).
* Click any pupil to view their dedicated extracurricular history at `/clubs/pupil/{id}/clubs`.

### 6. Real-Time Daily Attendance (`/clubs/pupils/today`)

An essential operational tool for office staff, duty managers, and transport supervisors:

* Displays a real-time list of all pupils attending any club or fixture today.
* Grouped by club and showing student form, house, and check-in status.
* Ensures duty staff can verify pupil location before late bus departures or during emergency dismissals.

### 7. Participation Statistics Hub (`/clubs/statistics`)

Visual analytics driving school engagement and house competitions:

* **Interactive Date Filtering**: Review participation across termly, monthly, or annual ranges.
* **House Competition Breakdown**: Total student attendance aggregated by school house to inform house cups and rewards.
* **Year Group & Form Insights**: Identify cohorts with lower extracurricular engagement to tailor new club offerings.

***

## Automated Background Jobs & Reminders

> [accordion] Bulk Meeting Reminders (SendMeetingReminders)
>
> Dispatched on demand from the **Meetings** screen. Automatically filters selected meetings to those without recorded pupil attendance and notifies club owners to submit their registers.

> [accordion] Automated Badge Awards (AwardBadges)
>
> Evaluates pupil attendance milestones in the background, automatically awarding badges (*First Timer*, *Regular Attender*, *Super Explorer*, *Team Player*, *Team Winner*) that display proudly on the **Pupil Portal**.

***

## Next Steps & Guides

> [card] [Getting Started Guide](./getting-started)
>
> Step-by-step setup guide for administrators and club coordinators.

> [card] [Tutorials & Walkthroughs](./tutorials)
>
> Practical guides for QR check-in, bulk reminders, and taking registers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.