feat: initial frontend codebase — EnCoach v3
React 18 + TypeScript + Vite 5 + Tailwind CSS + shadcn/ui frontend: - Multi-role auth: student, teacher, admin, corporate, agent, developer - Student portal: dashboard, courses, adaptive learning, exams, placement - Teacher portal: courses, assignments, grading, attendance, AI workbench - Admin portal: 60+ management pages (LMS, exams, users, entities, AI) - AI-powered features: study coach, generation page, gap analysis, TTS - Exam system: session, auto-save, results, grading queue - Full IELTS workflow: reading/listening/writing/speaking modules Made-with: Cursor
This commit is contained in:
30
src/services/adaptive-engine.service.ts
Normal file
30
src/services/adaptive-engine.service.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { api } from "@/lib/api-client";
|
||||
import type {
|
||||
AdaptiveDashboardMetrics,
|
||||
AdaptiveEngineStudentRow,
|
||||
AdaptiveThresholdSettings,
|
||||
StudentAbilityModel,
|
||||
StudentAdaptiveSignal,
|
||||
} from "@/types";
|
||||
import type { ApiSuccessResponse } from "@/types";
|
||||
|
||||
export const adaptiveEngineService = {
|
||||
getDashboard: () => api.get<AdaptiveDashboardMetrics>("/adaptive-engine/dashboard"),
|
||||
|
||||
getStudents: (params?: { page?: number; limit?: number }) =>
|
||||
api.get<{ data: AdaptiveEngineStudentRow[]; pagination?: { total: number; page: number } }>(
|
||||
"/adaptive-engine/students",
|
||||
params as Record<string, string | number | boolean | undefined>,
|
||||
),
|
||||
|
||||
getStudentSignals: (studentId: number) =>
|
||||
api.get<StudentAdaptiveSignal[]>(`/adaptive-engine/students/${studentId}/signals`),
|
||||
|
||||
getStudentAbility: (studentId: number) =>
|
||||
api.get<StudentAbilityModel>(`/adaptive-engine/students/${studentId}/ability`),
|
||||
|
||||
getSettings: () => api.get<AdaptiveThresholdSettings>("/adaptive-engine/settings"),
|
||||
|
||||
updateSettings: (data: AdaptiveThresholdSettings) =>
|
||||
api.put<ApiSuccessResponse>("/adaptive-engine/settings", data),
|
||||
};
|
||||
Reference in New Issue
Block a user