lingo-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev 8af89d2cc9f8
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 7efc97d0dde0b2a3e729ccf9
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
functions/lib/course.ts
// The shape of a course file (functions/courses/<id>.json), shared by the app and the API.
// Courses are written by hand and live in the repo; nothing here is generated at runtime.

export type LangId = "es" | "fr" | "de" | "it" | "pt";

export interface Course {
  id: LangId;
  name: string; // "Spanish"
  native: string; // "Español"
  speech: string; // BCP-47 code for speech and listening, "es-MX"
  level: string; // "A1"
  about: string; // one sentence for the course card
  units: Unit[];
}

export interface Unit {
  n: number; // 1-based
  title: string;
  about: string; // one line under the unit title
  tip: Tip;
  lessons: Lesson[];
}

export interface Tip {
  title: string;
  body: string[]; // short paragraphs in plain English
  examples: [string, string][]; // [target, English]
}

export interface Lesson {
  n: number; // 1-based within the unit
  title: string;
  words: Word[]; // the new words and short phrases this lesson teaches
  sentences: Sentence[]; // sentences that use this lesson's words and earlier ones
}

export interface Word {
  t: string; // target language, nouns with their article: "el gato"
  e: string; // English: "the cat"
  ea?: string[]; // other English meanings a learner may type or pick
}

export interface Sentence {
  t: string; // target language sentence
  e: string; // natural English translation
  ta?: string[]; // other correct target-language translations of `e`
  ea?: string[]; // other correct English translations of `t`
}

/** What the landing page and the API list before a course file loads. */
export const LANGUAGES: { id: LangId; name: string; native: string; units: number }[] = [
  { id: "es", name: "Spanish", native: "Español", units: 8 },
  { id: "fr", name: "French", native: "Français", units: 8 },
  { id: "de", name: "German", native: "Deutsch", units: 3 },
  { id: "it", name: "Italian", native: "Italiano", units: 3 },
  { id: "pt", name: "Portuguese", native: "Português", units: 3 },
];

export const isLang = (x: string): x is LangId => LANGUAGES.some((l) => l.id === x);

Change history

Point OpenApps links to openapps.free
8af89d2cc9 · 17 hours ago
Bind agent address in policy
0018350275 · 19 hours ago
Use OpenApps service URLs and add contribution strip
805365daf4 · 19 hours ago
Bounded source sync
3f2fb3b265 · 2 days ago
Bounded source sync
7dcb580324 · 2 days ago
Bounded source sync
dcd05c0944 · 2 days ago