Seedlingo Documentation

website·Indexed 31 days ago

https://seedlingo.com

Documentation for Seedlingo, a client-side single page application built with VueJS. Includes guides on local setup, Android build processes, architecture, and the ContentSpec.json format for creating and validating custom content.

Tokens
5.2K
Snippets
24
Records
37
Agent score
50%

What's inside Seedlingo

  1. Overview of Seedlingo language learning tool

    Seedlingo is a digital language learning tool designed for adults who are fluent listeners but are learning to read their native language. Teachers and content developers can use Seedlingo's templates to create tailored units of exercises and skill-adjusted assignments.
  2. Seedlingo Technology Stack Overview

    Seedlingo is developed as a client-side single page application (SPA) using the VueJS web framework with Progressive Web App (PWA) functionality. To deploy as a native Android app, the application is wrapped using the Ionic Framework and Capacitor, which renders the app fully offline within a WebView.
  3. Understand the Seedlingo content directory structure

    The Seedlingo app loads its educational data from the content/ folder. To deploy custom content, the directory must contain the following components:

    • ContentSpec.json: A root configuration file that specifies how Seedlingo identifies and loads the rest of the content.
    • Word-lists: Files describing words and their associated media (icons, pictures, audio).
    • Media files: The actual image and audio assets referenced in the word-lists.
    • Unit specifications: Definitions that determine which exercise templates are included in a unit and which words are paired with specific exercise types.
    • Instruction audio: Audio files that guide users on interaction and progression.
  4. Update Android splash screens and icons

    Use cordova-res to generate and copy Android icons and splash screens from source images. After running the command, manually edit ic_launcher.xml and ic_launcher_round.xml to change the background attribute from @color to @mipmap.
    npx cordova-res android --skip-config --copy --icon-source public/logo-m/apple-touch-icon-512x512.png --splash-source public/logo/splash.png --icon-foreground-source public/logo/icon-foreground.png --icon-background-source public/logo/icon-background.png
  5. Install Seedlingo Android app (Simplified Chinese)

    To install the Simplified Chinese version of the Seedlingo Android app, download the APK from the official S3 bucket or the GitHub releases page. Note that you may need to enable 'Install from unknown sources' in your Android settings.
    # Download from S3 (Version 1.5.7)
    https://seedlingo.s3.ap-southeast-1.amazonaws.com/seedlingo%5Fv1.5.7%5F79.apk
    
    # Or check GitHub releases
    https://github.com/nodepa/seedlingo/releases
  6. Exercise Generation and Delivery Flow

    The process of delivering an exercise to the user follows this flow:

    1. Route Trigger: ExerciseSession.vue is mounted via a /unit/:id route.
    2. Unit Identification: ExerciseSession calls ExerciseProvider.getExerciseFromUnit(index) using the ID from the route parameter.
    3. Exercise Generation: ExerciseProvider.ts uses Content.UnitSpec to verify the unit and randomly selects an exercise type available for that unit. It then executes a specific generator function (e.g., generateMultipleChoiceExercise(unit)).
    4. Data Assembly: For a Multiple Choice exercise, the provider selects a random exercise specification, picks 4 random word references, fetches the word specifications, and designates one as the correct option. It also fetches the corresponding icon (iconToMatch).
    5. Component Rendering: The resulting exercise object is passed back to ExerciseSession, which dynamically renders the appropriate component (e.g., MultipleChoiceExercise.vue) and passes the data via the exercise-prop prop.
  7. Set up Seedlingo for local development

    To run Seedlingo locally for testing, content development, or contribution, ensure you have git and Node.js (with npm) installed. If you are not using Volta, refer to the volta section in package.json to use the correct Node.js version. The setup is tested on Ubuntu 22.04 LTS or equivalent.
    # Clone the repository
    git clone git@github.com:nodepa/seedlingo.git
    
    # Navigate to the app directory
    cd seedlingo/app
    
    # Install dependencies
    npm install
  8. Install Android build tools and SDK

    To build for Android, you must install the Java Development Kit (JDK) and the Android SDK command line tools. After unpacking the command line tools (e.g., to $HOME/cmdline-tools/latest), configure the ANDROID_HOME environment variable and update your PATH to include the tools' bin folder. Use sdkmanager to update the tools and install the specific build-tools version (34.0.0).
    # Add to .bashrc or similar
    export ANDROID_HOME="$HOME/.android"
    export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$PATH"
    
    # Update and install build tools
    sdkmanager --update
    sdkmanager --install "build-tools;34.0.0"
  9. Build the SeedLingo Android APK

    Once the environment is configured and the repository is cloned, navigate to the seedlingo/app directory and execute the Android build script. The resulting .apk file will be located in the android/app/build/outputs/apk/release/ directory.
    cd seedlingo/app
    npm run build:android
  10. Match Seedlingo app versions to format versions

    Ensure the formatVersion in your JSON files matches the requirements of the Seedlingo app version being used:
    • Seedlingo v1.4.0+ $\rightarrow$ format version 1.4.0
    • Seedlingo v1.3.0+ $\rightarrow$ format version 1.3.0
    • Seedlingo v1.0.0+ $\rightarrow$ format version 1.2.1
    • Seedlingo v0.91.0+ $\rightarrow$ format version 1.1.1
    • Seedlingo v0.9.0 $\rightarrow$ format version 1.1.0
  11. Install Seedlingo Android app (English Demo)

    To install the English demo version of the Seedlingo Android app, download the APK from the official S3 bucket or the GitHub releases page. Note that you may need to enable 'Install from unknown sources' in your Android settings.
    # Download from S3 (Version 1.5.7_en)
    https://seedlingo.s3.ap-southeast-1.amazonaws.com/seedlingo%5Fen%5Fv1.5.7%5F80.apk
    
    # Or check GitHub releases
    https://github.com/nodepa/seedlingo-en/releases