ENGLISH·COURSE API
    Preparing search index...

    Driven adapter: in-memory implementation of CourseRepository.

    Production seed data is supplied at construction time and is treated as immutable from the perspective of this adapter. A real database adapter (Postgres, JSON file, ...) implements the same port and lands in a separate change.

    Implements

    Index

    Methods

    • Courses in ascending sequence order — the ladder order the home renders — so downstream use cases never re-sort, matching the guarantee ModuleRepository.listByCourse already gives for modules.

      slice() first: sorting the backing array in place would reorder the seed the caller passed in.

      Returns Promise<
          {
              id: string & $brand<"CourseId">;
              slug: string & $brand<"Slug">;
              title: string;
              description: string;
              language: string;
              lessonCount: number;
              moduleCount: number;
              sequence: number;
              track: "level" | "reference";
              outcomes?: string[];
              audience?: string;
              highlights?: string[];
              sounds?: { vowels: string[]; consonants: string[] };
              translations?: Record<
                  string,
                  {
                      description?: string;
                      outcomes?: string[];
                      audience?: string;
                      highlights?: string[];
                  },
              >;
          }[],
      >