Skip to content

Dead code cleanup — server actions + API routes #19

@Echolento

Description

@Echolento

Parent

#14

What to build

Remove orphaned server actions and API routes after feature removal. Clean up data-actions.ts and admin-actions.ts.

Remove from data-actions.ts

  • Session-related: getTeacherDashboard (simplify), getTeacherSessions, createSession, completeSession, updateSessionDetails, deleteSession, getTeacherWeeklySessionCounts, checkSessionOverlap
  • Session notes: createSessionNote, updateSessionNotes, getStudentLastSessionNotes
  • Student progress: updateStudentProgress
  • Admin: getAdminDashboard, getAllTeachers (admin variant), getAllStudents (admin variant), transferStudent, removeStudent, getAllOrganizations, createOrganization
  • Unused payment analytics: getRevenueTrend, getPaymentHistory

Remove API routes

  • /api/teachers/[id]/display if no longer needed

Remove

  • admin-actions.ts entirely
  • lib/invitation-actions.ts (if not already removed by student CRUD slice)

Keep

  • Payment actions: getTeacherPayments, toggleStudentPayment, updateStudentMonthlyPrice, updateStudentPaymentDay
  • Student actions: getTeacherStudents (simplified for new schema)
  • Settings actions: updateTeacherSettings (simplified)
  • Auth actions unchanged

End-to-end behavior: app compiles without errors, payment flow works, student management works, no references to removed server actions.

Acceptance criteria

  • Session, session-note, progress server actions removed from data-actions.ts
  • Admin and org server actions removed
  • admin-actions.ts file deleted
  • Unused payment analytics actions removed
  • /api/teachers/[id]/display route removed if orphaned
  • All imports cleaned up, no compilation errors
  • Payments, students, settings, auth still work end-to-end

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentReady for autonomous agent to implement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions