### Install Dependencies and Start Build Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/case-module/editor/README.md Navigate to your content set's editor directory, install npm dependencies, and start the build process. Ensure you commit all changes after completion. ```bash cd your-content-set/editor npm install npm start ``` -------------------------------- ### Install and Start Tangerine (Windows) Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/default/README.md Use these commands to install dependencies and start the Tangerine Content Set v2 on Windows. ```bash npm install npm start-windows ``` -------------------------------- ### Install and Start Tangerine (Linux/macOS) Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/default/README.md Use these commands to install dependencies and start the Tangerine Content Set v2 on Linux and macOS. ```bash npm install npm start ``` -------------------------------- ### Install Tangerine Server Software Source: https://github.com/tangerine-community/tangerine/blob/main/README.md Clone the Tangerine repository, checkout a specific version tag, copy default configuration, and start the server. Ensure you replace `` with the actual release version. ```bash # Get the software. git clone https://github.com/tangerine-community/tangerine.git cd tangerine # See releases tab on github for versions. git checkout # Create config.sh and change all required settings. cp config.defaults.sh config.sh nano config.sh # Start the software. ./start.sh ``` -------------------------------- ### Install Documentation Dependencies Source: https://github.com/tangerine-community/tangerine/blob/main/docs/CONTRIBUTING.md Install the required Python packages for building and serving the documentation locally. ```bash pip install mkdocs pip install mkdocs-material pip install mkdocs-git-revision-date-localized-plugin pip install mkdocs-awesome-pages-plugin pip install mkdocs-minify-plugin ``` -------------------------------- ### Install Case Module Content Set Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/case-module/README.md Clone the repository and install dependencies to set up the local environment. ```bash git clone git@github.com:tangerine-community/tangerine cd tangerine/content-sets/case-module npm install ``` -------------------------------- ### Start Tangerine with New Configuration Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/mysql-module.md Execute the start script to apply configuration changes and recreate the container. ```bash ./start.sh ``` -------------------------------- ### GET /sync-session/start/{projectGroup}/{deviceUuid}/{deviceToken} Source: https://context7.com/tangerine-community/tangerine/llms.txt Starts a device synchronization session for offline-first data collection. ```APIDOC ## GET /sync-session/start/{projectGroup}/{deviceUuid}/{deviceToken} ### Description Starts a sync session and returns the sync session URL for CouchDB replication. ### Method GET ### Endpoint /sync-session/start/{projectGroup}/{deviceUuid}/{deviceToken} ### Parameters #### Path Parameters - **projectGroup** (string) - Required - The project group identifier. - **deviceUuid** (string) - Required - The unique identifier of the device. - **deviceToken** (string) - Required - The device authentication token. ### Response #### Success Response (200) - **syncSessionUrl** (string) - The URL for CouchDB replication. ``` -------------------------------- ### Install Tangerine Preview Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/local-content-development.md Installs the Tangerine Preview CLI globally via npm. ```bash npm install -g tangerine-preview ``` -------------------------------- ### Install New Tangerine Version Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/upgrade-instructions.md Fetch updates, checkout the new version tag to a new branch, and run the start script with the new version. ```bash # Fetch the updates. git fetch origin # Checkout a new branch with the new version tag. git checkout -b # Run the start script with the new version. ./start.sh ``` -------------------------------- ### Set Up Tangerine Client Development Environment Source: https://github.com/tangerine-community/tangerine/blob/main/README.md Commands to set up the Tangerine client-side development environment using npm and Angular CLI. This includes installing dependencies, copying content sets, and starting the development server. ```bash # Install Angular CLI globally. This is useful for using the `ng generate` subcommand for templating out new Components, Modules, etc. npm install -g @angular/cli # Clone the repository. git clone git@github.com:tangerine-community/tangerine # Navigate to the client codebase in the repository. cd tangerine/client/ # Install client dependencies. npm install # Remove the existing Angular Assets folder as we will populate it with a Content Set. rm -rf src/assets # Copy the client folder of a Content Set into the Angular Assets folder. cp -r ../content-sets//client src/assets # Set up an app-config.json file. You won't have to modify anything in this file for development, it just needs to be a copy. cp src/assets/app-config.defaults.json src/assets/app-config.json # Copy the latest translations into the Angular Assets folder. cp ../translations/translation* src/assets/ # Workaround for ssl issue in phantomjs: error:0308010C:digital envelope routines::unsupported export NODE_OPTIONS=--openssl-legacy-provider # Start the Angular development server. npm start ``` -------------------------------- ### Run Tangerine Preview Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/local-content-development.md Navigates to the project directory and starts the preview server. ```bash cd your-project tangerine-preview ``` -------------------------------- ### Install Tangerine Preview Globally Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/custom-app/client/README.md Installs a specific version of the tangerine-preview package globally. Ensure Node.js is installed first. ```bash npm uninstall -g tangerine-preview npm install -g tangerine-preview@3.14.0-prerelease-5 ``` -------------------------------- ### Start Tangerine Server (v3.16.2) Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Starts the Tangerine server with version v3.16.2. Ensure that any necessary configuration changes, like enabling `filterCaseEventScheduleByDeviceAssignedLocation`, are made in `app-config.json` prior to starting. ```bash ./start.sh v3.16.2 ``` -------------------------------- ### Install and execute generate-uploads script Source: https://github.com/tangerine-community/tangerine/blob/main/server/src/scripts/generate-uploads/README.md Install dependencies and run the script with specified parameters for batch size, group name, delay, and template. ```bash npm install ./bin.js [delayBetweenBatchesInMilliseconds] [batchSize] [alternativeTemplate] ``` ```bash cd /tangerine/server/src/scripts/generate-uploads ``` ```bash ./bin.js 1 group-uuid 2000 1 case-mother ``` ```bash ./bin.js 4 group-1 ``` ```bash ./bin.js 100 group-1 15000 10 ``` ```bash ./bin.js 100 foo 2000 5 class ``` -------------------------------- ### Start Tangerine Server (v3.16.3) Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Starts the Tangerine server with a specified version. Ensure environment variables T_ARCHIVE_APKS_TO_DISK and T_ARCHIVE_PWAS_TO_DISK are set if archive functionality is not desired. ```bash ./start.sh v3.16.3 ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/tangerine-community/tangerine/blob/main/server/README.md Run this command in your terminal to install all necessary project dependencies after cloning the repository. ```bash $ npm install ``` -------------------------------- ### Start Development Server Source: https://github.com/tangerine-community/tangerine/blob/main/editor/README.md Launches a local development server that supports automatic reloading. ```bash ng serve ``` -------------------------------- ### Start Tangerine Server Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Use this command to start the Tangerine server with a specific version. ```bash ./start.sh v3.13.0 ``` -------------------------------- ### Serve Application Locally Source: https://github.com/tangerine-community/tangerine/blob/main/client/pwa-tools/updater-app/README.md Starts a local development server for the application. ```bash $ polymer serve ``` -------------------------------- ### Example Module Implementation with Hooks Source: https://github.com/tangerine-community/tangerine/blob/main/docs/developer/modules.md This example module implements the flatFormResponse and groupNew hooks. The flatFormResponse hook transforms form data, while groupNew handles new group setup, including copying forms and configuring app settings. ```javascript const clog = require('tangy-log').clog const fs = require('fs-extra') module.exports = { hooks: { flatFormResponse: function(data) { return new Promise((resolve, reject) => { debugger; let formResponse = data.formResponse let flatFormResponse = data.flatFormResponse if (formResponse.metadata && formResponse.metadata.studentRegistrationDoc && formResponse.metadata.studentRegistrationDoc.classId) { let studentRegistrationDoc = formResponse.metadata.studentRegistrationDoc flatFormResponse[`sr_classId`] = studentRegistrationDoc.classId; flatFormResponse[`sr_student_name`] = studentRegistrationDoc.student_name; flatFormResponse[`sr_student_id`] = studentRegistrationDoc.id; flatFormResponse[`sr_age`] = studentRegistrationDoc.age; flatFormResponse[`sr_gender`] = studentRegistrationDoc.gender; } resolve({flatFormResponse, formResponse}) }) }, groupNew: function(data) { return new Promise(async (resolve, reject) => { const {groupName, appConfig} = data clog("Setting homeUrl to dashboard and uploadUnlockedFormReponses to true.") appConfig.homeUrl = "dashboard" appConfig.uploadUnlockedFormReponses = true // copy the class forms try { await fs.copy('/tangerine/server/src/modules/class/', `/tangerine/client/content/groups/${groupName}`) clog("Copied class module forms.") } catch (err) { console.error(err) } resolve(data) }) }, } } ``` -------------------------------- ### Install Tangerine Preview Tools Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/case-module-starter/README.md Commands to clone your content set repository and install the necessary npm packages for the preview tools. ```bash git clone cd npm install ``` -------------------------------- ### Run Tangerine Preview Server Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/custom-app/client/README.md Starts the Tangerine preview server from the client directory of your project. ```bash cd client tangerine-preview ``` -------------------------------- ### Start Tangerine Server (v3.16.1) Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Starts the Tangerine server with version v3.16.1. This command should be run after all prerequisite steps, including fetching updates and initializing Git repositories, are completed. ```bash ./start.sh v3.16.1 ``` -------------------------------- ### Start Tangerine with Specific Version Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Command to start the Tangerine application with a specified version script. ```bash ./start.sh v3.22.4 ``` -------------------------------- ### Start Tangerine Platform Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/installation.md Starts the Tangerine platform with the specified version. Ensure config.sh is updated with your settings before running. ```bash sudo ./start.sh v3.31.1-rc-17 ``` -------------------------------- ### Start Tangerine container Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/upgrade-checklist.md Execute this script to initialize the container with the updated configuration settings. ```bash ./start.sh ``` -------------------------------- ### Install and Run generate-uploads Script Source: https://github.com/tangerine-community/tangerine/blob/main/server/src/scripts/generate-cases/README.md Installs dependencies and runs the generate-uploads script with specified parameters. The script creates documentation based on the number of uploads, group name, delay, batch size, and an optional alternative template. ```bash npm install ./bin.js [delayBetweenBatchesInMilliseconds] [batchSize] [alternativeTemplate] ``` -------------------------------- ### Preview Case Module Content Set Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/case-module/README.md Start the local development server to preview the content set. ```bash cd tangerine/content-sets/case-module npm start ``` -------------------------------- ### Install specific version of Tangerine Preview Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/local-content-development.md Installs a specific version of the CLI tool. ```bash npm install -g tangerine-preview@3.18.5 ``` -------------------------------- ### Start Tangerine with New Version (v3.25.1) Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md After updating the code, start Tangerine with the specified version. ```bash ./start.sh v3.25.1 ``` -------------------------------- ### Start Tangerine with New Version (v3.25.0) Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md After updating the code, start Tangerine with the specified version. ```bash ./start.sh v3.25.0 ``` -------------------------------- ### Start Tangerine Server with Specific Version Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Starts the Tangerine server using a specific version script. Ensure you have checked out the correct version before running this. ```bash ./start.sh v3.27.6 ``` -------------------------------- ### Define Initial Form Configuration Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/form-versions.md Initial setup for a form in the forms.json file. ```json [ { "id" : "form-x", "title" : "Form X", "src" : "./assets/form-x/form.html", } ] ``` -------------------------------- ### Start Tangerine with New Version (v3.24.4) Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md After updating the code, start Tangerine with the specified version. ```bash ./start.sh v3.24.4 ``` -------------------------------- ### Start SSM Agent Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/configuring-aws-cloudwatch-for-logs.md If the SSM Agent is not running, use this command to start it on Ubuntu instances. This is necessary for Systems Manager commands to execute on the instance. ```bash sudo snap start amazon-ssm-agent ``` -------------------------------- ### Run local CouchDB instance Source: https://github.com/tangerine-community/tangerine/blob/main/editor/src/app/couchdb-conflict-manager/README.md Start a CouchDB container for development purposes. ```bash docker run -p 5984:5984 --env "COUCHDB_USER=admin" --env "COUCHDB_PASSWORD=some-secure-password" couchdb ``` -------------------------------- ### Template Logic Examples Source: https://github.com/tangerine-community/tangerine/blob/main/docs/developer/viewing-forms-and-data.md Examples of template strings using conditional logic and helper functions to display form status and version information. ```js `StatusStatut: ${!eventForm.complete ? 'IncompleteIncomplète' : 'CompleteAchevée'} ${response ? `Version: ${getValue("content_release_version")}`: ''}` ``` ```js "StatusStatut: CompleteAchevée Start date: 3/13/2020, 11:25:19 AM" ``` ```js `StatusStatut: ${!eventForm.complete ? 'IncompleteIncomplète' : 'CompleteAchevée'} ${response ? `Start date: ${response.startDatetime}`: ''}` ``` -------------------------------- ### Table List Output Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/restore-from-backup.md Example output showing the tables present in the database. ```shell attach-seq-store by-sequence local-store attach-store document-store metadata-store ``` -------------------------------- ### Forms Configuration Example Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/case-module/README.md An example of a form definition in forms.json, including search settings for indexing and display templates. Ensure the 'id' matches the formId in the Case Definition. ```json [ { "id" : "case-definition-1-manifest", "type" : "case", "title" : "Case Definition 1 Manifest", "description" : "Description...", "listed" : true, "src" : "./assets/case-definition-1-manifest/form.html", "searchSettings" : { "primaryTemplate" : "${searchDoc.variables.status === 'Enrolled' ? `Participant ID: ${searchDoc.variables.participant_id}       Enrollment Date: ${(searchDoc.variables.enrollment_date).substring(8,10) + '-' + (searchDoc.variables.enrollment_date).substring(5,7)+ '-' + (searchDoc.variables.enrollment_date).substring(0,4)}` : `Screening ID: ${searchDoc._id.substr(0,6)}       Screening Date: ${searchDoc.variables.screening_date ? searchDoc.variables.screening_date : 'N/A' }` }", "shouldIndex" : true, "secondaryTemplate" : "${searchDoc.variables.status === 'Enrolled' ? `Name: ${searchDoc.variables.first_name} ${searchDoc.variables.last_name}       Location: ${searchDoc.variables.location}       Status: Enrolled      ` : `Status: Not enrolled      ` }", "variablesToIndex" : [ "first_name", "last_name", "status", "location", "participant_id", "enrollment_date", "screening_date" ] }, } ] ``` -------------------------------- ### Launch Tangerine Development Environment Source: https://github.com/tangerine-community/tangerine/blob/main/docs/developer/development-bullet-points.md Starts the Tangerine application in developer mode. ```bash ./develop.sh ``` -------------------------------- ### Get CLI Help Source: https://github.com/tangerine-community/tangerine/blob/main/editor/README.md Displays help information for the Angular CLI. ```bash ng help ``` -------------------------------- ### Example Password Policy and Recipe Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/password-policy.md This JSON snippet shows an example of a password policy defined as a regular expression and a corresponding human-readable recipe. This is useful for setting distinct password requirements for different user groups. ```json "passwordPolicy": "(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,}", "passwordRecipe": "Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" ``` -------------------------------- ### Initialize and Set Up New Custom App Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/custom-apps.md Steps to initialize a new custom app using the 'custom-app' content set. This involves copying files, initializing a Git repository, and installing dependencies. ```bash cd tangerine/content-sets cp -r custom-app my-app cp ../translations/* my-app/client/ cd my-app git init git add . git commit -m "First." git branch -M main git remote add origin git push -u origin main npm install npm start ``` -------------------------------- ### Configure Upload Tokens Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Example transformation of legacy upload URL configuration to the new token-based format. ```json "uploadUrl": "http://uploader:password@foo.tangerinecentral.org/upload/foo" ``` ```json "serverUrl":"http://foo.tangerinecentral.org", "groupName":"foo", "uploadToken":"secret_foo_passphrase" ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/tangerine-community/tangerine/blob/main/docs/CONTRIBUTING.md Start the local development server to preview documentation changes from the project root directory. ```bash mkdocs serve ``` -------------------------------- ### Start Tangerine Preview Tools on Mac Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/case-module-starter/README.md Command to launch the Tangerine preview tools on a macOS system. ```bash cd npm run start ``` -------------------------------- ### Initialize Client Development Environment Source: https://github.com/tangerine-community/tangerine/blob/main/docs/developer/creating-clean-dev-content.md Commands to prepare the client directory by installing dependencies and replacing assets with a known content set. ```bash cd client npm install rm -rf client/src/assets cp -r ../content-sets//client src/assets cp src/assets/app-config.defaults.json src/assets/app-config.json cp ../translations/translation* src/assets/ npm start ``` -------------------------------- ### Run Nginx Container from Saved Image Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/tangerine-nginx-ssl.md Start a new Nginx container using the previously saved image. This is useful for recreating the SSL proxy setup, ensuring the link to the Tangerine container is updated. ```bash docker run -p 80:80 -p 443:443 --link tangerine:tangerine --restart always --name nginx -d nginx/nginx:configuredNginx ``` -------------------------------- ### Install pouchdb-couchdb-archive-conflicts CLI Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/managing-data-conflicts.md Install the command-line tool globally using npm. This requires Node.js to be installed. ```bash npm install -g pouchdb-couchdb-archive-conflicts ``` -------------------------------- ### Logstash user-profile attachment example Source: https://github.com/tangerine-community/tangerine/blob/main/server/src/scripts/generate-uploads/README.md Example JSON structure showing how a user-profile is attached to an example document for logstash reporting. ```json "user-profile._id": "user-7c66edc0-5173-11e9-afce-6ddd698d4789", "user-profile._rev": "5-5ba9a57c95900032439b9177fc925774", "user-profile.formId": "user-profile", "user-profile.startDatetime": "2018-05-31T19:46:12.180Z", "user-profile.startUnixtime": 1527795972180, "user-profile.processedResult": { "_id": "user-7c66edc0-5173-11e9-afce-6ddd698d4789", "formId": "user-profile", "startUnixtime": 1527795972180, "complete": "", "first_name": "Jimmy", "last_name": "Foo", "gender": "Male", "phone": "5551212", "test": "on" }, ``` -------------------------------- ### Run Nest.js Application Source: https://github.com/tangerine-community/tangerine/blob/main/server/README.md Commands to start the Nest.js application in different modes. Use 'start:dev' for development with watch mode and 'start:prod' for production builds. ```bash # development $ npm run start # watch mode $ npm run start:dev # production mode $ npm run start:prod ``` -------------------------------- ### Check installed version Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/local-content-development.md Lists the globally installed version of the package. ```bash npm list -g tangerine-preview ``` -------------------------------- ### Install dependencies via npm Source: https://github.com/tangerine-community/tangerine/blob/main/editor/src/app/couchdb-conflict-manager/README.md Install the required packages for the conflict manager and its dependencies. ```bash npm install --save https://github.com/rjsteinert/juicy-ace-editor.git#ES6-modules @polymer/paper-input @polymer/paper-button couchdb-conflict-manager ``` -------------------------------- ### Install Collectd Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/configuring-aws-cloudwatch-for-logs.md Installs the collectd package if the CloudWatch agent reports missing dependencies. ```bash apt install collectd ``` -------------------------------- ### Build Project Source: https://github.com/tangerine-community/tangerine/blob/main/editor/README.md Compiles the application into the dist directory. ```bash ng build ``` -------------------------------- ### Configure development environment Source: https://github.com/tangerine-community/tangerine/blob/main/editor/src/app/couchdb-conflict-manager/README.md Create a config.json file with database credentials and username for local development. ```json { "dbUrl": "http://user:pass@localhost:5984/test", "username": "yourName" } ``` -------------------------------- ### Server Upgrade Instructions v3.15.3 Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Instructions for fetching updates, checking out the v3.15.3 tag, starting the server, and removing the previous Docker image. ```bash cd tangerine git fetch origin git checkout v3.15.3 ./start.sh v3.15.3 docker rmi tangerine/tangerine:v3.15.2 ``` -------------------------------- ### Initialize Application Redirection Source: https://github.com/tangerine-community/tangerine/blob/main/client/src/shell/index.html Handles the transition from the shell index to the application index, using local storage to manage the first-load state. ```javascript function go() { window.location = window.location.href.replace('shell/index.html', 'app/index.html') } if (!localStorage.getItem('firstLoad')) { // Give chcp some time to get things set up so when we redirect, the filesystem still exists. // chcp will do our redirect. //setTimeout(go, 10*1000) } else { localStorage.setItem('firstLoad', true) go() } ``` -------------------------------- ### Install Android Application Source: https://github.com/tangerine-community/tangerine/blob/main/docs/developer/tangerine-dev-tutorial-notes.md Installs a specific Android application package (APK) onto a connected device or emulator. ```shell adb install data/client/releases/prod/apks/group-09a2a880-1317-4cbf-b944-0fd059fa7007/platforms/android//app/build/outputs/apk/debug/app-debug.apk ``` -------------------------------- ### Clone and Set Up Tangerine for Development Source: https://github.com/tangerine-community/tangerine/blob/main/README.md Use these bash commands to clone the Tangerine repository and set up the initial configuration files for local development. ```bash git clone git@github.com:tangerine-community/tangerine cd tangerine cp config.defaults.sh config.sh ``` -------------------------------- ### Example DNS Resolution Error Source: https://github.com/tangerine-community/tangerine/blob/main/docs/developer/docker-network-issues.md An example of a network error indicating that the Docker container cannot resolve external hostnames. ```text request to https://registry.npmjs.org/@vaadin/vaadin-usage-statistics/-/vaadin-usage-statistics-2.1.0.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443 ``` -------------------------------- ### Teach Module Configuration Example Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/configuration.md This configuration object defines settings for the 'teach' module, including assessment units, dates, scoring thresholds, and student registration fields. Ensure 'student_name' and 'classId' are included in 'studentRegistrationFields' for proper student listing. ```json "teachProperties": { "units": ["Semester 1", "Semester 2"], "unitDates": [ { "name": "Semester 1", "start": "2024-02-15", "end": "2024-04-23" }, { "name": "Semester 2", "start": "2024-04-24", "end": "2024-06-30" } ], "attendancePrimaryThreshold": 80, "attendanceSecondaryThreshold": 70, "scoringPrimaryThreshold": 70, "scoringSecondaryThreshold": 60, "behaviorPrimaryThreshold": 90, "behaviorSecondaryThreshold": 80, "useAttendanceFeature": true, "studentRegistrationFields": [ "student_name", "student_surname", "gender", "age", "classId", "student_num" ] } ``` -------------------------------- ### Create Group with Pre-built Custom App Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/custom-apps.md Use this command to create a new group pre-configured with the 'custom-app' content set. This is the quickest way to start with a custom app. ```bash docker exec -it tangerine create-group "My custom app" custom-app ``` -------------------------------- ### Set macOS permissions for global npm installs Source: https://github.com/tangerine-community/tangerine/blob/main/docs/editor/advanced-form-programming/local-content-development.md Required for macOS users to allow global installation of npm packages. ```bash sudo chown -R `whoami` /usr/local/lib/node_modules ``` -------------------------------- ### Update Application Version Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Fetch the latest repository updates, switch to the target version, and execute the startup script. ```bash git fetch origin git checkout v3.20.1 ./start.sh v3.20.1 ``` -------------------------------- ### Serve Built Application Source: https://github.com/tangerine-community/tangerine/blob/main/client/pwa-tools/updater-app/README.md Serves a specific build directory for production testing. ```bash $ polymer serve build/default ``` -------------------------------- ### Example Git TLS Handshake Error Source: https://github.com/tangerine-community/tangerine/blob/main/docs/developer/docker-network-issues.md An example of a common error message encountered when Docker network settings conflict with corporate VPNs. ```text bower polymer#^2.0.0 ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/Polymer/polymer.git", exit code of #128 fatal: unable to access 'https://github.com/Polymer/polymer.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated. Additional error details: fatal: unable to access 'https://github.com/Polymer/polymer.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated. ``` -------------------------------- ### Load and run test suites with WCT Source: https://github.com/tangerine-community/tangerine/blob/main/editor/src/app/couchdb-conflict-manager/test/index.html Use this command to initialize and execute specified test files within the Web Component Tester environment. ```javascript // Load and run all tests (.html, .js): WCT.loadSuites([ 'couchdb-conflict-manager_test.html' ]); ``` -------------------------------- ### Install Docker CE on Ubuntu Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/installation.md Installs Docker Community Edition on Ubuntu systems. Ensure you follow the official Docker documentation for the most up-to-date instructions. ```bash sudo apt update sudo apt install apt-transport-https ca-certificates curl software-properties-common -y curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu noble stable" apt-cache policy docker-ce sudo apt install docker-ce -y sudo systemctl status docker ``` -------------------------------- ### Launch local-ssl-proxy Source: https://github.com/tangerine-community/tangerine/blob/main/docs/developer/reverse-proxy-for-developers.md Starts the proxy to forward HTTPS traffic from port 443 to the local server on port 80. ```bash local-ssl-proxy --source 443 --target 80 --cert ~/ssl/server.crt --key ~/ssl/server.key ``` -------------------------------- ### Install Certbot and Nginx Module Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/tangerine-nginx-ssl.md Execute these commands inside the running Nginx container to install Certbot and the Nginx plugin, which are necessary for obtaining and managing SSL certificates. ```bash docker exec -it nginx bash apt-get update && apt-get install certbot vim python3-certbot-nginx -y ``` -------------------------------- ### Clear Reporting Cache and Start Debugger Source: https://github.com/tangerine-community/tangerine/blob/main/docs/developer/debugging-reporting.md Removes the lock file for the reporting worker and clears its cache. Then, it starts the reporting worker in debug mode, listening on port 9228. ```bash rm /reporting-worker-running reporting-cache-clear node --inspect-brk=0.0.0.0:9228 $(which reporting-worker-batch) ``` -------------------------------- ### Install Deprecated Tangerine v2 Docker Image Source: https://github.com/tangerine-community/tangerine/blob/main/README.md Instructions for installing a deprecated version of Tangerine (v2) using a specific Docker image. This is for projects that still rely on this older version. ```bash docker run -i -t -p 80:80 tangerine/tangerine:v2.2.5-couchdb-1.7.2-e ``` -------------------------------- ### Install CloudWatch Agent via Systems Manager Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/configuring-aws-cloudwatch-for-logs.md This command installs the CloudWatch agent using AWS Systems Manager Run Command. Ensure the instance has the CloudWatchAgentServerRole attached and the SSM Agent is running. ```bash /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard ``` -------------------------------- ### Upgrade to v3.1.0 Source: https://github.com/tangerine-community/tangerine/blob/main/CHANGELOG.md Instructions for fetching the latest code, checking out the v3.1.0 tag, starting the application, and clearing the reporting cache. ```bash git fetch origin git checkout v3.1.0 ./start.sh docker exec tangerine reporting-cache-clear ``` -------------------------------- ### Preview Tangerine Content Source: https://github.com/tangerine-community/tangerine/blob/main/tangerine-preview/README.md Navigate to your project's client directory and run the tangerine-preview command to start the local preview server. Open http://localhost:3000 in your browser to view the content. ```bash cd your-project/client tangerine-preview ``` -------------------------------- ### Install jq and Update Group Configuration Source: https://github.com/tangerine-community/tangerine/blob/main/docs/system-administrator/automating-upgrades-of-tangerine.md Installs the `jq` utility within a Docker container and then uses it to modify a group's configuration in the `groups` database. Replace `xyz` with the target group ID. ```bash docker exec -it tangerine apt install -y jq ``` ```bash docker exec -it tangerine bash -c 'curl -s $T_COUCHDB_ENDPOINT/groups/xyz | jq ".csvReplacementCharacters = [[\",\"|\"],[\"\\n\",\"___\"]]]" | curl -s -T - -H "Content-Type: application/json" -X PUT $T_COUCHDB_ENDPOINT/groups/xyz' ``` -------------------------------- ### Install PhantomJS for Tangerine v3.x Client Development Source: https://github.com/tangerine-community/tangerine/blob/main/README.md Install PhantomJS globally on Linux systems if required for running tests with Tangerine v3.x client branches. This involves downloading, extracting, and creating symbolic links. ```bash cd /usr/local/share sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 sudo tar xjf phantomjs-1.9.8-linux-x86_64.tar.bz2 sudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs sudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs sudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/bin/phantomjs ``` -------------------------------- ### Start Tangerine Preview Tools on Windows Source: https://github.com/tangerine-community/tangerine/blob/main/content-sets/case-module-starter/README.md Command to launch the Tangerine preview tools on a Windows operating system. ```bash cd npm run start-windows ```