refactor: move app code into Max Avatar/ subfolder (monorepo prep for backend)

Step 1 of adding a backend proxy server (API keys held server-side instead
of shipped in the installer). Moves everything app-specific into
"Max Avatar/" via git mv (preserves history): src/, tests/, scripts/,
assets/, build/, resources/, package.json/-lock.json, electron-builder.yml,
electron.vite.config.ts, eslint.config.mjs, playwright.config.ts,
vitest.config.mts, sonar-project.properties, tsconfig*.json, Dockerfile,
.editorconfig/.env*/.gitignore/.prettier*.

CLAUDE.md, README.md, docs/, .claude/, .gitea/, .husky/, .vscode/, and the
docker-compose files stay at the repo root, since they'll apply to both the
app and the future backend.

No application code needed changes (all its internal paths are relative to
its own tree). Adjusted what referenced the old root from outside:
- .husky/pre-commit: cd into "Max Avatar" before lint-staged
- .gitea/workflows/*.yml: working-directory + cache-dependency-path +
  artifact paths + SonarQube projectBaseDir
- docker-compose.yml: build context -> ./Max Avatar
- Max Avatar/Dockerfile: node:20-alpine -> node:24-alpine (same node:sqlite
  issue already fixed elsewhere, never applied here before)
- .vscode/launch.json, README.md: updated paths/instructions

Verified from Max Avatar/ after the move: npm ci, typecheck, lint,
test:coverage (473/473, same coverage numbers), build, and dev all work
unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-10-31 12:15:30 +01:00
co-authored by Claude Sonnet 5
parent 60e2fb26af
commit 1c2f002eb3
224 changed files with 135 additions and 18 deletions
+85
View File
@@ -0,0 +1,85 @@
export type ConceptStatus = 'not_started' | 'in_progress' | 'acquired' | 'to_review'
export type SubjectStatus = 'researching' | 'assessing' | 'in_progress' | 'mastered'
export type AssessmentKind = 'initial' | 'module' | 'final'
export type ExerciseDifficulty = 'facile' | 'moyen' | 'difficile'
export type ExerciseStyle = 'prediction' | 'debogage' | 'probleme_ouvert' | 'projet' | 'qcm_cible'
export interface SubjectProgress {
subject: string
level: string | null
status: SubjectStatus
objective: string | null
lastSessionAt: string
concepts: {
name: string
status: ConceptStatus
lastReviewedAt: string
nextReviewAt: string | null
locked: boolean
orderIndex: number
}[]
}
export interface ModuleAssessment {
question: string
answer: string
dontKnow: boolean
difficulty: ExerciseDifficulty | null
exerciseStyle: ExerciseStyle | null
targetsCommonError: string | null
createdAt: string
}
/** Resultat d'une exigence du guide pedagogique, calcule a partir des donnees stockees (non-LLM). */
export interface ComplianceCheck {
key: string
label: string
ok: boolean
detail: string
}
export interface CourseComplianceReport {
subject: string
checks: ComplianceCheck[]
}
export type ModuleDiagramKind = 'shapes' | 'mermaid'
export interface ModuleDiagram {
kind: ModuleDiagramKind
title: string
data: unknown
createdAt: string
}
export interface ModuleDetail {
name: string
status: ConceptStatus
locked: boolean
theorySummary: string | null
assessments: ModuleAssessment[]
diagrams: ModuleDiagram[]
}
export type ExerciseType = 'free_text' | 'multiple_choice' | 'true_false'
/** Une question parmi plusieurs posees en une seule fois (formulaire groupe, pas une par une). */
export interface ExerciseFormItem {
id: string
question: string
type: ExerciseType
options: string[] | null
}
export interface ExerciseForm {
requestId: string
items: ExerciseFormItem[]
}
export interface ExerciseFormAnswer {
id: string
answer: string
}
/** Reponse sentinelle soumise par le bouton "Je ne sais pas", toujours disponible. */
export const DONT_KNOW_ANSWER = 'Je ne sais pas'
+13
View File
@@ -0,0 +1,13 @@
export type CourseBuildStepStatus = 'pending' | 'active' | 'done'
export interface CourseBuildStep {
key: string
label: string
status: CourseBuildStepStatus
detail?: string
}
export interface CourseBuildState {
subject: string
steps: CourseBuildStep[]
}
+33
View File
@@ -0,0 +1,33 @@
export type ShapeType = 'rect' | 'circle' | 'line' | 'arrow' | 'text' | 'stroke' | 'arc' | 'preset'
export interface DrawShape {
type: ShapeType
x?: number | undefined
y?: number | undefined
x2?: number | undefined
y2?: number | undefined
width?: number | undefined
height?: number | undefined
radius?: number | undefined
content?: string | undefined
label?: string | undefined
color?: string | undefined
points?: { x: number; y: number }[] | undefined
/** Legende orale dite au moment ou cette forme apparait (narration pas-a-pas). */
caption?: string | undefined
/** Pour type 'arc' : portion de cercle en degres (0 = droite, sens horaire). */
startAngle?: number | undefined
endAngle?: number | undefined
/** Pour type 'arc' : true = part de camembert (reliee au centre), false/absent = arc ouvert. */
closed?: boolean | undefined
/** Pour type 'preset' : nom du preset (ex: "right_triangle") et ses parametres bruts. */
preset?: string | undefined
presetParams?: Record<string, unknown> | undefined
}
export interface Drawing {
title: string
width: number
height: number
shapes: DrawShape[]
}
+4
View File
@@ -0,0 +1,4 @@
export type VoiceTurnResult =
| { ok: true; transcript: string; reply: string; audio: ArrayBuffer }
| { ok: 'ignored'; transcript: string }
| { ok: false; error: string }