Skip to main content

SKOLE-CALS — Academic Calendar Module

Module ID: SKOLE-CALS | Version: 1.0 | Status: Active
Products: Parent App (read) · Teacher App (manage) · Web App (manage)

1. Overview

FieldValue
Module NameAcademic Calendar
Module CodeCALS
Business ValueGives the whole school community a single source of truth for the academic year’s events — exam dates, holidays, sports days, PTMs. Reduces missed events and scheduling conflicts.

Scope In

  • Create, update, soft-delete academic events with date range, event type, time
  • Parent and Teacher views of upcoming events
  • Filter by event_type

Scope Out

  • iCal export / Google Calendar sync
  • Parent RSVP

2. Requirements

Functional Requirements (FR)

What the module must DO — actions, behaviors, and outcomes.
  • SKOLE-CALS-FR001: The module shall allow admins and teachers to create academic events with titles, descriptions, types, date ranges (from/to), and times.
  • SKOLE-CALS-FR002: The module shall support categorized event types: holiday, exam, sports, ptm, cultural, and other.
  • SKOLE-CALS-FR003: The module shall enable authorized users to update and soft-delete calendar events.
  • SKOLE-CALS-FR004: The module shall allow all users to view upcoming school events, filterable by their type.
  • SKOLE-CALS-FR005: The module shall perform chronological display of events, sorted by the start date in ascending order.

Non-Functional Requirements (NFR)

How well the module must do it — performance, security, and reliability.
  • SKOLE-CALS-NFR001: The module shall behave reliably by excluding soft-deleted events (deleted_status = 1) from visibility across all apps.
  • SKOLE-CALS-NFR002: The module shall perform multi-tenant isolation by scoping all events strictly to the school’s skole_id.

Constraints

Rules and boundaries — tech choices and platform restrictions.
  • C001: We must implement event duration support where the end date can differ from the start date to accommodate multi-day events like exams or sports days.
  • C002: We must use a dedicated academic_events table to separate formal calendar dates from activity-based social content.

3. Sub-modules / Backlog

IDSub-modulePriorityStatusEstimateLinked FR
SKOLE-CALS-SM001Event management (teacher/admin)P0Done2dFR001–FR003
SKOLE-CALS-SM002Calendar viewer (all apps)P0Done1dFR004–FR005

4. Logical Implementation

GET /teachers-app/academic-calendar?skole_id=&event_type=
  WHERE deleted_status = 0 AND skole_id = ?
  ORDER BY event_from_date ASC

POST /teachers-app/academic-calendar
  { skole_id, title, description, event_type,
    event_from_date, event_to_date, event_time }

5. UI Requirements

Teacher App — CalendarScreen

IDScreenRouteDescription
SKOLE-CALS-UI001CalendarScreen/calendarMonthly calendar with event markers, event list below
Components:
IDComponentProps
SKOLE-CALS-UC001EventCardevent, onEdit, onDelete
SKOLE-CALS-UC002EventTypeFiltertypes[], selected, onChange
SKOLE-CALS-UC003EventForminitialValues, onSubmit
SKOLE-CALS-UC004CalendarMarkerdate, hasEvent, eventType

Parent App — AcademicCalendarScreen

IDScreenRouteDescription
SKOLE-CALS-UI002AcademicCalendar/academic-calendarRead-only view of school calendar events

Web App

IDScreenRouteDescription
SKOLE-CALS-UI003Calendar Page/:skoleId/calendarFull CRUD calendar management

6. Conditional Expressions

IDExpressionTriggerTrue ActionFalse Action
SKOLE-CALS-CE001deleted_status === 1DB queryExcludeInclude
SKOLE-CALS-CE002event_type === 'holiday'EventCard renderGreen highlightNormal
SKOLE-CALS-CE003event_type === 'exam'EventCard renderRed highlightNormal
SKOLE-CALS-CE004event_to_date !== event_from_dateEventCard renderShow date rangeShow single date
SKOLE-CALS-CE005user.type === 'staff'Calendar screenShow add/edit/deleteRead-only

7. Database Tables

IDTableRole
SKOLE-CALS-TB001academic_eventsAll academic calendar events

8. API Endpoints

IDMethodRouteAuthDescription
SKOLE-CALS-EP001GET/parent-app/academic-eventsJWT (parent)View events
SKOLE-CALS-EP002GET/teachers-app/academic-calendarJWT (staff)View events
SKOLE-CALS-EP003POST/teachers-app/academic-calendarJWT (staff)Create event
SKOLE-CALS-EP004PUT/teachers-app/academic-calendar/:idJWT (staff)Update event
SKOLE-CALS-EP005DELETE/teachers-app/academic-calendar/:idJWT (staff)Soft-delete event
SKOLE-CALS-EP006GET/web-app/academic-calendarJWT (user)Admin view events
SKOLE-CALS-EP007POST/web-app/academic-calendarJWT (user)Admin create event
SKOLE-CALS-EP008PUT/web-app/academic-calendar/:idJWT (user)Admin update event
SKOLE-CALS-EP009DELETE/web-app/academic-calendar/:idJWT (user)Admin delete event