ENGLISH·COURSE API
    Preparing search index...

    Now showing · learning-english

    The API reference for English Course.

    Every exported contract that carries JSDoc: the domain's ports and use cases, the adapters behind them, and the hooks, utilities and components the app is built from.

    v0.5.0-8-gc9300d0429 modulesHexagonal · Ports & Adapters

    Browse by layer

    Start from the hexagon

    The domain imports nothing but zod and neverthrow. Everything else reaches it through a port.

    • src/domain/use-cases24

      Use cases

      Factories that take ports and return a ResultAsync.

    • src/domain/ports15

      Ports

      The repository, Clock and IdGenerator contracts.

    • src/domain/entities11

      Entities

      Course, module, lesson and learner shapes.

    • src/adapters45

      Adapters

      Turso, in-memory, local filesystem and SMTP.

    • src/hooks51

      Hooks

      Playback, progress, install prompts and forms.

    • src/components163

      Components

      Cinema primitives, views and shadcn/ui.

    Index

    All modules

    Grouped by folder. Paths mirror src/, one folder per entity.

    domain/use-cases

    24

    domain/ports

    15

    domain/entities

    11
    • domain/entities/continue-watching-location

      Where the learner was the last time they opened a lesson.

      VariableType Alias
    • domain/entities/continue-watching-record

      A course's resume location together with when the learner was last there.

      VariableType Alias
    • domain/entities/course-standing

      Derives every course's standing from the catalog it belongs to.

      Type AliasVariableFunction
    • domain/entities/course

      Whether a course is a rung of the catalog ladder or reference material.

      VariableType Alias
    • domain/entities/ids

      Branded UUID identifiers for course-platform entities.

      VariableType Alias
    • domain/entities/learner-profile

      The letters an initials avatar shows: the first letter of the first word, followed by the first letter of the last word when there is more than one.

      VariableType AliasFunction
    • domain/entities/lesson

      A reading lesson — markdown body, no media. The first lesson kind.

      VariableType Alias
    • domain/entities/module

      A grouping of related Lessons within a Course.

      VariableType Alias
    • domain/entities/resource

      The kind of a Resource — drives the icon in the UI and the filter in ResourceRepository.listByKind (deferred). Defined as a Zod enum so the domain rejects unknown values at the boundary.

      VariableType Alias
    • domain/entities/slug

      A URL-safe identifier for a course (kebab-case, ≥ 3 chars).

      VariableType Alias
    • domain/entities/url-or-path

      A string that is either a fully-qualified absolute URL or a site-relative path beginning with /. Used for Resource.url, VideoLesson.source, and VideoLesson.poster — v1 ships static assets under /public (see design.md §D5, §D9) so relative paths are the natural form. The boundary still rejects garbage (empty strings, schemes without a host, paths without a leading /).

      Function

    adapters

    45

    hooks

    51

    components

    163
    • components/account-challenge

      The Turnstile challenge as the challenged account forms place it: last in the form, under "Continue with Google" on sign-in and sign-up and under the submit button on forgot-password.

      Type AliasFunction
    • components/account-confirmation

      What an account form turns into once there is nothing left to fill in: "check your inbox" after sign-up or a reset request, or "this link no longer works" for a spent reset link. The message is a status region, so it is announced when it replaces the form.

      Type AliasFunction
    • components/account-field

      One labelled input of an account form.

      Type AliasFunction
    • components/account-row

      One account detail on the Profile page: its label and current value, with a Change button that opens the form for it in place.

      Type AliasFunction
    • components/account-section

      The Profile page's sign-in and security settings: the address the learner is registered with, their password, and how they sign in.

      Type AliasFunction
    • components/account-shell

      The card every account page is built in: sign-in, sign-up, forgot and reset password. A heading, an optional subtitle, the page's content, and a footer for the links between those pages.

      Type AliasFunction
    • components/account-submit-area

      The end of every account form's fields: the announced error of the last refused attempt, and the submit button, which stays disabled until the form may be sent. A challenged form places its Turnstile challenge on its own, with AccountChallenge.

      Type AliasFunction
    • components/account-wait

      Whether the nearest AccountWait has a request in flight.

      FunctionType Alias
    • components/achievements-view

      The Achievements page: the learner's card with the distinction they have earned, and their tickets and prizes across the whole catalog.

      Function
    • components/add-to-home-screen-guide/guide-autoplay

      The install guide, playing itself: the four steps on a loop, and a drag to move it by hand.

      ReferenceFunction
    • components/add-to-home-screen-guide/guide-phone-screen

      A miniature iPhone showing the iOS surface one install step happens on, with that step's target control picked out.

      VariableFunction
    • components/add-to-home-screen-guide/install-steps

      Adding the course to an iPhone home screen, as iOS 26 Safari requires it.

      Type AliasVariable
    • components/available-courses-view

      Available courses: every catalog course as an equal poster, the learner's own courses first.

      Type AliasFunction
    • components/avatar-picker

      Picks the learner's avatar: their initials or one of eight illustrations.

      Function
    • components/brand

      The Immersion Cinema wordmark: ENGLISH·COURSE, letter-spaced, with the middle dot in the gold accent. Links wherever the caller points it (locale-aware), defaulting to the locale home — the header sends a signed-in learner to My learning instead. The visible text carries the accessible name, so no extra aria-label is needed.

      Function
    • components/catalog-card

      The way from My learning to Available courses: the size of the catalog, how much of it the learner has not joined, and one course they could try next.

      Type AliasFunction
    • components/change-email-section

      The Profile page's email form: moves the account to a different address, behind two links.

      Type AliasFunction
    • components/change-password-section

      The Profile page's password form: replaces the account's password without signing the learner out here.

      Function
    • components/cinema-background

      The Immersion Cinema backdrop: a warm radial glow bleeding from the upper-right over the base --background, plus a subtle top scrim that evokes the mockup's letterbox bar. Rendered once (in the locale layout) as a fixed, aria-hidden layer behind all content. The glow is static — no animation — so it is safe under prefers-reduced-motion.

      Function
    • components/cinema-hero-artwork

      The backdrop of a cinema hero frame: a video poster fading into the page background from the left and from the bottom, so copy laid over it reads in both themes.

      Type AliasFunction
    • components/continue-band

      The landing's closing band for a learner who already has a card: a greeting by first name, their learner card with its progress, and the way back in.

      Function
    • components/continue-tile

      The course overview's one way in: the video the learner continues with, as a large artwork tile with its position, title and a single action.

      Type AliasFunction
    • components/course-brief

      A course at a glance: For — who it suits — and You'll learn — its highlights — in the active locale.

      Type AliasFunction
    • components/course-detail-hero

      The course page's opening frame: the course's first video's artwork, what kind of course it is, how big it is, and the enroll action.

      Type AliasFunction
    • components/course-detail-view

      The course page a learner sees before joining a course: what it teaches, what is in it, how long it takes, and Enroll (capability course-detail-page).

      Type AliasFunction
    • components/course-enroll-action

      The course page's one action: Enroll until the learner has joined the course, then the way into it — Start course, Continue where you left off or Watch again.

      Type AliasFunction
    • components/course-enroll-bar

      The course page's bottom bar on narrow screens: the course's name and size, and the enroll action, kept at the bottom of the viewport while the page scrolls.

      Type AliasFunction
    • components/course-enroll-card

      The course page's enroll card: the action, how big the course is, and how long it takes at the learner's pace.

      Type AliasFunction
    • components/course-navigator

      Driving adapter: React component that calls the findNextLessonToRecommend use case and renders the recommendation.

      Function
    • components/course-outcomes

      What you'll learn: a course's outcomes as a checklist, in the order the course declares them.

      Type AliasFunction
    • components/course-overview/course-overview-error

      Inline error state for the Course Overview. Reused for the unknown courseSlug and the internal-error case. The page never leaks the raw error kind to the user.

      Function
    • components/course-overview

      The course overview: the video to continue with and the course's progress, then every lesson as a progress-ring tile.

      Function
    • components/course-page-gate

      Holds a course page back until the learner store is seeded, showing PendingCoursePage meanwhile (capability course-detail-page).

      Type AliasFunction
    • components/course-page-switch

      Decides what the course route shows: the course page to a learner who has not joined the course, the progress board to one who has (capabilities course-detail-page, cinema-course-overview).

      Type AliasFunction
    • components/course-poster

      One course of Available courses' lobby, drawn as a vertical cinema poster: artwork, its level, its title, who it is for and what it teaches, and the way in.

      Type AliasFunction
    • components/course-progress-board

      The course overview's progress board: the continue tile and the course progress tile, which leads to the course page, then one ring tile per lesson.

      Type AliasFunction
    • components/course-progress-tile

      The course overview's progress tile: the course title as a heading, a large ring filled to the watched share, and how much is left in videos and time.

      Type AliasFunction
    • components/course-section

      One section of the course page: a gold eyebrow, a level-two heading, then its content, as a region named by the heading.

      Type AliasFunction
    • components/course-sound-strip

      The sounds a course teaches, counted in the heading and laid out as two groups of IPA symbols: vowels, then consonants.

      Type AliasFunction
    • components/course-start-link

      The way into a course the learner has joined: Start course, Continue where you left off or Watch again.

      VariableType AliasFunction
    • components/course-syllabus

      The course page's syllabus: every lesson in sequence order as a disclosure row that opens to its videos.

      Type AliasFunction
    • components/delete-account-section

      The last section of the Profile page: deletes the learner's account.

      Function
    • components/enrolled-course-summary-card

      One enrolled course on My learning's Your courses: its share watched, and the video it continues with.

      Type AliasFunction
    • components/eyebrow

      A small uppercase, letter-spaced gold label — the cinema "eyebrow" used for section chrome and kickers ("Now streaming", "Lesson 3", "Video 1"). The --gold token is contrast safe as text in both themes (design.md §D2).

      Function
    • components/first-course-step

      Onboarding step 3: the one course every new learner is recommended, with a way to start it and a way to see every course.

      Type AliasFunction
    • components/forgot-password-form

      Requests a password-reset email, behind a Turnstile challenge.

      Function
    • components/global-error-fallback

      What a learner sees when the root layout itself fails: one line, one retry button, and a report to Sentry.

      Type AliasFunction
    • components/global-providers

      Client-side providers that wrap the entire app. Add new global providers here (theme, auth session, query client, etc.).

      Function
    • components/gold-badge

      A cinema pill/badge. gold is the accented variant (counts, "featured"); neutral is the quiet variant (metadata chips). Purely presentational.

      Function
    • components/google-sign-in-button

      "Continue with Google": starts the Google OAuth round-trip, which signs the learner in (creating the account on first use, or linking it to an existing account with the same address) and returns them to returnPath in the current locale. A failed round-trip comes back to sign-in.

      Type AliasFunction
    • components/guide-playback-rail

      The row of controls a guide is moved by: back, one per frame, and on.

      Function
    • components/home-view

      The locale home: always the editorial landing.

      Type AliasFunction
    • components/install-app-button

      The header chip that gets the course onto the learner's home screen or Dock.

      Function
    • components/install-prompt-art

      A picture of where the course will come to rest, drawn per platform.

      Function
    • components/learner-achievements

      The learner's collection: how many tickets and prizes they hold across the catalog, then the prize counter with every module's prize.

      Function
    • components/learner-avatar

      The learner's avatar: a circle showing their chosen illustration, or the initials of their name on the gold accent.

      Type AliasFunction
    • components/learner-avatar/learner-illustration

      One of the eight learner illustrations, filling its container.

      Function
    • components/learner-card-name-field

      The learner card's name, written in place.

      Type AliasFunction
    • components/learner-card

      The learner card: who is learning on this device, drawn like a membership card — wordmark, Learner tag, avatar, name, level, and progress.

      Type AliasFunction
    • components/learner-questions

      The new-visitor home's three questions, each answered in a sentence or two.

      Function
    • components/learner-state-seed

      Hands the server's learner snapshot to the browser's learner store.

      Type AliasFunction
    • components/legal-document

      The shell both legal pages share: a title, an opening paragraph, a series of titled passages, and the date the wording last changed.

      VariableType AliasFunction
    • components/lesson-completion-mark

      The "you have taken this lesson" indicator.

      Function
    • components/lesson-notes/markdown

      Renders a lesson notes Markdown body with the Immersion Cinema typographic hierarchy.

      Function
    • components/lesson-ring-tile

      One lesson (module) of the course overview: its artwork, ordinal, a progress ring, a status and how much is left. The whole tile opens the lesson.

      Type AliasFunction
    • components/lesson-ticket

      One lesson's ticket: a notched strip of cream arcade paper carrying the lesson's sound.

      Function
    • components/lesson-view/lesson-breadcrumb

      The breadcrumb at the top of the Lesson Page. Three segments: Course › Module › Lesson. The first two are locale-aware links to the course and module overview pages; the Lesson is the current page (no link).

      Function
    • components/lesson-view/lesson-close-card

      The end-of-lesson block: the "Mark as complete" action and the next lesson as one closing surface.

      Function
    • components/lesson-view/lesson-completion-toggle

      The lesson's completion control, in both of its states — and in the third one, which says nothing.

      Function
    • components/lesson-view/lesson-list

      A module's lessons in sequence order, each a locale-aware link to the lesson route. The current lesson is marked with aria-current="page" and a visual indicator. Each row uses the project's standard minimum touch target height and a visible focus ring.

      Function
    • components/lesson-view/lesson-notes-tabs

      The Lesson Page's Notes/Transcript tab pair (design.md §D6/§D7). The Notes tab renders the readme.md section written in the app's active locale — one language at a time, never a side-by-side pair — falling back to English and then Spanish when the notes do not carry that locale. The Transcript tab is present for visual parity but disabled — no transcript data exists — so activating it only reveals a localized "not available" notice, never transcript content.

      Function
    • components/lesson-view/lesson-page-error

      Inline error state for the Lesson Page. Used when the resolved route is well-formed but the domain can't satisfy it (course not found, module not in course, lesson not in module, or invalid URL params).

      Type Alias
    • components/lesson-view/lesson-video-player

      The lesson player: a Vidstack <MediaPlayer> with the Default Video Layout.

      Function
    • components/lesson-view/lesson-video-player/playback-gestures

      The player's pointer gestures: a single tap toggles playback with a mouse and brings the control bar in or out with a finger, a double tap in the middle toggles fullscreen, a double tap on an edge starts a seek run — where every further tap on that edge adds a step and an indicator counts them — and a press held on the frame runs the lesson at double speed until it is released. All of them are the YouTube app's conventions, which the learner's thumbs already know.

      VariableFunction
    • components/lesson-view/lesson-video-player/video-player-translations

      Builds the full DefaultLayoutTranslations map from the app's own messages.

      VariableFunction
    • components/lesson-view/lesson-video-resume-overlay

      The "Resume from MM:SS · Restart from beginning" choice, drawn inside the player over the video frame.

      Function
    • components/lesson-view/lesson-video-skeleton

      What the lesson's video frame shows while the player is still booting.

      Function
    • components/lesson-view/lesson-view

      The composition the Lesson Page renders. Receives the resolved View from findLessonForView and the Server Action that completes a lesson. Dispatches on lesson.kind so video and reading lessons render appropriately (video → PlaybackPositionedVideoPlayer; reading → body).

      Function
    • components/lesson-view/module-list

      Renders the course's modules in sequence order, each with its lessons listed below. lessonsByModuleId is the precomputed map of moduleId → lessons (sorted by sequence) that the page passes in.

      Function
    • components/lesson-view/outline-drawer/outline-drawer-fixture

      Builds a course of lessonsPerModule.length modules, with the current lesson placed at currentLessonIndex inside the module at currentModuleIndex.

      Type AliasFunction
    • components/lesson-view/outline-drawer

      Responsive shell around the Outline. On screens >= lg it renders as a permanent sidebar (the design's desktop layout). On smaller screens it renders as a compact row above the breadcrumb — collapsed by default, expanded with a tap.

      Function
    • components/lesson-view/outline

      The Course outline sidebar. Renders the course's modules and lessons in sequence order with the current lesson indicated. The component itself does not own the responsive shell — the page chooses where the outline sits (sidebar on desktop, drawer on mobile).

      Function
    • components/lesson-view/playback-positioned-video-player/fire-and-forget

      Observes a player command's promise and discards its rejection.

      Function
    • components/lesson-view/playback-positioned-video-player

      The lesson player with its memory: it remembers where the learner stopped, and offers to take them back there.

      Function
    • components/lesson-view/remember-continue-watching

      Records where the learner is, so the home can offer to bring them back.

      Function
    • components/lesson-view/resource-item

      A single resource row inside the Resources list. The icon is chosen by ResourceKind; the title is the link text; the URL is opened in a new tab so the learner does not navigate away from the lesson.

      Function
    • components/lesson-view/resource-list

      A flat list of resources for the Lesson Page's right rail. Renders a heading plus one row per resource, or a localized empty-state message when there are none.

      Function
    • components/lesson-view/scroll-down-hint

      The hint drawn over the enlarged video while the browser's own chrome still takes part of the screen, asking for the gesture that reclaims it.

      Function
    • components/lesson-view/seek-feedback

      The indicator drawn over the tapped half of the video while a seek run is active: a translucent half-disc, three chevrons pointing the way the video moved, and the seconds the run has seeked so far.

      Function
    • components/lesson-view/seek-step-menu

      The seek-step setting, as an entry in the player's own settings menu.

      Function
    • components/lesson-view/select-notes-for-locale

      Returns the Markdown a learner on locale should read, without its ## language heading.

      Type AliasFunction
    • components/lesson-view/speed-feedback

      The pill drawn over the video while a press-and-hold runs it faster: the rate in force and a pair of chevrons pointing the way it is running.

      Function
    • components/lesson-view/video-buffering-indicator

      The buffering indicator the lesson player draws at the centre of the frame: the Default Layout's own ring, with an opaque core.

      VariableFunction
    • components/lesson-view/video-center-play-button

      The play/pause control drawn at the centre of the video on a touch device, for as long as the control bar is in view.

      Function
    • components/lesson-view/video-enlarge-button

      The fallback control that fills the viewport with the video, seated beside Vidstack's own fullscreen button.

      Function
    • components/lesson-watch-progress

      How much of one video the learner has watched.

      Function
    • components/levels-table

      Catalog courses as rows of an ordered table: the levels, or the reference courses that sit outside them.

      Type AliasFunction
    • components/loading-status

      The one thing a loading shell says out loud.

      Function
    • components/locale-switcher

      Language selector that updates the active locale via next-intl's locale-aware navigation.

      Function
    • components/modals/achievements-guide-modal

      Explains how achievements are earned: tickets, prizes and the card's distinction.

      Variable
    • components/modals/add-to-home-screen-modal

      The add-to-home-screen guide, in a modal.

      Variable
    • components/modals/delete-account-modal

      Asks the learner to confirm deleting their account.

      Variable
    • components/modals/enrollment-welcome-modal

      Welcomes a learner who just enrolled from the course page: the poster of the video the course starts with, an Enrolled mark, and the way in (capability enrollment-welcome).

      Type AliasVariable
    • components/modals/install-prompt-modal

      The install prompt: one question, two answers, then the browser takes over.

      Type AliasVariable
    • components/modals/prize-ready-modal

      Tells the learner a prize is waiting for them at the counter, without showing which one.

      Type AliasVariable
    • components/modals/prize-redeemed-modal

      Celebrates redeeming a module's prize: the module's tickets fly into the prize's silhouette, it shakes and flashes, and the coloured prize appears with its name.

      Type AliasVariable
    • components/modals/safari-install-guide-modal

      The iPad and macOS install guides, in a modal.

      Variable
    • components/modals/unmark-lesson-modal

      Asks the learner to confirm un-marking a lesson they had completed.

      Variable
    • components/module-overview/module-overview-error

      Inline error state for the Module Overview. Used for unknown module, module-not-in-course and invalid params. The page never leaks the raw domain error kind to the user.

      Function
    • components/module-overview

      The module overview as a route through its videos: a server-rendered header — back link, Lesson NN · Course eyebrow, title, and how many videos the module holds with their total runtime — above the learner's route.

      Function
    • components/module-prize

      A module's prize on the module overview, drawn the way the prize counter draws it.

      Type AliasFunction
    • components/module-progress-panel

      The module's progress at a glance: a ring with the percentage finished, the count of finished videos, and the watch time left.

      Type AliasFunction
    • components/module-route-step

      One lesson on a module's route.

      Type AliasFunction
    • components/module-route/module-route.fixtures

      Seeds the browser with a learner who finished the first finishedCount videos and is currentFraction of the way through the next one.

      Function
    • components/module-route

      The learner's route through a module: the progress panel, one step per lesson, each showing whether it is finished, current or upcoming, and the module's prize at the end of the route.

      Type AliasFunction
    • components/module-watch-progress

      How many of a module's videos the learner has finished.

      Function
    • components/my-learning-view

      My learning: the learner's own page — a greeting, the way back into the course they watched last, and every course they are enrolled in.

      Type AliasFunction
    • components/new-visitor-hero

      The landing's hero: who the course is for, what it promises, and one way in.

      Function
    • components/next-up-bar

      A slim "next up" bar, like a mini player, that tells a learner enrolled in nothing where to begin: the recommended course's first video, where it sits, and Start course.

      Type AliasFunction
    • components/onboarding-avatar-step

      Onboarding step 2: the learner picks an avatar on the same learner card.

      Function
    • components/onboarding-name-step

      Onboarding step 1: the learner types their name into the learner card itself.

      Function
    • components/onboarding-progress

      Where the learner is in the onboarding, in words and as a segmented bar.

      Type AliasFunction
    • components/onboarding-shell

      The onboarding step's shape while storage has not said whether this device already holds a profile.

      Function
    • components/pending-button

      The button an account surface waits on: at rest it is an ordinary Button, and while its request is in flight it swaps its label and turns a SpinnerArc beside it.

      Type AliasFunction
    • components/pending-course-page

      What a course route shows before the learner's state has reached the browser: the course title over placeholders, and nothing that depends on whether the learner is enrolled.

      Type AliasFunction
    • components/pending-prize-announcement

      Tells the learner about a prize whose announcement the lesson page never got to make.

      Function
    • components/play-button

      The circular gold play affordance. Two modes:

      Function
    • components/poster-card

      The reusable Immersion Cinema "poster". Composes an artwork box (warm radial glow, optional cover image behind a scrim, an oversized sequence number, an optional eyebrow/headline, and a decorative play circle) with an optional meta row (title + badge) beneath it.

      Function
    • components/practice-track-summary

      A non-interactive summary of a course's modules rendered as a row of numeric marks separated by a connector. The number of marks equals the module count of the course and is used on the locale-home card and the course overview. Accessibility is provided through the aria-label and a visually hidden text description — the marks themselves are not interactive on the home card.

      Function
    • components/prize-counter

      The prize counter: one shelf per course holding every module's prize, like the counter where arcade tickets are redeemed.

      Function
    • components/prize-icon

      One prize from the arcade counter, drawn in colour or as a silhouette.

      Function
    • components/prize-shelf-item

      One module's prize on the counter shelf: the toy, its name once claimed, and a hanging tag with the tickets collected — or the control that claims it.

      Function
    • components/profile-card-band

      The Profile page's card column: the learner card, which carries the level's progress as a count and a bar, and under it two ticket stubs counting the tickets the learner has earned and the prizes they have claimed, each a link to the Achievements page where those tickets are spent and prizes live.

      Type AliasFunction
    • components/profile-save-bar

      The Profile page's save bar, for as long as the learner's card has unsaved changes: under the card on a wide screen, docked to the bottom edge of the viewport on a narrow one.

      Type AliasFunction
    • components/profile-section

      One named section of the Profile page: a heading, an optional supporting line, and whatever the section holds.

      Type AliasFunction
    • components/profile-view

      The Profile page: the learner's card and progress in a column of their own, beside the sections that edit the card, hold the sign-in and security settings, set the preferences, and delete the account.

      Function
    • components/progress-ring

      A circular progress indicator in the Immersion Cinema gold.

      Function
    • components/reset-password-form

      Sets a new password with the token from a reset email.

      Type AliasFunction
    • components/resume-tile

      My learning's way back in: the video to open next in the course the learner watched last, as the course overview's artwork tile.

      Type AliasFunction
    • components/safari-install-guide/safari-guide-autoplay

      The Safari install guide, playing itself: one platform's taps on a loop, and a drag to move it by hand.

      Function
    • components/safari-install-guide/safari-install-steps

      Whether this frame is a tap the learner performs, or the result of having performed them all.

      Type AliasFunctionVariable
    • components/safari-install-guide/safari-window-screen

      A miniature Safari window showing the surface one install step happens on, with that step's target control picked out.

      VariableFunctionType Alias
    • components/share-card

      Renders the sharing card at 1200×630.

      Type AliasFunction
    • components/sign-in-form

      Signs a verified learner in with email and password, behind a Turnstile challenge, or with Google.

      Type AliasFunction
    • components/sign-up-form

      Creates an account with a name, an email and a password, behind a Turnstile challenge.

      Type AliasFunction
    • components/site-footer

      The site's footer: the two legal documents, and nothing else.

      Function
    • components/site-header

      The Immersion Cinema top bar: the ENGLISH·COURSE wordmark, a section eyebrow naming only the current section ("PROFILE") derived from the route, and the locale chip. The theme is not set here — its only control lives in the Profile page's Preferences section. Client-side because the section label reads the pathname; the locale control was already a client component.

      Function
    • components/skip-link

      The first focusable element on every page. Hidden until it receives keyboard focus, then becomes visible to offer screen-reader and keyboard users a way to jump to the page's main landmark.

      Function
    • components/spinner-arc

      The gold arc that turns while a request is in flight.

      Type AliasFunction
    • components/start-course-link

      The landing's primary action: Start course for a new visitor, Continue for a learner who already has a card.

      Function
    • components/start-here-band

      The landing's closing band: the offer restated once more, and the hero's primary action repeated.

      Function
    • components/structured-data

      Renders one schema.org payload as linked data.

      Function
    • components/theme-switch-track

      The visual of the theme switch: a pill track with a sun and a moon, and a thumb that slides to the theme in use with a slight overshoot.

      Function
    • components/theme-toggle

      Theme switch backed by next-themes.

      Function
    • components/ticket-toast

      The notification a lesson page shows when the learner earns a ticket: the ticket dropping out of its slot, the tickets collected towards the module's prize, and that prize's silhouette.

      VariableFunction
    • components/turnstile-challenge

      Cloudflare Turnstile, the bot check on the sign-up, sign-in and forgot-password forms.

      Type AliasFunction
    • components/ui/button

      shadcn/ui Button primitive.

      VariableType AliasFunction
    • components/ui/dialog

      shadcn/ui Dialog root — the state machine behind a modal.

      FunctionType Alias
    • components/ui/dropdown-menu

      shadcn/ui DropdownMenu root — the state machine behind a menu.

      Function
    • components/ui/skeleton

      A pulsing block that stands in for content that has not arrived yet.

      Function
    • components/ui/tooltip

      shadcn/ui TooltipProvider — shares the open delay across the tooltips inside it.

      Function
    • components/vowel-length-card

      The home's interactive minimal-pair card: ship /ɪ/ against sheep /i/, each with a recording, a duration bar and a note tying both vowels to words the learner already says.

      Type AliasFunction
    • components/watch-progress-bar

      A thin gold meter with its reading beside it.

      Function

    app

    52

    content

    1
    • content/courses

      Every course manifest, in catalog order: the level courses, then reference material.

      Variable

    emails

    6
    • emails/_shared/account-email

      The shared shape of the account emails, drawn in the Immersion Cinema dark palette: black letterbox bars cropping the cinema gradient into a film frame, and centred between them the wordmark, a heading, one paragraph, one button, the same link printed as text for clients that hide buttons, and a closing line saying what happens if the email is ignored.

      Type AliasFunction
    • emails/change-email

      The email that approves moving an account to a different address. It goes to the address the account holds today, names the one it would move to, and only asks that new address to confirm once this link is opened.

      Function
    • emails/delete-account

      The email that confirms deleting an account. Following its link, while signed in, deletes the account and everything the learner saved.

      Function
    • emails/password-changed

      The email that tells a learner their password was replaced.

      Function
    • emails/reset-password

      The email that carries a password-reset link. Following it opens the page where the learner chooses a new password.

      Function
    • emails/verify-email

      The email that confirms a new account's address. Following its link verifies the address and signs the learner in.

      Function

    i18n

    4
    • i18n/lesson-routes

      Centralised URL builders for the catalog and lesson pages. Pages and components import these instead of concatenating URL strings, so future routing changes happen in one place.

      Function
    • i18n/request

      Loads the message catalog for the active locale on every Server Component request. Falls back to the default locale when the requested one is not supported (defensive — the middleware should already validate it).

      Variable
    • i18n/require-supported-locale

      Narrows a route's locale param to a locale the application serves, or ends the request as a 404.

      Function
    • i18n/routing

      Centralized routing configuration for next-intl.

      Variable

    lib

    55
    • lib/account-emails

      The locale an account email must be written in, read from the link it carries.

      VariableType AliasFunction
    • lib/account-error-key

      Translates a Better Auth refusal into the key of a localized message, so no raw server text ever reaches a learner.

      Type AliasFunction
    • lib/account-form-schemas

      The change-email form: the address the account would move to, which has to differ from the one it holds today.

      VariableFunctionType Alias
    • lib/account-identity

      A way the learner can sign in to their account.

      Type Alias
    • lib/auth-client

      The browser's Better Auth client: sign-up, sign-in (email and Google), password reset, sign-out and session reads, against /api/auth on the current origin.

      Variable
    • lib/auth

      Builds the Better Auth instance the application runs on.

      Type AliasFunction
    • lib/auth/current-account

      The signed-in learner's account identity for this request, or null without a session.

      Function
    • lib/auth/current-learner-snapshot

      The signed-in learner's snapshot for this request, or null without a session.

      Function
    • lib/auth/redirect-signed-in-learner

      Sends a learner who is already signed in away from an account page — there is nothing to sign in to.

      Function
    • lib/auth/require-learner-session

      The server-side session check every personal route runs before rendering.

      Type AliasFunction
    • lib/celebrate-completion

      Fires the confetti burst that celebrates finishing a lesson.

      Function
    • lib/centered-scroll-top

      Returns the scroll offset that puts a row in the middle of a scrollable region, clamped to what the region can actually scroll.

      Type AliasFunction
    • lib/cinema-confetti

      Fires the confetti burst the app celebrates with: one fan of gold from each bottom corner of the page.

      Function
    • lib/continue-target

      Picks the video a learner continues with. The single source of truth for that question: every surface that offers to continue calls this function rather than reading the continue-watching record directly.

      Type AliasFunction
    • lib/course-copy

      A course's description, outcomes, audience and highlights in a locale.

      Type AliasFunction
    • lib/course-lobby

      Orders every catalog course for Available courses' lobby: the learner's courses first, then every course they have not joined, in catalog order.

      Type AliasFunction
    • lib/course-overview-progress

      Pairs each module with its summary, in module order; a module without a summary is left out.

      Type AliasFunction
    • lib/course-schema

      The site itself and who publishes it.

      Function
    • lib/course-shelf

      Sorts the catalog into the course to lead with, the learner's other courses and the courses still available to them. A learner enrolled in nothing is led by the first level course, as a recommendation — never a reference course.

      Type AliasFunction
    • lib/format-duration

      Split a duration in seconds into hours and minutes for display.

      Type AliasFunction
    • lib/format-minutes-seconds

      Format a playback position as a zero-padded MM:SS clock.

      Function
    • lib/install-offer-stash

      Start listening for the browser's install offer.

      Function
    • lib/is-running-standalone

      Whether the app is already running from the home screen rather than in a browser tab.

      Function
    • lib/known-route-segments

      Whether the router has a route for this path, judged by its first segment.

      VariableFunction
    • lib/learner-achievements

      The symbol a lesson's ticket shows.

      Type AliasFunction
    • lib/learner-snapshot

      The snapshot of a learner with no progress at all.

      Type AliasVariable
    • lib/learner-store

      Adopts the snapshot the server loaded for this request.

      Type AliasVariableFunction
    • lib/legal-sections

      Resolves a document's passages, in the order its key tuple declares.

      VariableType AliasFunction
    • lib/lesson-position

      Where the current lesson sits inside its own module.

      Type AliasFunction
    • lib/minimal-pair-clips

      The recorded clips the home's vowel-length card plays, keyed by the English word each one speaks.

      VariableType Alias
    • lib/missing-page

      Answers a request for a path no route serves with a real 404.

      Function
    • lib/module-prizes

      The prize a module redeems once every one of its lessons has earned its ticket.

      VariableType AliasFunction
    • lib/module-progress

      Decides which state a module's progress panel is in, and the lesson its primary action should open.

      Type AliasFunction
    • lib/module-route

      Splits a runtime into hours and minutes, rounded to the nearest minute.

      Type AliasFunction
    • lib/onboarding-return-path

      Tells whether a value may be used as the course route a learner returns to after the onboarding.

      Function
    • lib/personal-routes

      Whether a locale-less path belongs to a signed-in learner.

      Function
    • lib/playback-resume-thresholds

      Returns true when the saved positionSeconds is meaningful enough to resume from (not noise, not "basically finished"). Both bounds must hold.

      VariableFunction
    • lib/player-layout

      Whether a player of this width wears the Default Layout's compact chrome.

      VariableFunction
    • lib/report-handled-error

      Reports an error the application caught and recovered from, so it still shows up in Sentry.

      Type AliasFunction
    • lib/safe-action

      Base safe-action client. Use this for any Server Action that needs validation.

      Variable
    • lib/safe-internal-path

      Whether a value is a path that can only lead somewhere on this site.

      Function
    • lib/seek-run

      Resolves a stored seek step to one the player can use.

      VariableType AliasFunction
    • lib/sentry-init-options

      Decides whether Sentry starts, and with what.

      Type AliasFunction
    • lib/server-env

      Whether Better Auth rate-limits sign-in, sign-up and the email endpoints.

      Type AliasVariableFunction
    • lib/session-gate

      The proxy's session check: sends a request for a personal route that carries no session cookie to sign-in, with the route as next.

      Function
    • lib/share-card-fonts

      The two Geist weights the sharing card renders in, as ImageResponse wants them.

      Function
    • lib/share-headline

      The promise a course makes, extracted from its description.

      Function
    • lib/share-metadata

      Composes the metadata a single route publishes about itself.

      Type AliasFunction
    • lib/sign-in-return-path

      Whether a value may be used as the route a learner returns to after signing in.

      Function
    • lib/site-url

      The absolute origin the application publishes about itself.

      Function
    • lib/study-pace

      Turns a course's runtime into how long it takes at a number of minutes a day.

      Type AliasFunction
    • lib/utils

      Joins a list of class names, dropping falsy values.

      Function
    • lib/video-pointer

      Whether a pointer event is a primary-button press or release that landed on the video itself.

      Function
    • lib/watch-progress

      The position, in seconds, at which a lesson counts as watched to the end.

      VariableFunction
    • lib/youtube-source

      Extracts the YouTube video id from a lesson's source, when that source is a YouTube link.

      Function

    src

    2
    • instrumentation

      Starts Sentry in whichever server runtime Next.js is booting.

      Function
    • proxy

      Next.js 16 uses proxy.ts for middleware (formerly middleware.ts).

      FunctionVariable