Skip to Content
Living documentation — last reviewed 2026-05-28
FeaturesDaily ProgrammingDaily programming — code map

Daily programming — code map

API

Base path: /organizations/:orgId/daily-programming

RouteMethodService method
PUT /Whole-day replaceset
GET /?weekStart=Week readfindByWeek
GET /?date=Date readfindByDate
PATCH /statusFlip draft↔publishedsetStatus
DELETE /?classTypeId&datePhysical removeremove

Controller: apps/api/src/daily-programming/daily-programming.controller.ts (105 lines) Service: apps/api/src/daily-programming/daily-programming.service.ts (~510 lines) Module: apps/api/src/daily-programming/daily-programming.module.ts

Cross-feature internal export: findByDateRange(orgId, startDate, endDate, publishedOnly) is consumed by ClassSessionsService. static mapWorkoutSections(...) is exported for response-shape reuse.

DTOs

  • apps/api/src/daily-programming/dto/set-daily-programming.dto.tsSetDailyProgrammingDto (classTypeId, date, status?, workouts:[{workoutId, sortOrder}]).
  • Inline SetStatusDto in the controller — classTypeId, date, status: 'draft'|'published'.

Web

PathFile
Schedule programming surfaceapps/web/src/app/[lang]/(protected)/dashboard/schedule/... (TODO: verify exact page)
Class session detail (consumer)apps/web/src/app/[lang]/(protected)/dashboard/schedule/sessions/[sessionId]/page.tsx

Components

  • apps/web/src/components/overview/programming/ — shared with workout-assignments; the daily-programming write UI is part of the schedule program experience.
  • apps/web/src/components/overview/workouts/workout-autocomplete.tsx — workout picker reused in the daily-programming write flow.

DB

libs/db/src/lib/schema/scheduling.ts:

Shared

libs/shared/src/lib/schemas/daily-programming.schema.ts — Zod response types (TODO: verify exact contents).

Tests

  • TODO: verify whether daily-programming.service.unit.spec.ts exists; coverage seems mostly indirect via schedule e2e flows. Apply-from-template path is exercised by:
    • apps/web/e2e/specs/schedule-setup.spec.ts
    • apps/web/e2e/specs/session-sheets.spec.ts