From 18bc79e6164ed87b1b46ff0a696f21a4fc6a5ba5 Mon Sep 17 00:00:00 2001 From: VISHNUDAS <95604247+VISHNUDAS-tunerlabs@users.noreply.github.com> Date: Thu, 31 Jul 2025 15:45:12 +0530 Subject: [PATCH 001/119] Create docker-image.yml --- .github/workflows/docker-image.yml | 87 ++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..241e64fe --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,87 @@ +name: Build and Push Docker Image + +on: + workflow_dispatch: + inputs: + tag_version: + description: 'Docker image tag version (e.g., 3.3.11)' + required: true + +env: + DOCKER_IMAGE_NAME: elevate-project-service # Configure your image name here + DOCKER_REGISTRY: docker.io + DOCKER_NAMESPACE: shikshalokamqa + +jobs: + docker-image-build-and-push: + if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/staging' + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Get Docker tag version (fail if not provided) + id: get-version + run: | + # Use workflow_dispatch input if provided + if [ ! -z "${{ github.event.inputs.tag_version }}" ]; then + VERSION="${{ github.event.inputs.tag_version }}" + # Or use TAG_VERSION env if set (for push/PR) + elif [ ! -z "${TAG_VERSION}" ]; then + VERSION="${TAG_VERSION}" + else + echo "Error: Docker image version must be provided as workflow_dispatch input or TAG_VERSION env." + exit 1 + fi + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Check if version exists on Docker Hub + id: check-version + run: | + VERSION=${{ steps.get-version.outputs.version }} + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "https://hub.docker.com/v2/namespaces/${{ env.DOCKER_NAMESPACE }}/repositories/${{ env.DOCKER_IMAGE_NAME }}/tags/$VERSION") + if [ "$RESPONSE" -eq 200 ]; then + echo "Error: Tag $VERSION already exists on Docker Hub" + exit 1 + else + echo "Tag $VERSION does not exist, proceeding with build" + fi + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_NAMESPACE }}/${{ env.DOCKER_IMAGE_NAME }} + tags: | + type=raw,value=${{ steps.get-version.outputs.version }} + + - name: Build and push Docker image + id: build + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Image digest + run: echo "Image pushed with digest ${{ steps.build.outputs.digest }}" + + - name: Print pushed tags + run: | + echo "Pushed tags:" + echo "${{ steps.meta.outputs.tags }}" | tr ',' '\n' From ff589571520eae83976626e4bca8496097b612db Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 21 Nov 2025 12:38:34 +0530 Subject: [PATCH 002/119] setup-guide-3.4.0 --- .../user/distributionColumns.sql | 12 + .../dockerized/docker-compose-project.yml | 231 +++ .../dockerized/envs/entity_management_env | 27 + documentation/3.4.0/dockerized/envs/env.js | 17 + .../3.4.0/dockerized/envs/interface_env | 18 + .../3.4.0/dockerized/envs/notification_env | 14 + .../3.4.0/dockerized/envs/project_env | 82 + .../3.4.0/dockerized/envs/scheduler_env | 12 + documentation/3.4.0/dockerized/envs/user_env | 87 + .../scripts/stand-alone/ubuntu/citus_setup.sh | 106 ++ .../stand-alone/ubuntu/docker-compose-down.sh | 15 + .../stand-alone/ubuntu/docker-compose-up.sh | 15 + .../stand-alone/ubuntu/entity_sampleData.js | 409 +++++ .../stand-alone/ubuntu/insert_sample_data.sh | 42 + .../ubuntu/insert_sample_solutions.js | 56 + .../stand-alone/ubuntu/project_sampleData.js | 1612 +++++++++++++++++ .../stand-alone/ubuntu/replace_volume_path.sh | 21 + .../stand-alone/ubuntu/setup_project.sh | 83 + .../3.4.0/native/envs/entity_management_env | 27 + documentation/3.4.0/native/envs/enviroment.ts | 7 + documentation/3.4.0/native/envs/interface_env | 17 + .../native/envs/non-citus/notification_env | 14 + .../3.4.0/native/envs/non-citus/user_env | 74 + .../3.4.0/native/envs/notification_env | 14 + documentation/3.4.0/native/envs/project_env | 72 + documentation/3.4.0/native/envs/scheduler_env | 12 + .../envs/stand-alone/elevate_portal_env | 48 + .../envs/stand-alone/entity_management_env | 21 + .../native/envs/stand-alone/interface_env | 17 + .../native/envs/stand-alone/notification_env | 14 + .../envs/stand-alone/observation_portal_env | 5 + .../observation_survey_projects_pwa_env | 17 + .../3.4.0/native/envs/stand-alone/project_env | 57 + .../native/envs/stand-alone/scheduler_env | 12 + .../3.4.0/native/envs/stand-alone/user_env | 83 + documentation/3.4.0/native/envs/user_env | 79 + .../stand-alone/ubuntu/check-dependencies.sh | 139 ++ .../scripts/stand-alone/ubuntu/citus_setup.sh | 93 + .../scripts/stand-alone/ubuntu/common.js | 39 + .../stand-alone/ubuntu/create-databases.sh | 16 + .../stand-alone/ubuntu/entity_sampleData.js | 409 +++++ .../stand-alone/ubuntu/import_forms.js | 51 + .../ubuntu/insert_sample_solutions.js | 56 + .../ubuntu/install-dependencies.sh | 206 +++ .../stand-alone/ubuntu/project_sampleData.js | 523 ++++++ .../ubuntu/uninstall-dependencies.sh | 131 ++ .../sample-data/mac-linux/user/sampleData.sql | 23 + .../sample-data/windows/user/sampleData.sql | 21 + .../setup/docker/stand-alone/ubuntu/README.md | 237 +++ .../setup/native/stand-alone/ubuntu/README.md | 345 ++++ 50 files changed, 5738 insertions(+) create mode 100644 documentation/3.4.0/distribution-columns/user/distributionColumns.sql create mode 100644 documentation/3.4.0/dockerized/docker-compose-project.yml create mode 100644 documentation/3.4.0/dockerized/envs/entity_management_env create mode 100644 documentation/3.4.0/dockerized/envs/env.js create mode 100644 documentation/3.4.0/dockerized/envs/interface_env create mode 100644 documentation/3.4.0/dockerized/envs/notification_env create mode 100644 documentation/3.4.0/dockerized/envs/project_env create mode 100644 documentation/3.4.0/dockerized/envs/scheduler_env create mode 100644 documentation/3.4.0/dockerized/envs/user_env create mode 100644 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh create mode 100644 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh create mode 100644 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh create mode 100644 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js create mode 100755 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh create mode 100644 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js create mode 100644 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js create mode 100644 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/replace_volume_path.sh create mode 100644 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh create mode 100644 documentation/3.4.0/native/envs/entity_management_env create mode 100644 documentation/3.4.0/native/envs/enviroment.ts create mode 100644 documentation/3.4.0/native/envs/interface_env create mode 100644 documentation/3.4.0/native/envs/non-citus/notification_env create mode 100644 documentation/3.4.0/native/envs/non-citus/user_env create mode 100644 documentation/3.4.0/native/envs/notification_env create mode 100644 documentation/3.4.0/native/envs/project_env create mode 100644 documentation/3.4.0/native/envs/scheduler_env create mode 100644 documentation/3.4.0/native/envs/stand-alone/elevate_portal_env create mode 100644 documentation/3.4.0/native/envs/stand-alone/entity_management_env create mode 100644 documentation/3.4.0/native/envs/stand-alone/interface_env create mode 100644 documentation/3.4.0/native/envs/stand-alone/notification_env create mode 100644 documentation/3.4.0/native/envs/stand-alone/observation_portal_env create mode 100644 documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env create mode 100644 documentation/3.4.0/native/envs/stand-alone/project_env create mode 100644 documentation/3.4.0/native/envs/stand-alone/scheduler_env create mode 100644 documentation/3.4.0/native/envs/stand-alone/user_env create mode 100644 documentation/3.4.0/native/envs/user_env create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/citus_setup.sh create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/common.js create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/import_forms.js create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh create mode 100644 documentation/3.4.0/sample-data/mac-linux/user/sampleData.sql create mode 100644 documentation/3.4.0/sample-data/windows/user/sampleData.sql create mode 100644 documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md create mode 100644 documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md diff --git a/documentation/3.4.0/distribution-columns/user/distributionColumns.sql b/documentation/3.4.0/distribution-columns/user/distributionColumns.sql new file mode 100644 index 00000000..230fe838 --- /dev/null +++ b/documentation/3.4.0/distribution-columns/user/distributionColumns.sql @@ -0,0 +1,12 @@ +SELECT create_distributed_table('entities', 'entity_type_id'); +SELECT create_distributed_table('entity_types', 'organization_id'); +SELECT create_distributed_table('file_uploads', 'organization_id'); +SELECT create_distributed_table('forms', 'organization_id'); +SELECT create_distributed_table('notification_templates', 'organization_id'); +SELECT create_distributed_table('organizations', 'id'); +SELECT create_distributed_table('organization_codes', 'code'); +SELECT create_distributed_table('organization_domains', 'domain'); +SELECT create_distributed_table('organization_role_requests','organization_id'); +SELECT create_distributed_table('organization_user_invites','organization_id'); +SELECT create_distributed_table('users_credentials','email'); +SELECT create_distributed_table('users', 'organization_id'); \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/docker-compose-project.yml b/documentation/3.4.0/dockerized/docker-compose-project.yml new file mode 100644 index 00000000..61d48ead --- /dev/null +++ b/documentation/3.4.0/dockerized/docker-compose-project.yml @@ -0,0 +1,231 @@ +version: '3' +services: + zookeeper: + image: 'confluentinc/cp-zookeeper:7.3.0' + ports: + - '2181:2181' + environment: + - ALLOW_ANONYMOUS_LOGIN=yes + - ZOOKEEPER_CLIENT_PORT=2181 + - ZOOKEEPER_TICK_TIME=2000 + networks: + - project_net + kafka: + image: 'confluentinc/cp-kafka:7.3.0' + ports: + - '9092:9092' + environment: + KAFKA_BROKER_ID: 1 + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:29092,PLAINTEXT_HOST://0.0.0.0:9092 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + depends_on: + - zookeeper + networks: + - project_net + # logging: + # driver: none + redis: + image: 'redis:7.0.0' + restart: 'always' + #ports: + # - '6379:6379' + expose: + - 6379 + networks: + - project_net + # logging: + # driver: none + project: + build: ./project-service + container_name: project + ports: + - '6000:6000' + # command: ['nodemon', 'app.js'] + environment: + - MONGODB_URL=mongodb://mongo:27017/elevate-project + env_file: + - ./project_env + depends_on: + - mongo + - kafka + volumes: + - ./project-service:/usr/app + networks: + - project_net + + # Entity-management config + entity_management: + build: ./entity-management + ports: + - '5001:5001' + # command: ['nodemon', 'app.js'] + env_file: + - ./entity_management_env + depends_on: + - mongo + volumes: + - ./entity-management:/usr/src/app + networks: + - project_net + user: + build: ./user + ports: + - '3001:3001' + command: > + bash -c "echo 'Waiting for PostgreSQL on citus_master:5432 to accept connections...' && + while ! timeout 1 bash -c 'cat < /dev/null > /dev/tcp/citus_master/5432' 2> /dev/null; do + echo 'Waiting for citus_master to be ready...'; + sleep 1; + done; + echo 'Database is ready.'; + npm run db:init && npm run db:seed:all && + (echo 'Running nodeee' && nodemon app.js &) && + (while ! curl -sSf http://user:3001 > /dev/null; do + sleep 1; + done && echo 'Service is up' && + /bin/bash -c 'cd scripts && echo Running user service scripts && node insertDefaultOrg.js && node viewsScript.js && node -r module-alias/register uploadSampleCSV.js'); + tail -f /dev/null" + depends_on: + - kafka + - citus + - redis + - scheduler + environment: + - DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/user + - KAFKA_URL=kafka:29092 + - REDIS_HOST=redis://redis:6379 + volumes: + - ./user:/usr/src/app + networks: + - project_net + env_file: + - ./user_env + + notification: + image: shikshalokamqa/elevate-notification:2.6.1 + ports: + - '3002:3002' + command: > + bash -c "echo 'Waiting for PostgreSQL on citus_master:5432 to accept connections...' && + while ! timeout 1 bash -c 'cat < /dev/null > /dev/tcp/citus_master/5432' 2> /dev/null; do + echo 'Waiting for citus_master to be ready...'; + sleep 1; + done; + echo 'Database is ready.'; + npm run db:init && nodemon app.js" + depends_on: + - kafka + - citus + environment: + - KAFKA_HOST=kafka:29092 + - DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/notification + networks: + - project_net + env_file: + - ./notification_env + + scheduler: + # Update with latest image + image: shikshalokamqa/elevate-scheduler:2.6.1 + ports: + - '4000:4000' + command: ['nodemon', 'app.js'] + environment: + - KAFKA_URL=kafka:29092 + depends_on: + - kafka + - redis + networks: + - project_net + env_file: + - scheduler_env + interface: + # Update with latest image + image: shikshalokamqa/elevate-interface:3.1.5 + ports: + - '3569:3569' + command: ['node', 'app.js'] + networks: + - project_net + env_file: + - ./interface_env + citus: + image: citusdata/citus:11.2.0 + container_name: 'citus_master' + ports: + - 5432:5432 + expose: + - 5432 + environment: &AUTH + POSTGRES_USER: '${POSTGRES_USER:-postgres}' + POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-postgres}' + PGUSER: '${POSTGRES_USER:-postgres}' + PGPASSWORD: '${POSTGRES_PASSWORD:-postgres}' + POSTGRES_DB: 'postgres' + POSTGRES_HOST_AUTH_METHOD: '${POSTGRES_HOST_AUTH_METHOD:-trust}' + POSTGRES_LOG_STATEMENT: 'all' # Enable query logging (set to 'all' for all queries) + networks: + - project_net + #volumes: + # - citus-data:/var/lib/postgresql/data + pgadmin: + image: dpage/pgadmin4 + container_name: elevate-pgadmin + restart: always + ports: + - '5500:80' + environment: + - PGADMIN_DEFAULT_EMAIL=user@shikshalokam.org + - PGADMIN_DEFAULT_PASSWORD=password + networks: + - project_net + # logging: + # driver: none + + # Mongo config + mongo: + image: 'mongo:4.4.14' + container_name: project_mongo_1 + restart: 'always' + ports: + - '27017:27017' + networks: + - project_net + # volumes: + # - mongo-data:/data/db + # logging: + # driver: none + + # Gotenberg config + gotenberg: + image: gotenberg/gotenberg:latest + container_name: gotenberg + ports: + - '3003:3000' + networks: + - project_net + restart: 'always' + + portal: + # Update with latest image + image: shikshalokamqa/elevate-project-obervation-pwa:3.4.0 + container_name: portal + ports: + - '7007:7007' + volumes: + - /home/user4/Workspace/Docker Image/env.js:/usr/src/app/www/assets/env/env.js + command: > + /bin/bash -c "ionic build --prod && ionic serve --host 0.0.0.0" + networks: + - project_net + +networks: + project_net: + external: false +#volumes: +# mongo-data: +# citus-data: diff --git a/documentation/3.4.0/dockerized/envs/entity_management_env b/documentation/3.4.0/dockerized/envs/entity_management_env new file mode 100644 index 00000000..b363248e --- /dev/null +++ b/documentation/3.4.0/dockerized/envs/entity_management_env @@ -0,0 +1,27 @@ +# Entity service configurations file +APPLICATION_PORT = 5001 +APPLICATION_ENV ="development" +APPLICATION_BASE_URL='/entity-management/' +INTERNAL_ACCESS_TOKEN ="internal_access_token" +ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 +# DB +MONGODB_URL=mongodb://mongo:27017/elevate-entity +AUTH_METHOD = native +# USER_SERVICE +USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +USER_SERVICE_BASE_URL=/user +KAFKA_HEALTH_CHECK_TOPIC=test +#service name +SERVICE_NAME = elevate-entity-service +API_DOC_URL="https://project-dev.elevate-apis.shikshalokam.org/entity-management/api-doc" +APPLICATION_HOST=localhost +IS_AUTH_TOKEN_BEARER="false" +ADMIN_ACCESS_TOKEN=rwwee3$123 +ADMIN_TOKEN_HEADER_NAME="admin-auth-token" +INTERFACE_SERVICE_URL="https://saas-qa.tekdinext.com" +KAFKA_HEALTH_CHECK_TOPIC = entity-health-check-topic-check +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_URL = kafka:9092 +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_GROUP_ID = entity +HEALTH_CHECK_DEBUG_MODE = true \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/env.js b/documentation/3.4.0/dockerized/envs/env.js new file mode 100644 index 00000000..9606a60a --- /dev/null +++ b/documentation/3.4.0/dockerized/envs/env.js @@ -0,0 +1,17 @@ +window['env'] = { + production: true, + baseURL: 'https://qa.elevate-apis.shikshalokam.org', + capabilities: 'all', + restrictedPages: ['DOWNLOADS', 'AUTH_PAGES', 'PROFILE', 'EDIT_PROFILE'], + unauthorizedRedirectUrl: '/', + isAuthBypassed: true, + profileRedirectPath: '', + showHeader: true, + config: { + logoPath: 'assets/images/logo.png', + faviconPath: 'assets/icons/elevate-logo.png', + title: 'Elevate', + redirectUrl: '/home', + }, + hostPath: '/ml/', +} diff --git a/documentation/3.4.0/dockerized/envs/interface_env b/documentation/3.4.0/dockerized/envs/interface_env new file mode 100644 index 00000000..3a8f00e6 --- /dev/null +++ b/documentation/3.4.0/dockerized/envs/interface_env @@ -0,0 +1,18 @@ +API_DOC_URL=http://localhost:3569/interface/api-doc +APPLICATION_ENV=development +APPLICATION_PORT=3569 +ENTITY_SERVICE_BASE_URL=http://entity_management:5001 +INSTALLED_PACKAGES=elevate-user elevate-scheduler elevate-project elevate-entity-management +NOTIFICATION_SERVICE_BASE_URL=http://notification:3002 +PROJECT_SERVICE_BASE_URL=http://project:6000 +RATE_LIMITER_ENABLED=false +RATE_LIMITER_GENERAL_LIMIT=50 +RATE_LIMITER_NUMBER_OF_PROXIES=3 +RATE_LIMITER_PUBLIC_LOW_LIMIT=5 +REQUIRED_PACKAGES=elevate-user@1.1.77 elevate-scheduler@1.0.4 elevate-project@1.1.16 elevate-entity-management@1.0.10 +SCHEDULER_SERVICE_BASE_URL=http://scheduler:4000 +SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE +USER_SERVICE_BASE_URL=http://user:3001 +ALLOWED_HOST=http://localhost:7007 +REQUIRED_BASE_PACKAGES=user,notification,scheduler,project,entity +ROUTE_CONFIG_JSON_URLS_PATHS="https://raw.githubusercontent.com/ELEVATE-Project/user/staging/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/scheduler/develop/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/entity-management/main/src/constants/interface-routes/configs.json" \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/notification_env b/documentation/3.4.0/dockerized/envs/notification_env new file mode 100644 index 00000000..37037c7e --- /dev/null +++ b/documentation/3.4.0/dockerized/envs/notification_env @@ -0,0 +1,14 @@ +API_DOC_URL=/api-doc +APPLICATION_BASE_URL=/notification/ +APPLICATION_ENV=development +APPLICATION_PORT=3002 +DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/notification +DISABLE_LOG=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +INTERNAL_ACCESS_TOKEN=internal_access_token +KAFKA_GROUP_ID=notification +KAFKA_HOST=kafka:29092 +KAFKA_TOPIC=develop.notifications +SENDGRID_API_KEY=SG.asd9f87a9s8d7f. +SENDGRID_FROM_MAIL=no-reply@some.org \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/project_env b/documentation/3.4.0/dockerized/envs/project_env new file mode 100644 index 00000000..d3ff1273 --- /dev/null +++ b/documentation/3.4.0/dockerized/envs/project_env @@ -0,0 +1,82 @@ +APPLICATION_PORT = 6000 +APPLICATION_ENV = development +ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 + +INTERNAL_ACCESS_TOKEN =internal_access_token +# DB +# MONGODB_URL = mongodb://localhost:27017/elevate-diksha +# MONGODB_URL = mongodb://10.148.0.43:27017/elevate-project + +# MONGODB_URL = mongodb://13.127.166.58:27017/qa-saas-project +# MONGODB_URL = mongodb://localhost:27017/qadb + +# Docker--------- +MONGODB_URL = mongodb://mongodb:27017/qadb + +# MONGODB_URL = mongodb://localhost:27017/projectService +# ML Core Service +ML_CORE_SERVICE_URL = http://localhost:4000 +# ML Survey Service +# SURVEY_SERVICE_URL = https://saas-qa.tekdinext.com/survey +# OFFLINE VALIDATION +KEYCLOAK_PUBLIC_KEY_PATH = keycloak-public-keys +# KAFKA Configurations +KAFKA_COMMUNICATIONS_ON_OFF = ON +# KAFKA_URL =localhost:9092 + +KAFKA_URL =kafka:9092 + +# KAFKA_URL=10.148.0.38:9092 +KAFKA_GROUP_ID = projects +# KAFKA_GROUP_ID=dev.projects +KAFKA_HEALTH_CHECK_TOPIC = project-health-check-topic-check +# SUBMISSION TOPIC +PROJECT_SUBMISSION_TOPIC=sl-improvement-project-submission-dev +SUBMISSION_TOPIC = Projectsubmissions +PROJECT_CERTIFICATE_TOPIC = generateProjectCertificate +ELEVATE_PROJECT_SERVICE_URL= 'http://localhost:6000' +SERVICE_NAME = project +USER_DELETE_TOPIC = deleteuser +TELEMETRY_TOPIC=telemetry.raw +ID = projectservice +TELEMETRY_ON_OFF=ON +USER_DELETE_ON_OFF=OFF +CLOUD_STORAGE=ON +TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC = +05:30 +VALIDATE_ENTITIES = ON +APP_PORTAL_BASE_URL = "https://dev.elevate.org" +NO_OF_MINUTES = 30 +NO_OF_EXPIRY_TIME = 60 +# PRESIGNED_URL_EXPIRY_IN_SECONDS = 300 +# DOWNLOADABLE_URL_EXPIRY_IN_SECONDS = 300 +DEFAULT_ORGANISATION_CODE = 1 +# GOTENBERG_URL=http://localhost:3000 + +GOTENBERG_URL=http://gotenberg:3000 + +CERTIFICATE_SERVICE_URL = http://localhost:8081 +API_DOC_URL = "https://project-dev.elevate-apis.shikshalokam.org/project/api-doc" +#INTERFACE SERVICE URL +INTERFACE_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +# INTERFACE_SERVICE_URLL = "http://localhost:5001" +USER_SERVICE_BASE_URL = "/user" +ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" +SURVEY_SERVICE_URL = http://localhost:4301/survey +#GCP Cloud Configuration +CLOUD_STORAGE_PROVIDER=gcloud +CLOUD_STORAGE_ACCOUNTNAME=sl-mentoring-dev-storage@sl-dev-project.iam.gserviceaccount.com +CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDHwatCbtxcfqvt\n7rWWdgOsyQwH1/WGMJ2zTfQydZpRf2JGi6DaqbF85SEaoVnAKaN+33na2Vu5Kgep\n0wnZywCHCnz0W0Geo/4I4KUmzpm4gtG+ncuUhOd9bibx8M+yYhzWOijcPqaxTdpc\nWuenzqRmyNOHbYh4vz9cITrPnP95yPEl3o9gk+e4tD5MHwZTHw9/XKCp27Z/y9D2\nNzotaTjHNPZIxzxNkLzEC3PgYiGTiXBDdj5uag+Y5oV0+ydEZULyiqmr/IgWUZFL\nPsWnlraBgRDCJ/VsQOfU9EomyEapQdR1eBXYETqtMCFIT+lvbZherj0UQ7oRLAlZ\nqnKhnDchAgMBAAECggEADSJBtWN+n6JAgathSxxFT5YEcXuUjBckN0bX2H19AQDE\nIGlL0TS5E8Io9AxJz2Wtd0kQRQBnlHwb9uGGU0iSp05cOuDJJroXmNPUaAHLf6My\nUTskyIYYhlm4u82eilcDGF7IkvqXkS7SPaJIevMOQifQKKZeA7pnWxJgQIhND9+1\nls0OFQ77llh8pXiuAJ9fZbf7oLomKXUxlvfBFSj8NEiqzK7Vk+XCJVvuvUdsLSi6\nR8fputYgaoLJSDaGc/AFNlcec3gneok7zak4TyPQzSV3rwdMajbLEtBwwhsUVuFf\n5K6JHrYY3jYaOd0wqcu1v+WJw5LDexdawk1keD+08QKBgQDxMoAGNZQLxyuGPOnS\nYClPDJMZiSR+8oTaQyI0xvgQ8V7z741dEDNrbmYh2AKgDSec4zDfWga+xl2VSwsD\ndA42+HiD8Tji29iqT9aIJnhYWdk+DXwk/ySjLvUVY4dRGLI4kDwWjb5RAO4M5UEl\n1MeWhfMbgYLL/1gY4gX5BBQBXQKBgQDUBBW0lx9tXGjBr7c5dM8iO5J+O8K/zbds\nzE+oAwtN5saOtv9lhgDuhyFN67pCGW3M7fQgec9tigrDMKmy6ARHbORLes1zhSsd\nHH9aTA6/DkVzBnsDA3dT0klgOAFN2eP8QYhpNGN0My5jhhXNd5L2pDHpuIHkZPP4\ncuFxncJclQKBgHL2VAkhnnfirb8k53nrdaUE5FQmhuuvIl155CLtty00LsLsKh/y\nad/J1gpJkC7DNl9T9mZu3YouuEpBY3V46pGO6rpQzoFqsiGzPhjU5UWPRbmK6eIk\nbk0NQ6m3L7cao0/Mh6dkVhL783rYBq5Gdf8rx00T9MjQ4yexC5G+PN7NAoGAeWsN\ncyrI2Lx/UczrxX/bz+MF9j0LPwT08t3fEH0N0ENFmx26Dc48Yl4I+LLzLD+b3iy4\nDpEz9auEllwcE1VEfhMieweM+YdeNYHIfVHpcAkgRMuFTyiBAgP/+ZaZSJhsNF7j\nXDygaD+XZW+4tL6x74YA/7SmzsHx5msEKSkL0jECgYAOldGF28ujJHVA8kksXBkP\nlqIPki9Mg7qRHZBRFkmjskmEUFJTJP8TSWuo2c+J9idx6fxgXKmiXa5lH5ewQbXu\nQYbqpNsF167AjHEwxKS4qeU2u+fyw3VxB03gpNqEzolIIaGItAIfzyQ5KiN2thSl\nnhHTJ/psHBlZoENzsgvIUA==\n-----END PRIVATE KEY-----\n" +CLOUD_STORAGE_PROJECT =sl-dev-project +CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private +CLOUD_STORAGE_BUCKET_TYPE=private +ADMIN_ACCESS_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_AUTH_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_TOKEN_HEADER_NAME = 'admin-auth-token' +IS_AUTH_TOKEN_BEARER = false +AUTH_METHOD = native +REDIS_HOST=redis://127.0.0.1:6379 +# PUBLIC_ASSET_BUCKETNAME=mentoring-dev-storage-public + + +USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +RESOURCE_DELETION_TOPIC=RESOURCE_DELETION_TOPIC diff --git a/documentation/3.4.0/dockerized/envs/scheduler_env b/documentation/3.4.0/dockerized/envs/scheduler_env new file mode 100644 index 00000000..ee35cc2a --- /dev/null +++ b/documentation/3.4.0/dockerized/envs/scheduler_env @@ -0,0 +1,12 @@ +API_DOC_URL=/api-doc +APPLICATION_BASE_URL=/scheduler/ +APPLICATION_ENV=development +APPLICATION_PORT=4000 +DEFAULT_QUEUE=email +DISABLE_LOG=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +KAFKA_URL=kafka:9092 +NOTIFICATION_KAFKA_TOPIC=develop.notifications +REDIS_HOST=redis +REDIS_PORT=6379 \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/user_env b/documentation/3.4.0/dockerized/envs/user_env new file mode 100644 index 00000000..c25d6c61 --- /dev/null +++ b/documentation/3.4.0/dockerized/envs/user_env @@ -0,0 +1,87 @@ +ACCESS_TOKEN_EXPIRY='30m' +ACCESS_TOKEN_SECRET='bsj82AHBxahusub12yexlashsbxAXADHBlaj' +API_DOC_URL=/user/api-doc +APP_NAME=MentorED +APPLICATION_ENV=development +APPLICATION_PORT=3001 +CLEAR_INTERNAL_CACHE=userinternal +ENABLE_EMAIL_OTP_VERIFICATION=false +ENABLE_LOG=true +GCP_PATH=gcp.json +GCP_PROJECT_ID=sl-dev-project +INTERNAL_ACCESS_TOKEN=internal_access_token +INTERNAL_CACHE_EXP_TIME=86400 +IV=LHYOA5YnTonqcgrm15k3/Q== +KAFKA_GROUP_ID=mentoring +KAFKA_TOPIC= +# KAFKA_URL= localhost:9092 + +KAFKA_URL= kafka:9092 + +KEY=key +MENTOR_SECRET_CODE=45MENTOR_SECRET_CODE67 +# MONGODB_URL=mongodb://localhost:27017/elevate-users + +MONGODB_URL=mongodb://mongo:27017/elevate-users + +NOTIFICATION_KAFKA_TOPIC=dev.notifications +OTP_EMAIL_TEMPLATE_CODE=emailotp +OTP_EXP_TIME=86400 +RATING_KAFKA_TOPIC=dev.mentor_rating +# REDIS_HOST=redis://localhost:6379 +REDIS_HOST=redis://redis:6379 + +REFRESH_TOKEN_EXPIRY=183 +REFRESH_TOKEN_SECRET=371hkjkjady2y3ihdkajshdkiq23iuekw71yekhaskdvkvegavy23t78veqwexqvxveit6ttxyeeytt62tx236vv +REGISTRATION_EMAIL_TEMPLATE_CODE=registration +REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp +SALT_ROUNDS=10 + +DEFAULT_OCI_BUCKET_NAME=mentoring-oci-private +OCI_ACCESS_KEY_ID= 81a4c2553026982360af6b24497c489b0fea9436 +OCI_BUCKET_ENDPOINT=https://axgqmpkrpmt5.compat.objectstorage.ap-hyderabad-1.oraclecloud.com +OCI_BUCKET_REGION= ap-hyderabad-1 +OCI_SECRET_ACCESS_KEY='+U4O+CjiC6M/mOcGjYh7K/9XjfSdJ79OoLuQrABPOJ8=' +ERROR_LOG_LEVEL= silly +DISABLE_LOG= false +DEFAULT_ORGANISATION_CODE=default_code + +#new +# DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/user_service_elevate + +DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/user + +ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy + +MENTORING_SERVICE_URL="http://localhost:3000" +INVITEE_EMAIL_TEMPLATE_CODE="emailcode" +ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="coeadmin" +DEFAULT_QUEUE="defaultque" +MENTOR_INVITATION_EMAIL_TEMPLATE_CODE="mentorinvitationTemplateCode" +MENTEE_INVITATION_EMAIL_TEMPLATE_CODE="mentee invitationTemplateCode" +DEFAULT_ROLE="mentee" +SAMPLE_CSV_FILE_PATH="sample path" +ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE = "code5" +DEFAULT_ORG_ID = 1 +PORTAL_URL = "portaladdress" +# SCHEDULER_SERVICE_HOST = "host" + +SCHEDULER_SERVICE_HOST = scheduler + +SCHEDULER_SERVICE_BASE_URL = "/scheduler/" +REFRESH_VIEW_INTERVAL = 100000 +EMAIL_ID_ENCRYPTION_IV = 'a390328e496f025249a88384f318a536' +EMAIL_ID_ENCRYPTION_KEY = '9bbf4698e081176b4e38c3f04f9c0cff6ae80b1960e5ac868cc234ac8537aa66' +EMAIL_ID_ENCRYPTION_ALGORITHM = 'aes-256-cbc' +GENERIC_INVITATION_EMAIL_TEMPLATE_CODE = 'check_code' +EVENT_ORG_LISTENER_URLS = "sample url" +EVENT_ENABLE_ORG_EVENTS = false +DOWNLOAD_URL_EXPIRATION_DURATION = 300 + +APPLICATION_HOST= "localhost" +CHANGE_PASSWORD_TEMPLATE_CODE = "change_password" +CAPTCHA_ENABLE = false +RECAPTCHA_SECRET_KEY= "6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" +ALLOWED_IDLE_TIME=1200000 +APPLICATION_BASE_URL="/user" +ENTITY_MANAGEMENT_SERVICE_BASE_URL="/" \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh new file mode 100644 index 00000000..861094d4 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +# Exit on error +set -e + +# Ensure correct number of arguments are provided +if [ $# -lt 2 ]; then + echo "Error: Folder name and database URL not provided. Usage: $0 " + exit 1 +fi + +# Use the provided folder name +FOLDER_NAME="$1" + +# Check if folder exists +if [ ! -d "$FOLDER_NAME" ]; then + echo "Error: Folder '$FOLDER_NAME' not found." + exit 1 +fi + +# Use the provided database URL +DEV_DATABASE_URL="$2" + +# Extract database credentials and connection details using awk for portability +DB_USER=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $4}') +DB_PASSWORD=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $5}') +DB_HOST=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $6}') +DB_PORT=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{split($7,a,"/"); print a[1]}') +DB_NAME=$(echo $DEV_DATABASE_URL | awk -F '/' '{print $NF}') + +# Log database variables +echo "Extracted Database Variables:" +echo "DB_USER: $DB_USER" +echo "DB_PASSWORD: $DB_PASSWORD" +echo "DB_HOST: $DB_HOST" +echo "DB_PORT: $DB_PORT" +echo "DB_NAME: $DB_NAME" + +# Define the container name (same as DB_HOST) +CONTAINER_NAME="$DB_HOST" + +# Wait for Docker container to be up +echo "Waiting for Docker container '$CONTAINER_NAME' to be up..." +while ! docker inspect "$CONTAINER_NAME" &>/dev/null; do + echo "Waiting for container..." + sleep 1 +done +echo "Container is now up." + +# Wait for PostgreSQL to be ready to accept connections +echo "Waiting for PostgreSQL on '$DB_HOST:$DB_PORT' to accept connections..." +until docker exec "$CONTAINER_NAME" bash -c "pg_isready -h localhost -p $DB_PORT -U $DB_USER"; do + echo "Waiting for database to be ready..." + sleep 1 +done +echo "Database is ready." + +# Function to check if the database exists +check_database() { + docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -p $DB_PORT -lqt | cut -d \| -f 1 | grep -qw '$DB_NAME'" +} + +echo "Checking existence of database '$DB_NAME'..." +until check_database; do + echo "Database '$DB_NAME' does not exist, waiting..." + sleep 5 +done +echo "Database '$DB_NAME' exists, proceeding with script." + +# Retrieve and prepare SQL file operations +DISTRIBUTION_COLUMNS_FILE="$FOLDER_NAME/distributionColumns.sql" +if [ ! -f "$DISTRIBUTION_COLUMNS_FILE" ]; then + echo "Error: distributionColumns.sql not found in folder '$FOLDER_NAME'." + exit 1 +fi +echo "Copying distributionColumns.sql to container '$CONTAINER_NAME'..." +docker cp "$DISTRIBUTION_COLUMNS_FILE" "$CONTAINER_NAME:/distributionColumns.sql" + +echo "Creating Citus extension in the database..." +docker exec --user "$DB_USER" "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -c 'CREATE EXTENSION IF NOT EXISTS citus;'" + +# Function to check if table exists +check_table() { + local table=$1 + local exists=$(docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -t -c \"SELECT EXISTS(SELECT 1 FROM pg_tables WHERE schemaname = 'public' AND tablename = '$table');\"") + exists=$(echo "$exists" | tr -d '[:space:]') # Trim whitespace + echo "Debug: exists result for table $table = '$exists'" # Debug line + [[ "$exists" == "t" ]] # Checking specifically for 't' +} + +# Execute the SQL file with checks for table existence +echo "Creating distribution columns..." +while IFS= read -r line; do + if [[ $line =~ create_distributed_table\(\'([^\']+)\', ]]; then + table="${BASH_REMATCH[1]}" + echo "Checking existence of table '$table'..." + until check_table "$table"; do + echo "Table '$table' does not exist, waiting..." + sleep 1 + done + echo "Table '$table' exists, executing: $line" + docker exec --user "$DB_USER" "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -c \"$line\"" + fi +done <"$DISTRIBUTION_COLUMNS_FILE" + +echo "Citus extension setup complete." \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh new file mode 100644 index 00000000..4ca32173 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Get the directory of the shell script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Set environment variables +export notification_env="$SCRIPT_DIR/notification_env" +export scheduler_env="$SCRIPT_DIR/scheduler_env" +export project_env="$SCRIPT_DIR/project_env" +export users_env="$SCRIPT_DIR/user_env" +export interface_env="$SCRIPT_DIR/interface_env" +export entity_management_env="$SCRIPT_DIR/entity_management_env" + +# Run docker-compose +docker-compose -f "$SCRIPT_DIR/docker-compose-project.yml" down \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh new file mode 100644 index 00000000..7315c530 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Get the directory of the shell script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Set environment variables +export notification_env="$SCRIPT_DIR/notification_env" +export scheduler_env="$SCRIPT_DIR/scheduler_env" +export project_env="$SCRIPT_DIR/project_env" +export users_env="$SCRIPT_DIR/user_env" +export interface_env="$SCRIPT_DIR/interface_env" +export entity_management_env="$SCRIPT_DIR/entity_management_env" + +# Run docker-compose +docker-compose -f "$SCRIPT_DIR/docker-compose-project.yml" up \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js new file mode 100644 index 00000000..0e5303ae --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -0,0 +1,409 @@ +const { ObjectId } = require('mongodb') + +let districtId = new ObjectId() +let blockId = new ObjectId() +let clusterId = new ObjectId() +let schoolId = new ObjectId() +let professionalId = new ObjectId() +let professionalSubRoleId = new ObjectId() + +let entityType = [ + { + _id: ObjectId('6825914b97b5680013e6a140'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'state', + toBeMappedToParentEntities: true, + tenantId: 'shikshalokam', + updatedAt: new Date('2025-05-15T07:01:31.680Z'), + createdAt: new Date('2025-05-15T07:01:31.680Z'), + __v: 0, + orgId: 'sl', + }, + { + _id: ObjectId('6825915197b5680013e6a142'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'district', + toBeMappedToParentEntities: true, + tenantId: 'shikshalokam', + updatedAt: new Date('2025-05-15T07:01:37.892Z'), + createdAt: new Date('2025-05-15T07:01:37.892Z'), + __v: 0, + orgId: 'sl', + }, + { + _id: ObjectId('682591cc97b5680013e6a15c'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'professional_role', + toBeMappedToParentEntities: true, + tenantId: 'shikshalokam', + updatedAt: new Date('2025-05-15T07:03:40.376Z'), + createdAt: new Date('2025-05-15T07:03:40.376Z'), + __v: 0, + orgId: 'sl', + }, + { + _id: ObjectId('682591d397b5680013e6a15e'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'professional_subroles', + toBeMappedToParentEntities: true, + tenantId: 'shikshalokam', + updatedAt: new Date('2025-05-15T07:03:47.062Z'), + createdAt: new Date('2025-05-15T07:03:47.062Z'), + __v: 0, + orgId: 'sl', + }, + // { + // _id: new ObjectId(), + // name: 'state', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['district', 'block', 'cluster', 'school'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'district', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['block', 'cluster', 'school'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'block', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['cluster', 'school'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'cluster', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['school'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'school', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: [], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'professional_role', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['professional_subroles'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'professional_subroles', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: [], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, +] + +let entities = [ + { + _id: ObjectId('6852c86c7248c20014b38a4d'), + metaInformation: { + targetedEntityTypes: [], + externalId: '16', + name: 'Tripura', + }, + childHierarchyPath: ['district', 'block', 'cluster', 'school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: ObjectId('6825914b97b5680013e6a140'), + entityType: 'state', + registryDetails: { + code: '16', + locationId: '16', + }, + tenantId: 'shikshalokam', + orgId: 'sl', + updatedAt: new Date('2025-06-18T14:29:00.266Z'), + createdAt: new Date('2025-06-18T14:08:44.438Z'), + __v: 0, + groups: { + district: [ObjectId('6852c8ae7248c20014b38a57')], + }, + }, + { + _id: ObjectId('6852c8ae7248c20014b38a57'), + metaInformation: { + targetedEntityTypes: [], + externalId: 'westTripura', + name: 'West Tripura', + }, + childHierarchyPath: ['block', 'cluster', 'school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: ObjectId('6825915197b5680013e6a142'), + entityType: 'district', + registryDetails: { + code: 'westTripura', + locationId: 'westTripura', + }, + tenantId: 'shikshalokam', + orgId: 'sl', + updatedAt: new Date('2025-06-18T14:27:43.218Z'), + createdAt: new Date('2025-06-18T14:09:50.337Z'), + __v: 0, + groups: { + block: [ + ObjectId('6852c8de7248c20014b38a9d'), + ObjectId('6852c8de7248c20014b38a9e'), + ObjectId('6852c8de7248c20014b38a9f'), + ObjectId('6852c8de7248c20014b38aa0'), + ObjectId('6852c8de7248c20014b38aa1'), + ObjectId('6852c8de7248c20014b38aa2'), + ObjectId('6852c8de7248c20014b38aa3'), + ObjectId('6852c8de7248c20014b38aa4'), + ObjectId('6852c8de7248c20014b38aa5'), + ObjectId('6852c8de7248c20014b38aa6'), + ObjectId('6852c8de7248c20014b38aa7'), + ObjectId('6852c8de7248c20014b38aa8'), + ], + }, + }, + { + _id: ObjectId('68876746b19aea00144c2af9'), + metaInformation: { + targetedEntityTypes: [ + { + entityTypeId: '6825915197b5680013e6a142', + entityType: 'district', + }, + ], + externalId: 'Facilitator', + name: 'Facilitator', + }, + childHierarchyPath: ['professional_role', 'professional_subroles'], + createdBy: '1', + updatedBy: '1', + deleted: false, + entityTypeId: ObjectId('682591cc97b5680013e6a15c'), + entityType: 'professional_role', + registryDetails: { + locationId: 'Facilitator', + code: 'Facilitator', + }, + userId: '1', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-07-28T12:08:56.065Z'), + createdAt: new Date('2025-07-28T12:04:22.011Z'), + __v: 0, + groups: { + professional_subroles: [ObjectId('688767deb19aea00144c2b08')], + }, + }, + { + _id: ObjectId('688767deb19aea00144c2b08'), + metaInformation: { + targetedEntityTypes: [ + { + entityType: 'Handbook1_Activity', + entityTypeId: '688762feb19aea00144c2a81', + }, + { + entityType: 'Handbook2_Activity', + entityTypeId: '68887766b19aea00144c3631', + }, + ], + externalId: 'facilitator', + name: 'Facilitator', + }, + childHierarchyPath: ['professional_subroles'], + createdBy: '1', + updatedBy: '1', + deleted: false, + entityTypeId: ObjectId('682591d397b5680013e6a15e'), + entityType: 'professional_subroles', + registryDetails: { + locationId: 'facilitator', + code: 'facilitator', + }, + userId: '1', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-07-29T07:28:05.355Z'), + createdAt: new Date('2025-07-28T12:06:54.072Z'), + __v: 0, + }, + // { + // _id: new ObjectId(), + // name: 'Karnataka', + // entityType: 'state', + // entityTypeId: entityType[0]._id, + // userId: '1', + // metaInformation: { + // externalId: 'KR001', + // name: 'Karnataka', + // }, + // childHierarchyPath: ['district', 'block', 'cluster', 'school'], + // groups: { + // district: [districtId], + // block: [blockId], + // cluster: [clusterId], + // school: [schoolId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: districtId, + // name: 'Bangalore', + // entityType: 'district', + // entityTypeId: entityType[1]._id, + // userId: '1', + // metaInformation: { + // externalId: 'BN001', + // name: 'Bangalore', + // }, + // childHierarchyPath: ['block', 'cluster', 'school'], + // groups: { + // block: [blockId], + // cluster: [clusterId], + // school: [schoolId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + + // { + // _id: blockId, + // entityType: 'block', + // entityTypeId: entityType[2]._id, + // userId: '1', + // metaInformation: { + // externalId: 'BU', + // name: 'Bangalore Urban', + // }, + // childHierarchyPath: ['cluster', 'school'], + // groups: { + // cluster: [clusterId], + // school: [schoolId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: clusterId, + // entityType: 'district', + // entityTypeId: entityType[3]._id, + // userId: '1', + // metaInformation: { + // externalId: 'JPN', + // name: 'JP Nagar', + // }, + // childHierarchyPath: ['school'], + // groups: { + // school: [schoolId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: schoolId, + // entityType: 'school', + // entityTypeId: entityType[4]._id, + // userId: '1', + // metaInformation: { + // externalId: 'GS01', + // name: 'Govt School', + // }, + // childHierarchyPath: [], + // groups: {}, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: professionalId, + // entityType: 'professional_role', + // entityTypeId: entityType[5]._id, + // userId: '1', + // metaInformation: { + // externalId: 'STD', + // name: 'student', + // }, + // childHierarchyPath: ['professional_subroles'], + // groups: { + // professional_subroles: [professionalSubRoleId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: professionalSubRoleId, + // entityType: 'professional_subroles', + // entityTypeId: entityType[6]._id, + // userId: '1', + // metaInformation: { + // externalId: 'SG', + // name: 'student-school', + // }, + // childHierarchyPath: [], + // groups: {}, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, +] + +module.exports = { + entities, + entityType, +} diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh new file mode 100755 index 00000000..7af34b16 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Ensure PGPASSWORD is set in your environment before running, e.g., export PGPASSWORD=postgres + +# --- 1. INSERT INTO public.user --- +# FIXES: +# - Quoted 'default' and the phone number hash which were missing quotes. +# - Quoted the user_name variables. +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e4','+91', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a767','+91', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e0','+91', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a700','+91', NULL);" + +# --- 2. INSERT INTO public.user_organizations --- +# FIXES: +# - Quoted the organization_code and tenant_code variables. +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (1, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (2, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (3, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (4, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + +# --- 3. INSERT INTO public.user_organization_roles --- +# FIXES: +# - Quoted the organization_code and tenant_code variables. +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 2, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + +# --- 4. INSERT INTO public.entity_types --- +# FIXES: +# - Quoted the JSON value for the 'meta' column. +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" + +# --- 5. UPDATES and SEQUENCES --- +psql -h localhost -p 5432 -U postgres -d user -c "UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3;" +psql -h localhost -p 5432 -U postgres -d user -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" +psql -h localhost -p 5432 -U postgres -d user -c "SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials;" +psql -h localhost -p 5432 -U postgres -d user -c "SELECT NULL;" + + + diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js new file mode 100644 index 00000000..82a616ce --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js @@ -0,0 +1,56 @@ +const { MongoClient } = require('mongodb') + +const url = 'mongodb://localhost:27017/' // MongoDB URL +const dbName = 'elevate-project' +const dbName2 = 'elevate-entity' +const entityData = require('./entity_sampleData.js') +const projectData = require('./project_sampleData.js') + +async function insertData(collectionName, dataFile, curretDB = dbName) { + const client = new MongoClient(url) + + try { + // Connect to MongoDB + await client.connect() + console.log(`Connected to MongoDB for ${collectionName}`) + + const db = client.db(curretDB) + const collection = db.collection(collectionName) + + // Read the data from the file + const data = dataFile + + if (!data) { + await client.close() + return + } + + const result = await collection.insertMany(data) + //console.log(`Inserted ${result.insertedCount} documents into ${collectionName}`); + } finally { + await client.close() + } +} + +async function main({ dataToBeInserted }) { + await insertData('entities', dataToBeInserted.entities, dbName2) + await insertData('entityTypes', dataToBeInserted.entityType, dbName2) + await insertData('programs', dataToBeInserted.programData) + await insertData('solutions', dataToBeInserted.solutionData) + await insertData('projectTemplates', dataToBeInserted.projectTemplatesData) + await insertData('projectTemplateTasks', dataToBeInserted.projectTemplateTasksData) + await insertData('certificateTemplates', dataToBeInserted.certificateTemplatesData) + await insertData('certificateBaseTemplates', dataToBeInserted.certificateBaseTemplatesData) + await insertData('projectCategories', dataToBeInserted.projectCategoriesData) +} + +main({ dataToBeInserted: entityData }) + .then(() => { + console.log('Entity data populated successfully.') + }) + .catch(console.error) +main({ dataToBeInserted: projectData }) + .then(() => { + console.log('project data populated successfully.') + }) + .catch(console.error) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js new file mode 100644 index 00000000..98f67396 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js @@ -0,0 +1,1612 @@ +const { ObjectId } = require('mongodb') + +let solutionData = [ + { + _id: ObjectId('68ee4bb3fb9bee08b93b6d68'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + entityType: 'school', + externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', + name: 'pro with obsasatask oct 8 facilitator only 2nd', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-09-09T00:00:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + programName: 'custom observation as a task check on oct 14th facilitator', + programDescription: 'custom observation as a task check on oct 14th facilitator', + status: 'active', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-14T13:11:17.993Z'), + createdAt: new Date('2025-10-14T13:10:11.897Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + updatedBy: '1', + author: '1', + creator: 'Nevil', + certificateTemplateId: ObjectId('68ee4bf5fb9bee08b93b6d97'), + link: 'f8a8e9ba397a29cf75ad5057db6cb7f9', + }, + { + _id: ObjectId('68e8c635201642091e014914'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + entityType: 'school', + externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION', + name: 'Testing Project For LED IMP facilitator only', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-09-09T00:00:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: ObjectId('68e8c284201642091e0148c1'), + programName: 'custom observation as a task check on oct 10th facilitator', + programDescription: 'custom observation as a task check on oct 10th facilitator', + status: 'active', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-10T08:40:22.617Z'), + createdAt: new Date('2025-10-10T08:39:17.519Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: ObjectId('68e8c635201642091e01491c'), + updatedBy: '1', + author: '1', + creator: 'Nevil', + certificateTemplateId: ObjectId('68e8c676201642091e014943'), + link: '178ac1fdff5b367ef3335ce0e1665a6c', + }, + { + _id: ObjectId('68c98d9538aee0086ee61096'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'ProgramTestKey1', + entityType: 'school', + externalId: 'ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION', + name: 'Project name sep 16 9 30', + description: + 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', + isReusable: false, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2026-01-30T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: ObjectId('68c98d8f38aee0086ee61070'), + programName: 'Program name is sep 16 9 30', + programDescription: 'Description of the Program', + status: 'active', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-16T16:17:25.599Z'), + createdAt: new Date('2025-09-16T16:17:25.472Z'), + __v: 0, + scope: { + professional_role: ['ALL'], + professional_subroles: ['ALL'], + organizations: ['tan90'], + state: ['ALL'], + district: ['ALL'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: ObjectId('68c98d9538aee0086ee6109e'), + }, + { + _id: ObjectId('68d3b9a72ba17cc3cb238821'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'SUP_as_a_task_test_sept_24_1500', + entityType: 'school', + externalId: 'DPDTSCH012025-1758706081315-PROJECT-SOLUTION', + name: 'project sup test with obs or sur tasks sep 23 1520', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2025-12-30T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: ObjectId('68d3b9681e09f9b5b1e0693d'), + programName: 'SUP_as_a_task_test_sept_24_1500', + programDescription: 'This is the description of the program.', + status: 'active', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-24T09:28:19.783Z'), + createdAt: new Date('2025-09-24T09:28:07.900Z'), + __v: 0, + scope: { + professional_role: ['ALL'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['ALL'], + district: ['ALL', '6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: ObjectId('68d3b9a92ba17cc3cb238829'), + updatedBy: '1', + author: '1', + creator: 'Nevil', + link: 'a0acc357edbcf3287e9767d20a7d9f12', + }, +] + +let programData = [ + { + _id: ObjectId('68ee4b79fb9bee08b93b6d34'), + resourceType: ['program'], + language: ['English'], + keywords: ['CBSE', 'SQAA'], + concepts: [], + components: [ + { + _id: ObjectId('68ee4bb3fb9bee08b93b6d68'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + name: 'custom observation as a task check on oct 14th facilitator', + description: 'custom observation as a task check on oct 14th facilitator', + startDate: new Date('2025-09-08T18:30:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ['Tripura'], + recommendedFor: ['Facilitator'], + }, + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-14T13:18:46.936Z'), + createdAt: new Date('2025-10-14T13:09:13.649Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: ObjectId('68e8c284201642091e0148c1'), + resourceType: ['program'], + language: ['English'], + keywords: ['CBSE', 'SQAA'], + concepts: [], + components: [ + { + _id: ObjectId('68e8c635201642091e014914'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + name: 'custom observation as a task check on oct 10th facilitator', + description: 'custom observation as a task check on oct 10th facilitator', + startDate: new Date('2025-09-08T18:30:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ['Tripura'], + recommendedFor: ['Facilitator'], + }, + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-10T08:44:35.535Z'), + createdAt: new Date('2025-10-10T08:23:32.295Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: ObjectId('68c98d8f38aee0086ee61070'), + resourceType: ['program'], + language: ['English'], + keywords: [], + concepts: [], + components: [ + { + _id: ObjectId('68c98d9538aee0086ee61096'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'ProgramTestKey1', + name: 'Program name is sep 16 9 30', + description: 'Description of the Program', + metaInformation: { + state: ['Tripura'], + recommendedFor: ['functionaries-officials', 'teacher-educators-coordinators'], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2026-01-30T18:29:59.000Z'), + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-16T17:06:14.752Z'), + createdAt: new Date('2025-09-16T16:17:19.239Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: ObjectId('68d3b9681e09f9b5b1e0693d'), + resourceType: ['program'], + language: ['English'], + keywords: [], + concepts: [], + components: [ + { + _id: ObjectId('68d3b9a72ba17cc3cb238821'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'SUP_as_a_task_test_sept_24_1500', + name: 'SUP_as_a_task_test_sept_24_1500 oct 3', + description: 'This is the description of the program.', + metaInformation: { + state: ['Tripura'], + recommendedFor: ['functionaries-officials'], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2025-12-30T18:29:59.000Z'), + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-03T09:20:39.907Z'), + createdAt: new Date('2025-09-24T09:27:04.322Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, +] + +let projectTemplatesData = [ + { + _id: ObjectId('68ee4bb3fb9bee08b93b6d70'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + ObjectId('68ee4bb4fb9bee08b93b6d7a'), + ObjectId('68ee4bb4fb9bee08b93b6d7e'), + ObjectId('68ee4bb4fb9bee08b93b6d82'), + ObjectId('68ee4bb4fb9bee08b93b6d86'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984', + 'DPDTSC-HandBook-1-2025-Task2-1760447411369', + 'DPDTSC-HandBook-1-2025-Task3-1760447411369', + 'DPDTSC-HandBook-1-2025-Task4-1760447411369', + 'DPDTSC-HandBook-1-2025-Task5-1760447411369', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: 'CURRENT', + visibleToOrganizations: ['tan90'], + deleted: false, + title: 'pro with obsasatask oct 8 facilitator only 2nd', + externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + categories: [ + { + _id: ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-14T13:11:17.899Z'), + createdAt: new Date('2025-10-14T13:10:11.630Z'), + __v: 0, + solutionId: ObjectId('68ee4bb3fb9bee08b93b6d68'), + solutionExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', + programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + parentTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d4c'), + certificateTemplateId: ObjectId('68ee4bf5fb9bee08b93b6d97'), + }, + { + _id: ObjectId('68e8c635201642091e01491c'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + ObjectId('68e8c635201642091e014926'), + ObjectId('68e8c635201642091e01492a'), + ObjectId('68e8c635201642091e01492e'), + ObjectId('68e8c635201642091e014932'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1-2025-Task1-1760085557008-1760085557606', + 'DPDTSC-HandBook-1-2025-Task2-1760085557008', + 'DPDTSC-HandBook-1-2025-Task3-1760085557008', + 'DPDTSC-HandBook-1-2025-Task4-1760085557008', + 'DPDTSC-HandBook-1-2025-Task5-1760085557008', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: 'CURRENT', + visibleToOrganizations: ['tan90'], + deleted: false, + title: 'Testing Project For LED IMP facilitator only', + externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + categories: [ + { + _id: ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-10T08:40:22.544Z'), + createdAt: new Date('2025-10-10T08:39:17.260Z'), + __v: 0, + solutionId: ObjectId('68e8c635201642091e014914'), + solutionExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION', + programId: ObjectId('68e8c284201642091e0148c1'), + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + parentTemplateId: ObjectId('68e8c635201642091e0148f8'), + certificateTemplateId: ObjectId('68e8c676201642091e014943'), + }, + { + _id: ObjectId('68c98d9538aee0086ee6109e'), + description: + 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: [''], + tasks: [ + ObjectId('68c98d9538aee0086ee610a2'), + ObjectId('68c98d9538aee0086ee610a6'), + ObjectId('68c98d9538aee0086ee610aa'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'Task1-1758039445176', + 'Task2-1758039445176', + 'Task3-1758039445176', + 'Task4-1758039445176', + 'Task5-1758039445176', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: 'Project name sep 16 9 30', + externalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + categories: [ + { + _id: ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-16T16:17:25.596Z'), + createdAt: new Date('2025-09-16T16:17:25.301Z'), + __v: 0, + solutionId: ObjectId('68c98d9538aee0086ee61096'), + solutionExternalId: 'ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION', + programId: ObjectId('68c98d8f38aee0086ee61070'), + programExternalId: 'ProgramTestKey1', + parentTemplateId: ObjectId('68c98d9538aee0086ee6107a'), + }, + { + _id: ObjectId('68d3b9a92ba17cc3cb238829'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + ObjectId('68d3b9ad2ba17cc3cb238837'), + ObjectId('68d3b9ad2ba17cc3cb23883b'), + ObjectId('68d3b9ae2ba17cc3cb23883f'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1/2025-Task1-1758706081315-1758706089304', + 'DPDTSC-HandBook-1/2025-Task2-1758706081315', + 'DPDTSC-HandBook-1/2025-Task3-1758706081315', + 'DPDTSC-HandBook-1/2025-Task4-1758706081315', + 'DPDTSC-HandBook-1/2025-Task5-1758706081315', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: 'project sup test with obs or sur tasks sep 23 1520', + externalId: 'DPDTSCH012025-1758706081315_IMPORTED', + categories: [ + { + _id: ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-24T09:28:14.561Z'), + createdAt: new Date('2025-09-24T09:28:03.404Z'), + __v: 0, + solutionId: ObjectId('68d3b9a72ba17cc3cb238821'), + solutionExternalId: 'DPDTSCH012025-1758706081315-PROJECT-SOLUTION', + programId: ObjectId('68d3b9681e09f9b5b1e0693d'), + programExternalId: 'SUP_as_a_task_test_sept_24_1500', + parentTemplateId: ObjectId('68d3b9a32ba17cc3cb238805'), + }, +] + +let projectTemplateTasksData = [ + { + _id: ObjectId('68ee4bb4fb9bee08b93b6d7a'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + description: '', + sequenceNumber: '2', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.192Z'), + createdAt: new Date('2025-10-14T13:10:11.805Z'), + __v: 0, + }, + { + _id: ObjectId('68ee4bb4fb9bee08b93b6d7e'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + description: '', + sequenceNumber: '3', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.202Z'), + createdAt: new Date('2025-10-14T13:10:11.813Z'), + __v: 0, + }, + { + _id: ObjectId('68ee4bb4fb9bee08b93b6d82'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'learn', + link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + app: 'projectService', + id: 'view?usp=drive_link', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + description: '', + sequenceNumber: '4', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.210Z'), + createdAt: new Date('2025-10-14T13:10:11.825Z'), + __v: 0, + }, + { + _id: ObjectId('68ee4bb4fb9bee08b93b6d86'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'walking', + link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', + app: 'projectService', + id: 'view?usp=sharing', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', + description: '', + sequenceNumber: '5', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.218Z'), + createdAt: new Date('2025-10-14T13:10:11.833Z'), + __v: 0, + }, + { + _id: ObjectId('68e8c635201642091e014926'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', + description: '', + sequenceNumber: '2', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2026', + endDate: '31/12/2026', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.813Z'), + createdAt: new Date('2025-10-10T08:39:17.430Z'), + __v: 0, + }, + { + _id: ObjectId('68e8c635201642091e01492a'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', + description: '', + sequenceNumber: '3', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2027', + endDate: '31/12/2027', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.822Z'), + createdAt: new Date('2025-10-10T08:39:17.439Z'), + __v: 0, + }, + { + _id: ObjectId('68e8c635201642091e01492e'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'learn', + link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + app: 'projectService', + id: 'view?usp=drive_link', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', + description: '', + sequenceNumber: '4', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2028', + endDate: '31/12/2028', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.831Z'), + createdAt: new Date('2025-10-10T08:39:17.449Z'), + __v: 0, + }, + { + _id: ObjectId('68e8c635201642091e014932'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'walking', + link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', + app: 'projectService', + id: 'view?usp=sharing', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', + description: '', + sequenceNumber: '5', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2029', + endDate: '31/12/2029', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.840Z'), + createdAt: new Date('2025-10-10T08:39:17.458Z'), + __v: 0, + }, + { + _id: ObjectId('68c98d9538aee0086ee610a2'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Manual (PDF)', + link: 'https://docs.google.com/document/d/1NCUdj9nPAz82sPV5q2BJ8At31sFJdSDwocrDCh_g7W0/edit?tab=t.0', + app: 'projectService', + id: 'edit?tab=t.0', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Review the Activity Manual', + externalId: 'Task1-1758039445176-1758039445561', + description: '', + sequenceNumber: '1', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '28/07/2025', + endDate: '30/01/2026', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.564Z'), + createdAt: new Date('2025-09-16T16:17:25.375Z'), + __v: 0, + }, + { + _id: ObjectId('68c98d9538aee0086ee610a6'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'Task2-1758039445176-1758039445567', + description: '', + sequenceNumber: '2', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '29/07/2025', + endDate: '30/01/2027', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.571Z'), + createdAt: new Date('2025-09-16T16:17:25.386Z'), + __v: 0, + }, + { + _id: ObjectId('68c98d9538aee0086ee610aa'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'Task3-1758039445176-1758039445575', + description: '', + sequenceNumber: '3', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/01/2028', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.579Z'), + createdAt: new Date('2025-09-16T16:17:25.396Z'), + __v: 0, + }, + { + _id: ObjectId('68d3b9ad2ba17cc3cb238837'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', + description: '', + sequenceNumber: '3', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:13.534Z'), + createdAt: new Date('2025-09-24T09:28:06.227Z'), + __v: 0, + }, + { + _id: ObjectId('68d3b9ad2ba17cc3cb23883b'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Assessment (PDF)', + link: 'https://sunbirdsaaspublic.blob.core.windows.net/content/content/assets/do_2143687931908833281255/dpdt-switch-car.pdf', + app: 'projectService', + id: 'dpdt-switch-car.pdf', + }, + { + name: 'Activity OMR Sheet (PDF)', + link: 'https://drive.google.com/file/d/1-f7Tg8bmZd-xlcxlhfOcf2ZO6vpc6qkH/view', + app: 'projectService', + id: 'view', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', + description: '', + sequenceNumber: '4', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:13.967Z'), + createdAt: new Date('2025-09-24T09:28:06.583Z'), + __v: 0, + }, + { + _id: ObjectId('68d3b9ae2ba17cc3cb23883f'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', + description: '', + sequenceNumber: '5', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:14.374Z'), + createdAt: new Date('2025-09-24T09:28:07.083Z'), + __v: 0, + }, +] + +let certificateTemplatesData = [ + { + _id: ObjectId('68ee4bf5fb9bee08b93b6d97'), + status: 'active', + deleted: false, + criteria: { + validationText: 'Complete validation message', + expression: 'C1&&(C3||C4||C5||C6)', + conditions: { + C1: { + validationText: 'Submit your project.', + expression: 'C1', + conditions: { + C1: { + scope: 'project', + key: 'status', + operator: '==', + value: 'submitted', + }, + }, + }, + C3: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d53'], + }, + }, + validationText: 'Add 2 evidence for any task', + }, + C4: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d57'], + }, + }, + }, + C5: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d5b'], + }, + }, + }, + C6: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d63'], + }, + }, + }, + }, + }, + issuer: { + name: 'Tan90', + }, + solutionId: ObjectId('68ee4bb3fb9bee08b93b6d68'), + programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + baseTemplateId: ObjectId('68c008dfd113c30c11f1aca2'), + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-14T13:11:17.793Z'), + createdAt: new Date('2025-10-14T13:11:17.628Z'), + __v: 0, + templateUrl: + 'certificate/aa8529e3-6754-4432-a669-72b73d358e2f/1/7042c718-a1bf-43e3-b296-586de247a440/68ee4bf5fb9bee08b93b6d97/14-9-2025-1760447477692_Dowloaded.svg', + }, + { + _id: ObjectId('68e8c676201642091e014943'), + status: 'active', + deleted: false, + criteria: { + validationText: 'Complete validation message', + expression: 'C1&&(C3||C4||C5||C6||C7)', + conditions: { + C1: { + validationText: 'Submit your project.', + expression: 'C1', + conditions: { + C1: { + scope: 'project', + key: 'status', + operator: '==', + value: 'submitted', + }, + }, + }, + C3: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e0148ff'], + }, + }, + validationText: 'Add 2 evidence for any task', + }, + C4: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e014903'], + }, + }, + }, + C5: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e014907'], + }, + }, + }, + C6: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e01490b'], + }, + }, + }, + C7: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e01490f'], + }, + }, + }, + }, + }, + issuer: { + name: 'Tan90', + }, + solutionId: ObjectId('68e8c635201642091e014914'), + programId: ObjectId('68e8c284201642091e0148c1'), + baseTemplateId: ObjectId('68c008dfd113c30c11f1aca2'), + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-10T08:40:22.454Z'), + createdAt: new Date('2025-10-10T08:40:22.298Z'), + __v: 0, + templateUrl: + 'certificate/0bcc856d-0145-448c-8188-300ca3f3250e/1/58cfdf3c-f1a2-4a94-bbb5-21dcd7286913/68e8c676201642091e014943/10-9-2025-1760085622353_Dowloaded.svg', + }, +] + +let certificateBaseTemplatesData = [ + { + _id: ObjectId('68c008dfd113c30c11f1aca2'), + deleted: false, + code: 'onelogo_onesign', + name: 'onelogo_onesign', + url: 'certificate/ef2058a1-92e0-4a63-af5f-b712f992bf90/1/81fc35ad-9519-4ec4-87bb-6cef64b940f0/9-8-2025-1757415647754_sl_s1l1.svg', + tenantId: 'shikshalokam', + orgId: 'slorg', + updatedAt: new Date('2025-09-09T11:00:47.878Z'), + createdAt: new Date('2025-09-09T11:00:47.878Z'), + __v: 0, + }, +] + +let projectCategoriesData = [ + { + _id: ObjectId('685ae6a0cb7c7200145dadae'), + createdBy: 'SYSTEM', + updatedBy: 'SYSTEM', + isDeleted: false, + isVisible: true, + status: 'active', + icon: '', + noOfProjects: 361, + evidences: [], + deleted: false, + name: 'teachers', + externalId: 'teachers', + tenantId: 'shikshalokam', + orgId: 'slorg', + updatedAt: new Date('2025-06-24T17:55:44.720Z'), + createdAt: new Date('2025-06-24T17:55:44.720Z'), + __v: 0, + }, +] +module.exports = { + solutionData, + programData, + projectTemplatesData, + projectTemplateTasksData, + certificateTemplatesData, + certificateBaseTemplatesData, + projectCategoriesData, +} diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/replace_volume_path.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/replace_volume_path.sh new file mode 100644 index 00000000..e427fe5e --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/replace_volume_path.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Define the path of your docker-compose file +DOCKER_COMPOSE_FILE="docker-compose-project.yml" + +# Check if the Docker Compose file exists +if [ ! -f "$DOCKER_COMPOSE_FILE" ]; then + echo "Error: Docker Compose file '$DOCKER_COMPOSE_FILE' does not exist." + exit 1 +fi + +# Get the current directory path +CURRENT_DIR=$(pwd) + +# Escape the current directory path to be used in a sed expression +ESCAPED_CURRENT_DIR=$(printf '%s\n' "$CURRENT_DIR" | sed -e 's/[\/&]/\\&/g') + +# Use sed to replace the path leading up to 'env.js' in the docker-compose file +# The pattern ensures that it only replaces the path component up to ':/usr/src/app/www/assets/env/env.js' +sed -i -e "s|/[^:]*\(\/env\.js\):/usr/src/app/www/assets/env/env.js|$ESCAPED_CURRENT_DIR\1:/usr/src/app/www/assets/env/env.js|" "$DOCKER_COMPOSE_FILE" +echo "Updated volume path for 'env.js' in $DOCKER_COMPOSE_FILE" \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh new file mode 100644 index 00000000..7a4742aa --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +# Logging function +log() { + echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" >> setup_log.txt +} + +# Step 1: Download Docker Compose file +log "Downloading Docker Compose file..." +curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/docker-compose-project.yml +log "Docker Compose file downloaded." + +# Step 2: Download environment files +log "Downloading environment files..." +curl -L \ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/interface_env \ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/entity_management_env \ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/project_env \ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/notification_env \ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/scheduler_env \ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/user_env \ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/env.js +log "Environment files downloaded." + +# Step 3: Download replace_volume_path.sh script +log "Downloading replace_volume_path.sh script..." +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/dockerized/scripts/mac-linux/replace_volume_path.sh +log "replace_volume_path.sh script downloaded." + +# Step 4: Make replace_volume_path.sh executable +log "Making replace_volume_path.sh executable..." +chmod +x replace_volume_path.sh +log "Made replace_volume_path.sh executable." + +# Step 5: Run replace_volume_path.sh script +log "Running replace_volume_path.sh script..." +./replace_volume_path.sh +log "replace_volume_path.sh script executed." + +# Step 6: Download additional scripts +log "Downloading docker-compose scripts..." +curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/docker-compose-up.sh +curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/docker-compose-down.sh +log "docker-compose scripts downloaded." + +# Step 7: Make the scripts executable +log "Making docker-compose scripts executable..." +chmod +x docker-compose-up.sh +chmod +x docker-compose-down.sh +log "Made docker-compose scripts executable." + +# Step 8: Create user directory and download SQL file +log "Creating user directory and downloading distributionColumns.sql..." +mkdir -p user && curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql +log "User directory created and distributionColumns.sql downloaded." + +# Step 9: Download and make citus_setup.sh executable +log "Downloading citus_setup.sh..." +curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/citus_setup.sh +chmod +x citus_setup.sh + +# Step 10: Create sample-data directory and download SQL file +log "Creating sample-data directory and downloading sampleData.sql..." +mkdir -p sample-data/user && \ +curl -L https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/sample-data/mac-linux/user/sampleData.sql -o sample-data/user/sampleData.sql +log "Sample-data directory created and sampleData.sql downloaded." + +# Step 11: Download additional scripts to add data +log "Downloading sample data scripts..." +curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/docker-compose-up.js +curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/docker-compose-down.js +curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/insert_sample_solution.js +log "sample data scripts downloaded." + +# Step 13 : Run sample data insert script +# log "Running sample data insertion..." +# node insert_sample_solution.js +# log "Sample data inserted." + +# Step 13: Run docker-compose-up.sh script +log "Running docker-compose-up.sh script..." +./docker-compose-up.sh +log "docker-compose-up.sh script executed." diff --git a/documentation/3.4.0/native/envs/entity_management_env b/documentation/3.4.0/native/envs/entity_management_env new file mode 100644 index 00000000..60d2cb5e --- /dev/null +++ b/documentation/3.4.0/native/envs/entity_management_env @@ -0,0 +1,27 @@ +# Entity service configurations file +APPLICATION_PORT = 5001 +APPLICATION_ENV ="development" +APPLICATION_BASE_URL='/entity-management/' +INTERNAL_ACCESS_TOKEN ="internal_access_token" +ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 +# DB +MONGODB_URL=mongodb://localhost:27017/elevate-entity +AUTH_METHOD = native +# USER_SERVICE +USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +USER_SERVICE_BASE_URL=/user +KAFKA_HEALTH_CHECK_TOPIC=test +#service name +SERVICE_NAME = elevate-entity-service +API_DOC_URL="https://project-dev.elevate-apis.shikshalokam.org/entity-management/api-doc" +APPLICATION_HOST=localhost +IS_AUTH_TOKEN_BEARER="false" +ADMIN_ACCESS_TOKEN=rwwee3$123 +ADMIN_TOKEN_HEADER_NAME="admin-auth-token" +INTERFACE_SERVICE_URL="https://saas-qa.tekdinext.com" +KAFKA_HEALTH_CHECK_TOPIC = entity-health-check-topic-check +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_URL = kafka:9092 +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_GROUP_ID = entity +HEALTH_CHECK_DEBUG_MODE = true \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/enviroment.ts b/documentation/3.4.0/native/envs/enviroment.ts new file mode 100644 index 00000000..75db90a7 --- /dev/null +++ b/documentation/3.4.0/native/envs/enviroment.ts @@ -0,0 +1,7 @@ +export const environment = { + production: true, + baseURL: 'http://localhost:3569', + projectsBaseURL: null, + surveyBaseURL: null, + capabilities: 'project', +} diff --git a/documentation/3.4.0/native/envs/interface_env b/documentation/3.4.0/native/envs/interface_env new file mode 100644 index 00000000..768d6ac6 --- /dev/null +++ b/documentation/3.4.0/native/envs/interface_env @@ -0,0 +1,17 @@ +API_DOC_URL= /interface/api-doc +APPLICATION_ENV= development +APPLICATION_PORT= 3569 +ENTITY_SERVICE_BASE_URL= http://localhost:5001 +INSTALLED_PACKAGES= elevate-user elevate-scheduler elevate-project elevate-entity-management +NOTIFICATION_SERVICE_BASE_URL= http://localhost:3002 +PROJECT_SERVICE_BASE_URL= http://localhost:5000 +RATE_LIMITER_ENABLED= false +RATE_LIMITER_GENERAL_LIMIT= 50 +RATE_LIMITER_NUMBER_OF_PROXIES= 3 +RATE_LIMITER_PUBLIC_LOW_LIMIT= 5 +REQUIRED_BASE_PACKAGES= user,notification,scheduler,project,entity-management +REQUIRED_PACKAGES="elevate-user@1.1.77 elevate-scheduler@1.0.4 elevate-project@1.1.16 elevate-entity-management@1.0.10" +ROUTE_CONFIG_JSON_URLS_PATHS="https://raw.githubusercontent.com/ELEVATE-Project/user/staging/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/scheduler/develop/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/entity-management/main/src/constants/interface-routes/configs.json" +SCHEDULER_SERVICE_BASE_URL= http://localhost:4000 +SUPPORTED_HTTP_TYPES= GET POST PUT PATCH DELETE +USER_SERVICE_BASE_URL= http://localhost:3001 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/non-citus/notification_env b/documentation/3.4.0/native/envs/non-citus/notification_env new file mode 100644 index 00000000..419184a2 --- /dev/null +++ b/documentation/3.4.0/native/envs/non-citus/notification_env @@ -0,0 +1,14 @@ +API_DOC_URL=/api-doc +APPLICATION_BASE_URL=/notification/ +APPLICATION_ENV=development +APPLICATION_PORT=3002 +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/notification +DISABLE_LOG=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +INTERNAL_ACCESS_TOKEN=internal_access_token +KAFKA_GROUP_ID=notification +KAFKA_HOST=kafka:9092 +KAFKA_TOPIC=develop.notifications +SENDGRID_API_KEY=SG.asd9f87a9s8d7f. +SENDGRID_FROM_MAIL=no-reply@some.org \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/non-citus/user_env b/documentation/3.4.0/native/envs/non-citus/user_env new file mode 100644 index 00000000..e9bc7827 --- /dev/null +++ b/documentation/3.4.0/native/envs/non-citus/user_env @@ -0,0 +1,74 @@ +ACCESS_TOKEN_EXPIRY=30m +ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 +ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE=test +ADMIN_SECRET_CODE=a98sd76fasdfasd +API_DOC_URL=/user/api-doc +APPLICATION_ENV=development +APPLICATION_HOST=localhost +APPLICATION_PORT=3001 +APP_NAME=ELEVATE-Project +AZURE_ACCOUNT_KEY=asd897gfa09sd87f09as8d +AZURE_ACCOUNT_NAME=mentoring +AWS_ACCESS_KEY_ID=adsfg98a7sdfg +AWS_BUCKET_ENDPOINT=s3.ap-south-1.amazonaws.com +AWS_BUCKET_REGION=ap-south-1 +AWS_SECRET_ACCESS_KEY=asd9786fg9a8sd/asdfg9a8sd7fg +CAPTCHA_ENABLE=false +CHANGE_PASSWORD_TEMPLATE_CODE=change_password +CLEAR_INTERNAL_CACHE=userinternal +DEFAULT_ORGANISATION_CODE=default_code +DEFAULT_ORG_ID=1 +DEFAULT_ROLE=mentee +DEFAULT_QUEUE=test +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/users +DISABLE_LOG=false +EMAIL_ID_ENCRYPTION_ALGORITHM=aes-256-cbc +EMAIL_ID_ENCRYPTION_IV=c9c7bd480494409071847264652f5c95 +EMAIL_ID_ENCRYPTION_KEY=eef7e009626c18724be86afa41a2620e0718561a508c61f92d7ee0377177ef7b +ENABLE_EMAIL_OTP_VERIFICATION=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +EVENT_ENABLE_ORG_EVENTS=true +EVENT_ORG_LISTENER_URLS=http://localhost:3567/mentoring/v1/organization/eventListener +GCP_PATH=gcp.json +GCP_PROJECT_ID=sl-dev-project +INTERNAL_ACCESS_TOKEN=internal_access_token +INTERNAL_CACHE_EXP_TIME=86400 +INVITEE_EMAIL_TEMPLATE_CODE=test +IV=09sdf8g098sdf/Q== +KAFKA_GROUP_ID=projects +KAFKA_TOPIC= +KAFKA_URL=localhost:9092 +KEY=fasd98fg9a8sydg98a7usd89fg +MENTEE_INVITATION_EMAIL_TEMPLATE_CODE=test +MENTOR_INVITATION_EMAIL_TEMPLATE_CODE=test +MENTOR_REQUEST_ACCEPTED_EMAIL_TEMPLATE_CODE=mentor_request_accepted +MENTOR_REQUEST_REJECTED_EMAIL_TEMPLATE_CODE=mentor_request_rejected +MENTORING_SERVICE_URL=http://mentoring:3000 +NOTIFICATION_KAFKA_TOPIC=develop.notifications +ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE=invite_org_admin +OTP_EMAIL_TEMPLATE_CODE=emailotp +OTP_EXP_TIME=86400 +PORTAL_URL=https://mentored.some.org/auth/login +RECAPTCHA_SECRET_KEY=temporary_recaptcha_secret_key +REFRESH_TOKEN_EXPIRY=7 +REFRESH_TOKEN_SECRET=as9d87fa9s87df98as7d9f87a9sd87f98as7dg987asf +REFRESH_VIEW_INTERVAL=540000 +REDIS_HOST=http://localhost:6379 +REGISTRATION_EMAIL_TEMPLATE_CODE=registration +REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp +SAMPLE_CSV_FILE_PATH=sample/bulk_user_creation.csv +SCHEDULER_SERVICE_BASE_URL= /scheduler/ +SCHEDULER_SERVICE_ERROR_REPORTING_EMAIL_ID=rakesh.k@some.com +SCHEDULER_SERVICE_HOST=http://localhost:4000 +SCHEDULER_SERVICE_URL=http://localhost:4000/jobs/scheduleJob +ALLOWED_HOST=http://localhost:8100 +CLOUD_STORAGE=GCP +CLOUD_STORAGE_ACCOUNTNAME=sl-mentoring-dev-storage@sl-dev-project.iam.gserviceaccount.com +CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private +CLOUD_STORAGE_BUCKET_TYPE=private +CLOUD_STORAGE_PROJECT=sl-dev-project +CLOUD_STORAGE_PROVIDER=gcloud +CLOUD_STORAGE_SECRET=qwrthgafyadady +APPLICATION_BASE_URL='/user' +PUBLIC_ASSET_BUCKETNAME=check \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/notification_env b/documentation/3.4.0/native/envs/notification_env new file mode 100644 index 00000000..ce2f2d64 --- /dev/null +++ b/documentation/3.4.0/native/envs/notification_env @@ -0,0 +1,14 @@ +API_DOC_URL=/api-doc +APPLICATION_BASE_URL=/notification/ +APPLICATION_ENV=development +APPLICATION_PORT=3002 +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/notification +DISABLE_LOG=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +INTERNAL_ACCESS_TOKEN=qwertyhdgffs +KAFKA_GROUP_ID=notification +KAFKA_HOST=localhost:9092 +KAFKA_TOPIC=develop.notifications +SENDGRID_API_KEY=SG.asd9f87a9s8d7f. +SENDGRID_FROM_MAIL=no-reply@some.org \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/project_env b/documentation/3.4.0/native/envs/project_env new file mode 100644 index 00000000..14192224 --- /dev/null +++ b/documentation/3.4.0/native/envs/project_env @@ -0,0 +1,72 @@ +APPLICATION_PORT = 6000 +APPLICATION_ENV = development +ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 + +INTERNAL_ACCESS_TOKEN =internal_access_token +# Docker--------- +MONGODB_URL = mongodb://localhost:27017/elevate-project + +# ML Core Service +ML_CORE_SERVICE_URL = http://localhost:4000 +# ML Survey Service +# SURVEY_SERVICE_URL = https://saas-qa.tekdinext.com/survey +# OFFLINE VALIDATION +KEYCLOAK_PUBLIC_KEY_PATH = keycloak-public-keys +# KAFKA Configurations +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_URL =localhost:9092 + +# KAFKA_URL=10.148.0.38:9092 +KAFKA_GROUP_ID = projects +# KAFKA_GROUP_ID=dev.projects +KAFKA_HEALTH_CHECK_TOPIC = project-health-check-topic-check +# SUBMISSION TOPIC +PROJECT_SUBMISSION_TOPIC=sl-improvement-project-submission-dev +SUBMISSION_TOPIC = Projectsubmissions +PROJECT_CERTIFICATE_TOPIC = generateProjectCertificate +ELEVATE_PROJECT_SERVICE_URL= 'http://localhost:6000' +SERVICE_NAME = project +USER_DELETE_TOPIC = deleteuser +TELEMETRY_TOPIC=telemetry.raw +ID = projectservice +TELEMETRY_ON_OFF=ON +USER_DELETE_ON_OFF=OFF +CLOUD_STORAGE=ON +TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC = +05:30 +VALIDATE_ENTITIES = ON +APP_PORTAL_BASE_URL = "https://dev.elevate.org" +NO_OF_MINUTES = 30 +NO_OF_EXPIRY_TIME = 60 +# PRESIGNED_URL_EXPIRY_IN_SECONDS = 300 +# DOWNLOADABLE_URL_EXPIRY_IN_SECONDS = 300 +DEFAULT_ORGANISATION_CODE = 1 +# GOTENBERG_URL=http://localhost:3000 + +GOTENBERG_URL=http://gotenberg:3000 + +CERTIFICATE_SERVICE_URL = http://localhost:8081 +API_DOC_URL = "https://project-dev.elevate-apis.shikshalokam.org/project/api-doc" +#INTERFACE SERVICE URL +INTERFACE_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +# INTERFACE_SERVICE_URLL = "http://localhost:5001" +USER_SERVICE_BASE_URL = "/user" +ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" +SURVEY_SERVICE_URL = http://localhost:4301/survey +#GCP Cloud Configuration +CLOUD_STORAGE_PROVIDER=gcloud +CLOUD_STORAGE_ACCOUNTNAME=sl-mentoring-dev-storage@sl-dev-project.iam.gserviceaccount.com +CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDHwatCbtxcfqvt\n7rWWdgOsyQwH1/WGMJ2zTfQydZpRf2JGi6DaqbF85SEaoVnAKaN+33na2Vu5Kgep\n0wnZywCHCnz0W0Geo/4I4KUmzpm4gtG+ncuUhOd9bibx8M+yYhzWOijcPqaxTdpc\nWuenzqRmyNOHbYh4vz9cITrPnP95yPEl3o9gk+e4tD5MHwZTHw9/XKCp27Z/y9D2\nNzotaTjHNPZIxzxNkLzEC3PgYiGTiXBDdj5uag+Y5oV0+ydEZULyiqmr/IgWUZFL\nPsWnlraBgRDCJ/VsQOfU9EomyEapQdR1eBXYETqtMCFIT+lvbZherj0UQ7oRLAlZ\nqnKhnDchAgMBAAECggEADSJBtWN+n6JAgathSxxFT5YEcXuUjBckN0bX2H19AQDE\nIGlL0TS5E8Io9AxJz2Wtd0kQRQBnlHwb9uGGU0iSp05cOuDJJroXmNPUaAHLf6My\nUTskyIYYhlm4u82eilcDGF7IkvqXkS7SPaJIevMOQifQKKZeA7pnWxJgQIhND9+1\nls0OFQ77llh8pXiuAJ9fZbf7oLomKXUxlvfBFSj8NEiqzK7Vk+XCJVvuvUdsLSi6\nR8fputYgaoLJSDaGc/AFNlcec3gneok7zak4TyPQzSV3rwdMajbLEtBwwhsUVuFf\n5K6JHrYY3jYaOd0wqcu1v+WJw5LDexdawk1keD+08QKBgQDxMoAGNZQLxyuGPOnS\nYClPDJMZiSR+8oTaQyI0xvgQ8V7z741dEDNrbmYh2AKgDSec4zDfWga+xl2VSwsD\ndA42+HiD8Tji29iqT9aIJnhYWdk+DXwk/ySjLvUVY4dRGLI4kDwWjb5RAO4M5UEl\n1MeWhfMbgYLL/1gY4gX5BBQBXQKBgQDUBBW0lx9tXGjBr7c5dM8iO5J+O8K/zbds\nzE+oAwtN5saOtv9lhgDuhyFN67pCGW3M7fQgec9tigrDMKmy6ARHbORLes1zhSsd\nHH9aTA6/DkVzBnsDA3dT0klgOAFN2eP8QYhpNGN0My5jhhXNd5L2pDHpuIHkZPP4\ncuFxncJclQKBgHL2VAkhnnfirb8k53nrdaUE5FQmhuuvIl155CLtty00LsLsKh/y\nad/J1gpJkC7DNl9T9mZu3YouuEpBY3V46pGO6rpQzoFqsiGzPhjU5UWPRbmK6eIk\nbk0NQ6m3L7cao0/Mh6dkVhL783rYBq5Gdf8rx00T9MjQ4yexC5G+PN7NAoGAeWsN\ncyrI2Lx/UczrxX/bz+MF9j0LPwT08t3fEH0N0ENFmx26Dc48Yl4I+LLzLD+b3iy4\nDpEz9auEllwcE1VEfhMieweM+YdeNYHIfVHpcAkgRMuFTyiBAgP/+ZaZSJhsNF7j\nXDygaD+XZW+4tL6x74YA/7SmzsHx5msEKSkL0jECgYAOldGF28ujJHVA8kksXBkP\nlqIPki9Mg7qRHZBRFkmjskmEUFJTJP8TSWuo2c+J9idx6fxgXKmiXa5lH5ewQbXu\nQYbqpNsF167AjHEwxKS4qeU2u+fyw3VxB03gpNqEzolIIaGItAIfzyQ5KiN2thSl\nnhHTJ/psHBlZoENzsgvIUA==\n-----END PRIVATE KEY-----\n" +CLOUD_STORAGE_PROJECT =sl-dev-project +CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private +CLOUD_STORAGE_BUCKET_TYPE=private +ADMIN_ACCESS_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_AUTH_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_TOKEN_HEADER_NAME = 'admin-auth-token' +IS_AUTH_TOKEN_BEARER = false +AUTH_METHOD = native +REDIS_HOST=redis://127.0.0.1:6379 +# PUBLIC_ASSET_BUCKETNAME=mentoring-dev-storage-public + + +USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +RESOURCE_DELETION_TOPIC=RESOURCE_DELETION_TOPIC diff --git a/documentation/3.4.0/native/envs/scheduler_env b/documentation/3.4.0/native/envs/scheduler_env new file mode 100644 index 00000000..ee239875 --- /dev/null +++ b/documentation/3.4.0/native/envs/scheduler_env @@ -0,0 +1,12 @@ +API_DOC_URL=/api-doc +APPLICATION_BASE_URL=/scheduler/ +APPLICATION_ENV=development +APPLICATION_PORT=4000 +DEFAULT_QUEUE=email +DISABLE_LOG=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +KAFKA_URL=localhost:9092 +NOTIFICATION_KAFKA_TOPIC=develop.notifications +REDIS_HOST=localhost +REDIS_PORT=6379 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env b/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env new file mode 100644 index 00000000..b9b1fb02 --- /dev/null +++ b/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env @@ -0,0 +1,48 @@ +AUTH_API_TOKEN=your_auth_api_token_here +AWS_ACCESS_KEY_ID=your_aws_access_key_id +AWS_ACCESS_SECRET_KEY=your_aws_secret_access_key +AWS_BUCKET_NAME=your_s3_bucket_name +AWS_REGION=your_aws_region +BASE_URL=https://your-middleware-url.com +NEXT_API_BASE_URL=https://your-api-base-url.com +NEXT_PRIVATE_LOCAL_WEBPACK=true +NEXT_PUBLIC_AUTH=Bearer your_public_auth_token +NEXT_PUBLIC_BASE_URL=https://your-elevate-apis-url.com +NEXT_PUBLIC_BASE_URL_ENTITY=https://your-entity-management-url.com +NEXT_PUBLIC_BASE_URL_READ=https://your-read-service-url.com +NEXT_PUBLIC_BASE_URL_SCHEMA=https://your-schema-service-url.com +NEXT_PUBLIC_CHANNEL_ID=your_channel_id +NEXT_PUBLIC_CLIENT_ID=your_client_id +NEXT_PUBLIC_CLIENT_SECRET=your_client_secret +NEXT_PUBLIC_CLOUD_STORAGE_URL=https://your-s3-bucket-url.amazonaws.com/ +NEXT_PUBLIC_CONTENT=http://localhost:8000/your-app/content +NEXT_PUBLIC_CONTENT_FRAMEWORK_ID=your_content_framework_id +NEXT_PUBLIC_DELETE_USER=/api/user/v1/block +NEXT_PUBLIC_FORGOT_PASSWORD=https://your-domain.com/recover/identify/account +NEXT_PUBLIC_FRAMEWORK_ID=your_framework_id +NEXT_PUBLIC_GENRATE_OTP=/api/otp/v2/generate +NEXT_PUBLIC_GRANT_TYPE=password +NEXT_PUBLIC_LOCATION_SEARCH=/api/data/v1/location/search +NEXT_PUBLIC_LOGINPAGE=https://your-login-page-url.com/ +NEXT_PUBLIC_LOGIN_PATH=/auth/realms/sunbird/protocol/openid-connect/token +NEXT_PUBLIC_NEW_REGISTRATION=/interface/v1/account/create +NEXT_PUBLIC_ORGID=1 +NEXT_PUBLIC_PROGRAM_BASE_URL=https://your-program-base-url.com +NEXT_PUBLIC_PWA=http://localhost:8000/your-app/pwa +NEXT_PUBLIC_READ_USER=/api/user/v1/search +NEXT_PUBLIC_REGISTRATION=http://localhost:8000/your-app/registration/newUser +NEXT_PUBLIC_SEARCH_LOCATION=/interface/v1/user/locations/search +NEXT_PUBLIC_SEND_OTP=/api/otp/v1/generate +NEXT_PUBLIC_SHIKSHAGRAHA_BASEPATH=/your-app-basepath +NEXT_PUBLIC_SSUNBIRD_BASE_URL=https://your-sunbird-interface-url.com/interface/v1 +NEXT_PUBLIC_SSUNBIRD_HIERARCHY_PATH=/api/course/v1/ +NEXT_PUBLIC_TELEMETRY_URL=https://your-telemetry-url.com/telemetry +NEXT_PUBLIC_TENANT_ID=your_tenant_id_uuid +NEXT_PUBLIC_TRACKING_BASE_URL=https://your-tracking-url.com/tracking +NEXT_PUBLIC_UPDATE_USER=/api/framework/v1/update +NEXT_PUBLIC_VERIFT_OTP=/api/otp/v2/verify +NEXT_PUBLIC_VERIFY_OTP=/api/otp/v1/verify +created_time=2025-06-18T08:50:04.71092372Z +custom_metadata=null +destroyed=false +version=5 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/entity_management_env b/documentation/3.4.0/native/envs/stand-alone/entity_management_env new file mode 100644 index 00000000..4b1c2eb5 --- /dev/null +++ b/documentation/3.4.0/native/envs/stand-alone/entity_management_env @@ -0,0 +1,21 @@ +ACCESS_TOKEN_EXPIRY=1440m +ACCESS_TOKEN_SECRET=hsghasghj617237yuhdhhdqwu27hjadfhjghjadghhgfyrgjkhrhhl1 +API_DOC_URL=/entity-management/api-doc +APPLICATION_BASE_URL=/entity-management/ +APPLICATION_ENV=development +APPLICATION_HOST=localhost +APPLICATION_PORT=5001 +INTERNAL_ACCESS_TOKEN=qwertyhdgffs +MONGODB_URL=mongodb://localhost:27017/elevate-entity +IS_AUTH_TOKEN_BEARER=false +KAFKA_COMMUNICATIONS_ON_OFF=ON +KAFKA_GROUP_ID=entity +KAFKA_HEALTH_CHECK_TOPIC=entity-health-check-topic-check +KAFKA_URL=10.148.0.38:9092 +SERVICE_NAME=EntityManagementService +USER_SERVICE_BASE_URL=/user +USER_SERVICE_URL=http://localhost:3567 +ADMIN_ACCESS_TOKEN=aADMINTOKEN +ADMIN_TOKEN_HEADER_NAME=admin-auth-token +INTERFACE_SERVICE_URL=http://localhost:3567 +AUTH_METHOD=native diff --git a/documentation/3.4.0/native/envs/stand-alone/interface_env b/documentation/3.4.0/native/envs/stand-alone/interface_env new file mode 100644 index 00000000..5f12ea5a --- /dev/null +++ b/documentation/3.4.0/native/envs/stand-alone/interface_env @@ -0,0 +1,17 @@ +API_DOC_URL= /interface/api-doc +APPLICATION_ENV= development +APPLICATION_PORT= 3569 +ENTITY_SERVICE_BASE_URL= http://localhost:5001 +INSTALLED_PACKAGES=elevate-project elevate-self-creation-portal elevate-survey-observation +NOTIFICATION_SERVICE_BASE_URL= http://localhost:3002 +PROJECT_SERVICE_BASE_URL= http://localhost:5000 +RATE_LIMITER_ENABLED= false +RATE_LIMITER_GENERAL_LIMIT= 50 +RATE_LIMITER_NUMBER_OF_PROXIES= 3 +RATE_LIMITER_PUBLIC_LOW_LIMIT= 5 +REQUIRED_BASE_PACKAGES= project,self-creation-portal,survey +REQUIRED_PACKAGES=elevate-project@1.1.34 elevate-self-creation-portal@1.0.64 elevate-survey-observation@1.0.3 +ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/survey-project-creation-service/story-1085-publish/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/samiksha-service/refs/heads/develop/constants/interface-routes/elevate-survey-observation/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/develop/constants/interface-routes/elevate-project/configs.json +SCHEDULER_SERVICE_BASE_URL= http://localhost:4000 +SUPPORTED_HTTP_TYPES= GET POST PUT PATCH DELETE +USER_SERVICE_BASE_URL= http://localhost:3001 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/notification_env b/documentation/3.4.0/native/envs/stand-alone/notification_env new file mode 100644 index 00000000..ce2f2d64 --- /dev/null +++ b/documentation/3.4.0/native/envs/stand-alone/notification_env @@ -0,0 +1,14 @@ +API_DOC_URL=/api-doc +APPLICATION_BASE_URL=/notification/ +APPLICATION_ENV=development +APPLICATION_PORT=3002 +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/notification +DISABLE_LOG=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +INTERNAL_ACCESS_TOKEN=qwertyhdgffs +KAFKA_GROUP_ID=notification +KAFKA_HOST=localhost:9092 +KAFKA_TOPIC=develop.notifications +SENDGRID_API_KEY=SG.asd9f87a9s8d7f. +SENDGRID_FROM_MAIL=no-reply@some.org \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/observation_portal_env b/documentation/3.4.0/native/envs/stand-alone/observation_portal_env new file mode 100644 index 00000000..84430043 --- /dev/null +++ b/documentation/3.4.0/native/envs/stand-alone/observation_portal_env @@ -0,0 +1,5 @@ +window["env"] = { + production: true, + surveyBaseURL: '', + hostPath: '/observations/', +}; \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env b/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env new file mode 100644 index 00000000..ccd660b0 --- /dev/null +++ b/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env @@ -0,0 +1,17 @@ +window["env"] = { + production: true, + baseURL: '', + capabilities: 'all', + restrictedPages: ['DOWNLOADS','AUTH_PAGES','PROFILE','EDIT_PROFILE'], + unauthorizedRedirectUrl: "/", + isAuthBypassed: true, + profileRedirectPath: "", + showHeader: true, + config:{ + logoPath:'assets/images/logo.png', + faviconPath:'assets/icons/elevate-logo.png', + title:"Elevate", + redirectUrl:"/home" + }, + hostPath:'/ml/' + }; \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/project_env b/documentation/3.4.0/native/envs/stand-alone/project_env new file mode 100644 index 00000000..b30cf93a --- /dev/null +++ b/documentation/3.4.0/native/envs/stand-alone/project_env @@ -0,0 +1,57 @@ + ACCESS_TOKEN_EXPIRY=1440h + ACCESS_TOKEN_SECRET=hsghasghj617237yuhdhhdqwu27hjadfhjghjadghhgfyrgjkhrhhl1 + ADMIN_ACCESS_TOKEN=ADMINTOKEN + ADMIN_AUTH_TOKEN=ADMINAUTHTOKEN + ADMIN_TOKEN_HEADER_NAME=admin-auth-token + API_DOC_URL=/project/api-doc + APPLICATION_BASE_URL=/project/ + APPLICATION_ENV=development + APPLICATION_HOST=localhost + APPLICATION_PORT=5003 + APP_PORTAL_BASE_URL=https://localhost:8100 + AUTH_CONFIG_FILE_PATH=config.json + AUTH_METHOD=native + CLOUD_STORAGE=GCP + CLOUD_STORAGE_ACCOUNTNAME=sl-mentoring-dev-storage@sl-dev-project.iam.gserviceaccount.com + CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private + CLOUD_STORAGE_BUCKET_TYPE=private + CLOUD_STORAGE_PROJECT=sl-dev-project + CLOUD_STORAGE_PROVIDER=gcloud + CLOUD_STORAGE_SECRET=-----BEGIN PRIVATE KEY-----\nMIIEvAIBADA****ZoENzsgvIUA==\n-----END PRIVATE KEY-----\n + DEFAULT_ORGANISATION_CODE=default_code + DOWNLOADABLE_URL_EXPIRY_IN_SECONDS=300 + ELEVATE_PROJECT_SERVICE_URL=http://localhost:5000 + ENABLE_REFLECTION=false + ENTITY_BASE_URL=http://localhost:3567 + ENTITY_MANAGEMENT_SERVICE_BASE_URL=/entity-management + ENTITY_MONGODB_URL=mongodb://localhost:27017/elevate-entity + GOTENBERG_URL=http://localhost:3000 + INTERFACE_SERVICE_URL=http://localhost:3567 + INTERNAL_ACCESS_TOKEN=qwertyhdgffs + IS_AUTH_TOKEN_BEARER=false + KAFKA_COMMUNICATIONS_ON_OFF=ON + KAFKA_GROUP_ID=projects + KAFKA_HEALTH_CHECK_TOPIC=project-health-check-topic-check + KAFKA_URL=localhost:9092 + MONGODB_URL=mongodb://localhost:27017/elevate-project + ORGANIZATION_EXTENSION_TOPIC=elevate_project_org_extension_event_listener + ORG_ID_HEADER_NAME=Org-id + ORG_UPDATES_TOPIC=organizationEvent + PRESIGNED_URL_EXPIRY_IN_SECONDS=300 + PROGRAM_USER_MAPPING_TOPIC=program + PROJECT_SUBMISSION_TOPIC=elevate.improvement.project.submission + SERVICE_NAME=project + SOURCE_MONGODB_URL=mongodb://localhost:27017/elevate-project + SUBMISSION_LEVEL=USER + SUBMISSION_TOPIC=elevate_project_task_submissions + SURVEY_MONGODB_URL=mongodb://localhost:27017/elevate-samiksha + SURVEY_SERVICE_URL=http://localhost:3567/survey + TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC=+05:30 + USER_ACCOUNT_EVENT_TOPIC=userCreate + USER_ACTIVITY_TOPIC=user-activities + USER_COURSES_SUBMISSION_TOPIC=elevate_user_courses + USER_COURSES_TOPIC=elevate_user_courses_raw + USER_DELETE_ON_OFF=ON + USER_DELETE_TOPIC=userCreate + USER_SERVICE_BASE_URL=/user + VALIDATE_ENTITIES=ON diff --git a/documentation/3.4.0/native/envs/stand-alone/scheduler_env b/documentation/3.4.0/native/envs/stand-alone/scheduler_env new file mode 100644 index 00000000..ee239875 --- /dev/null +++ b/documentation/3.4.0/native/envs/stand-alone/scheduler_env @@ -0,0 +1,12 @@ +API_DOC_URL=/api-doc +APPLICATION_BASE_URL=/scheduler/ +APPLICATION_ENV=development +APPLICATION_PORT=4000 +DEFAULT_QUEUE=email +DISABLE_LOG=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +KAFKA_URL=localhost:9092 +NOTIFICATION_KAFKA_TOPIC=develop.notifications +REDIS_HOST=localhost +REDIS_PORT=6379 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/user_env b/documentation/3.4.0/native/envs/stand-alone/user_env new file mode 100644 index 00000000..6cc1e05d --- /dev/null +++ b/documentation/3.4.0/native/envs/stand-alone/user_env @@ -0,0 +1,83 @@ +ACCESS_TOKEN_EXPIRY=30m +ACCESS_TOKEN_SECRET=hsghasghj617237yuhdhhdqwu27hjadfhjghjadghhgfyrgjkhrhhl1 +ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE=test +ADMIN_SECRET_CODE=a98sd76fasdfasd +API_DOC_URL=/user/api-doc +APPLICATION_ENV=development +APPLICATION_HOST=localhost +APPLICATION_PORT=3001 +APPLICATION_BASE_URL=/user +APP_NAME=ELEVATE-Project +AZURE_ACCOUNT_KEY=asd897gfa09sd87f09as8d +AZURE_ACCOUNT_NAME=mentoring +AWS_ACCESS_KEY_ID=adsfg98a7sdfg +AWS_BUCKET_ENDPOINT=s3.ap-south-1.amazonaws.com +AWS_BUCKET_REGION=ap-south-1 +AWS_SECRET_ACCESS_KEY=asd9786fg9a8sd/asdfg9a8sd7fg +CAPTCHA_ENABLE=false +CHANGE_PASSWORD_TEMPLATE_CODE=change_password +CLEAR_INTERNAL_CACHE=userinternal +CLOUD_STORAGE=AWS +DEFAULT_AWS_BUCKET_NAME=mentoring-dev-storage +DEFAULT_AZURE_CONTAINER_NAME=mentoring-images +DEFAULT_GCP_BUCKET_NAME=mentoring-dev-storage +DEFAULT_OCI_BUCKET_NAME=dev-mentoring +DEFAULT_ORGANISATION_CODE=default_code +DEFAULT_ORG_ID=1 +DEFAULT_ROLE=mentee +DEFAULT_QUEUE=test +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/users +DISABLE_LOG=false +EMAIL_ID_ENCRYPTION_ALGORITHM=aes-256-cbc +EMAIL_ID_ENCRYPTION_IV=c9c7bd480494409071847264652f5c95 +EMAIL_ID_ENCRYPTION_KEY=eef7e009626c18724be86afa41a2620e0718561a508c61f92d7ee0377177ef7b +ENABLE_EMAIL_OTP_VERIFICATION=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +EVENT_ENABLE_ORG_EVENTS=true +EVENT_ORG_LISTENER_URLS=http://localhost:3567/mentoring/v1/organization/eventListener +GCP_PATH=gcp.json +GCP_PROJECT_ID=sl-dev-project +INTERNAL_ACCESS_TOKEN=qwertyhdgffs +INTERNAL_CACHE_EXP_TIME=86400 +INVITEE_EMAIL_TEMPLATE_CODE=test +IV=09sdf8g098sdf/Q== +KAFKA_GROUP_ID=projects +KAFKA_TOPIC= +KAFKA_URL=localhost:9092 +KEY=fasd98fg9a8sydg98a7usd89fg +MENTEE_INVITATION_EMAIL_TEMPLATE_CODE=test +MENTOR_INVITATION_EMAIL_TEMPLATE_CODE=test +MENTOR_REQUEST_ACCEPTED_EMAIL_TEMPLATE_CODE=mentor_request_accepted +MENTOR_REQUEST_REJECTED_EMAIL_TEMPLATE_CODE=mentor_request_rejected +MENTORING_SERVICE_URL=http://mentoring:3000 +NOTIFICATION_KAFKA_TOPIC=develop.notifications +OCI_ACCESS_KEY_ID=asdgf6a0s98d76g9a8sasdasd7df987as98df +OCI_BUCKET_ENDPOINT=https://as98d7asdasdf.compat.objectstorage.ap-hyderabad-1.oraclecloud.com +OCI_BUCKET_REGION=ap-hyderabad-1 +OCI_SECRET_ACCESS_KEY=as09d7f8/as0d7f09as7d8f= +ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE=invite_org_admin +OTP_EMAIL_TEMPLATE_CODE=emailotp +OTP_EXP_TIME=86400 +PORTAL_URL=https://mentored.some.org/auth/login +RECAPTCHA_SECRET_KEY=temporary_recaptcha_secret_key +REFRESH_TOKEN_EXPIRY=7 +REFRESH_TOKEN_SECRET=as9d87fa9s87df98as7d9f87a9sd87f98as7dg987asf +REFRESH_VIEW_INTERVAL=540000 +REDIS_HOST=redis://localhost:6379 +REGISTRATION_EMAIL_TEMPLATE_CODE=registration +REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp +SAMPLE_CSV_FILE_PATH=sample/bulk_user_creation.csv +SCHEDULER_SERVICE_BASE_URL= /scheduler/ +SCHEDULER_SERVICE_ERROR_REPORTING_EMAIL_ID=rakesh.k@some.com +SCHEDULER_SERVICE_HOST=http://localhost:4000 +SCHEDULER_SERVICE_URL=http://localhost:4000/jobs/scheduleJob +ALLOWED_HOST=http://localhost:8100 +APPLICATION_BASE_URL=/user +CLOUD_STORAGE_ACCOUNTNAME=asdf +CLOUD_STORAGE_ACCOUNTNAME=asdf +CLOUD_STORAGE_PROVIDER=azure +CLOUD_STORAGE_SECRET=abcd +CLOUD_STORAGE_BUCKETNAME=abcd +CLOUD_STORAGE_BUCKET_TYPE=private +PUBLIC_ASSET_BUCKETNAME=abcd diff --git a/documentation/3.4.0/native/envs/user_env b/documentation/3.4.0/native/envs/user_env new file mode 100644 index 00000000..53681709 --- /dev/null +++ b/documentation/3.4.0/native/envs/user_env @@ -0,0 +1,79 @@ +ACCESS_TOKEN_EXPIRY='30m' +ACCESS_TOKEN_SECRET='bsj82AHBxahusub12yexlashsbxAXADHBlaj' +# ACCESS_TOKEN_SECRET ='hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271' +API_DOC_URL=/user/api-doc +APP_NAME=MentorED +APPLICATION_ENV=development +APPLICATION_PORT=3001 +CLEAR_INTERNAL_CACHE=userinternal +CLOUD_STORAGE=GCP +ENABLE_EMAIL_OTP_VERIFICATION=false +ENABLE_LOG=true +GCP_PATH=gcp.json +GCP_PROJECT_ID=GCP_PROJECT_ID +INTERNAL_ACCESS_TOKEN=internal_access_token +INTERNAL_CACHE_EXP_TIME=86400 +IV=LHYOA5YnTonqcgrm15k3/Q== +KAFKA_GROUP_ID=mentoring +KAFKA_TOPIC= +KAFKA_URL= localhost:9092 +KEY=E/m3RD/aM3Ed3lLfYVcKizakG9R+bFybAPZSLjIP2hY= +MENTOR_SECRET_CODE=4567 +MONGODB_URL=mongodb://localhost:27017/elevate-users +NOTIFICATION_KAFKA_TOPIC=dev.notifications +OTP_EMAIL_TEMPLATE_CODE=emailotp +OTP_EXP_TIME=86400 +RATING_KAFKA_TOPIC=dev.mentor_rating +REDIS_HOST=redis://localhost:6379 +REFRESH_TOKEN_EXPIRY=183 +REFRESH_TOKEN_SECRET=371hkjkjady2y3ihdkajshdkiq23iuekw71yekhaskdvkvegavy23t78veqwexqvxveit6ttxyeeytt62tx236vv +REGISTRATION_EMAIL_TEMPLATE_CODE=registration +REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp +SALT_ROUNDS=10 + +DEFAULT_OCI_BUCKET_NAME=mentoring-oci-private +OCI_ACCESS_KEY_ID= 81a4c2553026982360af6b24497c489b0fea9436 +OCI_BUCKET_ENDPOINT=https://axgqmpkrpmt5.compat.objectstorage.ap-hyderabad-1.oraclecloud.com +OCI_BUCKET_REGION= ap-hyderabad-1 +OCI_SECRET_ACCESS_KEY='+U4O+CjiC6M/mOcGjYh7K/9XjfSdJ79OoLuQrABPOJ8=' +ERROR_LOG_LEVEL= silly +DISABLE_LOG= false +DEFAULT_ORGANISATION_CODE=default_code + +#new +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/user +ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy + +MENTORING_SERVICE_URL="http://localhost:3000" +INVITEE_EMAIL_TEMPLATE_CODE="emailcode" +ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="coeadmin" +DEFAULT_QUEUE="defaultque" +MENTOR_INVITATION_EMAIL_TEMPLATE_CODE="mentorinvitationTemplateCode" +MENTEE_INVITATION_EMAIL_TEMPLATE_CODE="mentee invitationTemplateCode" +DEFAULT_ROLE="mentee" +SAMPLE_CSV_FILE_PATH="sample path" +ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE = "code5" +DEFAULT_ORG_ID = 1 +PORTAL_URL = "portaladdress" +# SCHEDULER_SERVICE_HOST = "host" + +SCHEDULER_SERVICE_HOST = scheduler + +SCHEDULER_SERVICE_BASE_URL = "/scheduler/" +REFRESH_VIEW_INTERVAL = 100000 +EMAIL_ID_ENCRYPTION_IV = 'a390328e496f025249a88384f318a536' +EMAIL_ID_ENCRYPTION_KEY = '9bbf4698e081176b4e38c3f04f9c0cff6ae80b1960e5ac868cc234ac8537aa66' +EMAIL_ID_ENCRYPTION_ALGORITHM = 'aes-256-cbc' +GENERIC_INVITATION_EMAIL_TEMPLATE_CODE = 'check_code' +EVENT_ORG_LISTENER_URLS = "sample url" +EVENT_ENABLE_ORG_EVENTS = false +# Downloadabale url exipres after +DOWNLOAD_URL_EXPIRATION_DURATION = 300 + +APPLICATION_HOST= "localhost" +CHANGE_PASSWORD_TEMPLATE_CODE = "change_password" +CAPTCHA_ENABLE = false +RECAPTCHA_SECRET_KEY= "6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" +ALLOWED_IDLE_TIME=1200000 +APPLICATION_BASE_URL="/user" +ENTITY_MANAGEMENT_SERVICE_BASE_URL="/" \ No newline at end of file diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh new file mode 100644 index 00000000..98ff5e8b --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh @@ -0,0 +1,139 @@ +#!/bin/bash + +# Define ANSI color codes for output formatting +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +# Function to check Node.js installation +check_nodejs() { + if command -v node > /dev/null 2>&1; then + echo -e "${GREEN}Node.js is installed. Version: $(node --version)${NC}" + else + echo -e "${RED}Node.js is not installed.${NC}" + fi +} + +# Function to check Apache Kafka and Zookeeper installation +check_kafka() { + if [ -d "/opt/kafka" ]; then + echo -e "${GREEN}Kafka directory exists.${NC}" + else + echo -e "${RED}Kafka directory does not exist.${NC}" + fi + + if systemctl is-active --quiet zookeeper; then + echo -e "${GREEN}Zookeeper service is running.${NC}" + else + echo -e "${RED}Zookeeper service is not running.${NC}" + fi + + if systemctl is-active --quiet kafka; then + echo -e "${GREEN}Kafka service is running.${NC}" + else + echo -e "${RED}Kafka service is not running.${NC}" + fi +} + +# Function to check Redis installation and service status +check_redis() { + if command -v redis-server > /dev/null 2>&1; then + echo -e "${GREEN}Redis server is installed. Version: $(redis-server --version)${NC}" + else + echo -e "${RED}Redis server is not installed.${NC}" + return + fi + + if systemctl status redis-server.service &> /dev/null; then + echo -e "${GREEN}Redis service is running.${NC}" + else + echo -e "${RED}Redis service is not running or inactive.${NC}" + fi +} + +# Function to check Citus installation +check_citus() { + if sudo su - postgres -c "psql -p 9700 -c 'SELECT citus_version();'" &> /dev/null; then + echo -e "${GREEN}Citus is running on port 9700.${NC}" + else + echo -e "${RED}Citus is not running or not installed.${NC}" + fi +} + +# Function to check PM2 installation +check_pm2() { + if command -v pm2 > /dev/null 2>&1; then + echo -e "${GREEN}PM2 is installed. Version: $(pm2 -v)${NC}" + else + echo -e "${RED}PM2 is not installed.${NC}" + fi +} + +# Function to check PostgreSQL installation and service +check_postgres() { + if command -v psql > /dev/null 2>&1; then + echo -e "${GREEN}PostgreSQL is installed. Version: $(psql --version)${NC}" + else + echo -e "${RED}PostgreSQL is not installed.${NC}" + fi + + if systemctl is-active --quiet postgresql; then + echo -e "${GREEN}PostgreSQL service is running.${NC}" + else + echo -e "${RED}PostgreSQL service is not running.${NC}" + fi +} + +# Function to check MongoDB installation and service +check_mongo() { + if command -v mongod > /dev/null 2>&1; then + echo -e "${GREEN}MongoDB is installed. Version: $(mongod --version | head -n 1)${NC}" + else + echo -e "${RED}MongoDB is not installed.${NC}" + return + fi + + if systemctl is-active --quiet mongod; then + echo -e "${GREEN}MongoDB service is running.${NC}" + else + echo -e "${RED}MongoDB service is not running.${NC}" + fi +} + +# Function to check if Redis BullMQ is installed (in Node.js context) +check_bullmq() { + if npm list -g | grep -q bullmq; then + echo -e "${GREEN}Redis BullMQ is installed globally.${NC}" + else + echo -e "${RED}Redis BullMQ is not installed globally.${NC}" + fi +} + +# Function to check Gotenberg installation and service status +check_gotenberg() { + if command -v docker > /dev/null 2>&1; then + echo -e "${GREEN}Docker is installed. Version: $(docker --version)${NC}" + else + echo -e "${RED}Docker is not installed.${NC}" + return + fi + + if docker ps | grep -q gotenberg; then + echo -e "${GREEN}Gotenberg Docker container is running.${NC}" + else + echo -e "${RED}Gotenberg Docker container is not running.${NC}" + fi +} + +# Main execution flow of the script +echo "ELEVATE-Project Dependencies Status" + +check_nodejs +check_kafka +check_redis +check_pm2 +check_postgres +check_citus +check_mongo +# check_bullmq +check_gotenberg diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/citus_setup.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/citus_setup.sh new file mode 100644 index 00000000..7bba4af4 --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/citus_setup.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +# Exit on error +set -e + +# Ensure correct number of arguments are provided +if [ $# -lt 2 ]; then + echo "Error: Folder name and database URL not provided. Usage: $0 " + exit 1 +fi + +# Use the provided folder name +FOLDER_NAME="$1" + +# Check if folder exists +if [ ! -d "$FOLDER_NAME" ]; then + echo "Error: Folder '$FOLDER_NAME' not found." + exit 1 +fi + +# Use the provided database URL +DEV_DATABASE_URL="$2" + +# Extract database credentials and connection details using awk for portability +DB_USER=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $4}') +DB_PASSWORD=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $5}') +DB_HOST=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $6}') +DB_PORT=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{split($7,a,"/"); print a[1]}') +DB_NAME=$(echo $DEV_DATABASE_URL | awk -F '/' '{print $NF}') + +# Log database variables +echo "Extracted Database Variables:" +echo "DB_USER: $DB_USER" +echo "DB_PASSWORD: $DB_PASSWORD" +echo "DB_HOST: $DB_HOST" +echo "DB_PORT: $DB_PORT" +echo "DB_NAME: $DB_NAME" + +# Wait for PostgreSQL to be ready to accept connections +echo "Waiting for PostgreSQL on '$DB_HOST:$DB_PORT' to accept connections..." +until pg_isready -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER"; do + echo "Waiting for database to be ready..." + sleep 1 +done +echo "Database is ready." + +# Function to check if the database exists +check_database() { + PGPASSWORD="$DB_PASSWORD" psql -h "$DB_HOST" -U "$DB_USER" -p "$DB_PORT" -lqt | cut -d \| -f 1 | grep -qw "$DB_NAME" +} + +echo "Checking existence of database '$DB_NAME'..." +until check_database; do + echo "Database '$DB_NAME' does not exist, waiting..." + sleep 5 +done +echo "Database '$DB_NAME' exists, proceeding with script." + +# Retrieve and prepare SQL file operations +DISTRIBUTION_COLUMNS_FILE="$FOLDER_NAME/distributionColumns.sql" +if [ ! -f "$DISTRIBUTION_COLUMNS_FILE" ]; then + echo "Error: distributionColumns.sql not found in folder '$FOLDER_NAME'." + exit 1 +fi + +echo "Creating Citus extension in the database..." +PGPASSWORD="$DB_PASSWORD" psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -p "$DB_PORT" -c 'CREATE EXTENSION IF NOT EXISTS citus;' + +# Function to check if table exists +check_table() { + local table=$1 + local exists=$(PGPASSWORD="$DB_PASSWORD" psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -p "$DB_PORT" -t -c "SELECT EXISTS(SELECT 1 FROM pg_tables WHERE schemaname = 'public' AND tablename = '$table');") + exists=$(echo "$exists" | tr -d '[:space:]') # Trim whitespace + echo "Debug: exists result for table $table = '$exists'" # Debug line + [[ "$exists" == "t" ]] # Checking specifically for 't' +} + +# Execute the SQL file with checks for table existence +echo "Creating distribution columns..." +while IFS= read -r line; do + if [[ $line =~ create_distributed_table\(\'([^\']+)\', ]]; then + table="${BASH_REMATCH[1]}" + echo "Checking existence of table '$table'..." + until check_table "$table"; do + echo "Table '$table' does not exist, waiting..." + sleep 1 + done + echo "Table '$table' exists, executing: $line" + PGPASSWORD="$DB_PASSWORD" psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -p "$DB_PORT" -c "$line" + fi +done <"$DISTRIBUTION_COLUMNS_FILE" + +echo "Citus extension setup complete." diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/common.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/common.js new file mode 100644 index 00000000..0e70fb2e --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/common.js @@ -0,0 +1,39 @@ +function getEndDate(date) { + let endDate = date.split(' ') + if (endDate[1] === '' || endDate[1] === undefined) { + date = endDate[0] + ' 23:59:59' + } + date = new Date(date) + date = addOffsetToDateTime(date, '+05:30') + console.log(date, 'this is date') + return date +} + +function addOffsetToDateTime(time, timeZoneDifference) { + //get the offset time from env with respect UTC + let localTimeZone = timeZoneDifference + //convert offset time to minutes + let localTime = localTimeZone.split(':') + let localHourDifference = Number(localTime[0]) + let getTimeDiffInMinutes = + localHourDifference * 60 + (localHourDifference / Math.abs(localHourDifference)) * Number(localTime[1]) + //get server offset time w.r.t. UTC time + let timeDifference = new Date().getTimezoneOffset() + //get actual time difference in minutes + let differenceWithLocal = timeDifference + getTimeDiffInMinutes + // if its 0 then return same time + if (differenceWithLocal === 0) { + return time + } else { + // set time difference + let getMinutes = differenceWithLocal % 60 + let getHours = (differenceWithLocal - getMinutes) / 60 + time.setHours(time.getHours() - getHours) + time.setMinutes(time.getMinutes() - getMinutes) + return time + } +} + +module.exports = { + getEndDate, +} diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh new file mode 100644 index 00000000..2ce07163 --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Run commands as the postgres user +sudo -u postgres psql -p 5432 -c "CREATE USER postgres WITH ENCRYPTED PASSWORD 'postgres';" + +# Create the user database and assign privileges +sudo -u postgres psql -p 5432 -c "CREATE DATABASE users;" +sudo -u postgres psql -p 5432 -d users -c "GRANT ALL PRIVILEGES ON DATABASE users TO postgres;" +sudo -u postgres psql -p 5432 -d users -c "GRANT ALL ON SCHEMA public TO postgres;" + +# Create the notification database and assign privileges +sudo -u postgres psql -p 5432 -c "CREATE DATABASE notification;" +sudo -u postgres psql -p 5432 -d notification -c "GRANT ALL PRIVILEGES ON DATABASE notification TO postgres;" +sudo -u postgres psql -p 5432 -d notification -c "GRANT ALL ON SCHEMA public TO postgres;" + +echo "Database setup complete." diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js new file mode 100644 index 00000000..0e5303ae --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -0,0 +1,409 @@ +const { ObjectId } = require('mongodb') + +let districtId = new ObjectId() +let blockId = new ObjectId() +let clusterId = new ObjectId() +let schoolId = new ObjectId() +let professionalId = new ObjectId() +let professionalSubRoleId = new ObjectId() + +let entityType = [ + { + _id: ObjectId('6825914b97b5680013e6a140'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'state', + toBeMappedToParentEntities: true, + tenantId: 'shikshalokam', + updatedAt: new Date('2025-05-15T07:01:31.680Z'), + createdAt: new Date('2025-05-15T07:01:31.680Z'), + __v: 0, + orgId: 'sl', + }, + { + _id: ObjectId('6825915197b5680013e6a142'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'district', + toBeMappedToParentEntities: true, + tenantId: 'shikshalokam', + updatedAt: new Date('2025-05-15T07:01:37.892Z'), + createdAt: new Date('2025-05-15T07:01:37.892Z'), + __v: 0, + orgId: 'sl', + }, + { + _id: ObjectId('682591cc97b5680013e6a15c'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'professional_role', + toBeMappedToParentEntities: true, + tenantId: 'shikshalokam', + updatedAt: new Date('2025-05-15T07:03:40.376Z'), + createdAt: new Date('2025-05-15T07:03:40.376Z'), + __v: 0, + orgId: 'sl', + }, + { + _id: ObjectId('682591d397b5680013e6a15e'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'professional_subroles', + toBeMappedToParentEntities: true, + tenantId: 'shikshalokam', + updatedAt: new Date('2025-05-15T07:03:47.062Z'), + createdAt: new Date('2025-05-15T07:03:47.062Z'), + __v: 0, + orgId: 'sl', + }, + // { + // _id: new ObjectId(), + // name: 'state', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['district', 'block', 'cluster', 'school'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'district', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['block', 'cluster', 'school'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'block', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['cluster', 'school'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'cluster', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['school'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'school', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: [], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'professional_role', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: ['professional_subroles'], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: new ObjectId(), + // name: 'professional_subroles', + // toBeMappedToParentEntities: true, + // immediateChildrenEntityType: [], + // isDeleted: false, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, +] + +let entities = [ + { + _id: ObjectId('6852c86c7248c20014b38a4d'), + metaInformation: { + targetedEntityTypes: [], + externalId: '16', + name: 'Tripura', + }, + childHierarchyPath: ['district', 'block', 'cluster', 'school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: ObjectId('6825914b97b5680013e6a140'), + entityType: 'state', + registryDetails: { + code: '16', + locationId: '16', + }, + tenantId: 'shikshalokam', + orgId: 'sl', + updatedAt: new Date('2025-06-18T14:29:00.266Z'), + createdAt: new Date('2025-06-18T14:08:44.438Z'), + __v: 0, + groups: { + district: [ObjectId('6852c8ae7248c20014b38a57')], + }, + }, + { + _id: ObjectId('6852c8ae7248c20014b38a57'), + metaInformation: { + targetedEntityTypes: [], + externalId: 'westTripura', + name: 'West Tripura', + }, + childHierarchyPath: ['block', 'cluster', 'school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: ObjectId('6825915197b5680013e6a142'), + entityType: 'district', + registryDetails: { + code: 'westTripura', + locationId: 'westTripura', + }, + tenantId: 'shikshalokam', + orgId: 'sl', + updatedAt: new Date('2025-06-18T14:27:43.218Z'), + createdAt: new Date('2025-06-18T14:09:50.337Z'), + __v: 0, + groups: { + block: [ + ObjectId('6852c8de7248c20014b38a9d'), + ObjectId('6852c8de7248c20014b38a9e'), + ObjectId('6852c8de7248c20014b38a9f'), + ObjectId('6852c8de7248c20014b38aa0'), + ObjectId('6852c8de7248c20014b38aa1'), + ObjectId('6852c8de7248c20014b38aa2'), + ObjectId('6852c8de7248c20014b38aa3'), + ObjectId('6852c8de7248c20014b38aa4'), + ObjectId('6852c8de7248c20014b38aa5'), + ObjectId('6852c8de7248c20014b38aa6'), + ObjectId('6852c8de7248c20014b38aa7'), + ObjectId('6852c8de7248c20014b38aa8'), + ], + }, + }, + { + _id: ObjectId('68876746b19aea00144c2af9'), + metaInformation: { + targetedEntityTypes: [ + { + entityTypeId: '6825915197b5680013e6a142', + entityType: 'district', + }, + ], + externalId: 'Facilitator', + name: 'Facilitator', + }, + childHierarchyPath: ['professional_role', 'professional_subroles'], + createdBy: '1', + updatedBy: '1', + deleted: false, + entityTypeId: ObjectId('682591cc97b5680013e6a15c'), + entityType: 'professional_role', + registryDetails: { + locationId: 'Facilitator', + code: 'Facilitator', + }, + userId: '1', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-07-28T12:08:56.065Z'), + createdAt: new Date('2025-07-28T12:04:22.011Z'), + __v: 0, + groups: { + professional_subroles: [ObjectId('688767deb19aea00144c2b08')], + }, + }, + { + _id: ObjectId('688767deb19aea00144c2b08'), + metaInformation: { + targetedEntityTypes: [ + { + entityType: 'Handbook1_Activity', + entityTypeId: '688762feb19aea00144c2a81', + }, + { + entityType: 'Handbook2_Activity', + entityTypeId: '68887766b19aea00144c3631', + }, + ], + externalId: 'facilitator', + name: 'Facilitator', + }, + childHierarchyPath: ['professional_subroles'], + createdBy: '1', + updatedBy: '1', + deleted: false, + entityTypeId: ObjectId('682591d397b5680013e6a15e'), + entityType: 'professional_subroles', + registryDetails: { + locationId: 'facilitator', + code: 'facilitator', + }, + userId: '1', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-07-29T07:28:05.355Z'), + createdAt: new Date('2025-07-28T12:06:54.072Z'), + __v: 0, + }, + // { + // _id: new ObjectId(), + // name: 'Karnataka', + // entityType: 'state', + // entityTypeId: entityType[0]._id, + // userId: '1', + // metaInformation: { + // externalId: 'KR001', + // name: 'Karnataka', + // }, + // childHierarchyPath: ['district', 'block', 'cluster', 'school'], + // groups: { + // district: [districtId], + // block: [blockId], + // cluster: [clusterId], + // school: [schoolId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: districtId, + // name: 'Bangalore', + // entityType: 'district', + // entityTypeId: entityType[1]._id, + // userId: '1', + // metaInformation: { + // externalId: 'BN001', + // name: 'Bangalore', + // }, + // childHierarchyPath: ['block', 'cluster', 'school'], + // groups: { + // block: [blockId], + // cluster: [clusterId], + // school: [schoolId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + + // { + // _id: blockId, + // entityType: 'block', + // entityTypeId: entityType[2]._id, + // userId: '1', + // metaInformation: { + // externalId: 'BU', + // name: 'Bangalore Urban', + // }, + // childHierarchyPath: ['cluster', 'school'], + // groups: { + // cluster: [clusterId], + // school: [schoolId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: clusterId, + // entityType: 'district', + // entityTypeId: entityType[3]._id, + // userId: '1', + // metaInformation: { + // externalId: 'JPN', + // name: 'JP Nagar', + // }, + // childHierarchyPath: ['school'], + // groups: { + // school: [schoolId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: schoolId, + // entityType: 'school', + // entityTypeId: entityType[4]._id, + // userId: '1', + // metaInformation: { + // externalId: 'GS01', + // name: 'Govt School', + // }, + // childHierarchyPath: [], + // groups: {}, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: professionalId, + // entityType: 'professional_role', + // entityTypeId: entityType[5]._id, + // userId: '1', + // metaInformation: { + // externalId: 'STD', + // name: 'student', + // }, + // childHierarchyPath: ['professional_subroles'], + // groups: { + // professional_subroles: [professionalSubRoleId], + // }, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, + // { + // _id: professionalSubRoleId, + // entityType: 'professional_subroles', + // entityTypeId: entityType[6]._id, + // userId: '1', + // metaInformation: { + // externalId: 'SG', + // name: 'student-school', + // }, + // childHierarchyPath: [], + // groups: {}, + // tenantId: 'shikshalokam', + // orgId: 'slOrg', + // }, +] + +module.exports = { + entities, + entityType, +} diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/import_forms.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/import_forms.js new file mode 100644 index 00000000..96ed977b --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/import_forms.js @@ -0,0 +1,51 @@ +const mongoose = require('mongoose') +const axios = require('axios') + +// MongoDB URL and Collection +const mongoURL = 'mongodb://localhost:27017/elevate-samiksha' +const collectionName = 'forms' + +// Connect to MongoDB +mongoose + .connect(mongoURL, { + useNewUrlParser: true, + useUnifiedTopology: true, + }) + .then(() => { + console.log('Connected to MongoDB') + }) + .catch((err) => { + console.error('Failed to connect to MongoDB', err) + }) + +// Define schema for forms collection (adjust fields based on JSON structure) +const formSchema = new mongoose.Schema({}, { strict: false }) +const Form = mongoose.model(collectionName, formSchema) + +// Fetch JSON data from URL and insert into MongoDB +async function fetchAndInsertData() { + try { + const response = await axios.get( + 'https://raw.githubusercontent.com/ELEVATE-Project/observation-survey-projects-pwa/refs/heads/release-2.0.0/forms.json' + ) + const data = response.data + + const modifiedData = data.map((form) => ({ + ...form, + organizationId: 1, + deleted: false, + version: 0, + })) + + // Insert modified data into the forms collection + await Form.insertMany(modifiedData) + console.log('Data inserted successfully') + } catch (error) { + console.error('Error fetching or inserting data:', error) + } finally { + mongoose.connection.close() + } +} + +// Execute the function +fetchAndInsertData() diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js new file mode 100644 index 00000000..6ac2794d --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js @@ -0,0 +1,56 @@ +const { MongoClient } = require('mongodb') + +const url = 'mongodb://localhost:27017/' // MongoDB URL +const dbName = 'qadb' +const dbName2 = 'projectService' +const entityData = require('./entity_sampleData.js') +const projectData = require('./project_sampleData.js') + +async function insertData(collectionName, dataFile, curretDB = dbName) { + const client = new MongoClient(url) + + try { + // Connect to MongoDB + await client.connect() + console.log(`Connected to MongoDB for ${collectionName}`) + + const db = client.db(curretDB) + const collection = db.collection(collectionName) + + // Read the data from the file + const data = dataFile + + if (!data) { + await client.close() + return + } + + const result = await collection.insertMany(data) + //console.log(`Inserted ${result.insertedCount} documents into ${collectionName}`); + } finally { + await client.close() + } +} + +async function main({ dataToBeInserted }) { + await insertData('entities', dataToBeInserted.entities, dbName2) + await insertData('entityTypes', dataToBeInserted.entityType, dbName2) + await insertData('programs', dataToBeInserted.programData) + await insertData('solutions', dataToBeInserted.solutionData) + await insertData('projectTemplates', dataToBeInserted.projectTemplatesData) + await insertData('projectTemplateTasks', dataToBeInserted.projectTemplateTasksData) + await insertData('certificateTemplates', dataToBeInserted.certificateTemplatesData) + await insertData('certificateBaseTemplates', dataToBeInserted.certificateBaseTemplatesData) + await insertData('projectCategories', dataToBeInserted.projectCategoriesData) +} + +main({ dataToBeInserted: entityData }) + .then(() => { + console.log('Entity data populated successfully.') + }) + .catch(console.error) +main({ dataToBeInserted: projectData }) + .then(() => { + console.log('project data populated successfully.') + }) + .catch(console.error) diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh new file mode 100644 index 00000000..f6cf5dd9 --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh @@ -0,0 +1,206 @@ +#!/bin/bash + +echo "Starting the installation script..." + +# Function to install Node.js LTS +install_nodejs() { + echo "Installing Node.js version 20..." + curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential +} + + +# Function to install Kafka +install_kafka() { + echo "Installing Kafka..." + sudo DEBIAN_FRONTEND=noninteractive apt install -y openjdk-11-jdk + sudo wget https://archive.apache.org/dist/kafka/3.5.0/kafka_2.12-3.5.0.tgz -O kafka.tgz + sudo tar xzf kafka.tgz -C /opt + sudo mv /opt/kafka_2.12-3.5.0 /opt/kafka + + echo "Creating Zookeeper service..." + sudo bash -c 'cat > /etc/systemd/system/zookeeper.service << EOF +[Unit] +Description=Apache Zookeeper service +Documentation=http://zookeeper.apache.org +Requires=network.target remote-fs.target +After=network.target remote-fs.target + +[Service] +Type=simple +ExecStart=/opt/kafka/bin/zookeeper-server-start.sh /opt/kafka/config/zookeeper.properties +ExecStop=/opt/kafka/bin/zookeeper-server-stop.sh +Restart=on-abnormal + +[Install] +WantedBy=multi-user.target +EOF' + + echo "Creating Kafka service..." + sudo bash -c 'cat > /etc/systemd/system/kafka.service << EOF +[Unit] +Description=Apache Kafka Service +Documentation=http://kafka.apache.org/documentation.html +Requires=zookeeper.service + +[Service] +Type=simple +Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" +ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties +ExecStop=/opt/kafka/bin/kafka-server-stop.sh + +[Install] +WantedBy=multi-user.target +EOF' + + sudo systemctl daemon-reload + sudo systemctl start zookeeper + sudo systemctl start kafka +} + +# Function to install Redis +install_redis() { + echo "Installing Redis..." + sudo apt update + sudo DEBIAN_FRONTEND=noninteractive apt install -y redis-server + sudo sed -i 's/^# *supervised .*/supervised systemd/' /etc/redis/redis.conf + sudo systemctl restart redis.service +} + +# Function to install Redis BullMQ (as a global Node.js package) +install_bullmq() { + echo "Installing Redis BullMQ..." + sudo npm install -g bullmq + echo "Redis BullMQ has been installed globally." +} + +# Function to install Citus +install_citus() { + echo "Installing Citus..." + + # Ensure the 'postgres' user exists + if ! id "postgres" &>/dev/null; then + echo "Creating postgres user..." + sudo useradd -m -s /bin/bash postgres + echo "postgres user created." + else + echo "postgres user already exists." + fi + + # Download and install the Citus repository setup script + curl https://install.citusdata.com/community/deb.sh | sudo bash + + # Install Citus along with PostgreSQL + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql-16-citus-12.1 + + # Switch to the postgres user + sudo su - postgres <> ~/citus/postgresql.conf + + # Start the Citus server + pg_ctl -D ~/citus -o "-p 9700" -l ~/citus_logfile start + + # Create the Citus extension + psql -p 9700 -c "CREATE EXTENSION citus;" + + # Check the Citus version + PSQL_OUTPUT=\$(psql -p 9700 -c "select citus_version();") + echo "\$PSQL_OUTPUT" + +EOF +} + +# Function to install PM2 +install_pm2() { + echo "Installing PM2..." + sudo npm install pm2@latest -g +} + +# Function to install MongoDB +install_mongo() { + echo "Installing MongoDB 4.4.14..." + + # Import MongoDB public GPG key + wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - + + # Create the MongoDB source list for Ubuntu (MongoDB 4.4) + echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list + + # Update apt and install MongoDB version 4.4.14 + sudo apt update + sudo DEBIAN_FRONTEND=noninteractive apt install -y mongodb-org=4.4.14 mongodb-org-server=4.4.14 mongodb-org-shell=4.4.14 mongodb-org-mongos=4.4.14 mongodb-org-tools=4.4.14 + + # Start and enable MongoDB service + sudo systemctl start mongod + sudo systemctl enable mongod + echo "MongoDB 4.4.14 has been installed and started." +} + + +# Function to install Gotenberg (via Docker) +install_gotenberg() { + echo "Installing Docker (required for Gotenberg)..." + + # Install Docker + sudo apt update + sudo DEBIAN_FRONTEND=noninteractive apt install -y docker.io + + # Start and enable Docker service + sudo systemctl start docker + sudo systemctl enable docker + + echo "Docker installed. Pulling Gotenberg Docker image..." + + # Pull and run Gotenberg Docker container + sudo docker pull gotenberg/gotenberg:7 + sudo docker run -d --name gotenberg -p 3000:3000 gotenberg/gotenberg:7 + + echo "Gotenberg has been installed and started on port 3000." +} + +# Function to display options +display_menu() { + echo "Please select an installation option:" + options=("Install Node.js" "Install Kafka" "Install Redis" "Install Citus" "Install PM2" "Install MongoDB" "Install Gotenberg" "Exit") + for i in ${!options[@]}; do + echo "$((i+1)). ${options[i]}" + done +} + +# Main menu +display_menu + +while true; do + read -p "Enter your choice (1-${#options[@]}): " choice + if (( choice > 0 && choice <= ${#options[@]} )); then + case $choice in + 1) install_nodejs ;; + 2) install_kafka ;; + 3) install_redis ;; + 4) install_citus ;; + 5) install_pm2 ;; + 6) install_mongo ;; + 7) install_gotenberg ;; + 8) echo "Exiting the installation script."; break ;; + *) echo "Invalid option. Please try again." ;; + esac + echo "Operation completed. Here are the next options:" + display_menu + else + echo "Invalid option. Please try again." + fi +done + +echo "Installation script completed." diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js new file mode 100644 index 00000000..21cbd835 --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js @@ -0,0 +1,523 @@ +const { ObjectId } = require('mongodb') + +let solutionData = [ + { + _id: ObjectId('68ee4bb3fb9bee08b93b6d68'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + entityType: 'school', + externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', + name: 'pro with obsasatask oct 8 facilitator only 2nd', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-09-09T00:00:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + programName: 'custom observation as a task check on oct 14th facilitator', + programDescription: 'custom observation as a task check on oct 14th facilitator', + status: 'active', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-14T13:11:17.993Z'), + createdAt: new Date('2025-10-14T13:10:11.897Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + updatedBy: '1', + author: '1', + creator: 'Nevil', + certificateTemplateId: ObjectId('68ee4bf5fb9bee08b93b6d97'), + link: 'f8a8e9ba397a29cf75ad5057db6cb7f9', + }, +] + +let programData = [ + { + _id: ObjectId('68ee4b79fb9bee08b93b6d34'), + resourceType: ['program'], + language: ['English'], + keywords: ['CBSE', 'SQAA'], + concepts: [], + components: [ + { + _id: ObjectId('68ee4bb3fb9bee08b93b6d68'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + name: 'custom observation as a task check on oct 14th facilitator', + description: 'custom observation as a task check on oct 14th facilitator', + startDate: new Date('2025-09-08T18:30:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ['Tripura'], + recommendedFor: ['Facilitator'], + }, + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-14T13:18:46.936Z'), + createdAt: new Date('2025-10-14T13:09:13.649Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, +] + +let projectTemplatesData = [ + { + _id: ObjectId('68ee4bb3fb9bee08b93b6d70'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + ObjectId('68ee4bb4fb9bee08b93b6d7a'), + ObjectId('68ee4bb4fb9bee08b93b6d7e'), + ObjectId('68ee4bb4fb9bee08b93b6d82'), + ObjectId('68ee4bb4fb9bee08b93b6d86'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984', + 'DPDTSC-HandBook-1-2025-Task2-1760447411369', + 'DPDTSC-HandBook-1-2025-Task3-1760447411369', + 'DPDTSC-HandBook-1-2025-Task4-1760447411369', + 'DPDTSC-HandBook-1-2025-Task5-1760447411369', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: 'CURRENT', + visibleToOrganizations: ['tan90'], + deleted: false, + title: 'pro with obsasatask oct 8 facilitator only 2nd', + externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + categories: [ + { + _id: ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-14T13:11:17.899Z'), + createdAt: new Date('2025-10-14T13:10:11.630Z'), + __v: 0, + solutionId: ObjectId('68ee4bb3fb9bee08b93b6d68'), + solutionExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', + programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + parentTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d4c'), + certificateTemplateId: ObjectId('68ee4bf5fb9bee08b93b6d97'), + }, +] + +let projectTemplateTasksData = [ + { + _id: ObjectId('68ee4bb4fb9bee08b93b6d7a'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + description: '', + sequenceNumber: '2', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.192Z'), + createdAt: new Date('2025-10-14T13:10:11.805Z'), + __v: 0, + }, + { + _id: ObjectId('68ee4bb4fb9bee08b93b6d7e'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + description: '', + sequenceNumber: '3', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.202Z'), + createdAt: new Date('2025-10-14T13:10:11.813Z'), + __v: 0, + }, + { + _id: ObjectId('68ee4bb4fb9bee08b93b6d82'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'learn', + link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + app: 'projectService', + id: 'view?usp=drive_link', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + description: '', + sequenceNumber: '4', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.210Z'), + createdAt: new Date('2025-10-14T13:10:11.825Z'), + __v: 0, + }, + { + _id: ObjectId('68ee4bb4fb9bee08b93b6d86'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'walking', + link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', + app: 'projectService', + id: 'view?usp=sharing', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', + description: '', + sequenceNumber: '5', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.218Z'), + createdAt: new Date('2025-10-14T13:10:11.833Z'), + __v: 0, + }, +] + +let certificateTemplatesData = [ + { + _id: ObjectId('68ee4bf5fb9bee08b93b6d97'), + status: 'active', + deleted: false, + criteria: { + validationText: 'Complete validation message', + expression: 'C1&&(C3||C4||C5||C6)', + conditions: { + C1: { + validationText: 'Submit your project.', + expression: 'C1', + conditions: { + C1: { + scope: 'project', + key: 'status', + operator: '==', + value: 'submitted', + }, + }, + }, + C3: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d53'], + }, + }, + validationText: 'Add 2 evidence for any task', + }, + C4: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d57'], + }, + }, + }, + C5: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d5b'], + }, + }, + }, + C6: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d63'], + }, + }, + }, + }, + }, + issuer: { + name: 'Tan90', + }, + solutionId: ObjectId('68ee4bb3fb9bee08b93b6d68'), + programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + baseTemplateId: ObjectId('68c008dfd113c30c11f1aca2'), + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-14T13:11:17.793Z'), + createdAt: new Date('2025-10-14T13:11:17.628Z'), + __v: 0, + templateUrl: + 'certificate/aa8529e3-6754-4432-a669-72b73d358e2f/1/7042c718-a1bf-43e3-b296-586de247a440/68ee4bf5fb9bee08b93b6d97/14-9-2025-1760447477692_Dowloaded.svg', + }, +] + +let certificateBaseTemplatesData = [ + { + _id: ObjectId('68c008dfd113c30c11f1aca2'), + deleted: false, + code: 'onelogo_onesign', + name: 'onelogo_onesign', + url: 'certificate/ef2058a1-92e0-4a63-af5f-b712f992bf90/1/81fc35ad-9519-4ec4-87bb-6cef64b940f0/9-8-2025-1757415647754_sl_s1l1.svg', + tenantId: 'shikshalokam', + orgId: 'slorg', + updatedAt: new Date('2025-09-09T11:00:47.878Z'), + createdAt: new Date('2025-09-09T11:00:47.878Z'), + __v: 0, + }, +] + +let projectCategoriesData = [ + { + _id: ObjectId('685ae6a0cb7c7200145dadae'), + createdBy: 'SYSTEM', + updatedBy: 'SYSTEM', + isDeleted: false, + isVisible: true, + status: 'active', + icon: '', + noOfProjects: 361, + evidences: [], + deleted: false, + name: 'teachers', + externalId: 'teachers', + tenantId: 'shikshalokam', + orgId: 'slorg', + updatedAt: new Date('2025-06-24T17:55:44.720Z'), + createdAt: new Date('2025-06-24T17:55:44.720Z'), + __v: 0, + }, +] +module.exports = { + solutionData, + programData, + projectTemplatesData, + projectTemplateTasksData, + certificateTemplatesData, + certificateBaseTemplatesData, + projectCategoriesData, +} diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh new file mode 100644 index 00000000..c14a313a --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh @@ -0,0 +1,131 @@ +#!/bin/bash + +# Define color codes +RED='\033[0;31m' +GREEN='\033[0;32m' +NC='\033[0m' # No Color + +# Function to show the menu +show_menu() { + echo -e "${GREEN}Please choose an option to uninstall:${NC}" + echo "1) PM2" + echo "2) Node.js and npm" + echo "3) Kafka and Zookeeper" + echo "4) Redis" + echo "5) MongoDB" + echo "6) Citus and PostgreSQL" + echo "7) Gotenberg" + echo "8) Exit" + echo -e "${GREEN}Enter your choice [1-8]: ${NC}" +} + +# Function to uninstall PM2 +uninstall_pm2() { + echo -e "${RED}Uninstalling PM2...${NC}" + sudo npm uninstall -g pm2 +} + +# Function to uninstall Node.js and npm +uninstall_nodejs() { + echo -e "${RED}Uninstalling Node.js and npm...${NC}" + sudo apt-get remove -y nodejs + sudo apt-get purge -y nodejs + sudo apt-get autoremove -y +} + +# Function to uninstall Kafka and Zookeeper +uninstall_kafka_zookeeper() { + echo -e "${RED}Removing Kafka and Zookeeper...${NC}" + sudo systemctl stop kafka + sudo systemctl disable kafka + sudo systemctl stop zookeeper + sudo systemctl disable zookeeper + sudo rm /etc/systemd/system/kafka.service + sudo rm /etc/systemd/system/zookeeper.service + sudo rm -rf /opt/kafka + sudo systemctl daemon-reload +} + +# Function to uninstall Redis +uninstall_redis() { + echo -e "${RED}Uninstalling Redis...${NC}" + sudo systemctl stop redis + sudo systemctl disable redis + sudo apt-get remove -y redis-server + sudo apt-get purge -y redis-server + sudo apt-get autoremove -y +} + +# Function to uninstall Redis BullMQ +uninstall_bullmq() { + echo -e "${RED}Uninstalling Redis BullMQ...${NC}" + sudo npm uninstall -g bullmq + echo -e "${GREEN}Redis BullMQ has been uninstalled.${NC}" +} + +# Function to uninstall MongoDB +uninstall_mongodb() { + echo -e "${RED}Uninstalling MongoDB...${NC}" + sudo systemctl stop mongod + sudo systemctl disable mongod + sudo apt-get remove -y mongodb-org + sudo apt-get purge -y mongodb-org + sudo apt-get autoremove -y + sudo rm -rf /var/log/mongodb + sudo rm -rf /var/lib/mongodb + sudo rm /etc/apt/sources.list.d/mongodb-org-*.list + echo -e "${GREEN}MongoDB has been uninstalled.${NC}" +} + +# Function to uninstall Citus and PostgreSQL +uninstall_citus_postgresql() { + echo -e "${RED}Uninstalling Citus and PostgreSQL...${NC}" + sudo su - postgres -c "pg_ctl -D ~/citus stop" + sudo apt-get remove -y postgresql-16-citus-12.1 + sudo apt-get purge -y postgresql-16-citus-12.1 + sudo apt-get remove -y postgresql* + sudo apt-get purge -y postgresql* + sudo apt-get autoremove -y + sudo pkill -u postgres + sudo deluser --remove-home postgres +} + +# Function to uninstall Gotenberg +uninstall_gotenberg() { + echo -e "${RED}Uninstalling Gotenberg...${NC}" + + # Stop and remove the Gotenberg Docker container + sudo docker stop gotenberg + sudo docker rm gotenberg + + # Optionally uninstall Docker (if it's no longer needed) + echo -e "${GREEN}Do you also want to uninstall Docker? (y/n)${NC}" + read uninstall_docker + if [[ "$uninstall_docker" == "y" || "$uninstall_docker" == "Y" ]]; then + echo -e "${RED}Uninstalling Docker...${NC}" + sudo apt-get remove -y docker.io + sudo apt-get purge -y docker.io + sudo apt-get autoremove -y + sudo rm -rf /var/lib/docker + echo -e "${GREEN}Docker has been uninstalled.${NC}" + fi + echo -e "${GREEN}Gotenberg has been uninstalled.${NC}" +} + +# Main loop +while true; do + show_menu + read choice + case $choice in + 1) uninstall_pm2 ;; + 2) uninstall_nodejs ;; + 3) uninstall_kafka_zookeeper ;; + 4) uninstall_redis ;; + 5) uninstall_mongodb ;; + 6) uninstall_citus_postgresql ;; + 7) uninstall_gotenberg ;; + 8) echo -e "${GREEN}Exiting uninstallation process.${NC}"; exit ;; + *) echo -e "${RED}Invalid option, please try again.${NC}" ;; + esac + echo -e "${GREEN}Operation completed.${NC}" +done diff --git a/documentation/3.4.0/sample-data/mac-linux/user/sampleData.sql b/documentation/3.4.0/sample-data/mac-linux/user/sampleData.sql new file mode 100644 index 00000000..9744d2fe --- /dev/null +++ b/documentation/3.4.0/sample-data/mac-linux/user/sampleData.sql @@ -0,0 +1,23 @@ +INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e4','+91', NULL); +INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a767','+91', NULL); +INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e0','+91', NULL); +INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a700','+91', NULL); + +INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (1, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL); +INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (2, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL); +INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (3, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL); +INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (4, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL); + + +INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL); +INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 2, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL); +INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL); +INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL); + + +INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code'); +INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex) VALUES (5, 'district', 'District', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL); +UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3; +SELECT nextval('users_id_seq'::regclass) FROM public.users; +SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials; +SELECT NULL; \ No newline at end of file diff --git a/documentation/3.4.0/sample-data/windows/user/sampleData.sql b/documentation/3.4.0/sample-data/windows/user/sampleData.sql new file mode 100644 index 00000000..43a991df --- /dev/null +++ b/documentation/3.4.0/sample-data/windows/user/sampleData.sql @@ -0,0 +1,21 @@ +INSERT INTO public.users (id, name, email, email_verified, roles, status, password, organization_id, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at) VALUES (1, 'Aarav Patel', '8d1f1e11989cf7b739c9daa972c56c5083b46d490f8023a67eb89d28a2b615ef', false, '{8,2}', 'ACTIVE', '$2a$10$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', 1, true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL); +INSERT INTO public.users (id, name, email, email_verified, roles, status, password, organization_id, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at) VALUES (2, 'Arunima Reddy', '0f34042735bb359f1c227b4497cf5074b372085830eef69db07dd80789c25dd5', false, '{8,2}', 'ACTIVE', '$2a$10$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', 1, true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL); +INSERT INTO public.users (id, name, email, email_verified, roles, status, password, organization_id, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at) VALUES (3, 'Devika Singh', '1e8828f2f98d16ff63a424620f9d582a1de88268414606a0593c73eb5316543c', false, '{8,2}', 'ACTIVE', '$2a$10$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', 1, true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL); +INSERT INTO public.users_credentials (id, email, password, organization_id, user_id, meta, created_at, updated_at, deleted_at, organization_user_invite_id) VALUES (1, '8d1f1e11989cf7b739c9daa972c56c5083b46d490f8023a67eb89d28a2b615ef', '$2a$10$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', 1, 1, NULL, '2024-04-18 08:12:19.407+00', '2024-04-18 08:12:19.407+00', NULL, NULL); +INSERT INTO public.users_credentials (id, email, password, organization_id, user_id, meta, created_at, updated_at, deleted_at, organization_user_invite_id) VALUES (2, '0f34042735bb359f1c227b4497cf5074b372085830eef69db07dd80789c25dd5', '$2a$10$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', 1, 2, NULL, '2024-04-18 08:12:19.407+00', '2024-04-18 08:12:19.407+00', NULL, NULL); +INSERT INTO public.users_credentials (id, email, password, organization_id, user_id, meta, created_at, updated_at, deleted_at, organization_user_invite_id) VALUES (3, '1e8828f2f98d16ff63a424620f9d582a1de88268414606a0593c73eb5316543c', '$2a$10$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', 1, 3, NULL, '2024-04-18 08:12:19.407+00', '2024-04-18 08:12:19.407+00', NULL, NULL); +INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex) VALUES (4, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL); +INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex) VALUES (5, 'block', 'Block', 'ACTIVE', 0, 0, true, 'ARRAY', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL); +INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex) VALUES (6, 'school', 'school', 'ACTIVE', 0, 0, true, 'ARRAY', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL); +INSERT INTO public.entities (id, entity_type_id, value, label, status, type, created_by, updated_by, created_at, updated_at, deleted_at) VALUES (33, 3, 'bangalore','Bangalore' ,'ACTIVE', 'SYSTEM', 0, NULL, '2024-10-08 11:33:03.03+00', '2024-10-08 11:33:03.03+00', NULL); +INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex) VALUES (7, 'district', 'district', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL); +INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex) VALUES (8, 'cluster', 'Cluster', 'ACTIVE', 0, 0, true, 'ARRAY', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL); +INSERT INTO public.user_roles (id, title, user_type, status, created_at, updated_at, deleted_at, visibility, organization_id, label) VALUES (8, 'state_education_officer', 0, 'ACTIVE', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, 'PUBLIC', 1, 'State Education Officer'); +SELECT nextval('users_id_seq'::regclass) FROM public.users; +SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials; +SELECT nextval('entity_types_id_seq'::regclass) FROM public.entity_types; +SELECT nextval('entities_id_seq'::regclass) FROM public.entities; +SELECT nextval('user_roles_id_seq'::regclass) FROM public.user_roles; +UPDATE role_permission_mapping SET role_title = 'state_education_officer' WHERE role_title = 'mentor' +UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3; +SELECT NULL; \ No newline at end of file diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md new file mode 100644 index 00000000..b37a2eff --- /dev/null +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -0,0 +1,237 @@ +
+ +# Projects Service + + + + + +![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/ELEVATE-Project/mentoring?filename=src%2Fpackage.json) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) + + + + +
+The Project building block facilitates the creation and engagement with micro-improvement projects. + +
+
+ +# Supported Operating Systems + +- **Ubuntu (Recommended: Version 20 and above)** + +# Setup Options + +**Project services can be setup using two methods:** + +> Note : This guide outlines two setup methods, detailed below. For a quick, beginner-friendly setup and walkthrough of services, it is recommended to use the Dockerized Services & Dependencies setup with the Docker-Compose file. + +Dockerized Services & Dependencies Using Docker-Compose File + +## Dockerized Services & Dependencies + +Expectation: By diligently following the outlined steps, you will successfully establish a fully operational Project application setup, including both the portal and backend services. + +## Prerequisites + +To set up the Project application, ensure you have Docker and Docker Compose installed on your system. For Ubuntu users, detailed installation instructions for both can be found in the documentation here: [How To Install and Use Docker Compose on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04). To install and use Nodejs in Ubuntu machine, you can follow instructions here: [How To Install Nodejs in Ubuntu](https://nodejs.org/en/download/package-manager). + +## Installation + +**Create project Directory:** Establish a directory titled **project**. + +> Example Command: `mkdir project && cd project/` + +> Note: All commands are run from the project directory. + +## Operating Systems: Linux + +> **Caution:** Before proceeding, please ensure that the ports given here are available and open. It is essential to verify their availability prior to moving forward. You can run below command in your terminal to check this + +``` +for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 2707 3569; do + if lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then + echo "Port $port is in use" + else + echo "Port $port is available" + fi +done +``` + +1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. + ``` + curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh + ``` + +> Note : The script will download all the essential files and launch the services in Docker. Once all services are successfully up and running, you can proceed to the next steps. + +> **General Instructions :** + +1. All containers which are part of the docker-compose can be gracefully stopped by pressing Ctrl + c in the same terminal where the services are running. + +2. All docker containers can be stopped and removed by using below command. + +``` +sudo ./docker-compose-down.sh +``` + +3. All services and dependencies can be started using below command. + +``` +sudo ./docker-compose-up.sh +``` + +**Keep the current terminal session active, and kindly open a new terminal window within the project directory.** + +**After successfully completing this, please move to the next section: [Enable Citus Extension](#enable-citus-extension-optional)** + +## Enable Citus Extension (Optional) + +User management service comes with this bundle relies on PostgreSQL as its core database system. To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. + +For more information, refer **[Citus Data](https://www.citusdata.com/)**. + +To enable the Citus extension for user services, follow these steps. + +1. Create a sub-directory named `user` and download `distributionColumns.sql` into it. (Skip this for linux) + ``` + mkdir user && curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql + ``` +2. Set up the citus_setup file by following the steps given below. + + - **Ubuntu/Linux** + + 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. + ``` + sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user + ``` + +## Persistence Of Database Data In Docker Container (Optional) + +To ensure the persistence of database data when running `docker compose down`, it is necessary to modify the `docker-compose-project.yml` file according to the steps given below: + +1. **Modification Of The `docker-compose-project.yml` File:** + + Begin by opening the `docker-compose-project.yml` file. Locate the section pertaining to the Citus and mongo container and proceed to uncomment the volume specification. This action is demonstrated in the snippet provided below: + + ```yaml + mongo: + image: 'mongo:4.4.14' + restart: 'always' + ports: + - '27017:27017' + networks: + - project_net + volumes: + - mongo-data:/data/db + logging: + driver: none + + citus: + image: citusdata/citus:11.2.0 + container_name: 'citus_master' + ports: + - 5432:5432 + volumes: + - citus-data:/var/lib/postgresql/data + ``` + +2. **Uncommenting Volume Names Under The Volumes Section:** + + Next, navigate to the volumes section of the file and proceed to uncomment the volume names as illustrated in the subsequent snippet: + + ```yaml + networks: + elevate_net: + external: false + + volumes: + citus-data: + mongo-data: + ``` + +By implementing these adjustments, the configuration ensures that when the `docker-compose down` command is executed, the database data is securely stored within the specified volumes. Consequently, this data will be retained and remain accessible, even after the containers are terminated and subsequently reinstated using the `docker-compose up` command. + +## Sample User Accounts Generation + +During the initial setup of Project services with the default configuration, you may encounter issues creating new accounts through the regular SignUp flow on the project portal. This typically occurs because the default SignUp process includes OTP verification to prevent abuse. Until the notification service is configured correctly to send actual emails, you will not be able to create new accounts. + +In such cases, you can generate sample user accounts using the steps below. This allows you to explore the Project services and portal immediately after setup. + +> **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. + +- **Ubuntu/Linux** + + ``` + sudo ./insert_sample_data.sh user postgres://postgres:postgres@citus_master:5432/user + ``` + + After successfully running the script mentioned above, the following user accounts will be created and available for login: + + | Email ID | Password | Role | + | ---------------------- | ---------- | ----------------------- | + | mallanagouda@gmail.com | Password1@ | State Education Officer | + | prajwal@gmail.com | Password1@ | State Education Officer | + | vishnu@gmail.com | Password1@ | State Education Officer | + +## Sample Data Creation For Projects + +This step will guide us in implementing a sample project solution following the initial setup of the project service. + +1. **Insert Sample Data To Database:** + + - **Ubuntu/Linux** + + 1. Insert sample data by running the following command. + + ``` + node insert_sample_solution.js + ``` + +## Default Forms Creation for Portal Configuration + +This step inserts configuration forms into MongoDB, enabling or disabling features and fields on portal pages. + +#### Insert Forms Data into Database + +- **Ubuntu/Linux**: + + ``` + curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/import_forms_mongo.sh && chmod +x import_forms_mongo.sh && sudo ./import_forms_mongo.sh mongodb://mongo:27017/elevate-project + ``` + +## Explore the Portal + +Once the services are up and the front-end app bundle is built successfully, navigate to **[localhost:7007](http://localhost:7007/)** to access the Project app. + +> **Warning:** In this setup, features such as **Sign-Up, Project Certificate, Project Sharing, and Project PDF Report** will not be available because cloud storage credentials have been masked in the environment files for security reasons. + +## Postman Collections + +- [Projects Service](https://github.com/ELEVATE-Project/project-service/tree/main/api-doc) + +## Adding New Projects to the System + +With implementation scripts, you can seamlessly add new projects to the system. Once a project is successfully added, it becomes visible on the portal, ready for use and interaction. For a comprehensive guide on setting up and using the implementation script, please refer to the [documentation here](https://github.com/ELEVATE-Project/project-service/tree/main/Project-Service-implementation-Script). + +# Team + + + + + +# Open Source Dependencies + +Several open source dependencies that have aided Projects's development: + +![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) +![Apache Kafka](https://img.shields.io/badge/Apache%20Kafka-000?style=for-the-badge&logo=apachekafka) +![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white) +![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white) +![Git](https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge&logo=git&logoColor=white) diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md new file mode 100644 index 00000000..30776979 --- /dev/null +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -0,0 +1,345 @@ +
+ +# Projects Service + + + + + +![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/ELEVATE-Project/mentoring?filename=src%2Fpackage.json) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) + + + + +
+The Project building block facilitates the creation and engagement with micro-improvement projects. + +
+
+ +# Supported Operating Systems + +- **Ubuntu (Recommended: Version 20 and above)** + +# Native Setup - Stand Alone + +Natively Installed Services & Dependencies + +## PM2 Managed Services & Natively Installed Dependencies + +### System Requirements + +- **Node.jsĀ®:** v20 +- **PostgreSQL:** 16 +- **Apache KafkaĀ®:** 3.5.0 +- **MongoDB:** 4.4.14 +- **Gotenberg:** 8.5.0 + +Expectation: Upon following the prescribed steps, you will achieve a fully operational ELEVATE-Project application setup. Both the portal and backend services are managed using PM2, with all dependencies installed natively on the host system. + +## Prerequisites + +Before setting up the following ELEVATE-Project application, dependencies given below should be installed and verified to be running. Refer to the steps given below to install them and verify. + +- **Ubuntu/Linux** + + 1. Download dependency management scripts: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/check-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/install-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/uninstall-dependencies.sh && \ + chmod +x check-dependencies.sh && \ + chmod +x install-dependencies.sh && \ + chmod +x uninstall-dependencies.sh + ``` + + 2. Verify installed dependencies by running `check-dependencies.sh`: + + ``` + ./check-dependencies.sh + ``` + + > Note: Keep note of any missing dependencies. + + 3. Install dependencies by running `install-dependencies.sh`: + ``` + ./install-dependencies.sh + ``` + > Note: Install all missing dependencies and use check-dependencies script to ensure everything is installed and running. + 4. Uninstall dependencies by running `uninstall-dependencies.sh`: + + ``` + ./uninstall-dependencies.sh + ``` + + > Warning: Due to the destructive nature of the script (without further warnings), it should only be used during the initial setup of the dependencies. For example, Uninstalling PostgreSQL/Citus using script will lead to data loss. USE EXTREME CAUTION. + + > Warning: This script should only be used to uninstall dependencies that were installed via installation script in step 3. If same dependencies were installed using other methods, refrain from using this script. This script is provided in-order to reverse installation in-case issues arise from a bad install. + +## Installation + +1. **Create ELEVATE-Project Directory:** Create a directory named **ELEVATE-Project**. + + > Example Command: `mkdir ELEVATE-Project && cd ELEVATE-Project/` + +2. **Git Clone Services And Portal Repositories** + + - **Ubuntu/Linux** + + ``` + git clone -b develop https://github.com/ELEVATE-Project/project-service.git && \ + git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ + git clone -b develop https://github.com/ELEVATE-Project/user.git && \ + git clone -b master https://github.com/ELEVATE-Project/notification.git && \ + git clone -b master https://github.com/ELEVATE-Project/interface-service.git && \ + git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ + git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-survey-projects-pwa && \ + git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal/tree/releaase-1.1.0 && \ + git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal + ``` + +3. **Install NPM Packages** + + - **Ubuntu/Linux** + + ``` + cd project-service && npm install && cd ../ && \ + cd entity-management/src && npm install && cd ../.. && \ + cd user/src && npm install && cd ../.. && \ + cd entity-management\src && npm install && cd ..\.. && \ + cd notification/src && npm install && cd ../.. && \ + cd interface-service/src && npm install && cd ../.. && \ + cd scheduler/src && npm install && cd ../.. && \ + cd observation-survey-projects-pwa && npm install --force && cd .. && \ + cd observation-portal && npm install --force && cd .. && \ + cd elevate-portal && npm install --force && cd .. + ``` + +4. **Download Environment Files** + + - **Ubuntu/Linux** + + ``` + curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/project_env && \ + curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/entity_management_env && \ + curl -L -o user/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/user_env && \ + curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env && \ + curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ + curl -L -o scheduler/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/scheduler_env && \ + curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_survey_projects_pwa_env && \ + curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/elevate_portal_env && \ + curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_portal_env + ``` + + > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. + + > **Caution:** While the default values in the downloaded environment files enable the ELEVATE-Project Application to operate, certain features may not function correctly or could be impaired unless the adopter-specific environment variables are properly configured. + + > **Important:** As mentioned in the above linked document, the **User SignUp** functionality may be compromised if key environment variables are not set correctly during deployment. If you opt to skip this setup, consider using the sample user account generator detailed in the `Sample User Accounts Generation` section of this document. + +5. **Create Databases** + + - **Ubuntu/Linux** + + 1. Download `create-databases.sh` Script File: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/create-databases.sh + ``` + + 2. Make the executable by running the following command: + ``` + chmod +x create-databases.sh + ``` + 3. Run the script file: + ``` + ./create-databases.sh + ``` + +6. **Run Migrations To Create Tables** + + - **Ubuntu/Linux** + + 1. Run Migrations: + ``` + cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ + cd notification/src && npx sequelize-cli db:migrate && cd ../.. + ``` + +7. **Enabling Citus And Setting Distribution Columns (Optional)** + + To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. + + > NOTE: Currently only available for Linux based operation systems. + + 1. Download user `distributionColumns.sql` file. + + ``` + curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql + ``` + + 2. Set up the `citus_setup` file by following the steps given below. + + - **Ubuntu/Linux** + + 1. Download the `citus_setup.sh` file: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh + + ``` + + 2. Make the setup file executable by running the following command: + + ``` + chmod +x citus_setup.sh + ``` + + 3. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. + ``` + ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users + ``` + +8. **Insert Initial Data** + + - **Ubuntu/Linux** + + 1. Download `entity-project-sample-data.sh` Script File: + + 1.1. For ubuntu/linux + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/entity-project-sample-data.sh + ``` + + 2. Make the executable by running the following command: + ``` + chmod +x entity-project-sample-data.sh + ``` + 3. Run the script file: + ``` + ./entity-project-sample-data.sh + ``` + 4. Run seeders of user service + ``` + cd user/src && npm run db:seed:all && cd ../.. + ``` + +9. **Insert Forms Data into Database** + + - **Ubuntu/Linux** + + 1. Download `import_forms.js` Script File And Make the setup file executable by running the following command: + + ``` + curl -s https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/import_forms.js | node + ``` + +10. **Start The Services** + + Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. + + - **Ubuntu/Linux** + + ``` + (cd project-service && pm2 start app.js --name project-service && cd -) && \ + (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ + (cd user/src && pm2 start app.js --name user && cd -) && \ + (cd notification/src && pm2 start app.js --name notification && cd -) && \ + (cd interface-service/src && pm2 start app.js --name interface && cd -) && \ + (cd scheduler/src && pm2 start app.js --name scheduler && cd -) + ``` + +11. **Run Service Scripts** + + - **Ubuntu/Linux** + + ``` + cd user/src/scripts && node insertDefaultOrg.js && node viewsScript.js && cd ../../.. + ``` + +12. **Start The Portal** + + ELEVATE-Project portal utilizes Ionic for building the browser bundle, follow the steps given below to install them and start the portal. + + - **Ubuntu/Linux** + + 1. Install the Ionic framework: + + ``` + npm install -g ionic + ``` + + 2. Install the Ionic client: + + ``` + npm install -g @ionic/cli + ``` + + 3. Navigate to `observation-survey-projects-pwa` directory: + + ``` + cd observation-survey-projects-pwa + ``` + + 4. Run the project on your local system using the following command: + + ``` + ionic serve + ``` + + Navigate to http://localhost:8100 to access the ELEVATE-Project Portal. + +## Sample User Accounts Generation + +During the initial setup of ELEVATE-Project services with the default configuration, you may encounter issues creating new accounts through the regular SignUp flow on the ELEVATE-Project portal. This typically occurs because the default SignUp process includes OTP verification to prevent abuse. Until the notification service is configured correctly to send actual emails, you will not be able to create new accounts. + +In such cases, you can generate sample user accounts using the steps below. This allows you to explore the ELEVATE-Project services and portal immediately after setup. + +> **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. + +- **Ubuntu/Linux** + + ``` + curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/insert_sample_data.sh && \ + chmod +x insert_sample_data.sh && \ + ./insert_sample_data.sh + ``` + +After successfully running the script mentioned above, the following user accounts will be created and available for login: + +| Email ID | Password | Role | +| ------------------------ | ---------- | ------------------------- | +| aaravpatel@example.com | Password1@ | State Educational Officer | +| arunimareddy@example.com | Password1@ | State Educational Officer | +| devikasingh@example.com | Password1@ | State Educational Officer | + +## Postman Collections + +- [Projects Service](https://github.com/ELEVATE-Project/project-service/tree/main/api-doc) + +## Adding New Projects to the System + +With implementation scripts, you can seamlessly add new projects to the system. Once a project is successfully added, it becomes visible on the portal, ready for use and interaction. For a comprehensive guide on setting up and using the implementation script, please refer to the [documentation here](https://github.com/ELEVATE-Project/project-service/tree/main/Project-Service-implementation-Script). + +# Team + + + + + +# Open Source Dependencies + +Several open source dependencies that have aided Projects's development: + +![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) +![Apache Kafka](https://img.shields.io/badge/Apache%20Kafka-000?style=for-the-badge&logo=apachekafka) +![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white) +![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white) +![Git](https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge&logo=git&logoColor=white) From 661fa3060118e98f777141cbe163f8870379a803 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 21 Nov 2025 12:59:09 +0530 Subject: [PATCH 003/119] updated-readME --- .../stand-alone/ubuntu/setup_project.sh | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh index 7a4742aa..e92604d6 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh @@ -7,19 +7,19 @@ log() { # Step 1: Download Docker Compose file log "Downloading Docker Compose file..." -curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/docker-compose-project.yml +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/docker-compose-project.yml log "Docker Compose file downloaded." # Step 2: Download environment files log "Downloading environment files..." curl -L \ -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/interface_env \ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/entity_management_env \ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/project_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/entity_management_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/project_env \ -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/notification_env \ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/scheduler_env \ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/user_env \ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/env.js + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/scheduler_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/user_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/env.js log "Environment files downloaded." # Step 3: Download replace_volume_path.sh script @@ -39,8 +39,8 @@ log "replace_volume_path.sh script executed." # Step 6: Download additional scripts log "Downloading docker-compose scripts..." -curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/docker-compose-up.sh -curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/docker-compose-down.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh log "docker-compose scripts downloaded." # Step 7: Make the scripts executable @@ -67,9 +67,10 @@ log "Sample-data directory created and sampleData.sql downloaded." # Step 11: Download additional scripts to add data log "Downloading sample data scripts..." -curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/docker-compose-up.js -curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/docker-compose-down.js -curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/insert_sample_solution.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh log "sample data scripts downloaded." # Step 13 : Run sample data insert script From 216ca65ced945e057fc981c34bcdf992cf4e3405 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 21 Nov 2025 14:42:44 +0530 Subject: [PATCH 004/119] updated-readME --- .../stand-alone/ubuntu/insert_sample_data.sh | 29 +++++++++++++++++ .../setup/native/stand-alone/ubuntu/README.md | 32 +++++++++---------- 2 files changed, 45 insertions(+), 16 deletions(-) create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh new file mode 100644 index 00000000..fb61389e --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -0,0 +1,29 @@ +#!/bin/bash +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e4','+91', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a767','+91', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e0','+91', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a700','+91', NULL);" + +# --- 2. INSERT INTO public.user_organizations --- +# FIXES: +# - Quoted the organization_code and tenant_code variables. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (1, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (2, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (3, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (4, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + +# FIXES: +# - Quoted the organization_code and tenant_code variables. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 2, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + + +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex) VALUES (4, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL);" +sudo -u postgres psql -p 5432 -d users -c "UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3;" +sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" +sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials;" +sudo -u postgres psql -p 5432 -d users -c "UPDATE role_permission_mapping SET role_title = 'state_education_officer' WHERE role_title = 'mentor';" +sudo -u postgres psql -p 5432 -d users -c "SELECT NULL;" + diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index 30776979..83f5a495 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -51,9 +51,9 @@ Before setting up the following ELEVATE-Project application, dependencies given 1. Download dependency management scripts: ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/check-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/install-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/uninstall-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh && \ chmod +x check-dependencies.sh && \ chmod +x install-dependencies.sh && \ chmod +x uninstall-dependencies.sh @@ -126,12 +126,12 @@ Before setting up the following ELEVATE-Project application, dependencies given - **Ubuntu/Linux** ``` - curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/project_env && \ - curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/entity_management_env && \ - curl -L -o user/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/user_env && \ + curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/project_env && \ + curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/entity_management_env && \ + curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/user_env && \ curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env && \ curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ - curl -L -o scheduler/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/scheduler_env && \ + curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/scheduler_env && \ curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_survey_projects_pwa_env && \ curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/elevate_portal_env && \ curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_portal_env @@ -215,16 +215,16 @@ Before setting up the following ELEVATE-Project application, dependencies given 1.1. For ubuntu/linux ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/entity-project-sample-data.sh - ``` + curl -L -o https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js && \ - 2. Make the executable by running the following command: - ``` - chmod +x entity-project-sample-data.sh - ``` - 3. Run the script file: + curl -L -o https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js&& \ + + curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js + ``` + + 2. Run the script file: ``` - ./entity-project-sample-data.sh + node insert_sample_solutions.js ``` 4. Run seeders of user service ``` @@ -307,7 +307,7 @@ In such cases, you can generate sample user accounts using the steps below. This - **Ubuntu/Linux** ``` - curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/insert_sample_data.sh && \ + curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh && \ chmod +x insert_sample_data.sh && \ ./insert_sample_data.sh ``` From 25943081f0b63e32a732960c1adf5a146de912ac Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 21 Nov 2025 15:04:50 +0530 Subject: [PATCH 005/119] added-main-readME --- README.md | 1514 +++-------------------------------------------------- 1 file changed, 80 insertions(+), 1434 deletions(-) diff --git a/README.md b/README.md index 0f66cfa0..ea2b3bbd 100644 --- a/README.md +++ b/README.md @@ -13,1493 +13,140 @@ ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/ELEVATE-Project/mentoring?filename=src%2Fpackage.json) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) - - +
The Project building block facilitates the creation and engagement with micro-improvement projects. - -
- -# Supported Operating Systems - -- **Ubuntu (Recommended: Version 20 and above)** -- **Windows (Recommended: Version 11 and above)** -- **macOs (Recommended: Version 12 and above)** - -# Setup Options - -**Project services can be setup using two methods:** - -> Note : This guide outlines two setup methods, detailed below. For a quick, beginner-friendly setup and walkthrough of services, it is recommended to use the Dockerized Services & Dependencies setup with the Docker-Compose file. - -
Dockerized Services & Dependencies Using Docker-Compose File - -## Dockerized Services & Dependencies - -Expectation: By diligently following the outlined steps, you will successfully establish a fully operational Project application setup, including both the portal and backend services. - -## Prerequisites - -To set up the Project application, ensure you have Docker and Docker Compose installed on your system. For Ubuntu users, detailed installation instructions for both can be found in the documentation here: [How To Install and Use Docker Compose on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04). To install and use Nodejs in Ubuntu machine, you can follow instructions here: [How To Install Nodejs in Ubuntu](https://nodejs.org/en/download/package-manager). For Windows and MacOS users, you can refer to the Docker documentation for installation instructions: [Docker Compose Installation Guide](https://docs.docker.com/compose/install/). Once these prerequisites are in place, you're all set to get started with setting up the Project application. - -## Installation - -**Create project Directory:** Establish a directory titled **project**. - -> Example Command: `mkdir project && cd project/` - -> Note: All commands are run from the project directory. - -## Operating Systems: Linux / macOS - -> **Caution:** Before proceeding, please ensure that the ports given here are available and open. It is essential to verify their availability prior to moving forward. You can run below command in your terminal to check this - -``` -for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 2707 3569; do - if lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then - echo "Port $port is in use" - else - echo "Port $port is available" - fi -done -``` - -1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. - ` curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh - ` - - > Note : The script will download all the essential files and launch the services in Docker. Once all services are successfully up and running, you can proceed to the next steps. - - **General Instructions :** - - 1. All containers which are part of the docker-compose can be gracefully stopped by pressing Ctrl + c in the same terminal where the services are running. - - 2. All docker containers can be stopped and removed by using below command. - ``` - sudo ./docker-compose-down.sh - ``` - 3. All services and dependencies can be started using below command. - ``` - sudo ./docker-compose-up.sh - ``` - - **Keep the current terminal session active, and kindly open a new terminal window within the project directory.** - -**After successfully completing this, please move to the next section: [Enable Citus Extension](#enable-citus-extension-optional)** - -## Operating Systems: Windows - -1. **Download Docker Compose File:** Retrieve the **[docker-compose-project.yml](https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/docker-compose-project.yml)** file from the Project service repository and save it to the project directory. - - ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/docker-compose-project.yml - ``` - - > Note: All commands are run from the project directory. - -2. **Download Environment Files**: Using the OS specific commands given below, download environment files for all the services. - - - **Windows** - - ``` - curl -L ^ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/interface_env ^ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/entity_management_env ^ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/project_env ^ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/notification_env ^ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/scheduler_env ^ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/user_env ^ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/env.js - ``` - - > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. - - > **Caution:** While the default values in the downloaded environment files enable the Project Application to operate, certain features may not function correctly or could be impaired unless the adopter-specific environment variables are properly configured. - -3. **Download `replace_volume_path` Script File** - - - **Windows** - - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/dockerized/scripts/windows/replace_volume_path.bat - ``` - -4. **Run `replace_volume_path` Script File** - - - **Windows** - - Run the script file either by double clicking it or by executing the following command from the terminal. - - ``` - replace_volume_path.bat - ``` - - > **Note**: The provided script file replaces the host path for the **portal** service container volume in the `docker-compose-project.yml` file with your current directory path. - > - > volumes: - > - > \- /home/shikshalokam/elevate/single-click/linux/env.js:/usr/src/app/www/assets/env/env.js - -5. **Download `docker-compose-up` & `docker-compose-down` Script Files** - - - **Windows** - - ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/docker-compose-up.bat - ``` - - ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/docker-compose-down.bat - ``` - -6. **Run All Services & Dependencies**:All services and dependencies can be started using the `docker-compose-up` script file. - - - **Windows** - - ``` - docker-compose-up.bat - ``` - - > Double-click the file or run the above command from the terminal. - - > **Note**: During the first Docker Compose run, the database, migration seeder files, and the script to set the default organization will be executed automatically. - -7. **Remove All Service & Dependency Containers**: - All docker containers can be stopped and removed by using the `docker-compose-down` file. - - - **Windows** - - ``` - docker-compose-down.bat - ``` - - > **Caution**: As per the default configuration in the `docker-compose-project.yml` file, using the `down` command will lead to data loss since the database container does not persist data. To persist data across `down` commands and subsequent container removals, refer to the "Persistence of Database Data in Docker Containers" section of this documentation. +--- -## Enable Citus Extension (Optional) +## šŸ’» Supported Operating Systems -User management service comes with this bundle relies on PostgreSQL as its core database system. To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. +* **Ubuntu** (Recommended: Version 20 and above) +* **Windows** (Recommended: Version 11 and above) +* **macOS** (Recommended: Version 12 and above) -For more information, refer **[Citus Data](https://www.citusdata.com/)**. +--- -To enable the Citus extension for user services, follow these steps. +## ✨ Setup & Deployment Guide -1. Create a sub-directory named `user` and download `distributionColumns.sql` into it. (Skip this for linux/macOs) - ``` - mkdir user && curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql - ``` -2. Set up the citus_setup file by following the steps given below. +This section outlines the different ways to set up the **Projects Service**. Please select the deployment environment and setup method that best suits your needs. - - **Ubuntu/Linux/Mac** +### šŸ„‡ **STAND-ALONE SETUP (Projects Service Only)** - 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. - ``` - sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user - ``` - - - **Windows** - 1. Download the `citus_setup.bat` file. - ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/citus_setup.bat - ``` - 2. Enable Citus and set distribution columns for `user` database by running the `citus_setup.bat`with the following arguments. - ``` - citus_setup.bat user postgres://postgres:postgres@citus_master:5432/user - ``` - > **Note:** Since the `citus_setup.bat` file requires arguments, it must be run from a terminal. - -## Persistence Of Database Data In Docker Container (Optional) - -To ensure the persistence of database data when running `docker compose down`, it is necessary to modify the `docker-compose-project.yml` file according to the steps given below: - -1. **Modification Of The `docker-compose-project.yml` File:** - - Begin by opening the `docker-compose-project.yml` file. Locate the section pertaining to the Citus and mongo container and proceed to uncomment the volume specification. This action is demonstrated in the snippet provided below: - - ```yaml - mongo: - image: 'mongo:4.4.14' - restart: 'always' - ports: - - '27017:27017' - networks: - - project_net - volumes: - - mongo-data:/data/db - logging: - driver: none - - citus: - image: citusdata/citus:11.2.0 - container_name: 'citus_master' - ports: - - 5432:5432 - volumes: - - citus-data:/var/lib/postgresql/data - ``` - -2. **Uncommenting Volume Names Under The Volumes Section:** - - Next, navigate to the volumes section of the file and proceed to uncomment the volume names as illustrated in the subsequent snippet: - - ```yaml - networks: - elevate_net: - external: false - - volumes: - citus-data: - mongo-data: - ``` - -By implementing these adjustments, the configuration ensures that when the `docker-compose down` command is executed, the database data is securely stored within the specified volumes. Consequently, this data will be retained and remain accessible, even after the containers are terminated and subsequently reinstated using the `docker-compose up` command. - -## Sample User Accounts Generation - -During the initial setup of Project services with the default configuration, you may encounter issues creating new accounts through the regular SignUp flow on the project portal. This typically occurs because the default SignUp process includes OTP verification to prevent abuse. Until the notification service is configured correctly to send actual emails, you will not be able to create new accounts. - -In such cases, you can generate sample user accounts using the steps below. This allows you to explore the Project services and portal immediately after setup. - -> **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. - -- **Ubuntu/Linux/Mac** - - ``` - sudo ./insert_sample_data.sh user postgres://postgres:postgres@citus_master:5432/user - ``` - -- **Windows** - - 1. **Download The `sampleData.sql` Files:** - - ``` - mkdir sample-data\user 2>nul & ^ - curl -L "https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/sample-data/windows/user/sampleData.sql" -o sample-data\user\sampleData.sql - ``` - - 2. **Download The `insert_sample_data` Script File:** - - ``` - curl -L -o insert_sample_data.bat https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/dockerized/scripts/windows/insert_sample_data.bat - ``` - - 3. **Run The `insert_sample_data` Script File:** - - ``` - insert_sample_data.bat user postgres://postgres:postgres@citus_master:5432/user - ``` - - After successfully running the script mentioned above, the following user accounts will be created and available for login: - - | Email ID | Password | Role | - | ------------------------ | ---------- | ----------------------- | - | aaravpatel@example.com | Password1@ | State Education Officer | - | arunimareddy@example.com | Password1@ | State Education Officer | - | devikasingh@example.com | Password1@ | State Education Officer | - -## Sample Data Creation For Projects - -This step will guide us in implementing a sample project solution following the initial setup of the project service. - -1. **Insert Sample Data To Database:** - - - **Ubuntu/Linux/Mac** - - 1. Insert sample data by running the following command. - - ``` - sudo ./add_sample_project_entity_data.sh - ``` - - - **Windows** - - 1. Download `entity-project-sample-data.bat` Script File: - - ``` - curl -L ^ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/entity-project-sample-data.bat ^ - ``` - - 2. Make the setup file executable by running the following command. - - ``` - entity-project-sample-data.bat - ``` - -## Default Forms Creation for Portal Configuration - -This step inserts configuration forms into MongoDB, enabling or disabling features and fields on portal pages. - -#### Insert Forms Data into Database - -- **Ubuntu/Linux/Mac**: - - ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/import_forms_mongo.sh && chmod +x import_forms_mongo.sh && sudo ./import_forms_mongo.sh mongodb://mongo:27017/elevate-project - ``` - -- **Windows**: - 1. Download the `import_forms_mongo.bat` file: - ```cmd - curl -L -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/import_forms_mongo.bat - ``` - 2. Run the script: - ```cmd - import_forms_mongo.bat mongodb://localhost:27017/elevate-project - ``` - -## Explore the Portal +
+ **Click to Expand Stand-Alone Setup Options** +
-Once the services are up and the front-end app bundle is built successfully, navigate to **[localhost:7007](http://localhost:7007/)** to access the Project app. +This setup is ideal for **local development, testing**, and deployments where only the core Projects Service components are required. -> **Warning:** In this setup, features such as **Sign-Up, Project Certificate, Project Sharing, and Project PDF Report** will not be available because cloud storage credentials have been masked in the environment files for security reasons. +#### I. Docker Setup (Recommended) +
+ 1. Ubuntu Setup +Go to the detailed Ubuntu Docker setup guide: **SETUP_STANDALONE_DOCKER_UBUNTU.md**
-Natively Installed Services & Dependencies - -## PM2 Managed Services & Natively Installed Dependencies - -### System Requirements - -- **Node.jsĀ®:** v20 -- **PostgreSQL:** 16 -- **Apache KafkaĀ®:** 3.5.0 -- **MongoDB:** 4.4.14 -- **Gotenberg:** 8.5.0 - -Expectation: Upon following the prescribed steps, you will achieve a fully operational ELEVATE-Project application setup. Both the portal and backend services are managed using PM2, with all dependencies installed natively on the host system. - -## Prerequisites - -Before setting up the following ELEVATE-Project application, dependencies given below should be installed and verified to be running. Refer to the steps given below to install them and verify. - -- **Ubuntu/Linux** - - 1. Download dependency management scripts: - - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/check-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/install-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/uninstall-dependencies.sh && \ - chmod +x check-dependencies.sh && \ - chmod +x install-dependencies.sh && \ - chmod +x uninstall-dependencies.sh - ``` - - 2. Verify installed dependencies by running `check-dependencies.sh`: - - ``` - ./check-dependencies.sh - ``` - - > Note: Keep note of any missing dependencies. - - 3. Install dependencies by running `install-dependencies.sh`: - ``` - ./install-dependencies.sh - ``` - > Note: Install all missing dependencies and use check-dependencies script to ensure everything is installed and running. - 4. Uninstall dependencies by running `uninstall-dependencies.sh`: - - ``` - ./uninstall-dependencies.sh - ``` - - > Warning: Due to the destructive nature of the script (without further warnings), it should only be used during the initial setup of the dependencies. For example, Uninstalling PostgreSQL/Citus using script will lead to data loss. USE EXTREME CAUTION. - - > Warning: This script should only be used to uninstall dependencies that were installed via installation script in step 3. If same dependencies were installed using other methods, refrain from using this script. This script is provided in-order to reverse installation in-case issues arise from a bad install. - -- **MacOS** - - 1. Install Node.js 20: - - ``` - brew install node@20 - ``` - - ``` - brew link --overwrite node@20 - ``` - - 2. Install Kafka: - - ``` - brew install kafka - ``` - - > Note: To install Kafka on older macOS versions like Monterey (Intel architecture), you need to follow the manual installation process instead of using Homebrew. The process includes downloading Kafka, setting up ZooKeeper, and running Kafka services. You can find the official Kafka installation guide here: [Kafka Quickstart Guide](https://kafka.apache.org/quickstart).This ensures compatibility with older macOS systems. Follow the steps outlined in the documentation for a smooth setup. - - 3. Install PostgreSQL 16: - - ``` - brew install postgresql@16 - ``` - - 4. Install PM2: - - ``` - sudo npm install pm2@latest -g - ``` - - 5. Install Redis: - - ``` - brew install redis - ``` - - 6. Install mongDB: - - ``` - brew tap mongodb/brew - ``` - - ``` - brew install mongodb-community@4.4 - ``` - - ``` - brew link mongodb-community@4.4 --force - ``` - - ``` - brew services start mongodb-community@4.4 - ``` - - 7. Download `check-dependencies.sh` file: - - ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/native/scripts/macos/check-dependencies.sh && \ - chmod +x check-dependencies.sh - ``` - - 8. Verify installed dependencies by running `check-dependencies.sh`: - - ``` - ./check-dependencies.sh - ``` - - > Note : If you've manually installed Kafka without Homebrew, the script might incorrectly indicate that Kafka and Homebrew are not installed, as it checks only for Homebrew installations. In such cases, you can safely ignore this warning. Ensure that both Kafka and ZooKeeper are running on their default ports (ZooKeeper on `2181`, Kafka on `9092`). This will confirm proper installation and functionality despite the script's output. - -- **Windows** - - 1. Install Node.js 20: - - Download and install Node.js v20 for Windows platform (x64) from official [Node.js download page](https://nodejs.org/en/download). - - 2. Install Kafka 3.5.0: - - 1. Adapt the instructions given in the following ["Apache Kafka on Windows"](https://www.conduktor.io/kafka/how-to-install-apache-kafka-on-windows/) documentation to install Kafka version 3.5.0. - - > Note: As per the instructions, Kafka server and Zookeeper has to be kept active on different WSL terminals for the entire lifetime of ELEVATE-Project services. - - > Note: Multiple WSL terminals can be opened by launching `Ubuntu` from start menu. - - 2. Open a new WSL terminal and execute the following command to get the IP of the WSL instance. - - ``` - ip addr show eth0 - ``` - - Sample Output: - - ``` - 2: eth0: mtu 1492 qdisc mq state UP group default qlen 1000 - link/ether 11:56:54:f0:as:vf brd ff:ff:ff:ff:ff:ff - inet 172.12.46.150/20 brd 172.24.79.255 scope global eth0 - valid_lft forever preferred_lft forever - inet6 fe80::215:5dff:fee7:dc52/64 scope link - valid_lft forever preferred_lft forever - ``` - - Keep note of the IP address shown alongside `inet`. In the above case, `172.12.46.150` is IP address of the WSL instance. - - 3. In the same WSL terminal, navigate to `config` directory of Kafka from step 1 and make the following changes to `server.properties` file. - - - Uncomment `listeners=PLAINTEXT://:9092` line and change it to `listeners=PLAINTEXT://0.0.0.0:9092` to allow connections from any IP. - - - Uncomment `advertised.listeners` line and set it to `advertised.listeners=PLAINTEXT://172.12.46.150:9092`. Replace `172.12.46.150` with the actual IP address of your WSL instance. - - 4. Restart the Zookeeper and Kafka Server from their own WSL terminals from step 1. - - 3. Install Redis: - - 1. Follow the instructions given in the official [Redis Documentation](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-windows/) to install Redis using WSL. - - 2. Using the WSL terminal, open the Redis configuration file in a text editor, such as nano: - - ``` - sudo nano /etc/redis/redis.conf - ``` - - 3. Find the line containing `bind 127.0.0.1 ::1` and change it to `bind 0.0.0.0 ::.`. This change allows Redis to accept connections from any IP address. Then save and exit the file. - - 4. Restart Redis to apply the changes: - - ``` - sudo service redis-server restart - ``` - - 4. Install PM2: - - ``` - npm install pm2@latest -g - ``` - - 5. Install PostgreSQL 16: - - 1. Download and install PostgreSQL 16 from [EnterpriseDB PostgreSQL](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads) download page. - - > Note: Set username and password for the default database to be 'postgres' during installation. - - 2. Once installed, Add `C:\Program Files\PostgreSQL\16\bin` to windows environment variables. Refer [here](https://www.computerhope.com/issues/ch000549.htm) or [here](https://stackoverflow.com/a/68851621) for more information regarding how to set it. - - 6. Install MongoDB: - - Follow the official [MongoDB Website](https://www.mongodb.com/try/download/community) to install MongoDB. - - 7. Install Gotenberg via Docker: - - 1. Download Docker Desktop for Windows from [Docker Website](https://docs.docker.com/desktop/setup/install/windows-install/) - - 2. Run the installer and follow the setup instructions. - - 3. Ensure Docker Desktop is running and configured to use Linux containers(default settings). - - 4. Open a terminal (e.g., Command Prompt). - - 5. Pull the Gotenberg image: - - ``` - docker pull gotenberg/gotenberg:latest - ``` - - 6. Run the Gotenberg container with the following command: - - ``` - docker run -d --name gotenberg -p 3000:3000 gotenberg/gotenberg:latest - ``` - - 7. Verify the container is running. You should see the Gotenberg container listed after running the below command. - ``` - docker ps - ``` - -## Installation - -1. **Create ELEVATE-Project Directory:** Create a directory named **ELEVATE-Project**. - - > Example Command: `mkdir ELEVATE-Project && cd ELEVATE-Project/` - -2. **Git Clone Services And Portal Repositories** - - - **Ubuntu/Linux/MacOS** - - ``` - git clone -b main https://github.com/ELEVATE-Project/project-service.git && \ - git clone -b main https://github.com/ELEVATE-Project/entity-management.git && \ - git clone -b master https://github.com/ELEVATE-Project/user.git && \ - git clone -b master https://github.com/ELEVATE-Project/notification.git && \ - git clone -b main https://github.com/ELEVATE-Project/interface-service.git && \ - git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ - git clone -b main https://github.com/ELEVATE-Project/observation-survey-projects-pwa - ``` - - - **Windows** - - ``` - git clone -b staging https://github.com/ELEVATE-Project/project-service.git & - git clone -b staging https://github.com/ELEVATE-Project/entity-management.git & - git clone -b master https://github.com/ELEVATE-Project/user.git & - git clone -b master https://github.com/ELEVATE-Project/notification.git & - git clone -b main https://github.com/ELEVATE-Project/interface-service.git & - git clone -b master https://github.com/ELEVATE-Project/scheduler.git & - git clone -b main https://github.com/ELEVATE-Project/observation-survey-projects-pwa - ``` - -3. **Install NPM Packages** - - - **Ubuntu/Linux/MacOS** - - ``` - cd project-service && npm install && cd ../ && \ - cd entity-management/src && npm install && cd ../.. && \ - cd user/src && npm install && cd ../.. && \ - cd notification/src && npm install && cd ../.. && \ - cd interface-service/src && npm install && cd ../.. && \ - cd scheduler/src && npm install && cd ../.. && \ - cd observation-survey-projects-pwa && npm install --force && cd .. - ``` - - - **Windows** - - ``` - cd project-service && npm install && cd .. - cd user\src && npm install && cd ..\.. - cd notification\src && npm install && cd ..\.. - cd interface-service\src && npm install && cd ..\.. - cd scheduler\src && npm install && cd ..\.. - cd observation-survey-projects-pwa && npm install --force && cd .. - ``` - - > Note: Entity-management service runs only on node-16 for Windows native setup. - - ``` - nvm use 16 - ``` - - ``` - cd entity-management\src && npm install && cd ..\.. - ``` - - > Note: Change the node version as it was before. - -4. **Download Environment Files** - - - **Ubuntu/Linux** - - ``` - curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/project_env && \ - curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/entity_management_env && \ - curl -L -o user/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/user_env && \ - curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env && \ - curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ - curl -L -o scheduler/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/scheduler_env && \ - curl -L -o observation-survey-projects-pwa/src/environments/environment.ts https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/enviroment.ts - ``` - - - **MacOs** - - ``` - curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/project_env && \ - curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/entity_management_env && \ - curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/non-citus/user_env && \ - curl -L -o notification/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/non-citus/notification_env && \ - curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ - curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/scheduler_env && \ - curl -L -o observation-survey-projects-pwa/src/environments/environment.ts https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/enviroment.ts - ``` - - - **Windows** - - ``` - curl -L -o project-service\.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/project_env & - curl -L -o entity-management\src\.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/entity_management_env & - curl -L -o user\src\.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/user_env & - curl -L -o notification\src\.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env & - curl -L -o interface-service\src\.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env & - curl -L -o scheduler\src\.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/scheduler_env & - curl -L -o observation-survey-projects-pwa\src\environments\environment.ts https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/enviroment.ts - ``` - - > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. - - > **Caution:** While the default values in the downloaded environment files enable the ELEVATE-Project Application to operate, certain features may not function correctly or could be impaired unless the adopter-specific environment variables are properly configured. - - > **Important:** As mentioned in the above linked document, the **User SignUp** functionality may be compromised if key environment variables are not set correctly during deployment. If you opt to skip this setup, consider using the sample user account generator detailed in the `Sample User Accounts Generation` section of this document. - -5. **Create Databases** - - - **Ubuntu/Linux** - - 1. Download `create-databases.sh` Script File: - - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/create-databases.sh - ``` - - 2. Make the executable by running the following command: - ``` - chmod +x create-databases.sh - ``` - 3. Run the script file: - ``` - ./create-databases.sh - ``` - - - **MacOs** - - 1. Download `create-databases.sh` Script File: - - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/macos/create-databases.sh - - ``` - - 2. Make the executable by running the following command: - ``` - chmod +x create-databases.sh - ``` - 3. Run the script file: - ``` - ./create-databases.sh - ``` - - - **Windows** - - 1. Download `create-databases.bat` Script File: - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/windows/create-databases.bat - ``` - 2. Run the script file: - ``` - create-databases.bat - ``` - -6. **Run Migrations To Create Tables** - - - **Ubuntu/Linux/MacOS** - - 1. Run Migrations: - ``` - cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ - cd notification/src && npx sequelize-cli db:migrate && cd ../.. - ``` - - - **Windows** - - 1. Run Migrations: - ``` - cd user\src && npx sequelize-cli db:migrate && cd ..\.. && cd notification\src && npx sequelize-cli db:migrate && cd ..\.. - ``` - -7. **Enabling Citus And Setting Distribution Columns (Optional)** - - To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. - - > NOTE: Currently only available for Linux based operation systems. - - 1. Download user `distributionColumns.sql` file. - - ``` - curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql - ``` - - 2. Set up the `citus_setup` file by following the steps given below. - - - **Ubuntu/Linux** - - 1. Download the `citus_setup.sh` file: - - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh - - ``` - - 2. Make the setup file executable by running the following command: - - ``` - chmod +x citus_setup.sh - ``` - - 3. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. - ``` - ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users - ``` - -8. **Insert Initial Data** - - - **Ubuntu/Linux/MacOS** - - 1. Download `entity-project-sample-data.sh` Script File: - - 1.1. For ubuntu/linux - - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/entity-project-sample-data.sh - ``` - - 1.1. For mac - - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/macos/entity-project-sample-data.sh - ``` - - 2. Make the executable by running the following command: - ``` - chmod +x entity-project-sample-data.sh - ``` - 3. Run the script file: - ``` - ./entity-project-sample-data.sh - ``` - 4. Run seeders of user service - ``` - cd user/src && npm run db:seed:all && cd ../.. - ``` - - - **Windows** - - 1. Download `entity-project-sample-data.bat` Script File: - - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/windows/entity-project-sample-data.bat - ``` - - 2. Run the script file: - - ``` - entity-project-sample-data.bat - ``` - - 3. Run seeders of user service - - ``` - cd user\src && npm run db:seed:all && cd ..\.. - ``` - -9. **Insert Forms Data into Database** - - - **Ubuntu/Linux/MacOS** - - 1. Download `import_forms.js` Script File And Make the setup file executable by running the following command: - - ``` - curl -s https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/import_forms.js | node - ``` - - - **Windows** - - 1. Download `import_forms_mongo.bat` Script File and execute the file by running the following commands: - - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/windows/import_forms_mongo.bat - ``` - - ``` - import_forms_mongo.bat - ``` - -10. **Start The Services** - - Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. - - - **Ubuntu/Linux** - - ``` - (cd project-service && pm2 start app.js --name project-service && cd -) && \ - (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ - (cd user/src && pm2 start app.js --name user && cd -) && \ - (cd notification/src && pm2 start app.js --name notification && cd -) && \ - (cd interface-service/src && pm2 start app.js --name interface && cd -) && \ - (cd scheduler/src && pm2 start app.js --name scheduler && cd -) - ``` - - - **MacOs** - - ``` - cd project-service && npx pm2 start app.js -i 2 --name project-service && cd .. && \ - cd entity-management/src && npx pm2 start app.js -i 2 --name entity-management && cd ../.. && \ - cd user/src && npx pm2 start app.js -i 2 --name user && cd ../.. && \ - cd notification/src && npx pm2 start app.js -i 2 --name notification && cd ../.. && \ - cd interface-service/src && npx pm2 start app.js -i 2 --name interface && cd ../.. && \ - cd scheduler/src && npx pm2 start app.js -i 2 --name scheduler && cd ../.. - ``` - - - **Windows** - - ``` - cd project-service && pm2 start app.js --name project-service && cd .. - cd entity-management\src && pm2 start app.js --name entity-management && cd ..\.. - cd user\src && pm2 start app.js --name user && cd ..\.. - cd notification\src && pm2 start app.js --name notification && cd ..\.. - cd interface-service\src && pm2 start app.js --name interface && cd ..\.. - cd scheduler\src && pm2 start app.js --name scheduler && cd ..\.. - ``` - -11. **Run Service Scripts** - - - **Ubuntu/Linux/MacOS** - - ``` - cd user/src/scripts && node insertDefaultOrg.js && node viewsScript.js && cd ../../.. - ``` - - - **Windows** - - ``` - cd user\src\scripts && node insertDefaultOrg.js && node viewsScript.js && cd ..\..\.. - ``` - -12. **Start The Portal** - - ELEVATE-Project portal utilizes Ionic for building the browser bundle, follow the steps given below to install them and start the portal. - - - **Ubuntu/Linux/Windows** - - 1. Install the Ionic framework: - - ``` - npm install -g ionic - ``` - - 2. Install the Ionic client: - - ``` - npm install -g @ionic/cli - ``` - - 3. Navigate to `observation-survey-projects-pwa` directory: - - ``` - cd observation-survey-projects-pwa - ``` - - 4. Run the project on your local system using the following command: - - ``` - ionic serve - ``` - - Navigate to http://localhost:8100 to access the ELEVATE-Project Portal. - -## Sample User Accounts Generation - -During the initial setup of ELEVATE-Project services with the default configuration, you may encounter issues creating new accounts through the regular SignUp flow on the ELEVATE-Project portal. This typically occurs because the default SignUp process includes OTP verification to prevent abuse. Until the notification service is configured correctly to send actual emails, you will not be able to create new accounts. - -In such cases, you can generate sample user accounts using the steps below. This allows you to explore the ELEVATE-Project services and portal immediately after setup. - -> **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. - -- **Ubuntu/Linux** - - ``` - curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/insert_sample_data.sh && \ - chmod +x insert_sample_data.sh && \ - ./insert_sample_data.sh - ``` - -- **MacOS** - - ``` - curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/macos/insert_sample_data.sh && \ - chmod +x insert_sample_data.sh && \ - ./insert_sample_data.sh - ``` - -- **Windows** - - ``` - curl -o insert_sample_data.bat https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/windows/insert_sample_data.bat && ^ - insert_sample_data.bat - ``` - -After successfully running the script mentioned above, the following user accounts will be created and available for login: - -| Email ID | Password | Role | -| ------------------------ | ---------- | ------------------------- | -| aaravpatel@example.com | Password1@ | State Educational Officer | -| arunimareddy@example.com | Password1@ | State Educational Officer | -| devikasingh@example.com | Password1@ | State Educational Officer | - + 2. macOS Setup +Go to the detailed macOS Docker setup guide: **SETUP_STANDALONE_DOCKER_MACOS.md**
-## Postman Collections - -- [Projects Service](https://github.com/ELEVATE-Project/project-service/tree/main/api-doc) - -## Adding New Projects to the System - -With implementation scripts, you can seamlessly add new projects to the system. Once a project is successfully added, it becomes visible on the portal, ready for use and interaction. For a comprehensive guide on setting up and using the implementation script, please refer to the [documentation here](https://github.com/ELEVATE-Project/project-service/tree/main/Project-Service-implementation-Script). - - - - +--- -# Team +## šŸ¤ Team -# Open Source Dependencies +### Open Source Dependencies Several open source dependencies that have aided Projects's development: @@ -1509,5 +156,4 @@ Several open source dependencies that have aided Projects's development: ![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white) ![Git](https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge&logo=git&logoColor=white) - +--- \ No newline at end of file From a9847400112ea46d2a165c03946674ddba7d7f3f Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 21 Nov 2025 15:39:32 +0530 Subject: [PATCH 006/119] added-main-readME --- documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index 83f5a495..72a909ae 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -150,7 +150,7 @@ Before setting up the following ELEVATE-Project application, dependencies given 1. Download `create-databases.sh` Script File: ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/create-databases.sh + curl -OJL https://github.com/ELEVATE-Project/project-service/blob/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh ``` 2. Make the executable by running the following command: From ff18a19e3be34fbda3862817c6d88523941de10b Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 24 Nov 2025 15:02:53 +0530 Subject: [PATCH 007/119] pushing-for-native --- .../3.4.0/dockerized/envs/interface_env | 34 +- documentation/3.4.0/dockerized/envs/user_env | 13 +- documentation/3.4.0/native/envs/interface_env | 43 ++- documentation/3.4.0/native/envs/user_env | 26 +- .../stand-alone/ubuntu/entity_sampleData.js | 242 ++------------ .../ubuntu/insert_sample_solutions.js | 4 +- .../ubuntu/project_entity_sample_data.sh | 52 +++ .../stand-alone/ubuntu/project_sampleData.js | 60 ++-- .../setup/docker/stand-alone/ubuntu/README.md | 47 ++- .../setup/native/stand-alone/ubuntu/README.md | 312 ++++++++---------- 10 files changed, 340 insertions(+), 493 deletions(-) create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh diff --git a/documentation/3.4.0/dockerized/envs/interface_env b/documentation/3.4.0/dockerized/envs/interface_env index 3a8f00e6..d12c7e5d 100644 --- a/documentation/3.4.0/dockerized/envs/interface_env +++ b/documentation/3.4.0/dockerized/envs/interface_env @@ -1,18 +1,26 @@ -API_DOC_URL=http://localhost:3569/interface/api-doc +API_DOC_URL=/interface/api-doc APPLICATION_ENV=development APPLICATION_PORT=3569 -ENTITY_SERVICE_BASE_URL=http://entity_management:5001 -INSTALLED_PACKAGES=elevate-user elevate-scheduler elevate-project elevate-entity-management -NOTIFICATION_SERVICE_BASE_URL=http://notification:3002 -PROJECT_SERVICE_BASE_URL=http://project:6000 -RATE_LIMITER_ENABLED=false -RATE_LIMITER_GENERAL_LIMIT=50 +ELEVATE_NOTIFICATION_KAFKA_BROKERS=10.148.0.38:9092 +ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=dev.mentoring +ELEVATE_NOTIFICATION_KAFKA_TOPIC=dev.notification +ENTITY_SERVICE_BASE_URL=http://localhost:5001 +INSTALLED_PACKAGES=elevate-mentoring elevate-survey-observation@1.0.1 elevate-self-creation-portal +MENTORING_SERVICE_BASE_URL=http://localhost:7101 +NOTIFICATION_SERVICE_BASE_URL=http://localhost:7201 +PROJECT_SERVICE_BASE_URL=http://localhost:6000 +RATE_LIMITER_ENABLED=true +RATE_LIMITER_GENERAL_LIMIT=500 RATE_LIMITER_NUMBER_OF_PROXIES=3 RATE_LIMITER_PUBLIC_LOW_LIMIT=5 -REQUIRED_PACKAGES=elevate-user@1.1.77 elevate-scheduler@1.0.4 elevate-project@1.1.16 elevate-entity-management@1.0.10 -SCHEDULER_SERVICE_BASE_URL=http://scheduler:4000 +REQUIRED_BASE_PACKAGES=elevate-mentoring elevate-project elevate-survey-observation self-creation-portal +REQUIRED_PACKAGES=elevate-mentoring@1.2.90 elevate-survey-observation@1.0.22 elevate-project@1.1.53 shiksha-notification@1.1.3 elevate-self-creation-portal@1.0.70 +ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json +SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw +SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw +SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 +SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 +SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001 SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE -USER_SERVICE_BASE_URL=http://user:3001 -ALLOWED_HOST=http://localhost:7007 -REQUIRED_BASE_PACKAGES=user,notification,scheduler,project,entity -ROUTE_CONFIG_JSON_URLS_PATHS="https://raw.githubusercontent.com/ELEVATE-Project/user/staging/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/scheduler/develop/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/entity-management/main/src/constants/interface-routes/configs.json" \ No newline at end of file +SURVEY_SERVICE_BASE_URL=http://localhost:5007 +USER_SERVICE_BASE_URL=http://localhost:3001 \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/user_env b/documentation/3.4.0/dockerized/envs/user_env index c25d6c61..77d735ce 100644 --- a/documentation/3.4.0/dockerized/envs/user_env +++ b/documentation/3.4.0/dockerized/envs/user_env @@ -14,8 +14,19 @@ INTERNAL_CACHE_EXP_TIME=86400 IV=LHYOA5YnTonqcgrm15k3/Q== KAFKA_GROUP_ID=mentoring KAFKA_TOPIC= +DEFAULT_AZURE_CONTAINER_NAME=mentoring-azure-private +DEFAULT_GCP_BUCKET_NAME=DEFAULT_GCP_BUCKET_NAME # KAFKA_URL= localhost:9092 - +CLOUD_STORAGE_PROVIDER = aws +CLOUD_STORAGE_BUCKETNAME =mentoring-prod-storage-private +CLOUD_STORAGE_SECRET= CLOUD_STORAGE_SECRET +CLOUD_STORAGE_REGION =ap-south-1 +CLOUD_ENDPOINT =CLOUD_ENDPOINT +CLOUD_STORAGE_ACCOUNTNAME =CLOUD_STORAGE_ACCOUNTNAME +CLOUD_STORAGE_BUCKET_TYPE = private +PUBLIC_ASSET_BUCKETNAME=mentoring-prod-storage-private +AZURE_ACCOUNT_KEY='AZURE_ACCOUNT_KEY' +AZURE_ACCOUNT_NAME=elevatementoringaccount KAFKA_URL= kafka:9092 KEY=key diff --git a/documentation/3.4.0/native/envs/interface_env b/documentation/3.4.0/native/envs/interface_env index 768d6ac6..d12c7e5d 100644 --- a/documentation/3.4.0/native/envs/interface_env +++ b/documentation/3.4.0/native/envs/interface_env @@ -1,17 +1,26 @@ -API_DOC_URL= /interface/api-doc -APPLICATION_ENV= development -APPLICATION_PORT= 3569 -ENTITY_SERVICE_BASE_URL= http://localhost:5001 -INSTALLED_PACKAGES= elevate-user elevate-scheduler elevate-project elevate-entity-management -NOTIFICATION_SERVICE_BASE_URL= http://localhost:3002 -PROJECT_SERVICE_BASE_URL= http://localhost:5000 -RATE_LIMITER_ENABLED= false -RATE_LIMITER_GENERAL_LIMIT= 50 -RATE_LIMITER_NUMBER_OF_PROXIES= 3 -RATE_LIMITER_PUBLIC_LOW_LIMIT= 5 -REQUIRED_BASE_PACKAGES= user,notification,scheduler,project,entity-management -REQUIRED_PACKAGES="elevate-user@1.1.77 elevate-scheduler@1.0.4 elevate-project@1.1.16 elevate-entity-management@1.0.10" -ROUTE_CONFIG_JSON_URLS_PATHS="https://raw.githubusercontent.com/ELEVATE-Project/user/staging/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/scheduler/develop/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/entity-management/main/src/constants/interface-routes/configs.json" -SCHEDULER_SERVICE_BASE_URL= http://localhost:4000 -SUPPORTED_HTTP_TYPES= GET POST PUT PATCH DELETE -USER_SERVICE_BASE_URL= http://localhost:3001 \ No newline at end of file +API_DOC_URL=/interface/api-doc +APPLICATION_ENV=development +APPLICATION_PORT=3569 +ELEVATE_NOTIFICATION_KAFKA_BROKERS=10.148.0.38:9092 +ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=dev.mentoring +ELEVATE_NOTIFICATION_KAFKA_TOPIC=dev.notification +ENTITY_SERVICE_BASE_URL=http://localhost:5001 +INSTALLED_PACKAGES=elevate-mentoring elevate-survey-observation@1.0.1 elevate-self-creation-portal +MENTORING_SERVICE_BASE_URL=http://localhost:7101 +NOTIFICATION_SERVICE_BASE_URL=http://localhost:7201 +PROJECT_SERVICE_BASE_URL=http://localhost:6000 +RATE_LIMITER_ENABLED=true +RATE_LIMITER_GENERAL_LIMIT=500 +RATE_LIMITER_NUMBER_OF_PROXIES=3 +RATE_LIMITER_PUBLIC_LOW_LIMIT=5 +REQUIRED_BASE_PACKAGES=elevate-mentoring elevate-project elevate-survey-observation self-creation-portal +REQUIRED_PACKAGES=elevate-mentoring@1.2.90 elevate-survey-observation@1.0.22 elevate-project@1.1.53 shiksha-notification@1.1.3 elevate-self-creation-portal@1.0.70 +ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json +SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw +SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw +SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 +SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 +SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001 +SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE +SURVEY_SERVICE_BASE_URL=http://localhost:5007 +USER_SERVICE_BASE_URL=http://localhost:3001 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/user_env b/documentation/3.4.0/native/envs/user_env index 53681709..4d382ea0 100644 --- a/documentation/3.4.0/native/envs/user_env +++ b/documentation/3.4.0/native/envs/user_env @@ -5,12 +5,24 @@ API_DOC_URL=/user/api-doc APP_NAME=MentorED APPLICATION_ENV=development APPLICATION_PORT=3001 +CLOUD_STORAGE_PROVIDER = aws +CLOUD_STORAGE_BUCKETNAME =mentoring-prod-storage-private +CLOUD_STORAGE_SECRET= CLOUD_STORAGE_SECRET +CLOUD_STORAGE_REGION =ap-south-1 +CLOUD_ENDPOINT =CLOUD_ENDPOINT +CLOUD_STORAGE_ACCOUNTNAME =CLOUD_STORAGE_ACCOUNTNAME +CLOUD_STORAGE_BUCKET_TYPE = private +PUBLIC_ASSET_BUCKETNAME=mentoring-prod-storage-private +AZURE_ACCOUNT_KEY='AZURE_ACCOUNT_KEY' +AZURE_ACCOUNT_NAME=elevatementoringaccount CLEAR_INTERNAL_CACHE=userinternal CLOUD_STORAGE=GCP +DEFAULT_AZURE_CONTAINER_NAME=mentoring-azure-private +DEFAULT_GCP_BUCKET_NAME=DEFAULT_GCP_BUCKET_NAME ENABLE_EMAIL_OTP_VERIFICATION=false ENABLE_LOG=true GCP_PATH=gcp.json -GCP_PROJECT_ID=GCP_PROJECT_ID +GCP_PROJECT_ID=sl-dev-project INTERNAL_ACCESS_TOKEN=internal_access_token INTERNAL_CACHE_EXP_TIME=86400 IV=LHYOA5YnTonqcgrm15k3/Q== @@ -39,11 +51,8 @@ OCI_SECRET_ACCESS_KEY='+U4O+CjiC6M/mOcGjYh7K/9XjfSdJ79OoLuQrABPOJ8=' ERROR_LOG_LEVEL= silly DISABLE_LOG= false DEFAULT_ORGANISATION_CODE=default_code - -#new -DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/user +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/users ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy - MENTORING_SERVICE_URL="http://localhost:3000" INVITEE_EMAIL_TEMPLATE_CODE="emailcode" ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="coeadmin" @@ -55,10 +64,7 @@ SAMPLE_CSV_FILE_PATH="sample path" ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE = "code5" DEFAULT_ORG_ID = 1 PORTAL_URL = "portaladdress" -# SCHEDULER_SERVICE_HOST = "host" - -SCHEDULER_SERVICE_HOST = scheduler - +SCHEDULER_SERVICE_HOST = "host" SCHEDULER_SERVICE_BASE_URL = "/scheduler/" REFRESH_VIEW_INTERVAL = 100000 EMAIL_ID_ENCRYPTION_IV = 'a390328e496f025249a88384f318a536' @@ -67,9 +73,7 @@ EMAIL_ID_ENCRYPTION_ALGORITHM = 'aes-256-cbc' GENERIC_INVITATION_EMAIL_TEMPLATE_CODE = 'check_code' EVENT_ORG_LISTENER_URLS = "sample url" EVENT_ENABLE_ORG_EVENTS = false -# Downloadabale url exipres after DOWNLOAD_URL_EXPIRATION_DURATION = 300 - APPLICATION_HOST= "localhost" CHANGE_PASSWORD_TEMPLATE_CODE = "change_password" CAPTCHA_ENABLE = false diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js index 0e5303ae..fec1ed72 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -1,15 +1,8 @@ -const { ObjectId } = require('mongodb') - -let districtId = new ObjectId() -let blockId = new ObjectId() -let clusterId = new ObjectId() -let schoolId = new ObjectId() -let professionalId = new ObjectId() -let professionalSubRoleId = new ObjectId() +const { ObjectId } = require('mongodb') let entityType = [ { - _id: ObjectId('6825914b97b5680013e6a140'), + _id: new ObjectId('6825914b97b5680013e6a140'), profileForm: [], profileFields: [], types: [], @@ -29,7 +22,7 @@ let entityType = [ orgId: 'sl', }, { - _id: ObjectId('6825915197b5680013e6a142'), + _id: new ObjectId('6825915197b5680013e6a142'), profileForm: [], profileFields: [], types: [], @@ -49,7 +42,7 @@ let entityType = [ orgId: 'sl', }, { - _id: ObjectId('682591cc97b5680013e6a15c'), + _id: new ObjectId('682591cc97b5680013e6a15c'), profileForm: [], profileFields: [], types: [], @@ -69,7 +62,7 @@ let entityType = [ orgId: 'sl', }, { - _id: ObjectId('682591d397b5680013e6a15e'), + _id: new ObjectId('682591d397b5680013e6a15e'), profileForm: [], profileFields: [], types: [], @@ -88,74 +81,11 @@ let entityType = [ __v: 0, orgId: 'sl', }, - // { - // _id: new ObjectId(), - // name: 'state', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['district', 'block', 'cluster', 'school'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'district', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['block', 'cluster', 'school'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'block', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['cluster', 'school'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'cluster', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['school'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'school', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: [], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'professional_role', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['professional_subroles'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'professional_subroles', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: [], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, ] let entities = [ { - _id: ObjectId('6852c86c7248c20014b38a4d'), + _id: new ObjectId('6852c86c7248c20014b38a4d'), metaInformation: { targetedEntityTypes: [], externalId: '16', @@ -165,7 +95,7 @@ let entities = [ createdBy: '20', updatedBy: '20', deleted: false, - entityTypeId: ObjectId('6825914b97b5680013e6a140'), + entityTypeId: new ObjectId('6825914b97b5680013e6a140'), entityType: 'state', registryDetails: { code: '16', @@ -177,11 +107,11 @@ let entities = [ createdAt: new Date('2025-06-18T14:08:44.438Z'), __v: 0, groups: { - district: [ObjectId('6852c8ae7248c20014b38a57')], + district: [new ObjectId('6852c8ae7248c20014b38a57')], }, }, { - _id: ObjectId('6852c8ae7248c20014b38a57'), + _id: new ObjectId('6852c8ae7248c20014b38a57'), metaInformation: { targetedEntityTypes: [], externalId: 'westTripura', @@ -191,7 +121,7 @@ let entities = [ createdBy: '20', updatedBy: '20', deleted: false, - entityTypeId: ObjectId('6825915197b5680013e6a142'), + entityTypeId: new ObjectId('6825915197b5680013e6a142'), entityType: 'district', registryDetails: { code: 'westTripura', @@ -204,23 +134,23 @@ let entities = [ __v: 0, groups: { block: [ - ObjectId('6852c8de7248c20014b38a9d'), - ObjectId('6852c8de7248c20014b38a9e'), - ObjectId('6852c8de7248c20014b38a9f'), - ObjectId('6852c8de7248c20014b38aa0'), - ObjectId('6852c8de7248c20014b38aa1'), - ObjectId('6852c8de7248c20014b38aa2'), - ObjectId('6852c8de7248c20014b38aa3'), - ObjectId('6852c8de7248c20014b38aa4'), - ObjectId('6852c8de7248c20014b38aa5'), - ObjectId('6852c8de7248c20014b38aa6'), - ObjectId('6852c8de7248c20014b38aa7'), - ObjectId('6852c8de7248c20014b38aa8'), + new ObjectId('6852c8de7248c20014b38a9d'), + new ObjectId('6852c8de7248c20014b38a9e'), + new ObjectId('6852c8de7248c20014b38a9f'), + new ObjectId('6852c8de7248c20014b38aa0'), + new ObjectId('6852c8de7248c20014b38aa1'), + new ObjectId('6852c8de7248c20014b38aa2'), + new ObjectId('6852c8de7248c20014b38aa3'), + new ObjectId('6852c8de7248c20014b38aa4'), + new ObjectId('6852c8de7248c20014b38aa5'), + new ObjectId('6852c8de7248c20014b38aa6'), + new ObjectId('6852c8de7248c20014b38aa7'), + new ObjectId('6852c8de7248c20014b38aa8'), ], }, }, { - _id: ObjectId('68876746b19aea00144c2af9'), + _id: new ObjectId('68876746b19aea00144c2af9'), metaInformation: { targetedEntityTypes: [ { @@ -235,7 +165,7 @@ let entities = [ createdBy: '1', updatedBy: '1', deleted: false, - entityTypeId: ObjectId('682591cc97b5680013e6a15c'), + entityTypeId: new ObjectId('682591cc97b5680013e6a15c'), entityType: 'professional_role', registryDetails: { locationId: 'Facilitator', @@ -248,11 +178,11 @@ let entities = [ createdAt: new Date('2025-07-28T12:04:22.011Z'), __v: 0, groups: { - professional_subroles: [ObjectId('688767deb19aea00144c2b08')], + professional_subroles: [new ObjectId('688767deb19aea00144c2b08')], }, }, { - _id: ObjectId('688767deb19aea00144c2b08'), + _id: new ObjectId('688767deb19aea00144c2b08'), metaInformation: { targetedEntityTypes: [ { @@ -271,7 +201,7 @@ let entities = [ createdBy: '1', updatedBy: '1', deleted: false, - entityTypeId: ObjectId('682591d397b5680013e6a15e'), + entityTypeId: new ObjectId('682591d397b5680013e6a15e'), entityType: 'professional_subroles', registryDetails: { locationId: 'facilitator', @@ -284,123 +214,7 @@ let entities = [ createdAt: new Date('2025-07-28T12:06:54.072Z'), __v: 0, }, - // { - // _id: new ObjectId(), - // name: 'Karnataka', - // entityType: 'state', - // entityTypeId: entityType[0]._id, - // userId: '1', - // metaInformation: { - // externalId: 'KR001', - // name: 'Karnataka', - // }, - // childHierarchyPath: ['district', 'block', 'cluster', 'school'], - // groups: { - // district: [districtId], - // block: [blockId], - // cluster: [clusterId], - // school: [schoolId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: districtId, - // name: 'Bangalore', - // entityType: 'district', - // entityTypeId: entityType[1]._id, - // userId: '1', - // metaInformation: { - // externalId: 'BN001', - // name: 'Bangalore', - // }, - // childHierarchyPath: ['block', 'cluster', 'school'], - // groups: { - // block: [blockId], - // cluster: [clusterId], - // school: [schoolId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - - // { - // _id: blockId, - // entityType: 'block', - // entityTypeId: entityType[2]._id, - // userId: '1', - // metaInformation: { - // externalId: 'BU', - // name: 'Bangalore Urban', - // }, - // childHierarchyPath: ['cluster', 'school'], - // groups: { - // cluster: [clusterId], - // school: [schoolId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: clusterId, - // entityType: 'district', - // entityTypeId: entityType[3]._id, - // userId: '1', - // metaInformation: { - // externalId: 'JPN', - // name: 'JP Nagar', - // }, - // childHierarchyPath: ['school'], - // groups: { - // school: [schoolId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: schoolId, - // entityType: 'school', - // entityTypeId: entityType[4]._id, - // userId: '1', - // metaInformation: { - // externalId: 'GS01', - // name: 'Govt School', - // }, - // childHierarchyPath: [], - // groups: {}, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: professionalId, - // entityType: 'professional_role', - // entityTypeId: entityType[5]._id, - // userId: '1', - // metaInformation: { - // externalId: 'STD', - // name: 'student', - // }, - // childHierarchyPath: ['professional_subroles'], - // groups: { - // professional_subroles: [professionalSubRoleId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: professionalSubRoleId, - // entityType: 'professional_subroles', - // entityTypeId: entityType[6]._id, - // userId: '1', - // metaInformation: { - // externalId: 'SG', - // name: 'student-school', - // }, - // childHierarchyPath: [], - // groups: {}, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, + ] module.exports = { diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js index 6ac2794d..82a616ce 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js @@ -1,8 +1,8 @@ const { MongoClient } = require('mongodb') const url = 'mongodb://localhost:27017/' // MongoDB URL -const dbName = 'qadb' -const dbName2 = 'projectService' +const dbName = 'elevate-project' +const dbName2 = 'elevate-entity' const entityData = require('./entity_sampleData.js') const projectData = require('./project_sampleData.js') diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh new file mode 100644 index 00000000..d5ce17c5 --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# ---------------------------------------------------------------------- +# ELEVATE Project Data Setup Script +# +# This script performs the following actions: +# 1. Downloads sample data files from the ELEVATE-Project GitHub repository. +# 2. Installs the 'mongoose' package (required to run the sample scripts). +# 3. Executes the sample data insertion script using Node.js. +# ---------------------------------------------------------------------- + +# Exit immediately if a command exits with a non-zero status (ensures script stops on download failure) +set -e + +echo "Starting data setup script..." + +# --- 1. Define URL and Files --- +BASE_URL="https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu" + +ENTITY_FILE="entity_sampleData.js" +PROJECT_FILE="project_sampleData.js" +INSERT_SCRIPT="insert_sample_solutions.js" + +# --- 2. Download Files --- +echo "1. Downloading sample data files..." + +# Download entity_sampleData.js +curl -L "${BASE_URL}/${ENTITY_FILE}" -o "${ENTITY_FILE}" +echo "Downloaded ${ENTITY_FILE}" + +# Download project_sampleData.js +curl -L "${BASE_URL}/${PROJECT_FILE}" -o "${PROJECT_FILE}" +echo "Downloaded ${PROJECT_FILE}" + +# Download insert_sample_solutions.js (saved correctly to be run by node) +curl -L "${BASE_URL}/${INSERT_SCRIPT}" -o "${INSERT_SCRIPT}" +echo "Downloaded ${INSERT_SCRIPT}" + +# NOTE on Original Request: If you need to populate 'user/src/.env' with a specific file, +# you would add another 'curl' command here, but the file you linked was a JS script. + +# --- 3. Install Dependencies --- +echo "" +echo "2. Installing required Node packages (mongoose)..." +npm install mongoose + +# --- 4. Run Insertion Script --- +echo "" +echo "3. Running the sample data insertion script..." +node "${INSERT_SCRIPT}" + +echo "" +echo "--- Data setup complete! ---" \ No newline at end of file diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js index 21cbd835..50b7a449 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js @@ -2,7 +2,7 @@ const { ObjectId } = require('mongodb') let solutionData = [ { - _id: ObjectId('68ee4bb3fb9bee08b93b6d68'), + _id: new ObjectId('68ee4bb3fb9bee08b93b6d68'), resourceType: ['Improvement Project Solution'], language: ['English'], keywords: ['Improvement Project'], @@ -35,7 +35,7 @@ let solutionData = [ endDate: new Date('2026-09-09T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', - programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), programName: 'custom observation as a task check on oct 14th facilitator', programDescription: 'custom observation as a task check on oct 14th facilitator', status: 'active', @@ -54,25 +54,25 @@ let solutionData = [ cluster: ['ALL'], school: ['ALL'], }, - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), updatedBy: '1', author: '1', creator: 'Nevil', - certificateTemplateId: ObjectId('68ee4bf5fb9bee08b93b6d97'), + certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), link: 'f8a8e9ba397a29cf75ad5057db6cb7f9', }, ] let programData = [ { - _id: ObjectId('68ee4b79fb9bee08b93b6d34'), + _id: new ObjectId('68ee4b79fb9bee08b93b6d34'), resourceType: ['program'], language: ['English'], keywords: ['CBSE', 'SQAA'], concepts: [], components: [ { - _id: ObjectId('68ee4bb3fb9bee08b93b6d68'), + _id: new ObjectId('68ee4bb3fb9bee08b93b6d68'), order: 1, }, ], @@ -118,17 +118,17 @@ let programData = [ let projectTemplatesData = [ { - _id: ObjectId('68ee4bb3fb9bee08b93b6d70'), + _id: new ObjectId('68ee4bb3fb9bee08b93b6d70'), description: 'To construct a wired car using a DPDT switch.', concepts: [''], keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], isDeleted: false, recommendedFor: ['Learner'], tasks: [ - ObjectId('68ee4bb4fb9bee08b93b6d7a'), - ObjectId('68ee4bb4fb9bee08b93b6d7e'), - ObjectId('68ee4bb4fb9bee08b93b6d82'), - ObjectId('68ee4bb4fb9bee08b93b6d86'), + new ObjectId('68ee4bb4fb9bee08b93b6d7a'), + new ObjectId('68ee4bb4fb9bee08b93b6d7e'), + new ObjectId('68ee4bb4fb9bee08b93b6d82'), + new ObjectId('68ee4bb4fb9bee08b93b6d86'), ], createdBy: '1', updatedBy: '1', @@ -163,7 +163,7 @@ let projectTemplatesData = [ externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', categories: [ { - _id: ObjectId('685ae6a0cb7c7200145dadae'), + _id: new ObjectId('685ae6a0cb7c7200145dadae'), externalId: 'teachers', name: 'teachers', }, @@ -187,18 +187,18 @@ let projectTemplatesData = [ updatedAt: new Date('2025-10-14T13:11:17.899Z'), createdAt: new Date('2025-10-14T13:10:11.630Z'), __v: 0, - solutionId: ObjectId('68ee4bb3fb9bee08b93b6d68'), + solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), solutionExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', - programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', - parentTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d4c'), - certificateTemplateId: ObjectId('68ee4bf5fb9bee08b93b6d97'), + parentTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d4c'), + certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), }, ] let projectTemplateTasksData = [ { - _id: ObjectId('68ee4bb4fb9bee08b93b6d7a'), + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7a'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -217,7 +217,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', name: 'Watch the Activity Video', externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', @@ -242,7 +242,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68ee4bb4fb9bee08b93b6d7e'), + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7e'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -254,7 +254,7 @@ let projectTemplateTasksData = [ learningResources: [], deleted: false, type: 'simple', - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', name: 'Conduct the Activity with students', externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', @@ -279,7 +279,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68ee4bb4fb9bee08b93b6d82'), + _id: new ObjectId('68ee4bb4fb9bee08b93b6d82'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -298,7 +298,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', name: 'Conduct the Activity Assessment', externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', @@ -323,7 +323,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68ee4bb4fb9bee08b93b6d86'), + _id: new ObjectId('68ee4bb4fb9bee08b93b6d86'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -342,7 +342,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', @@ -370,7 +370,7 @@ let projectTemplateTasksData = [ let certificateTemplatesData = [ { - _id: ObjectId('68ee4bf5fb9bee08b93b6d97'), + _id: new ObjectId('68ee4bf5fb9bee08b93b6d97'), status: 'active', deleted: false, criteria: { @@ -463,9 +463,9 @@ let certificateTemplatesData = [ issuer: { name: 'Tan90', }, - solutionId: ObjectId('68ee4bb3fb9bee08b93b6d68'), - programId: ObjectId('68ee4b79fb9bee08b93b6d34'), - baseTemplateId: ObjectId('68c008dfd113c30c11f1aca2'), + solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), + baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), tenantId: 'shikshalokam', orgId: 'tan90', updatedAt: new Date('2025-10-14T13:11:17.793Z'), @@ -478,7 +478,7 @@ let certificateTemplatesData = [ let certificateBaseTemplatesData = [ { - _id: ObjectId('68c008dfd113c30c11f1aca2'), + _id: new ObjectId('68c008dfd113c30c11f1aca2'), deleted: false, code: 'onelogo_onesign', name: 'onelogo_onesign', @@ -493,7 +493,7 @@ let certificateBaseTemplatesData = [ let projectCategoriesData = [ { - _id: ObjectId('685ae6a0cb7c7200145dadae'), + _id: new ObjectId('685ae6a0cb7c7200145dadae'), createdBy: 'SYSTEM', updatedBy: 'SYSTEM', isDeleted: false, diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index b37a2eff..5a022086 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -105,12 +105,11 @@ To enable the Citus extension for user services, follow these steps. ``` 2. Set up the citus_setup file by following the steps given below. - - **Ubuntu/Linux** - 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. - ``` - sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user - ``` + 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. + ``` + sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user + ``` ## Persistence Of Database Data In Docker Container (Optional) @@ -166,19 +165,17 @@ In such cases, you can generate sample user accounts using the steps below. This > **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. -- **Ubuntu/Linux** - - ``` - sudo ./insert_sample_data.sh user postgres://postgres:postgres@citus_master:5432/user - ``` +``` +sudo ./insert_sample_data.sh user postgres://postgres:postgres@citus_master:5432/user +``` - After successfully running the script mentioned above, the following user accounts will be created and available for login: +After successfully running the script mentioned above, the following user accounts will be created and available for login: - | Email ID | Password | Role | - | ---------------------- | ---------- | ----------------------- | - | mallanagouda@gmail.com | Password1@ | State Education Officer | - | prajwal@gmail.com | Password1@ | State Education Officer | - | vishnu@gmail.com | Password1@ | State Education Officer | +| Email ID | Password | Role | +| ---------------------- | ---------- | ----------------------- | +| mallanagouda@gmail.com | Password1@ | State Education Officer | +| prajwal@gmail.com | Password1@ | State Education Officer | +| vishnu@gmail.com | Password1@ | State Education Officer | ## Sample Data Creation For Projects @@ -186,13 +183,9 @@ This step will guide us in implementing a sample project solution following the 1. **Insert Sample Data To Database:** - - **Ubuntu/Linux** - - 1. Insert sample data by running the following command. - - ``` - node insert_sample_solution.js - ``` + ``` + node insert_sample_solution.js + ``` ## Default Forms Creation for Portal Configuration @@ -200,11 +193,9 @@ This step inserts configuration forms into MongoDB, enabling or disabling featur #### Insert Forms Data into Database -- **Ubuntu/Linux**: - - ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/import_forms_mongo.sh && chmod +x import_forms_mongo.sh && sudo ./import_forms_mongo.sh mongodb://mongo:27017/elevate-project - ``` +``` +curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/import_forms_mongo.sh && chmod +x import_forms_mongo.sh && sudo ./import_forms_mongo.sh mongodb://mongo:27017/elevate-project +``` ## Explore the Portal diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index 72a909ae..8f2d0822 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -46,41 +46,39 @@ Expectation: Upon following the prescribed steps, you will achieve a fully opera Before setting up the following ELEVATE-Project application, dependencies given below should be installed and verified to be running. Refer to the steps given below to install them and verify. -- **Ubuntu/Linux** +1. Download dependency management scripts: - 1. Download dependency management scripts: + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh && \ + chmod +x check-dependencies.sh && \ + chmod +x install-dependencies.sh && \ + chmod +x uninstall-dependencies.sh + ``` - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh && \ - chmod +x check-dependencies.sh && \ - chmod +x install-dependencies.sh && \ - chmod +x uninstall-dependencies.sh - ``` - - 2. Verify installed dependencies by running `check-dependencies.sh`: +2. Verify installed dependencies by running `check-dependencies.sh`: - ``` - ./check-dependencies.sh - ``` + ``` + ./check-dependencies.sh + ``` - > Note: Keep note of any missing dependencies. + > Note: Keep note of any missing dependencies. - 3. Install dependencies by running `install-dependencies.sh`: - ``` - ./install-dependencies.sh - ``` - > Note: Install all missing dependencies and use check-dependencies script to ensure everything is installed and running. - 4. Uninstall dependencies by running `uninstall-dependencies.sh`: +3. Install dependencies by running `install-dependencies.sh`: + ``` + ./install-dependencies.sh + ``` + > Note: Install all missing dependencies and use check-dependencies script to ensure everything is installed and running. +4. Uninstall dependencies by running `uninstall-dependencies.sh`: - ``` - ./uninstall-dependencies.sh - ``` + ``` + ./uninstall-dependencies.sh + ``` - > Warning: Due to the destructive nature of the script (without further warnings), it should only be used during the initial setup of the dependencies. For example, Uninstalling PostgreSQL/Citus using script will lead to data loss. USE EXTREME CAUTION. + > Warning: Due to the destructive nature of the script (without further warnings), it should only be used during the initial setup of the dependencies. For example, Uninstalling PostgreSQL/Citus using script will lead to data loss. USE EXTREME CAUTION. - > Warning: This script should only be used to uninstall dependencies that were installed via installation script in step 3. If same dependencies were installed using other methods, refrain from using this script. This script is provided in-order to reverse installation in-case issues arise from a bad install. + > Warning: This script should only be used to uninstall dependencies that were installed via installation script in step 3. If same dependencies were installed using other methods, refrain from using this script. This script is provided in-order to reverse installation in-case issues arise from a bad install. ## Installation @@ -90,87 +88,76 @@ Before setting up the following ELEVATE-Project application, dependencies given 2. **Git Clone Services And Portal Repositories** - - **Ubuntu/Linux** - - ``` - git clone -b develop https://github.com/ELEVATE-Project/project-service.git && \ - git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ - git clone -b develop https://github.com/ELEVATE-Project/user.git && \ - git clone -b master https://github.com/ELEVATE-Project/notification.git && \ - git clone -b master https://github.com/ELEVATE-Project/interface-service.git && \ - git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ - git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-survey-projects-pwa && \ - git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal/tree/releaase-1.1.0 && \ - git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal - ``` + ``` + git clone -b develop https://github.com/ELEVATE-Project/project-service.git && \ + git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ + git clone -b develop https://github.com/ELEVATE-Project/user.git && \ + git clone -b master https://github.com/ELEVATE-Project/notification.git && \ + git clone -b master https://github.com/ELEVATE-Project/interface-service.git && \ + git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ + git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-survey-projects-pwa && \ + git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal/tree/releaase-1.1.0 && \ + git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal + ``` 3. **Install NPM Packages** - - **Ubuntu/Linux** - - ``` - cd project-service && npm install && cd ../ && \ - cd entity-management/src && npm install && cd ../.. && \ - cd user/src && npm install && cd ../.. && \ - cd entity-management\src && npm install && cd ..\.. && \ - cd notification/src && npm install && cd ../.. && \ - cd interface-service/src && npm install && cd ../.. && \ - cd scheduler/src && npm install && cd ../.. && \ - cd observation-survey-projects-pwa && npm install --force && cd .. && \ - cd observation-portal && npm install --force && cd .. && \ - cd elevate-portal && npm install --force && cd .. - ``` + ``` + cd project-service && npm install && cd ../ && \ + cd entity-management/src && npm install && cd ../.. && \ + cd user/src && npm install && cd ../.. && \ + cd entity-management\src && npm install && cd ..\.. && \ + cd notification/src && npm install && cd ../.. && \ + cd interface-service/src && npm install && cd ../.. && \ + cd scheduler/src && npm install && cd ../.. && \ + cd observation-survey-projects-pwa && npm install --force && cd .. && \ + cd observation-portal && npm install --force && cd .. && \ + cd elevate-portal && npm install --force && cd .. + ``` 4. **Download Environment Files** - - **Ubuntu/Linux** + ``` + curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/project_env && \ + curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/entity_management_env && \ + curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/user_env && \ + curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env && \ + curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ + curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/scheduler_env && \ + curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_survey_projects_pwa_env && \ + curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/elevate_portal_env && \ + curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_portal_env + ``` - ``` - curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/project_env && \ - curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/entity_management_env && \ - curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/user_env && \ - curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env && \ - curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ - curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/scheduler_env && \ - curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_survey_projects_pwa_env && \ - curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/elevate_portal_env && \ - curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_portal_env - ``` - - > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. +> **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. - > **Caution:** While the default values in the downloaded environment files enable the ELEVATE-Project Application to operate, certain features may not function correctly or could be impaired unless the adopter-specific environment variables are properly configured. +> **Caution:** While the default values in the downloaded environment files enable the ELEVATE-Project Application to operate, certain features may not function correctly or could be impaired unless the adopter-specific environment variables are properly configured. - > **Important:** As mentioned in the above linked document, the **User SignUp** functionality may be compromised if key environment variables are not set correctly during deployment. If you opt to skip this setup, consider using the sample user account generator detailed in the `Sample User Accounts Generation` section of this document. +> **Important:** As mentioned in the above linked document, the **User SignUp** functionality may be compromised if key environment variables are not set correctly during deployment. If you opt to skip this setup, consider using the sample user account generator detailed in the `Sample User Accounts Generation` section of this document. 5. **Create Databases** - - **Ubuntu/Linux** + 1. Download `create-databases.sh` Script File: - 1. Download `create-databases.sh` Script File: + ``` + curl -OJL https://github.com/ELEVATE-Project/project-service/blob/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh + ``` - ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/blob/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh - ``` - - 2. Make the executable by running the following command: - ``` - chmod +x create-databases.sh - ``` - 3. Run the script file: - ``` - ./create-databases.sh - ``` + 2. Make the executable by running the following command: + ``` + chmod +x create-databases.sh + ``` + 3. Run the script file: + ``` + ./create-databases.sh + ``` 6. **Run Migrations To Create Tables** - - **Ubuntu/Linux** - - 1. Run Migrations: - ``` - cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ - cd notification/src && npx sequelize-cli db:migrate && cd ../.. - ``` + ``` + cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ + cd notification/src && npx sequelize-cli db:migrate && cd ../.. + ``` 7. **Enabling Citus And Setting Distribution Columns (Optional)** @@ -186,113 +173,86 @@ Before setting up the following ELEVATE-Project application, dependencies given 2. Set up the `citus_setup` file by following the steps given below. - - **Ubuntu/Linux** + 1. Download the `citus_setup.sh` file: - 1. Download the `citus_setup.sh` file: + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh + ``` - ``` + 2. Make the setup file executable by running the following command: - 2. Make the setup file executable by running the following command: + ``` + chmod +x citus_setup.sh + ``` - ``` - chmod +x citus_setup.sh - ``` - - 3. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. - ``` - ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users - ``` + 3. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. + ``` + ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users + ``` 8. **Insert Initial Data** - - **Ubuntu/Linux** - - 1. Download `entity-project-sample-data.sh` Script File: - - 1.1. For ubuntu/linux - - ``` - curl -L -o https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js && \ - - curl -L -o https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js&& \ + 1. Download `entity-project-sample-data.sh` Script File: - curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js - ``` - - 2. Run the script file: - ``` - node insert_sample_solutions.js - ``` - 4. Run seeders of user service - ``` - cd user/src && npm run db:seed:all && cd ../.. - ``` + ``` + curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh && \ + ./project_entity_sample_data.sh + ``` 9. **Insert Forms Data into Database** - - **Ubuntu/Linux** - - 1. Download `import_forms.js` Script File And Make the setup file executable by running the following command: - ``` - curl -s https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/import_forms.js | node - ``` + ``` + curl -s https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/import_forms.js | node + ``` 10. **Start The Services** Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. - - **Ubuntu/Linux** - - ``` - (cd project-service && pm2 start app.js --name project-service && cd -) && \ - (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ - (cd user/src && pm2 start app.js --name user && cd -) && \ - (cd notification/src && pm2 start app.js --name notification && cd -) && \ - (cd interface-service/src && pm2 start app.js --name interface && cd -) && \ - (cd scheduler/src && pm2 start app.js --name scheduler && cd -) - ``` + ``` + (cd project-service && pm2 start app.js --name project-service && cd -) && \ + (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ + (cd user/src && pm2 start app.js --name user && cd -) && \ + (cd notification/src && pm2 start app.js --name notification && cd -) && \ + (cd interface-service/src && pm2 start app.js --name interface && cd -) && \ + (cd scheduler/src && pm2 start app.js --name scheduler && cd -) + ``` 11. **Run Service Scripts** - - **Ubuntu/Linux** - - ``` - cd user/src/scripts && node insertDefaultOrg.js && node viewsScript.js && cd ../../.. - ``` + ``` + cd user/src/scripts && node insertDefaultOrg.js && node viewsScript.js && cd ../../.. + ``` 12. **Start The Portal** ELEVATE-Project portal utilizes Ionic for building the browser bundle, follow the steps given below to install them and start the portal. - - **Ubuntu/Linux** - - 1. Install the Ionic framework: + 1. Install the Ionic framework: - ``` - npm install -g ionic - ``` + ``` + npm install -g ionic + ``` - 2. Install the Ionic client: + 2. Install the Ionic client: - ``` - npm install -g @ionic/cli - ``` + ``` + npm install -g @ionic/cli + ``` - 3. Navigate to `observation-survey-projects-pwa` directory: + 3. Navigate to `observation-survey-projects-pwa` directory: - ``` - cd observation-survey-projects-pwa - ``` + ``` + cd observation-survey-projects-pwa + ``` - 4. Run the project on your local system using the following command: + 4. Run the project on your local system using the following command: - ``` - ionic serve - ``` + ``` + ionic serve + ``` Navigate to http://localhost:8100 to access the ELEVATE-Project Portal. @@ -304,21 +264,19 @@ In such cases, you can generate sample user accounts using the steps below. This > **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. -- **Ubuntu/Linux** - - ``` - curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh && \ - chmod +x insert_sample_data.sh && \ - ./insert_sample_data.sh - ``` +``` +curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh && \ +chmod +x insert_sample_data.sh && \ +./insert_sample_data.sh +``` After successfully running the script mentioned above, the following user accounts will be created and available for login: -| Email ID | Password | Role | -| ------------------------ | ---------- | ------------------------- | -| aaravpatel@example.com | Password1@ | State Educational Officer | -| arunimareddy@example.com | Password1@ | State Educational Officer | -| devikasingh@example.com | Password1@ | State Educational Officer | +| Email ID | Password | Role | +| ---------------------- | ---------- | ----------------------- | +| mallanagouda@gmail.com | Password1@ | State Education Officer | +| prajwal@gmail.com | Password1@ | State Education Officer | +| vishnu@gmail.com | Password1@ | State Education Officer | ## Postman Collections From 59a0d4654c0b5dbc90cb4bee3bc3a9cf592f0254 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 24 Nov 2025 15:24:05 +0530 Subject: [PATCH 008/119] pushing-for-native --- README.md | 4 -- .../3.4.0/native/envs/elevate_portal_env | 48 +++++++++++++++++++ documentation/3.4.0/native/envs/enviroment.ts | 7 --- .../3.4.0/native/envs/observation_portal_env | 4 ++ .../envs/observation_survey_projects_pwa_env | 18 +++++++ .../setup/native/stand-alone/ubuntu/README.md | 5 +- 6 files changed, 73 insertions(+), 13 deletions(-) create mode 100644 documentation/3.4.0/native/envs/elevate_portal_env delete mode 100644 documentation/3.4.0/native/envs/enviroment.ts create mode 100644 documentation/3.4.0/native/envs/observation_portal_env create mode 100644 documentation/3.4.0/native/envs/observation_survey_projects_pwa_env diff --git a/README.md b/README.md index ea2b3bbd..b1cdf67d 100644 --- a/README.md +++ b/README.md @@ -130,10 +130,6 @@ Go to the detailed Windows Native setup guide: **Projects Service API Collection** - ### Adding New Projects to the System With implementation scripts, you can seamlessly add new projects to the system. Once a project is successfully added, it becomes visible on the portal, ready for use and interaction. For a comprehensive guide on setting up and using the implementation script, please refer to the **documentation here**. diff --git a/documentation/3.4.0/native/envs/elevate_portal_env b/documentation/3.4.0/native/envs/elevate_portal_env new file mode 100644 index 00000000..5092f8d5 --- /dev/null +++ b/documentation/3.4.0/native/envs/elevate_portal_env @@ -0,0 +1,48 @@ +AUTH_API_TOKEN= "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJPc3NtSUhXaW1NMDN2MUxsVnFvNHBqaS0ydEMwTGhLY0o5dmtwQTlJZV9zIn0.eyJleHAiOjE3MzI4NjE5ODcsImlhdCI6MTczMjc3NTU4NywianRpIjoiOTM5NWM4N2QtOTliYy00YTRkLWIyNTUtNDQ4NjFhYTBjYWE2IiwiaXNzIjoiaHR0cHM6Ly9xYS5wcmF0aGFtdGVhY2hlcmFwcC50ZWtkaW5leHQuY29tL2F1dGgvcmVhbG1zL3ByYXRoYW0iLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiY2IwN2RlNjItZWM0Yy00YmRlLWI5YjYtOWIwZjM3OWMwMTExIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoicHJhdGhhbSIsInNlc3Npb25fc3RhdGUiOiI2MzQ0ZWZjNS05NmUwLTQyNzYtYjViYi1hNTcyMGI0YzVmYjkiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIi8qIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiZGVmYXVsdC1yb2xlcy1wcmF0aGFtIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwic2lkIjoiNjM0NGVmYzUtOTZlMC00Mjc2LWI1YmItYTU3MjBiNGM1ZmI5IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiUmFqbmlzaCIsInByZWZlcnJlZF91c2VybmFtZSI6InJham5pc2g5ODc2MSIsImdpdmVuX25hbWUiOiJSYWpuaXNoIiwiZmFtaWx5X25hbWUiOiIifQ.OpTwdzG8sWhVK_VY6iAYy1klR2cfSLn2gYCqgnu9FJi4zTjPY-B0d8F--cEPVGZ4HdJiSZnGvfOgalICPKxthG-HfYR-cwznGWJVfte4HsvL5UbteOq5KDT3lsyzUkScgQ0bTKztSsePdhU2ctAGXv52DtPK8u7xWkKD6GYDeQCIHJlFS2JgR9v50d6Mva-stvtDRS7LEFgoes1hKQ0_k_C-5g1w7Rh084XJQC7tPmczap_Q-RqI-jkJZvUl_cAJK6NppZArSFA0AePkY-0_pZKBx82nBJbho2IETMIa7KzvnhdRCtjP0ynoTY-YJ4eL3jYhmIJ5DzWj3FpOZkrpSw" +AWS_ACCESS_KEY_ID= "AKIAXYKJQS7QTM6VVQ5S" +AWS_ACCESS_SECRET_KEY= "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" +AWS_BUCKET_NAME= "qa-knowlg-inquiry" +AWS_REGION= "ap-south-1" +BASE_URL= "https://qa-middleware.tekdinext.com" +NEXT_API_BASE_URL= "https://middleware.prathamdigital.org" +NEXT_PRIVATE_LOCAL_WEBPACK= "true" +NEXT_PUBLIC_AUTH= "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5dndaeklzS3U0ZzRjSWxoZnE1MWQ2SlR1d0w4dktlZCJ9.4jPaZhi9dHMzqqoZAZvfD5t5QPAVAuWOr9SDf1apZb8" +NEXT_PUBLIC_BASE_URL= "https://dev.elevate-apis.shikshalokam.org" +NEXT_PUBLIC_BASE_URL_ENTITY= "https://shiksha-dev-interface.tekdinext.com/entity-management" +NEXT_PUBLIC_BASE_URL_READ= "https://saas-dev-interface.tekdinext.com" +NEXT_PUBLIC_BASE_URL_SCHEMA= "https://qa-interface.prathamdigital.org" +NEXT_PUBLIC_CHANNEL_ID= "scp-channel" +NEXT_PUBLIC_CLIENT_ID= "implementation" +NEXT_PUBLIC_CLIENT_SECRET= "3e92df83-a773-4e3e-89c6-3a9afe81211a" +NEXT_PUBLIC_CLOUD_STORAGE_URL= "https://qa-knowlg-inquiry.s3-ap-south-1.amazonaws.com/" +NEXT_PUBLIC_CONTENT= "http://localhost:8000/shikshalokam/content" +NEXT_PUBLIC_CONTENT_FRAMEWORK_ID= "level1arning-framework" +NEXT_PUBLIC_DELETE_USER= "/api/user/v1/block" +NEXT_PUBLIC_FORGOT_PASSWORD= "https://dev.sunbirdsaas.com/recover/identify/account" +NEXT_PUBLIC_FRAMEWORK_ID= "shiksha-fw" +NEXT_PUBLIC_GENRATE_OTP= "/api/otp/v2/generate" +NEXT_PUBLIC_GRANT_TYPE= "password" +NEXT_PUBLIC_LOCATION_SEARCH= "/api/data/v1/location/search" +NEXT_PUBLIC_LOGINPAGE= "https://dev.elevate-apis.shikshalokam.org/" +NEXT_PUBLIC_LOGIN_PATH= "/auth/realms/sunbird/protocol/openid-connect/token" +NEXT_PUBLIC_NEW_REGISTRATION= "/interface/v1/account/create" +NEXT_PUBLIC_ORGID= "1" +NEXT_PUBLIC_PROGRAM_BASE_URL= "https://dev.elevate-sandbox.shikshalokam.org" +NEXT_PUBLIC_PWA= "http://localhost:8000/shikshalokam/pwa" +NEXT_PUBLIC_READ_USER= "/api/user/v1/search" +NEXT_PUBLIC_REGISTRATION= "http://localhost:8000/shikshalokam/registration/newUser" +NEXT_PUBLIC_SEARCH_LOCATION= "/interface/v1/user/locations/search" +NEXT_PUBLIC_SEND_OTP= "/api/otp/v1/generate" +NEXT_PUBLIC_SHIKSHAGRAHA_BASEPATH= "/shikshalokam" +NEXT_PUBLIC_SSUNBIRD_BASE_URL= "https://saas-qa.tekdinext.com/interface/v1" +NEXT_PUBLIC_SSUNBIRD_HIERARCHY_PATH= "/api/course/v1/" +NEXT_PUBLIC_TELEMETRY_URL= "https://qa.prathamteacherapp.tekdinext.com/telemetry" +NEXT_PUBLIC_TENANT_ID= "ef99949b-7f3a-4a5f-806a-e67e683e38f3" +NEXT_PUBLIC_TRACKING_BASE_URL= "https://shiksha2-dev.tekdinext.com/tracking" +NEXT_PUBLIC_UPDATE_USER= "/api/framework/v1/update" +NEXT_PUBLIC_VERIFT_OTP= "/api/otp/v2/verify" +NEXT_PUBLIC_VERIFY_OTP= "/api/otp/v1/verify" +created_time= "2025-06-18T08:50:04.71092372Z" +custom_metadata= "null" +destroyed= "false" +version= "5" \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/enviroment.ts b/documentation/3.4.0/native/envs/enviroment.ts deleted file mode 100644 index 75db90a7..00000000 --- a/documentation/3.4.0/native/envs/enviroment.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const environment = { - production: true, - baseURL: 'http://localhost:3569', - projectsBaseURL: null, - surveyBaseURL: null, - capabilities: 'project', -} diff --git a/documentation/3.4.0/native/envs/observation_portal_env b/documentation/3.4.0/native/envs/observation_portal_env new file mode 100644 index 00000000..50d7ba42 --- /dev/null +++ b/documentation/3.4.0/native/envs/observation_portal_env @@ -0,0 +1,4 @@ +window["env"] = { + production: true, + surveyBaseURL:"https://qa.elevate-apis.shikshalokam.org" +} \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/observation_survey_projects_pwa_env b/documentation/3.4.0/native/envs/observation_survey_projects_pwa_env new file mode 100644 index 00000000..156e3796 --- /dev/null +++ b/documentation/3.4.0/native/envs/observation_survey_projects_pwa_env @@ -0,0 +1,18 @@ +window["env"] = { + production: true, + baseURL: 'https://qa.elevate-apis.shikshalokam.org', + // baseURL: 'https://saas-qa.tekdinext.com', + capabilities: 'all', + restrictedPages: ['DOWNLOADS','AUTH_PAGES'], + unauthorizedRedirectUrl: "/", + isAuthBypassed: true, + profileRedirectPath: "/profile-edit", + showHeader: true, + config:{ + logoPath:'assets/images/logo.png', + faviconPath:'assets/icons/elevate-logo.png', + title:"Elevate", + redirectUrl:"/home" + }, + hostPath:'/ml/' +}; \ No newline at end of file diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index 8f2d0822..3f7df357 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -93,11 +93,12 @@ Before setting up the following ELEVATE-Project application, dependencies given git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ git clone -b develop https://github.com/ELEVATE-Project/user.git && \ git clone -b master https://github.com/ELEVATE-Project/notification.git && \ - git clone -b master https://github.com/ELEVATE-Project/interface-service.git && \ + git clone -b main https://github.com/ELEVATE-Project/interface-service.git && \ git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-survey-projects-pwa && \ - git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal/tree/releaase-1.1.0 && \ + git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal && \ git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal + ``` 3. **Install NPM Packages** From ae3669facec0e0c58b32a37210efb51b67c4a0b0 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 24 Nov 2025 15:25:43 +0530 Subject: [PATCH 009/119] pushing-for-native --- documentation/3.4.0/native/envs/elevate_portal_env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/3.4.0/native/envs/elevate_portal_env b/documentation/3.4.0/native/envs/elevate_portal_env index 5092f8d5..14b3959f 100644 --- a/documentation/3.4.0/native/envs/elevate_portal_env +++ b/documentation/3.4.0/native/envs/elevate_portal_env @@ -1,6 +1,6 @@ AUTH_API_TOKEN= "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJPc3NtSUhXaW1NMDN2MUxsVnFvNHBqaS0ydEMwTGhLY0o5dmtwQTlJZV9zIn0.eyJleHAiOjE3MzI4NjE5ODcsImlhdCI6MTczMjc3NTU4NywianRpIjoiOTM5NWM4N2QtOTliYy00YTRkLWIyNTUtNDQ4NjFhYTBjYWE2IiwiaXNzIjoiaHR0cHM6Ly9xYS5wcmF0aGFtdGVhY2hlcmFwcC50ZWtkaW5leHQuY29tL2F1dGgvcmVhbG1zL3ByYXRoYW0iLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiY2IwN2RlNjItZWM0Yy00YmRlLWI5YjYtOWIwZjM3OWMwMTExIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoicHJhdGhhbSIsInNlc3Npb25fc3RhdGUiOiI2MzQ0ZWZjNS05NmUwLTQyNzYtYjViYi1hNTcyMGI0YzVmYjkiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIi8qIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiZGVmYXVsdC1yb2xlcy1wcmF0aGFtIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwic2lkIjoiNjM0NGVmYzUtOTZlMC00Mjc2LWI1YmItYTU3MjBiNGM1ZmI5IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiUmFqbmlzaCIsInByZWZlcnJlZF91c2VybmFtZSI6InJham5pc2g5ODc2MSIsImdpdmVuX25hbWUiOiJSYWpuaXNoIiwiZmFtaWx5X25hbWUiOiIifQ.OpTwdzG8sWhVK_VY6iAYy1klR2cfSLn2gYCqgnu9FJi4zTjPY-B0d8F--cEPVGZ4HdJiSZnGvfOgalICPKxthG-HfYR-cwznGWJVfte4HsvL5UbteOq5KDT3lsyzUkScgQ0bTKztSsePdhU2ctAGXv52DtPK8u7xWkKD6GYDeQCIHJlFS2JgR9v50d6Mva-stvtDRS7LEFgoes1hKQ0_k_C-5g1w7Rh084XJQC7tPmczap_Q-RqI-jkJZvUl_cAJK6NppZArSFA0AePkY-0_pZKBx82nBJbho2IETMIa7KzvnhdRCtjP0ynoTY-YJ4eL3jYhmIJ5DzWj3FpOZkrpSw" -AWS_ACCESS_KEY_ID= "AKIAXYKJQS7QTM6VVQ5S" -AWS_ACCESS_SECRET_KEY= "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" +AWS_ACCESS_KEY_ID= "AWS_ACCESS_KEY_ID" +AWS_ACCESS_SECRET_KEY= "AWS_ACCESS_SECRET_KEY" AWS_BUCKET_NAME= "qa-knowlg-inquiry" AWS_REGION= "ap-south-1" BASE_URL= "https://qa-middleware.tekdinext.com" From 8b03c8f283d9c58cbbfc6d2f1ee507429cae3111 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 24 Nov 2025 16:13:49 +0530 Subject: [PATCH 010/119] pushing-for-native --- .../stand-alone/ubuntu/entity_sampleData.js | 241 +--- .../stand-alone/ubuntu/project_sampleData.js | 192 +-- .../stand-alone/ubuntu/entity_sampleData.js | 3 +- .../stand-alone/ubuntu/project_sampleData.js | 1223 ++++++++++++++++- .../setup/native/stand-alone/ubuntu/README.md | 2 +- 5 files changed, 1283 insertions(+), 378 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js index 0e5303ae..aebc1cfc 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -1,15 +1,8 @@ const { ObjectId } = require('mongodb') -let districtId = new ObjectId() -let blockId = new ObjectId() -let clusterId = new ObjectId() -let schoolId = new ObjectId() -let professionalId = new ObjectId() -let professionalSubRoleId = new ObjectId() - let entityType = [ { - _id: ObjectId('6825914b97b5680013e6a140'), + _id: new ObjectId('6825914b97b5680013e6a140'), profileForm: [], profileFields: [], types: [], @@ -29,7 +22,7 @@ let entityType = [ orgId: 'sl', }, { - _id: ObjectId('6825915197b5680013e6a142'), + _id: new ObjectId('6825915197b5680013e6a142'), profileForm: [], profileFields: [], types: [], @@ -49,7 +42,7 @@ let entityType = [ orgId: 'sl', }, { - _id: ObjectId('682591cc97b5680013e6a15c'), + _id: new ObjectId('682591cc97b5680013e6a15c'), profileForm: [], profileFields: [], types: [], @@ -69,7 +62,7 @@ let entityType = [ orgId: 'sl', }, { - _id: ObjectId('682591d397b5680013e6a15e'), + _id: new ObjectId('682591d397b5680013e6a15e'), profileForm: [], profileFields: [], types: [], @@ -88,74 +81,12 @@ let entityType = [ __v: 0, orgId: 'sl', }, - // { - // _id: new ObjectId(), - // name: 'state', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['district', 'block', 'cluster', 'school'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'district', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['block', 'cluster', 'school'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'block', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['cluster', 'school'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'cluster', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['school'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'school', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: [], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'professional_role', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: ['professional_subroles'], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: new ObjectId(), - // name: 'professional_subroles', - // toBeMappedToParentEntities: true, - // immediateChildrenEntityType: [], - // isDeleted: false, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, + ] let entities = [ { - _id: ObjectId('6852c86c7248c20014b38a4d'), + _id: new ObjectId('6852c86c7248c20014b38a4d'), metaInformation: { targetedEntityTypes: [], externalId: '16', @@ -165,7 +96,7 @@ let entities = [ createdBy: '20', updatedBy: '20', deleted: false, - entityTypeId: ObjectId('6825914b97b5680013e6a140'), + entityTypeId: new ObjectId('6825914b97b5680013e6a140'), entityType: 'state', registryDetails: { code: '16', @@ -177,11 +108,11 @@ let entities = [ createdAt: new Date('2025-06-18T14:08:44.438Z'), __v: 0, groups: { - district: [ObjectId('6852c8ae7248c20014b38a57')], + district: [new ObjectId('6852c8ae7248c20014b38a57')], }, }, { - _id: ObjectId('6852c8ae7248c20014b38a57'), + _id: new ObjectId('6852c8ae7248c20014b38a57'), metaInformation: { targetedEntityTypes: [], externalId: 'westTripura', @@ -191,7 +122,7 @@ let entities = [ createdBy: '20', updatedBy: '20', deleted: false, - entityTypeId: ObjectId('6825915197b5680013e6a142'), + entityTypeId: new ObjectId('6825915197b5680013e6a142'), entityType: 'district', registryDetails: { code: 'westTripura', @@ -204,23 +135,23 @@ let entities = [ __v: 0, groups: { block: [ - ObjectId('6852c8de7248c20014b38a9d'), - ObjectId('6852c8de7248c20014b38a9e'), - ObjectId('6852c8de7248c20014b38a9f'), - ObjectId('6852c8de7248c20014b38aa0'), - ObjectId('6852c8de7248c20014b38aa1'), - ObjectId('6852c8de7248c20014b38aa2'), - ObjectId('6852c8de7248c20014b38aa3'), - ObjectId('6852c8de7248c20014b38aa4'), - ObjectId('6852c8de7248c20014b38aa5'), - ObjectId('6852c8de7248c20014b38aa6'), - ObjectId('6852c8de7248c20014b38aa7'), - ObjectId('6852c8de7248c20014b38aa8'), + new ObjectId('6852c8de7248c20014b38a9d'), + new ObjectId('6852c8de7248c20014b38a9e'), + new ObjectId('6852c8de7248c20014b38a9f'), + new ObjectId('6852c8de7248c20014b38aa0'), + new ObjectId('6852c8de7248c20014b38aa1'), + new ObjectId('6852c8de7248c20014b38aa2'), + new ObjectId('6852c8de7248c20014b38aa3'), + new ObjectId('6852c8de7248c20014b38aa4'), + new ObjectId('6852c8de7248c20014b38aa5'), + new ObjectId('6852c8de7248c20014b38aa6'), + new ObjectId('6852c8de7248c20014b38aa7'), + new ObjectId('6852c8de7248c20014b38aa8'), ], }, }, { - _id: ObjectId('68876746b19aea00144c2af9'), + _id: new ObjectId('68876746b19aea00144c2af9'), metaInformation: { targetedEntityTypes: [ { @@ -235,7 +166,7 @@ let entities = [ createdBy: '1', updatedBy: '1', deleted: false, - entityTypeId: ObjectId('682591cc97b5680013e6a15c'), + entityTypeId: new ObjectId('682591cc97b5680013e6a15c'), entityType: 'professional_role', registryDetails: { locationId: 'Facilitator', @@ -248,11 +179,11 @@ let entities = [ createdAt: new Date('2025-07-28T12:04:22.011Z'), __v: 0, groups: { - professional_subroles: [ObjectId('688767deb19aea00144c2b08')], + professional_subroles: [new ObjectId('688767deb19aea00144c2b08')], }, }, { - _id: ObjectId('688767deb19aea00144c2b08'), + _id: new ObjectId('688767deb19aea00144c2b08'), metaInformation: { targetedEntityTypes: [ { @@ -271,7 +202,7 @@ let entities = [ createdBy: '1', updatedBy: '1', deleted: false, - entityTypeId: ObjectId('682591d397b5680013e6a15e'), + entityTypeId: new ObjectId('682591d397b5680013e6a15e'), entityType: 'professional_subroles', registryDetails: { locationId: 'facilitator', @@ -284,123 +215,7 @@ let entities = [ createdAt: new Date('2025-07-28T12:06:54.072Z'), __v: 0, }, - // { - // _id: new ObjectId(), - // name: 'Karnataka', - // entityType: 'state', - // entityTypeId: entityType[0]._id, - // userId: '1', - // metaInformation: { - // externalId: 'KR001', - // name: 'Karnataka', - // }, - // childHierarchyPath: ['district', 'block', 'cluster', 'school'], - // groups: { - // district: [districtId], - // block: [blockId], - // cluster: [clusterId], - // school: [schoolId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: districtId, - // name: 'Bangalore', - // entityType: 'district', - // entityTypeId: entityType[1]._id, - // userId: '1', - // metaInformation: { - // externalId: 'BN001', - // name: 'Bangalore', - // }, - // childHierarchyPath: ['block', 'cluster', 'school'], - // groups: { - // block: [blockId], - // cluster: [clusterId], - // school: [schoolId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - - // { - // _id: blockId, - // entityType: 'block', - // entityTypeId: entityType[2]._id, - // userId: '1', - // metaInformation: { - // externalId: 'BU', - // name: 'Bangalore Urban', - // }, - // childHierarchyPath: ['cluster', 'school'], - // groups: { - // cluster: [clusterId], - // school: [schoolId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: clusterId, - // entityType: 'district', - // entityTypeId: entityType[3]._id, - // userId: '1', - // metaInformation: { - // externalId: 'JPN', - // name: 'JP Nagar', - // }, - // childHierarchyPath: ['school'], - // groups: { - // school: [schoolId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: schoolId, - // entityType: 'school', - // entityTypeId: entityType[4]._id, - // userId: '1', - // metaInformation: { - // externalId: 'GS01', - // name: 'Govt School', - // }, - // childHierarchyPath: [], - // groups: {}, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: professionalId, - // entityType: 'professional_role', - // entityTypeId: entityType[5]._id, - // userId: '1', - // metaInformation: { - // externalId: 'STD', - // name: 'student', - // }, - // childHierarchyPath: ['professional_subroles'], - // groups: { - // professional_subroles: [professionalSubRoleId], - // }, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, - // { - // _id: professionalSubRoleId, - // entityType: 'professional_subroles', - // entityTypeId: entityType[6]._id, - // userId: '1', - // metaInformation: { - // externalId: 'SG', - // name: 'student-school', - // }, - // childHierarchyPath: [], - // groups: {}, - // tenantId: 'shikshalokam', - // orgId: 'slOrg', - // }, + ] module.exports = { diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js index 98f67396..84184d27 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js @@ -2,7 +2,7 @@ const { ObjectId } = require('mongodb') let solutionData = [ { - _id: ObjectId('68ee4bb3fb9bee08b93b6d68'), + _id: new ObjectId('68ee4bb3fb9bee08b93b6d68'), resourceType: ['Improvement Project Solution'], language: ['English'], keywords: ['Improvement Project'], @@ -35,7 +35,7 @@ let solutionData = [ endDate: new Date('2026-09-09T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', - programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), programName: 'custom observation as a task check on oct 14th facilitator', programDescription: 'custom observation as a task check on oct 14th facilitator', status: 'active', @@ -54,15 +54,15 @@ let solutionData = [ cluster: ['ALL'], school: ['ALL'], }, - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), updatedBy: '1', author: '1', creator: 'Nevil', - certificateTemplateId: ObjectId('68ee4bf5fb9bee08b93b6d97'), + certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), link: 'f8a8e9ba397a29cf75ad5057db6cb7f9', }, { - _id: ObjectId('68e8c635201642091e014914'), + _id: new ObjectId('68e8c635201642091e014914'), resourceType: ['Improvement Project Solution'], language: ['English'], keywords: ['Improvement Project'], @@ -95,7 +95,7 @@ let solutionData = [ endDate: new Date('2026-09-09T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', - programId: ObjectId('68e8c284201642091e0148c1'), + programId: new ObjectId('68e8c284201642091e0148c1'), programName: 'custom observation as a task check on oct 10th facilitator', programDescription: 'custom observation as a task check on oct 10th facilitator', status: 'active', @@ -114,15 +114,15 @@ let solutionData = [ cluster: ['ALL'], school: ['ALL'], }, - projectTemplateId: ObjectId('68e8c635201642091e01491c'), + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), updatedBy: '1', author: '1', creator: 'Nevil', - certificateTemplateId: ObjectId('68e8c676201642091e014943'), + certificateTemplateId: new ObjectId('68e8c676201642091e014943'), link: '178ac1fdff5b367ef3335ce0e1665a6c', }, { - _id: ObjectId('68c98d9538aee0086ee61096'), + _id: new ObjectId('68c98d9538aee0086ee61096'), resourceType: ['Improvement Project Solution'], language: ['English'], keywords: ['Improvement Project'], @@ -156,7 +156,7 @@ let solutionData = [ endDate: new Date('2026-01-30T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', - programId: ObjectId('68c98d8f38aee0086ee61070'), + programId: new ObjectId('68c98d8f38aee0086ee61070'), programName: 'Program name is sep 16 9 30', programDescription: 'Description of the Program', status: 'active', @@ -175,10 +175,10 @@ let solutionData = [ cluster: ['ALL'], school: ['ALL'], }, - projectTemplateId: ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), }, { - _id: ObjectId('68d3b9a72ba17cc3cb238821'), + _id: new ObjectId('68d3b9a72ba17cc3cb238821'), resourceType: ['Improvement Project Solution'], language: ['English'], keywords: ['Improvement Project'], @@ -211,7 +211,7 @@ let solutionData = [ endDate: new Date('2025-12-30T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', - programId: ObjectId('68d3b9681e09f9b5b1e0693d'), + programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), programName: 'SUP_as_a_task_test_sept_24_1500', programDescription: 'This is the description of the program.', status: 'active', @@ -230,7 +230,7 @@ let solutionData = [ cluster: ['ALL'], school: ['ALL'], }, - projectTemplateId: ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), updatedBy: '1', author: '1', creator: 'Nevil', @@ -240,14 +240,14 @@ let solutionData = [ let programData = [ { - _id: ObjectId('68ee4b79fb9bee08b93b6d34'), + _id: new ObjectId('68ee4b79fb9bee08b93b6d34'), resourceType: ['program'], language: ['English'], keywords: ['CBSE', 'SQAA'], concepts: [], components: [ { - _id: ObjectId('68ee4bb3fb9bee08b93b6d68'), + _id: new ObjectId('68ee4bb3fb9bee08b93b6d68'), order: 1, }, ], @@ -290,14 +290,14 @@ let programData = [ }, }, { - _id: ObjectId('68e8c284201642091e0148c1'), + _id: new ObjectId('68e8c284201642091e0148c1'), resourceType: ['program'], language: ['English'], keywords: ['CBSE', 'SQAA'], concepts: [], components: [ { - _id: ObjectId('68e8c635201642091e014914'), + _id: new ObjectId('68e8c635201642091e014914'), order: 1, }, ], @@ -340,14 +340,14 @@ let programData = [ }, }, { - _id: ObjectId('68c98d8f38aee0086ee61070'), + _id: new ObjectId('68c98d8f38aee0086ee61070'), resourceType: ['program'], language: ['English'], keywords: [], concepts: [], components: [ { - _id: ObjectId('68c98d9538aee0086ee61096'), + _id: new ObjectId('68c98d9538aee0086ee61096'), order: 1, }, ], @@ -390,14 +390,14 @@ let programData = [ }, }, { - _id: ObjectId('68d3b9681e09f9b5b1e0693d'), + _id: new ObjectId('68d3b9681e09f9b5b1e0693d'), resourceType: ['program'], language: ['English'], keywords: [], concepts: [], components: [ { - _id: ObjectId('68d3b9a72ba17cc3cb238821'), + _id: new ObjectId('68d3b9a72ba17cc3cb238821'), order: 1, }, ], @@ -443,17 +443,17 @@ let programData = [ let projectTemplatesData = [ { - _id: ObjectId('68ee4bb3fb9bee08b93b6d70'), + _id: new ObjectId('68ee4bb3fb9bee08b93b6d70'), description: 'To construct a wired car using a DPDT switch.', concepts: [''], keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], isDeleted: false, recommendedFor: ['Learner'], tasks: [ - ObjectId('68ee4bb4fb9bee08b93b6d7a'), - ObjectId('68ee4bb4fb9bee08b93b6d7e'), - ObjectId('68ee4bb4fb9bee08b93b6d82'), - ObjectId('68ee4bb4fb9bee08b93b6d86'), + new ObjectId('68ee4bb4fb9bee08b93b6d7a'), + new ObjectId('68ee4bb4fb9bee08b93b6d7e'), + new ObjectId('68ee4bb4fb9bee08b93b6d82'), + new ObjectId('68ee4bb4fb9bee08b93b6d86'), ], createdBy: '1', updatedBy: '1', @@ -488,7 +488,7 @@ let projectTemplatesData = [ externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', categories: [ { - _id: ObjectId('685ae6a0cb7c7200145dadae'), + _id: new ObjectId('685ae6a0cb7c7200145dadae'), externalId: 'teachers', name: 'teachers', }, @@ -512,25 +512,25 @@ let projectTemplatesData = [ updatedAt: new Date('2025-10-14T13:11:17.899Z'), createdAt: new Date('2025-10-14T13:10:11.630Z'), __v: 0, - solutionId: ObjectId('68ee4bb3fb9bee08b93b6d68'), + solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), solutionExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', - programId: ObjectId('68ee4b79fb9bee08b93b6d34'), + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', - parentTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d4c'), - certificateTemplateId: ObjectId('68ee4bf5fb9bee08b93b6d97'), + parentTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d4c'), + certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), }, { - _id: ObjectId('68e8c635201642091e01491c'), + _id: new ObjectId('68e8c635201642091e01491c'), description: 'To construct a wired car using a DPDT switch.', concepts: [''], keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], isDeleted: false, recommendedFor: ['Learner'], tasks: [ - ObjectId('68e8c635201642091e014926'), - ObjectId('68e8c635201642091e01492a'), - ObjectId('68e8c635201642091e01492e'), - ObjectId('68e8c635201642091e014932'), + new ObjectId('68e8c635201642091e014926'), + new ObjectId('68e8c635201642091e01492a'), + new ObjectId('68e8c635201642091e01492e'), + new ObjectId('68e8c635201642091e014932'), ], createdBy: '1', updatedBy: '1', @@ -565,7 +565,7 @@ let projectTemplatesData = [ externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', categories: [ { - _id: ObjectId('685ae6a0cb7c7200145dadae'), + _id: new ObjectId('685ae6a0cb7c7200145dadae'), externalId: 'teachers', name: 'teachers', }, @@ -589,15 +589,15 @@ let projectTemplatesData = [ updatedAt: new Date('2025-10-10T08:40:22.544Z'), createdAt: new Date('2025-10-10T08:39:17.260Z'), __v: 0, - solutionId: ObjectId('68e8c635201642091e014914'), + solutionId: new ObjectId('68e8c635201642091e014914'), solutionExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION', - programId: ObjectId('68e8c284201642091e0148c1'), + programId: new ObjectId('68e8c284201642091e0148c1'), programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', - parentTemplateId: ObjectId('68e8c635201642091e0148f8'), - certificateTemplateId: ObjectId('68e8c676201642091e014943'), + parentTemplateId: new ObjectId('68e8c635201642091e0148f8'), + certificateTemplateId: new ObjectId('68e8c676201642091e014943'), }, { - _id: ObjectId('68c98d9538aee0086ee6109e'), + _id: new ObjectId('68c98d9538aee0086ee6109e'), description: 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', concepts: [''], @@ -605,9 +605,9 @@ let projectTemplatesData = [ isDeleted: false, recommendedFor: [''], tasks: [ - ObjectId('68c98d9538aee0086ee610a2'), - ObjectId('68c98d9538aee0086ee610a6'), - ObjectId('68c98d9538aee0086ee610aa'), + new ObjectId('68c98d9538aee0086ee610a2'), + new ObjectId('68c98d9538aee0086ee610a6'), + new ObjectId('68c98d9538aee0086ee610aa'), ], createdBy: '1', updatedBy: '1', @@ -640,7 +640,7 @@ let projectTemplatesData = [ externalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', categories: [ { - _id: ObjectId('685ae6a0cb7c7200145dadae'), + _id: new ObjectId('685ae6a0cb7c7200145dadae'), externalId: 'teachers', name: 'teachers', }, @@ -664,23 +664,23 @@ let projectTemplatesData = [ updatedAt: new Date('2025-09-16T16:17:25.596Z'), createdAt: new Date('2025-09-16T16:17:25.301Z'), __v: 0, - solutionId: ObjectId('68c98d9538aee0086ee61096'), + solutionId: new ObjectId('68c98d9538aee0086ee61096'), solutionExternalId: 'ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION', - programId: ObjectId('68c98d8f38aee0086ee61070'), + programId: new ObjectId('68c98d8f38aee0086ee61070'), programExternalId: 'ProgramTestKey1', - parentTemplateId: ObjectId('68c98d9538aee0086ee6107a'), + parentTemplateId: new ObjectId('68c98d9538aee0086ee6107a'), }, { - _id: ObjectId('68d3b9a92ba17cc3cb238829'), + _id: new ObjectId('68d3b9a92ba17cc3cb238829'), description: 'To construct a wired car using a DPDT switch.', concepts: [''], keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], isDeleted: false, recommendedFor: ['Learner'], tasks: [ - ObjectId('68d3b9ad2ba17cc3cb238837'), - ObjectId('68d3b9ad2ba17cc3cb23883b'), - ObjectId('68d3b9ae2ba17cc3cb23883f'), + new ObjectId('68d3b9ad2ba17cc3cb238837'), + new ObjectId('68d3b9ad2ba17cc3cb23883b'), + new ObjectId('68d3b9ae2ba17cc3cb23883f'), ], createdBy: '1', updatedBy: '1', @@ -713,7 +713,7 @@ let projectTemplatesData = [ externalId: 'DPDTSCH012025-1758706081315_IMPORTED', categories: [ { - _id: ObjectId('685ae6a0cb7c7200145dadae'), + _id: new ObjectId('685ae6a0cb7c7200145dadae'), externalId: 'teachers', name: 'teachers', }, @@ -737,17 +737,17 @@ let projectTemplatesData = [ updatedAt: new Date('2025-09-24T09:28:14.561Z'), createdAt: new Date('2025-09-24T09:28:03.404Z'), __v: 0, - solutionId: ObjectId('68d3b9a72ba17cc3cb238821'), + solutionId: new ObjectId('68d3b9a72ba17cc3cb238821'), solutionExternalId: 'DPDTSCH012025-1758706081315-PROJECT-SOLUTION', - programId: ObjectId('68d3b9681e09f9b5b1e0693d'), + programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), programExternalId: 'SUP_as_a_task_test_sept_24_1500', - parentTemplateId: ObjectId('68d3b9a32ba17cc3cb238805'), + parentTemplateId: new ObjectId('68d3b9a32ba17cc3cb238805'), }, ] let projectTemplateTasksData = [ { - _id: ObjectId('68ee4bb4fb9bee08b93b6d7a'), + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7a'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -766,7 +766,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', name: 'Watch the Activity Video', externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', @@ -791,7 +791,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68ee4bb4fb9bee08b93b6d7e'), + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7e'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -803,7 +803,7 @@ let projectTemplateTasksData = [ learningResources: [], deleted: false, type: 'simple', - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', name: 'Conduct the Activity with students', externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', @@ -828,7 +828,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68ee4bb4fb9bee08b93b6d82'), + _id: new ObjectId('68ee4bb4fb9bee08b93b6d82'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -847,7 +847,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', name: 'Conduct the Activity Assessment', externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', @@ -872,7 +872,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68ee4bb4fb9bee08b93b6d86'), + _id: new ObjectId('68ee4bb4fb9bee08b93b6d86'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -891,7 +891,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', @@ -916,7 +916,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68e8c635201642091e014926'), + _id: new ObjectId('68e8c635201642091e014926'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -935,7 +935,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68e8c635201642091e01491c'), + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', name: 'Watch the Activity Video', externalId: 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', @@ -960,7 +960,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68e8c635201642091e01492a'), + _id: new ObjectId('68e8c635201642091e01492a'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -972,7 +972,7 @@ let projectTemplateTasksData = [ learningResources: [], deleted: false, type: 'simple', - projectTemplateId: ObjectId('68e8c635201642091e01491c'), + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', name: 'Conduct the Activity with students', externalId: 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', @@ -997,7 +997,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68e8c635201642091e01492e'), + _id: new ObjectId('68e8c635201642091e01492e'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -1016,7 +1016,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68e8c635201642091e01491c'), + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', name: 'Conduct the Activity Assessment', externalId: 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', @@ -1041,7 +1041,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68e8c635201642091e014932'), + _id: new ObjectId('68e8c635201642091e014932'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -1060,7 +1060,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68e8c635201642091e01491c'), + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", externalId: 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', @@ -1085,7 +1085,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68c98d9538aee0086ee610a2'), + _id: new ObjectId('68c98d9538aee0086ee610a2'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -1104,7 +1104,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', name: 'Review the Activity Manual', externalId: 'Task1-1758039445176-1758039445561', @@ -1129,7 +1129,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68c98d9538aee0086ee610a6'), + _id: new ObjectId('68c98d9538aee0086ee610a6'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -1148,7 +1148,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', name: 'Watch the Activity Video', externalId: 'Task2-1758039445176-1758039445567', @@ -1173,7 +1173,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68c98d9538aee0086ee610aa'), + _id: new ObjectId('68c98d9538aee0086ee610aa'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -1185,7 +1185,7 @@ let projectTemplateTasksData = [ learningResources: [], deleted: false, type: 'simple', - projectTemplateId: ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', name: 'Conduct the Activity with students', externalId: 'Task3-1758039445176-1758039445575', @@ -1210,7 +1210,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68d3b9ad2ba17cc3cb238837'), + _id: new ObjectId('68d3b9ad2ba17cc3cb238837'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -1222,7 +1222,7 @@ let projectTemplateTasksData = [ learningResources: [], deleted: false, type: 'simple', - projectTemplateId: ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', name: 'Conduct the Activity with students', externalId: 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', @@ -1247,7 +1247,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68d3b9ad2ba17cc3cb23883b'), + _id: new ObjectId('68d3b9ad2ba17cc3cb23883b'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -1272,7 +1272,7 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', name: 'Conduct the Activity Assessment', externalId: 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', @@ -1297,7 +1297,7 @@ let projectTemplateTasksData = [ __v: 0, }, { - _id: ObjectId('68d3b9ae2ba17cc3cb23883f'), + _id: new ObjectId('68d3b9ae2ba17cc3cb23883f'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -1309,7 +1309,7 @@ let projectTemplateTasksData = [ learningResources: [], deleted: false, type: 'simple', - projectTemplateId: ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", externalId: 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', @@ -1337,7 +1337,7 @@ let projectTemplateTasksData = [ let certificateTemplatesData = [ { - _id: ObjectId('68ee4bf5fb9bee08b93b6d97'), + _id: new ObjectId('68ee4bf5fb9bee08b93b6d97'), status: 'active', deleted: false, criteria: { @@ -1430,9 +1430,9 @@ let certificateTemplatesData = [ issuer: { name: 'Tan90', }, - solutionId: ObjectId('68ee4bb3fb9bee08b93b6d68'), - programId: ObjectId('68ee4b79fb9bee08b93b6d34'), - baseTemplateId: ObjectId('68c008dfd113c30c11f1aca2'), + solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), + baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), tenantId: 'shikshalokam', orgId: 'tan90', updatedAt: new Date('2025-10-14T13:11:17.793Z'), @@ -1442,7 +1442,7 @@ let certificateTemplatesData = [ 'certificate/aa8529e3-6754-4432-a669-72b73d358e2f/1/7042c718-a1bf-43e3-b296-586de247a440/68ee4bf5fb9bee08b93b6d97/14-9-2025-1760447477692_Dowloaded.svg', }, { - _id: ObjectId('68e8c676201642091e014943'), + _id: new ObjectId('68e8c676201642091e014943'), status: 'active', deleted: false, criteria: { @@ -1552,9 +1552,9 @@ let certificateTemplatesData = [ issuer: { name: 'Tan90', }, - solutionId: ObjectId('68e8c635201642091e014914'), - programId: ObjectId('68e8c284201642091e0148c1'), - baseTemplateId: ObjectId('68c008dfd113c30c11f1aca2'), + solutionId: new ObjectId('68e8c635201642091e014914'), + programId: new ObjectId('68e8c284201642091e0148c1'), + baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), tenantId: 'shikshalokam', orgId: 'tan90', updatedAt: new Date('2025-10-10T08:40:22.454Z'), @@ -1567,7 +1567,7 @@ let certificateTemplatesData = [ let certificateBaseTemplatesData = [ { - _id: ObjectId('68c008dfd113c30c11f1aca2'), + _id: new ObjectId('68c008dfd113c30c11f1aca2'), deleted: false, code: 'onelogo_onesign', name: 'onelogo_onesign', @@ -1582,7 +1582,7 @@ let certificateBaseTemplatesData = [ let projectCategoriesData = [ { - _id: ObjectId('685ae6a0cb7c7200145dadae'), + _id: new ObjectId('685ae6a0cb7c7200145dadae'), createdBy: 'SYSTEM', updatedBy: 'SYSTEM', isDeleted: false, diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js index fec1ed72..aebc1cfc 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -1,4 +1,4 @@ -const { ObjectId } = require('mongodb') +const { ObjectId } = require('mongodb') let entityType = [ { @@ -81,6 +81,7 @@ let entityType = [ __v: 0, orgId: 'sl', }, + ] let entities = [ diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js index 50b7a449..84184d27 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js @@ -61,6 +61,181 @@ let solutionData = [ certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), link: 'f8a8e9ba397a29cf75ad5057db6cb7f9', }, + { + _id: new ObjectId('68e8c635201642091e014914'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + entityType: 'school', + externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION', + name: 'Testing Project For LED IMP facilitator only', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-09-09T00:00:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68e8c284201642091e0148c1'), + programName: 'custom observation as a task check on oct 10th facilitator', + programDescription: 'custom observation as a task check on oct 10th facilitator', + status: 'active', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-10T08:40:22.617Z'), + createdAt: new Date('2025-10-10T08:39:17.519Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + updatedBy: '1', + author: '1', + creator: 'Nevil', + certificateTemplateId: new ObjectId('68e8c676201642091e014943'), + link: '178ac1fdff5b367ef3335ce0e1665a6c', + }, + { + _id: new ObjectId('68c98d9538aee0086ee61096'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'ProgramTestKey1', + entityType: 'school', + externalId: 'ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION', + name: 'Project name sep 16 9 30', + description: + 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', + isReusable: false, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2026-01-30T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68c98d8f38aee0086ee61070'), + programName: 'Program name is sep 16 9 30', + programDescription: 'Description of the Program', + status: 'active', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-16T16:17:25.599Z'), + createdAt: new Date('2025-09-16T16:17:25.472Z'), + __v: 0, + scope: { + professional_role: ['ALL'], + professional_subroles: ['ALL'], + organizations: ['tan90'], + state: ['ALL'], + district: ['ALL'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + }, + { + _id: new ObjectId('68d3b9a72ba17cc3cb238821'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'SUP_as_a_task_test_sept_24_1500', + entityType: 'school', + externalId: 'DPDTSCH012025-1758706081315-PROJECT-SOLUTION', + name: 'project sup test with obs or sur tasks sep 23 1520', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2025-12-30T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), + programName: 'SUP_as_a_task_test_sept_24_1500', + programDescription: 'This is the description of the program.', + status: 'active', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-24T09:28:19.783Z'), + createdAt: new Date('2025-09-24T09:28:07.900Z'), + __v: 0, + scope: { + professional_role: ['ALL'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['ALL'], + district: ['ALL', '6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + updatedBy: '1', + author: '1', + creator: 'Nevil', + link: 'a0acc357edbcf3287e9767d20a7d9f12', + }, ] let programData = [ @@ -114,6 +289,156 @@ let programData = [ school: ['ALL'], }, }, + { + _id: new ObjectId('68e8c284201642091e0148c1'), + resourceType: ['program'], + language: ['English'], + keywords: ['CBSE', 'SQAA'], + concepts: [], + components: [ + { + _id: new ObjectId('68e8c635201642091e014914'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + name: 'custom observation as a task check on oct 10th facilitator', + description: 'custom observation as a task check on oct 10th facilitator', + startDate: new Date('2025-09-08T18:30:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ['Tripura'], + recommendedFor: ['Facilitator'], + }, + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-10T08:44:35.535Z'), + createdAt: new Date('2025-10-10T08:23:32.295Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: new ObjectId('68c98d8f38aee0086ee61070'), + resourceType: ['program'], + language: ['English'], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId('68c98d9538aee0086ee61096'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'ProgramTestKey1', + name: 'Program name is sep 16 9 30', + description: 'Description of the Program', + metaInformation: { + state: ['Tripura'], + recommendedFor: ['functionaries-officials', 'teacher-educators-coordinators'], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2026-01-30T18:29:59.000Z'), + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-16T17:06:14.752Z'), + createdAt: new Date('2025-09-16T16:17:19.239Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: new ObjectId('68d3b9681e09f9b5b1e0693d'), + resourceType: ['program'], + language: ['English'], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId('68d3b9a72ba17cc3cb238821'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'SUP_as_a_task_test_sept_24_1500', + name: 'SUP_as_a_task_test_sept_24_1500 oct 3', + description: 'This is the description of the program.', + metaInformation: { + state: ['Tripura'], + recommendedFor: ['functionaries-officials'], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2025-12-30T18:29:59.000Z'), + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-03T09:20:39.907Z'), + createdAt: new Date('2025-09-24T09:27:04.322Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['tan90'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, ] let projectTemplatesData = [ @@ -168,37 +493,643 @@ let projectTemplatesData = [ name: 'teachers', }, ], - entityType: '', - taskCreationForm: '', - durationInDays: 365, + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-14T13:11:17.899Z'), + createdAt: new Date('2025-10-14T13:10:11.630Z'), + __v: 0, + solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + solutionExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + parentTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d4c'), + certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), + }, + { + _id: new ObjectId('68e8c635201642091e01491c'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + new ObjectId('68e8c635201642091e014926'), + new ObjectId('68e8c635201642091e01492a'), + new ObjectId('68e8c635201642091e01492e'), + new ObjectId('68e8c635201642091e014932'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1-2025-Task1-1760085557008-1760085557606', + 'DPDTSC-HandBook-1-2025-Task2-1760085557008', + 'DPDTSC-HandBook-1-2025-Task3-1760085557008', + 'DPDTSC-HandBook-1-2025-Task4-1760085557008', + 'DPDTSC-HandBook-1-2025-Task5-1760085557008', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: 'CURRENT', + visibleToOrganizations: ['tan90'], + deleted: false, + title: 'Testing Project For LED IMP facilitator only', + externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-10T08:40:22.544Z'), + createdAt: new Date('2025-10-10T08:39:17.260Z'), + __v: 0, + solutionId: new ObjectId('68e8c635201642091e014914'), + solutionExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION', + programId: new ObjectId('68e8c284201642091e0148c1'), + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + parentTemplateId: new ObjectId('68e8c635201642091e0148f8'), + certificateTemplateId: new ObjectId('68e8c676201642091e014943'), + }, + { + _id: new ObjectId('68c98d9538aee0086ee6109e'), + description: + 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: [''], + tasks: [ + new ObjectId('68c98d9538aee0086ee610a2'), + new ObjectId('68c98d9538aee0086ee610a6'), + new ObjectId('68c98d9538aee0086ee610aa'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'Task1-1758039445176', + 'Task2-1758039445176', + 'Task3-1758039445176', + 'Task4-1758039445176', + 'Task5-1758039445176', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: 'Project name sep 16 9 30', + externalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-16T16:17:25.596Z'), + createdAt: new Date('2025-09-16T16:17:25.301Z'), + __v: 0, + solutionId: new ObjectId('68c98d9538aee0086ee61096'), + solutionExternalId: 'ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION', + programId: new ObjectId('68c98d8f38aee0086ee61070'), + programExternalId: 'ProgramTestKey1', + parentTemplateId: new ObjectId('68c98d9538aee0086ee6107a'), + }, + { + _id: new ObjectId('68d3b9a92ba17cc3cb238829'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + new ObjectId('68d3b9ad2ba17cc3cb238837'), + new ObjectId('68d3b9ad2ba17cc3cb23883b'), + new ObjectId('68d3b9ae2ba17cc3cb23883f'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1/2025-Task1-1758706081315-1758706089304', + 'DPDTSC-HandBook-1/2025-Task2-1758706081315', + 'DPDTSC-HandBook-1/2025-Task3-1758706081315', + 'DPDTSC-HandBook-1/2025-Task4-1758706081315', + 'DPDTSC-HandBook-1/2025-Task5-1758706081315', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: 'project sup test with obs or sur tasks sep 23 1520', + externalId: 'DPDTSCH012025-1758706081315_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-09-24T09:28:14.561Z'), + createdAt: new Date('2025-09-24T09:28:03.404Z'), + __v: 0, + solutionId: new ObjectId('68d3b9a72ba17cc3cb238821'), + solutionExternalId: 'DPDTSCH012025-1758706081315-PROJECT-SOLUTION', + programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), + programExternalId: 'SUP_as_a_task_test_sept_24_1500', + parentTemplateId: new ObjectId('68d3b9a32ba17cc3cb238805'), + }, +] + +let projectTemplateTasksData = [ + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7a'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + description: '', + sequenceNumber: '2', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.192Z'), + createdAt: new Date('2025-10-14T13:10:11.805Z'), + __v: 0, + }, + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7e'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + description: '', + sequenceNumber: '3', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.202Z'), + createdAt: new Date('2025-10-14T13:10:11.813Z'), + __v: 0, + }, + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d82'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'learn', + link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + app: 'projectService', + id: 'view?usp=drive_link', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + description: '', + sequenceNumber: '4', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.210Z'), + createdAt: new Date('2025-10-14T13:10:11.825Z'), + __v: 0, + }, + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d86'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'walking', + link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', + app: 'projectService', + id: 'view?usp=sharing', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', + description: '', + sequenceNumber: '5', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.218Z'), + createdAt: new Date('2025-10-14T13:10:11.833Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e014926'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', + description: '', + sequenceNumber: '2', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2026', + endDate: '31/12/2026', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.813Z'), + createdAt: new Date('2025-10-10T08:39:17.430Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e01492a'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', + description: '', + sequenceNumber: '3', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2027', + endDate: '31/12/2027', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.822Z'), + createdAt: new Date('2025-10-10T08:39:17.439Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e01492e'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'learn', + link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + app: 'projectService', + id: 'view?usp=drive_link', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', + description: '', + sequenceNumber: '4', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2028', + endDate: '31/12/2028', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.831Z'), + createdAt: new Date('2025-10-10T08:39:17.449Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e014932'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'walking', + link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', + app: 'projectService', + id: 'view?usp=sharing', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', + description: '', + sequenceNumber: '5', + tenantId: 'shikshalokam', + orgId: 'tan90', metaInformation: { - testimonials: [], - goal: 'TEMP', - rationale: '', - primaryAudience: '', - duration: '1 year', - successIndicators: '', - risks: '', - approaches: '', + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2029', + endDate: '31/12/2029', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', }, - status: 'published', + updatedAt: new Date('2025-10-10T08:39:17.840Z'), + createdAt: new Date('2025-10-10T08:39:17.458Z'), + __v: 0, + }, + { + _id: new ObjectId('68c98d9538aee0086ee610a2'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Manual (PDF)', + link: 'https://docs.google.com/document/d/1NCUdj9nPAz82sPV5q2BJ8At31sFJdSDwocrDCh_g7W0/edit?tab=t.0', + app: 'projectService', + id: 'edit?tab=t.0', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Review the Activity Manual', + externalId: 'Task1-1758039445176-1758039445561', + description: '', + sequenceNumber: '1', tenantId: 'shikshalokam', orgId: 'tan90', - updatedAt: new Date('2025-10-14T13:11:17.899Z'), - createdAt: new Date('2025-10-14T13:10:11.630Z'), + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '28/07/2025', + endDate: '30/01/2026', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.564Z'), + createdAt: new Date('2025-09-16T16:17:25.375Z'), __v: 0, - solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), - solutionExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', - programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), - programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', - parentTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d4c'), - certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), }, -] - -let projectTemplateTasksData = [ { - _id: new ObjectId('68ee4bb4fb9bee08b93b6d7a'), + _id: new ObjectId('68c98d9538aee0086ee610a6'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -217,10 +1148,10 @@ let projectTemplateTasksData = [ ], deleted: false, type: 'content', - projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), - projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', name: 'Watch the Activity Video', - externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + externalId: 'Task2-1758039445176-1758039445567', description: '', sequenceNumber: '2', tenantId: 'shikshalokam', @@ -230,19 +1161,19 @@ let projectTemplateTasksData = [ parentTaskOperator: '', parentTaskValue: '', parentTaskId: '', - startDate: '01/08/2025', - endDate: '31/12/2025', + startDate: '29/07/2025', + endDate: '30/01/2027', isAnExternalTask: '', minNoOfSubmissionsRequired: '', redirectLink: '', buttonLabel: '', }, - updatedAt: new Date('2025-10-14T13:10:12.192Z'), - createdAt: new Date('2025-10-14T13:10:11.805Z'), + updatedAt: new Date('2025-09-16T16:17:25.571Z'), + createdAt: new Date('2025-09-16T16:17:25.386Z'), __v: 0, }, { - _id: new ObjectId('68ee4bb4fb9bee08b93b6d7e'), + _id: new ObjectId('68c98d9538aee0086ee610aa'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -254,10 +1185,10 @@ let projectTemplateTasksData = [ learningResources: [], deleted: false, type: 'simple', - projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), - projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', name: 'Conduct the Activity with students', - externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + externalId: 'Task3-1758039445176-1758039445575', description: '', sequenceNumber: '3', tenantId: 'shikshalokam', @@ -267,19 +1198,56 @@ let projectTemplateTasksData = [ parentTaskOperator: '', parentTaskValue: '', parentTaskId: '', - startDate: '01/08/2025', - endDate: '31/12/2025', + startDate: '30/07/2025', + endDate: '30/01/2028', isAnExternalTask: '', minNoOfSubmissionsRequired: '', redirectLink: '', buttonLabel: '', }, - updatedAt: new Date('2025-10-14T13:10:12.202Z'), - createdAt: new Date('2025-10-14T13:10:11.813Z'), + updatedAt: new Date('2025-09-16T16:17:25.579Z'), + createdAt: new Date('2025-09-16T16:17:25.396Z'), __v: 0, }, { - _id: new ObjectId('68ee4bb4fb9bee08b93b6d82'), + _id: new ObjectId('68d3b9ad2ba17cc3cb238837'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', + description: '', + sequenceNumber: '3', + tenantId: 'shikshalokam', + orgId: 'tan90', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:13.534Z'), + createdAt: new Date('2025-09-24T09:28:06.227Z'), + __v: 0, + }, + { + _id: new ObjectId('68d3b9ad2ba17cc3cb23883b'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -290,18 +1258,24 @@ let projectTemplateTasksData = [ hasSubTasks: false, learningResources: [ { - name: 'learn', - link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + name: 'Activity Assessment (PDF)', + link: 'https://sunbirdsaaspublic.blob.core.windows.net/content/content/assets/do_2143687931908833281255/dpdt-switch-car.pdf', app: 'projectService', - id: 'view?usp=drive_link', + id: 'dpdt-switch-car.pdf', + }, + { + name: 'Activity OMR Sheet (PDF)', + link: 'https://drive.google.com/file/d/1-f7Tg8bmZd-xlcxlhfOcf2ZO6vpc6qkH/view', + app: 'projectService', + id: 'view', }, ], deleted: false, type: 'content', - projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), - projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', name: 'Conduct the Activity Assessment', - externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + externalId: 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', description: '', sequenceNumber: '4', tenantId: 'shikshalokam', @@ -311,19 +1285,19 @@ let projectTemplateTasksData = [ parentTaskOperator: '', parentTaskValue: '', parentTaskId: '', - startDate: '01/08/2025', - endDate: '31/12/2025', + startDate: '30/07/2025', + endDate: '30/12/2025', isAnExternalTask: '', minNoOfSubmissionsRequired: '', redirectLink: '', buttonLabel: '', }, - updatedAt: new Date('2025-10-14T13:10:12.210Z'), - createdAt: new Date('2025-10-14T13:10:11.825Z'), + updatedAt: new Date('2025-09-24T09:28:13.967Z'), + createdAt: new Date('2025-09-24T09:28:06.583Z'), __v: 0, }, { - _id: new ObjectId('68ee4bb4fb9bee08b93b6d86'), + _id: new ObjectId('68d3b9ae2ba17cc3cb23883f'), createdBy: '1', updatedBy: '1', isDeleted: false, @@ -332,20 +1306,13 @@ let projectTemplateTasksData = [ children: [], visibleIf: [], hasSubTasks: false, - learningResources: [ - { - name: 'walking', - link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', - app: 'projectService', - id: 'view?usp=sharing', - }, - ], + learningResources: [], deleted: false, - type: 'content', - projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), - projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + type: 'simple', + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", - externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', + externalId: 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', description: '', sequenceNumber: '5', tenantId: 'shikshalokam', @@ -355,15 +1322,15 @@ let projectTemplateTasksData = [ parentTaskOperator: '', parentTaskValue: '', parentTaskId: '', - startDate: '01/08/2025', - endDate: '31/12/2025', + startDate: '30/07/2025', + endDate: '30/12/2025', isAnExternalTask: '', minNoOfSubmissionsRequired: '', redirectLink: '', buttonLabel: '', }, - updatedAt: new Date('2025-10-14T13:10:12.218Z'), - createdAt: new Date('2025-10-14T13:10:11.833Z'), + updatedAt: new Date('2025-09-24T09:28:14.374Z'), + createdAt: new Date('2025-09-24T09:28:07.083Z'), __v: 0, }, ] @@ -474,6 +1441,128 @@ let certificateTemplatesData = [ templateUrl: 'certificate/aa8529e3-6754-4432-a669-72b73d358e2f/1/7042c718-a1bf-43e3-b296-586de247a440/68ee4bf5fb9bee08b93b6d97/14-9-2025-1760447477692_Dowloaded.svg', }, + { + _id: new ObjectId('68e8c676201642091e014943'), + status: 'active', + deleted: false, + criteria: { + validationText: 'Complete validation message', + expression: 'C1&&(C3||C4||C5||C6||C7)', + conditions: { + C1: { + validationText: 'Submit your project.', + expression: 'C1', + conditions: { + C1: { + scope: 'project', + key: 'status', + operator: '==', + value: 'submitted', + }, + }, + }, + C3: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e0148ff'], + }, + }, + validationText: 'Add 2 evidence for any task', + }, + C4: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e014903'], + }, + }, + }, + C5: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e014907'], + }, + }, + }, + C6: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e01490b'], + }, + }, + }, + C7: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e01490f'], + }, + }, + }, + }, + }, + issuer: { + name: 'Tan90', + }, + solutionId: new ObjectId('68e8c635201642091e014914'), + programId: new ObjectId('68e8c284201642091e0148c1'), + baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), + tenantId: 'shikshalokam', + orgId: 'tan90', + updatedAt: new Date('2025-10-10T08:40:22.454Z'), + createdAt: new Date('2025-10-10T08:40:22.298Z'), + __v: 0, + templateUrl: + 'certificate/0bcc856d-0145-448c-8188-300ca3f3250e/1/58cfdf3c-f1a2-4a94-bbb5-21dcd7286913/68e8c676201642091e014943/10-9-2025-1760085622353_Dowloaded.svg', + }, ] let certificateBaseTemplatesData = [ diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index 3f7df357..9545c026 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -141,7 +141,7 @@ Before setting up the following ELEVATE-Project application, dependencies given 1. Download `create-databases.sh` Script File: ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/blob/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh ``` 2. Make the executable by running the following command: From c40f91f68b5866abf6d0999b31d64b9dc14ec0b9 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 24 Nov 2025 16:33:43 +0530 Subject: [PATCH 011/119] pushing-for-native --- .../setup/docker/stand-alone/ubuntu/README.md | 4 +- .../setup/native/stand-alone/ubuntu/README.md | 117 +++++++++--------- 2 files changed, 60 insertions(+), 61 deletions(-) diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index 5a022086..a2461a42 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -66,7 +66,7 @@ done 1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh + curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh ``` > Note : The script will download all the essential files and launch the services in Docker. Once all services are successfully up and running, you can proceed to the next steps. @@ -108,7 +108,7 @@ To enable the Citus extension for user services, follow these steps. 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. ``` - sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user + sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user ``` ## Persistence Of Database Data In Docker Container (Optional) diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index 9545c026..16c37fa9 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -49,31 +49,31 @@ Before setting up the following ELEVATE-Project application, dependencies given 1. Download dependency management scripts: ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh && \ - chmod +x check-dependencies.sh && \ - chmod +x install-dependencies.sh && \ - chmod +x uninstall-dependencies.sh + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh && \ + chmod +x check-dependencies.sh && \ + chmod +x install-dependencies.sh && \ + chmod +x uninstall-dependencies.sh ``` 2. Verify installed dependencies by running `check-dependencies.sh`: ``` - ./check-dependencies.sh + ./check-dependencies.sh ``` > Note: Keep note of any missing dependencies. 3. Install dependencies by running `install-dependencies.sh`: ``` - ./install-dependencies.sh + ./install-dependencies.sh ``` > Note: Install all missing dependencies and use check-dependencies script to ensure everything is installed and running. 4. Uninstall dependencies by running `uninstall-dependencies.sh`: ``` - ./uninstall-dependencies.sh + ./uninstall-dependencies.sh ``` > Warning: Due to the destructive nature of the script (without further warnings), it should only be used during the initial setup of the dependencies. For example, Uninstalling PostgreSQL/Citus using script will lead to data loss. USE EXTREME CAUTION. @@ -89,45 +89,44 @@ Before setting up the following ELEVATE-Project application, dependencies given 2. **Git Clone Services And Portal Repositories** ``` - git clone -b develop https://github.com/ELEVATE-Project/project-service.git && \ - git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ - git clone -b develop https://github.com/ELEVATE-Project/user.git && \ - git clone -b master https://github.com/ELEVATE-Project/notification.git && \ - git clone -b main https://github.com/ELEVATE-Project/interface-service.git && \ - git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ - git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-survey-projects-pwa && \ - git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal && \ - git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal - + git clone -b develop https://github.com/ELEVATE-Project/project-service.git && \ + git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ + git clone -b develop https://github.com/ELEVATE-Project/user.git && \ + git clone -b master https://github.com/ELEVATE-Project/notification.git && \ + git clone -b main https://github.com/ELEVATE-Project/interface-service.git && \ + git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ + git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-survey-projects-pwa && \ + git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal && \ + git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal ``` 3. **Install NPM Packages** ``` - cd project-service && npm install && cd ../ && \ - cd entity-management/src && npm install && cd ../.. && \ - cd user/src && npm install && cd ../.. && \ - cd entity-management\src && npm install && cd ..\.. && \ - cd notification/src && npm install && cd ../.. && \ - cd interface-service/src && npm install && cd ../.. && \ - cd scheduler/src && npm install && cd ../.. && \ - cd observation-survey-projects-pwa && npm install --force && cd .. && \ - cd observation-portal && npm install --force && cd .. && \ - cd elevate-portal && npm install --force && cd .. + cd project-service && npm install && cd ../ && \ + cd entity-management/src && npm install && cd ../.. && \ + cd user/src && npm install && cd ../.. && \ + cd entity-management\src && npm install && cd ..\.. && \ + cd notification/src && npm install && cd ../.. && \ + cd interface-service/src && npm install && cd ../.. && \ + cd scheduler/src && npm install && cd ../.. && \ + cd observation-survey-projects-pwa && npm install --force && cd .. && \ + cd observation-portal && npm install --force && cd .. && \ + cd elevate-portal && npm install --force && cd .. ``` 4. **Download Environment Files** ``` - curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/project_env && \ - curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/entity_management_env && \ - curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/user_env && \ - curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env && \ - curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ - curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/scheduler_env && \ - curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_survey_projects_pwa_env && \ - curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/elevate_portal_env && \ - curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_portal_env + curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/project_env && \ + curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/entity_management_env && \ + curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/user_env && \ + curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env && \ + curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ + curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/scheduler_env && \ + curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_survey_projects_pwa_env && \ + curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/elevate_portal_env && \ + curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_portal_env ``` > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. @@ -141,23 +140,23 @@ Before setting up the following ELEVATE-Project application, dependencies given 1. Download `create-databases.sh` Script File: ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh ``` 2. Make the executable by running the following command: ``` - chmod +x create-databases.sh + chmod +x create-databases.sh ``` 3. Run the script file: ``` - ./create-databases.sh + ./create-databases.sh ``` 6. **Run Migrations To Create Tables** ``` - cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ - cd notification/src && npx sequelize-cli db:migrate && cd ../.. + cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ + cd notification/src && npx sequelize-cli db:migrate && cd ../.. ``` 7. **Enabling Citus And Setting Distribution Columns (Optional)** @@ -177,19 +176,18 @@ Before setting up the following ELEVATE-Project application, dependencies given 1. Download the `citus_setup.sh` file: ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh - + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh ``` 2. Make the setup file executable by running the following command: ``` - chmod +x citus_setup.sh + chmod +x citus_setup.sh ``` 3. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. ``` - ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users + ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users ``` 8. **Insert Initial Data** @@ -198,6 +196,7 @@ Before setting up the following ELEVATE-Project application, dependencies given ``` curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh && \ + chmod +x insert_sample_data.sh && \ ./project_entity_sample_data.sh ``` @@ -213,19 +212,19 @@ Before setting up the following ELEVATE-Project application, dependencies given Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. ``` - (cd project-service && pm2 start app.js --name project-service && cd -) && \ - (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ - (cd user/src && pm2 start app.js --name user && cd -) && \ - (cd notification/src && pm2 start app.js --name notification && cd -) && \ - (cd interface-service/src && pm2 start app.js --name interface && cd -) && \ - (cd scheduler/src && pm2 start app.js --name scheduler && cd -) + (cd project-service && pm2 start app.js --name project-service && cd -) && \ + (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ + (cd user/src && pm2 start app.js --name user && cd -) && \ + (cd notification/src && pm2 start app.js --name notification && cd -) && \ + (cd interface-service/src && pm2 start app.js --name interface && cd -) && \ + (cd scheduler/src && pm2 start app.js --name scheduler && cd -) ``` 11. **Run Service Scripts** ``` - cd user/src/scripts && node insertDefaultOrg.js && node viewsScript.js && cd ../../.. - ``` + cd user/src/scripts && node insertDefaultOrg.js && node viewsScript.js && cd ../../.. + ``` 12. **Start The Portal** @@ -234,25 +233,25 @@ Before setting up the following ELEVATE-Project application, dependencies given 1. Install the Ionic framework: ``` - npm install -g ionic + npm install -g ionic ``` 2. Install the Ionic client: ``` - npm install -g @ionic/cli + npm install -g @ionic/cli ``` 3. Navigate to `observation-survey-projects-pwa` directory: ``` - cd observation-survey-projects-pwa + cd observation-survey-projects-pwa ``` 4. Run the project on your local system using the following command: ``` - ionic serve + ionic serve ``` Navigate to http://localhost:8100 to access the ELEVATE-Project Portal. From 5ec9593ee57bf261f56e7a5be436b4eb45eb23e8 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 24 Nov 2025 16:57:19 +0530 Subject: [PATCH 012/119] pushing-for-native --- .../3.4.0/native/envs/elevate_portal_env | 48 ------- .../3.4.0/native/envs/entity_management_env | 27 ---- documentation/3.4.0/native/envs/interface_env | 26 ---- .../3.4.0/native/envs/notification_env | 14 -- .../3.4.0/native/envs/observation_portal_env | 4 - .../envs/observation_survey_projects_pwa_env | 18 --- documentation/3.4.0/native/envs/project_env | 72 ---------- documentation/3.4.0/native/envs/scheduler_env | 12 -- .../envs/stand-alone/elevate_portal_env | 96 ++++++------- .../envs/stand-alone/entity_management_env | 44 +++--- .../native/envs/stand-alone/interface_env | 43 +++--- .../native/envs/stand-alone/notification_env | 3 +- .../envs/stand-alone/observation_portal_env | 7 +- .../observation_survey_projects_pwa_env | 33 ++--- .../3.4.0/native/envs/stand-alone/project_env | 129 +++++++++-------- .../native/envs/stand-alone/scheduler_env | 3 +- .../3.4.0/native/envs/stand-alone/user_env | 136 +++++++++--------- documentation/3.4.0/native/envs/user_env | 83 ----------- 18 files changed, 263 insertions(+), 535 deletions(-) delete mode 100644 documentation/3.4.0/native/envs/elevate_portal_env delete mode 100644 documentation/3.4.0/native/envs/entity_management_env delete mode 100644 documentation/3.4.0/native/envs/interface_env delete mode 100644 documentation/3.4.0/native/envs/notification_env delete mode 100644 documentation/3.4.0/native/envs/observation_portal_env delete mode 100644 documentation/3.4.0/native/envs/observation_survey_projects_pwa_env delete mode 100644 documentation/3.4.0/native/envs/project_env delete mode 100644 documentation/3.4.0/native/envs/scheduler_env delete mode 100644 documentation/3.4.0/native/envs/user_env diff --git a/documentation/3.4.0/native/envs/elevate_portal_env b/documentation/3.4.0/native/envs/elevate_portal_env deleted file mode 100644 index 14b3959f..00000000 --- a/documentation/3.4.0/native/envs/elevate_portal_env +++ /dev/null @@ -1,48 +0,0 @@ -AUTH_API_TOKEN= "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJPc3NtSUhXaW1NMDN2MUxsVnFvNHBqaS0ydEMwTGhLY0o5dmtwQTlJZV9zIn0.eyJleHAiOjE3MzI4NjE5ODcsImlhdCI6MTczMjc3NTU4NywianRpIjoiOTM5NWM4N2QtOTliYy00YTRkLWIyNTUtNDQ4NjFhYTBjYWE2IiwiaXNzIjoiaHR0cHM6Ly9xYS5wcmF0aGFtdGVhY2hlcmFwcC50ZWtkaW5leHQuY29tL2F1dGgvcmVhbG1zL3ByYXRoYW0iLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiY2IwN2RlNjItZWM0Yy00YmRlLWI5YjYtOWIwZjM3OWMwMTExIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoicHJhdGhhbSIsInNlc3Npb25fc3RhdGUiOiI2MzQ0ZWZjNS05NmUwLTQyNzYtYjViYi1hNTcyMGI0YzVmYjkiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIi8qIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiZGVmYXVsdC1yb2xlcy1wcmF0aGFtIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwic2lkIjoiNjM0NGVmYzUtOTZlMC00Mjc2LWI1YmItYTU3MjBiNGM1ZmI5IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiUmFqbmlzaCIsInByZWZlcnJlZF91c2VybmFtZSI6InJham5pc2g5ODc2MSIsImdpdmVuX25hbWUiOiJSYWpuaXNoIiwiZmFtaWx5X25hbWUiOiIifQ.OpTwdzG8sWhVK_VY6iAYy1klR2cfSLn2gYCqgnu9FJi4zTjPY-B0d8F--cEPVGZ4HdJiSZnGvfOgalICPKxthG-HfYR-cwznGWJVfte4HsvL5UbteOq5KDT3lsyzUkScgQ0bTKztSsePdhU2ctAGXv52DtPK8u7xWkKD6GYDeQCIHJlFS2JgR9v50d6Mva-stvtDRS7LEFgoes1hKQ0_k_C-5g1w7Rh084XJQC7tPmczap_Q-RqI-jkJZvUl_cAJK6NppZArSFA0AePkY-0_pZKBx82nBJbho2IETMIa7KzvnhdRCtjP0ynoTY-YJ4eL3jYhmIJ5DzWj3FpOZkrpSw" -AWS_ACCESS_KEY_ID= "AWS_ACCESS_KEY_ID" -AWS_ACCESS_SECRET_KEY= "AWS_ACCESS_SECRET_KEY" -AWS_BUCKET_NAME= "qa-knowlg-inquiry" -AWS_REGION= "ap-south-1" -BASE_URL= "https://qa-middleware.tekdinext.com" -NEXT_API_BASE_URL= "https://middleware.prathamdigital.org" -NEXT_PRIVATE_LOCAL_WEBPACK= "true" -NEXT_PUBLIC_AUTH= "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5dndaeklzS3U0ZzRjSWxoZnE1MWQ2SlR1d0w4dktlZCJ9.4jPaZhi9dHMzqqoZAZvfD5t5QPAVAuWOr9SDf1apZb8" -NEXT_PUBLIC_BASE_URL= "https://dev.elevate-apis.shikshalokam.org" -NEXT_PUBLIC_BASE_URL_ENTITY= "https://shiksha-dev-interface.tekdinext.com/entity-management" -NEXT_PUBLIC_BASE_URL_READ= "https://saas-dev-interface.tekdinext.com" -NEXT_PUBLIC_BASE_URL_SCHEMA= "https://qa-interface.prathamdigital.org" -NEXT_PUBLIC_CHANNEL_ID= "scp-channel" -NEXT_PUBLIC_CLIENT_ID= "implementation" -NEXT_PUBLIC_CLIENT_SECRET= "3e92df83-a773-4e3e-89c6-3a9afe81211a" -NEXT_PUBLIC_CLOUD_STORAGE_URL= "https://qa-knowlg-inquiry.s3-ap-south-1.amazonaws.com/" -NEXT_PUBLIC_CONTENT= "http://localhost:8000/shikshalokam/content" -NEXT_PUBLIC_CONTENT_FRAMEWORK_ID= "level1arning-framework" -NEXT_PUBLIC_DELETE_USER= "/api/user/v1/block" -NEXT_PUBLIC_FORGOT_PASSWORD= "https://dev.sunbirdsaas.com/recover/identify/account" -NEXT_PUBLIC_FRAMEWORK_ID= "shiksha-fw" -NEXT_PUBLIC_GENRATE_OTP= "/api/otp/v2/generate" -NEXT_PUBLIC_GRANT_TYPE= "password" -NEXT_PUBLIC_LOCATION_SEARCH= "/api/data/v1/location/search" -NEXT_PUBLIC_LOGINPAGE= "https://dev.elevate-apis.shikshalokam.org/" -NEXT_PUBLIC_LOGIN_PATH= "/auth/realms/sunbird/protocol/openid-connect/token" -NEXT_PUBLIC_NEW_REGISTRATION= "/interface/v1/account/create" -NEXT_PUBLIC_ORGID= "1" -NEXT_PUBLIC_PROGRAM_BASE_URL= "https://dev.elevate-sandbox.shikshalokam.org" -NEXT_PUBLIC_PWA= "http://localhost:8000/shikshalokam/pwa" -NEXT_PUBLIC_READ_USER= "/api/user/v1/search" -NEXT_PUBLIC_REGISTRATION= "http://localhost:8000/shikshalokam/registration/newUser" -NEXT_PUBLIC_SEARCH_LOCATION= "/interface/v1/user/locations/search" -NEXT_PUBLIC_SEND_OTP= "/api/otp/v1/generate" -NEXT_PUBLIC_SHIKSHAGRAHA_BASEPATH= "/shikshalokam" -NEXT_PUBLIC_SSUNBIRD_BASE_URL= "https://saas-qa.tekdinext.com/interface/v1" -NEXT_PUBLIC_SSUNBIRD_HIERARCHY_PATH= "/api/course/v1/" -NEXT_PUBLIC_TELEMETRY_URL= "https://qa.prathamteacherapp.tekdinext.com/telemetry" -NEXT_PUBLIC_TENANT_ID= "ef99949b-7f3a-4a5f-806a-e67e683e38f3" -NEXT_PUBLIC_TRACKING_BASE_URL= "https://shiksha2-dev.tekdinext.com/tracking" -NEXT_PUBLIC_UPDATE_USER= "/api/framework/v1/update" -NEXT_PUBLIC_VERIFT_OTP= "/api/otp/v2/verify" -NEXT_PUBLIC_VERIFY_OTP= "/api/otp/v1/verify" -created_time= "2025-06-18T08:50:04.71092372Z" -custom_metadata= "null" -destroyed= "false" -version= "5" \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/entity_management_env b/documentation/3.4.0/native/envs/entity_management_env deleted file mode 100644 index 60d2cb5e..00000000 --- a/documentation/3.4.0/native/envs/entity_management_env +++ /dev/null @@ -1,27 +0,0 @@ -# Entity service configurations file -APPLICATION_PORT = 5001 -APPLICATION_ENV ="development" -APPLICATION_BASE_URL='/entity-management/' -INTERNAL_ACCESS_TOKEN ="internal_access_token" -ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 -# DB -MONGODB_URL=mongodb://localhost:27017/elevate-entity -AUTH_METHOD = native -# USER_SERVICE -USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org -USER_SERVICE_BASE_URL=/user -KAFKA_HEALTH_CHECK_TOPIC=test -#service name -SERVICE_NAME = elevate-entity-service -API_DOC_URL="https://project-dev.elevate-apis.shikshalokam.org/entity-management/api-doc" -APPLICATION_HOST=localhost -IS_AUTH_TOKEN_BEARER="false" -ADMIN_ACCESS_TOKEN=rwwee3$123 -ADMIN_TOKEN_HEADER_NAME="admin-auth-token" -INTERFACE_SERVICE_URL="https://saas-qa.tekdinext.com" -KAFKA_HEALTH_CHECK_TOPIC = entity-health-check-topic-check -KAFKA_COMMUNICATIONS_ON_OFF = ON -KAFKA_URL = kafka:9092 -KAFKA_COMMUNICATIONS_ON_OFF = ON -KAFKA_GROUP_ID = entity -HEALTH_CHECK_DEBUG_MODE = true \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/interface_env b/documentation/3.4.0/native/envs/interface_env deleted file mode 100644 index d12c7e5d..00000000 --- a/documentation/3.4.0/native/envs/interface_env +++ /dev/null @@ -1,26 +0,0 @@ -API_DOC_URL=/interface/api-doc -APPLICATION_ENV=development -APPLICATION_PORT=3569 -ELEVATE_NOTIFICATION_KAFKA_BROKERS=10.148.0.38:9092 -ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=dev.mentoring -ELEVATE_NOTIFICATION_KAFKA_TOPIC=dev.notification -ENTITY_SERVICE_BASE_URL=http://localhost:5001 -INSTALLED_PACKAGES=elevate-mentoring elevate-survey-observation@1.0.1 elevate-self-creation-portal -MENTORING_SERVICE_BASE_URL=http://localhost:7101 -NOTIFICATION_SERVICE_BASE_URL=http://localhost:7201 -PROJECT_SERVICE_BASE_URL=http://localhost:6000 -RATE_LIMITER_ENABLED=true -RATE_LIMITER_GENERAL_LIMIT=500 -RATE_LIMITER_NUMBER_OF_PROXIES=3 -RATE_LIMITER_PUBLIC_LOW_LIMIT=5 -REQUIRED_BASE_PACKAGES=elevate-mentoring elevate-project elevate-survey-observation self-creation-portal -REQUIRED_PACKAGES=elevate-mentoring@1.2.90 elevate-survey-observation@1.0.22 elevate-project@1.1.53 shiksha-notification@1.1.3 elevate-self-creation-portal@1.0.70 -ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json -SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw -SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw -SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 -SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 -SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001 -SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE -SURVEY_SERVICE_BASE_URL=http://localhost:5007 -USER_SERVICE_BASE_URL=http://localhost:3001 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/notification_env b/documentation/3.4.0/native/envs/notification_env deleted file mode 100644 index ce2f2d64..00000000 --- a/documentation/3.4.0/native/envs/notification_env +++ /dev/null @@ -1,14 +0,0 @@ -API_DOC_URL=/api-doc -APPLICATION_BASE_URL=/notification/ -APPLICATION_ENV=development -APPLICATION_PORT=3002 -DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/notification -DISABLE_LOG=false -ENABLE_LOG=true -ERROR_LOG_LEVEL=silly -INTERNAL_ACCESS_TOKEN=qwertyhdgffs -KAFKA_GROUP_ID=notification -KAFKA_HOST=localhost:9092 -KAFKA_TOPIC=develop.notifications -SENDGRID_API_KEY=SG.asd9f87a9s8d7f. -SENDGRID_FROM_MAIL=no-reply@some.org \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/observation_portal_env b/documentation/3.4.0/native/envs/observation_portal_env deleted file mode 100644 index 50d7ba42..00000000 --- a/documentation/3.4.0/native/envs/observation_portal_env +++ /dev/null @@ -1,4 +0,0 @@ -window["env"] = { - production: true, - surveyBaseURL:"https://qa.elevate-apis.shikshalokam.org" -} \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/observation_survey_projects_pwa_env b/documentation/3.4.0/native/envs/observation_survey_projects_pwa_env deleted file mode 100644 index 156e3796..00000000 --- a/documentation/3.4.0/native/envs/observation_survey_projects_pwa_env +++ /dev/null @@ -1,18 +0,0 @@ -window["env"] = { - production: true, - baseURL: 'https://qa.elevate-apis.shikshalokam.org', - // baseURL: 'https://saas-qa.tekdinext.com', - capabilities: 'all', - restrictedPages: ['DOWNLOADS','AUTH_PAGES'], - unauthorizedRedirectUrl: "/", - isAuthBypassed: true, - profileRedirectPath: "/profile-edit", - showHeader: true, - config:{ - logoPath:'assets/images/logo.png', - faviconPath:'assets/icons/elevate-logo.png', - title:"Elevate", - redirectUrl:"/home" - }, - hostPath:'/ml/' -}; \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/project_env b/documentation/3.4.0/native/envs/project_env deleted file mode 100644 index 14192224..00000000 --- a/documentation/3.4.0/native/envs/project_env +++ /dev/null @@ -1,72 +0,0 @@ -APPLICATION_PORT = 6000 -APPLICATION_ENV = development -ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 - -INTERNAL_ACCESS_TOKEN =internal_access_token -# Docker--------- -MONGODB_URL = mongodb://localhost:27017/elevate-project - -# ML Core Service -ML_CORE_SERVICE_URL = http://localhost:4000 -# ML Survey Service -# SURVEY_SERVICE_URL = https://saas-qa.tekdinext.com/survey -# OFFLINE VALIDATION -KEYCLOAK_PUBLIC_KEY_PATH = keycloak-public-keys -# KAFKA Configurations -KAFKA_COMMUNICATIONS_ON_OFF = ON -KAFKA_URL =localhost:9092 - -# KAFKA_URL=10.148.0.38:9092 -KAFKA_GROUP_ID = projects -# KAFKA_GROUP_ID=dev.projects -KAFKA_HEALTH_CHECK_TOPIC = project-health-check-topic-check -# SUBMISSION TOPIC -PROJECT_SUBMISSION_TOPIC=sl-improvement-project-submission-dev -SUBMISSION_TOPIC = Projectsubmissions -PROJECT_CERTIFICATE_TOPIC = generateProjectCertificate -ELEVATE_PROJECT_SERVICE_URL= 'http://localhost:6000' -SERVICE_NAME = project -USER_DELETE_TOPIC = deleteuser -TELEMETRY_TOPIC=telemetry.raw -ID = projectservice -TELEMETRY_ON_OFF=ON -USER_DELETE_ON_OFF=OFF -CLOUD_STORAGE=ON -TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC = +05:30 -VALIDATE_ENTITIES = ON -APP_PORTAL_BASE_URL = "https://dev.elevate.org" -NO_OF_MINUTES = 30 -NO_OF_EXPIRY_TIME = 60 -# PRESIGNED_URL_EXPIRY_IN_SECONDS = 300 -# DOWNLOADABLE_URL_EXPIRY_IN_SECONDS = 300 -DEFAULT_ORGANISATION_CODE = 1 -# GOTENBERG_URL=http://localhost:3000 - -GOTENBERG_URL=http://gotenberg:3000 - -CERTIFICATE_SERVICE_URL = http://localhost:8081 -API_DOC_URL = "https://project-dev.elevate-apis.shikshalokam.org/project/api-doc" -#INTERFACE SERVICE URL -INTERFACE_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org -# INTERFACE_SERVICE_URLL = "http://localhost:5001" -USER_SERVICE_BASE_URL = "/user" -ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" -SURVEY_SERVICE_URL = http://localhost:4301/survey -#GCP Cloud Configuration -CLOUD_STORAGE_PROVIDER=gcloud -CLOUD_STORAGE_ACCOUNTNAME=sl-mentoring-dev-storage@sl-dev-project.iam.gserviceaccount.com -CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDHwatCbtxcfqvt\n7rWWdgOsyQwH1/WGMJ2zTfQydZpRf2JGi6DaqbF85SEaoVnAKaN+33na2Vu5Kgep\n0wnZywCHCnz0W0Geo/4I4KUmzpm4gtG+ncuUhOd9bibx8M+yYhzWOijcPqaxTdpc\nWuenzqRmyNOHbYh4vz9cITrPnP95yPEl3o9gk+e4tD5MHwZTHw9/XKCp27Z/y9D2\nNzotaTjHNPZIxzxNkLzEC3PgYiGTiXBDdj5uag+Y5oV0+ydEZULyiqmr/IgWUZFL\nPsWnlraBgRDCJ/VsQOfU9EomyEapQdR1eBXYETqtMCFIT+lvbZherj0UQ7oRLAlZ\nqnKhnDchAgMBAAECggEADSJBtWN+n6JAgathSxxFT5YEcXuUjBckN0bX2H19AQDE\nIGlL0TS5E8Io9AxJz2Wtd0kQRQBnlHwb9uGGU0iSp05cOuDJJroXmNPUaAHLf6My\nUTskyIYYhlm4u82eilcDGF7IkvqXkS7SPaJIevMOQifQKKZeA7pnWxJgQIhND9+1\nls0OFQ77llh8pXiuAJ9fZbf7oLomKXUxlvfBFSj8NEiqzK7Vk+XCJVvuvUdsLSi6\nR8fputYgaoLJSDaGc/AFNlcec3gneok7zak4TyPQzSV3rwdMajbLEtBwwhsUVuFf\n5K6JHrYY3jYaOd0wqcu1v+WJw5LDexdawk1keD+08QKBgQDxMoAGNZQLxyuGPOnS\nYClPDJMZiSR+8oTaQyI0xvgQ8V7z741dEDNrbmYh2AKgDSec4zDfWga+xl2VSwsD\ndA42+HiD8Tji29iqT9aIJnhYWdk+DXwk/ySjLvUVY4dRGLI4kDwWjb5RAO4M5UEl\n1MeWhfMbgYLL/1gY4gX5BBQBXQKBgQDUBBW0lx9tXGjBr7c5dM8iO5J+O8K/zbds\nzE+oAwtN5saOtv9lhgDuhyFN67pCGW3M7fQgec9tigrDMKmy6ARHbORLes1zhSsd\nHH9aTA6/DkVzBnsDA3dT0klgOAFN2eP8QYhpNGN0My5jhhXNd5L2pDHpuIHkZPP4\ncuFxncJclQKBgHL2VAkhnnfirb8k53nrdaUE5FQmhuuvIl155CLtty00LsLsKh/y\nad/J1gpJkC7DNl9T9mZu3YouuEpBY3V46pGO6rpQzoFqsiGzPhjU5UWPRbmK6eIk\nbk0NQ6m3L7cao0/Mh6dkVhL783rYBq5Gdf8rx00T9MjQ4yexC5G+PN7NAoGAeWsN\ncyrI2Lx/UczrxX/bz+MF9j0LPwT08t3fEH0N0ENFmx26Dc48Yl4I+LLzLD+b3iy4\nDpEz9auEllwcE1VEfhMieweM+YdeNYHIfVHpcAkgRMuFTyiBAgP/+ZaZSJhsNF7j\nXDygaD+XZW+4tL6x74YA/7SmzsHx5msEKSkL0jECgYAOldGF28ujJHVA8kksXBkP\nlqIPki9Mg7qRHZBRFkmjskmEUFJTJP8TSWuo2c+J9idx6fxgXKmiXa5lH5ewQbXu\nQYbqpNsF167AjHEwxKS4qeU2u+fyw3VxB03gpNqEzolIIaGItAIfzyQ5KiN2thSl\nnhHTJ/psHBlZoENzsgvIUA==\n-----END PRIVATE KEY-----\n" -CLOUD_STORAGE_PROJECT =sl-dev-project -CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private -CLOUD_STORAGE_BUCKET_TYPE=private -ADMIN_ACCESS_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl -ADMIN_AUTH_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl -ADMIN_TOKEN_HEADER_NAME = 'admin-auth-token' -IS_AUTH_TOKEN_BEARER = false -AUTH_METHOD = native -REDIS_HOST=redis://127.0.0.1:6379 -# PUBLIC_ASSET_BUCKETNAME=mentoring-dev-storage-public - - -USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org -RESOURCE_DELETION_TOPIC=RESOURCE_DELETION_TOPIC diff --git a/documentation/3.4.0/native/envs/scheduler_env b/documentation/3.4.0/native/envs/scheduler_env deleted file mode 100644 index ee239875..00000000 --- a/documentation/3.4.0/native/envs/scheduler_env +++ /dev/null @@ -1,12 +0,0 @@ -API_DOC_URL=/api-doc -APPLICATION_BASE_URL=/scheduler/ -APPLICATION_ENV=development -APPLICATION_PORT=4000 -DEFAULT_QUEUE=email -DISABLE_LOG=false -ENABLE_LOG=true -ERROR_LOG_LEVEL=silly -KAFKA_URL=localhost:9092 -NOTIFICATION_KAFKA_TOPIC=develop.notifications -REDIS_HOST=localhost -REDIS_PORT=6379 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env b/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env index b9b1fb02..14b3959f 100644 --- a/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env +++ b/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env @@ -1,48 +1,48 @@ -AUTH_API_TOKEN=your_auth_api_token_here -AWS_ACCESS_KEY_ID=your_aws_access_key_id -AWS_ACCESS_SECRET_KEY=your_aws_secret_access_key -AWS_BUCKET_NAME=your_s3_bucket_name -AWS_REGION=your_aws_region -BASE_URL=https://your-middleware-url.com -NEXT_API_BASE_URL=https://your-api-base-url.com -NEXT_PRIVATE_LOCAL_WEBPACK=true -NEXT_PUBLIC_AUTH=Bearer your_public_auth_token -NEXT_PUBLIC_BASE_URL=https://your-elevate-apis-url.com -NEXT_PUBLIC_BASE_URL_ENTITY=https://your-entity-management-url.com -NEXT_PUBLIC_BASE_URL_READ=https://your-read-service-url.com -NEXT_PUBLIC_BASE_URL_SCHEMA=https://your-schema-service-url.com -NEXT_PUBLIC_CHANNEL_ID=your_channel_id -NEXT_PUBLIC_CLIENT_ID=your_client_id -NEXT_PUBLIC_CLIENT_SECRET=your_client_secret -NEXT_PUBLIC_CLOUD_STORAGE_URL=https://your-s3-bucket-url.amazonaws.com/ -NEXT_PUBLIC_CONTENT=http://localhost:8000/your-app/content -NEXT_PUBLIC_CONTENT_FRAMEWORK_ID=your_content_framework_id -NEXT_PUBLIC_DELETE_USER=/api/user/v1/block -NEXT_PUBLIC_FORGOT_PASSWORD=https://your-domain.com/recover/identify/account -NEXT_PUBLIC_FRAMEWORK_ID=your_framework_id -NEXT_PUBLIC_GENRATE_OTP=/api/otp/v2/generate -NEXT_PUBLIC_GRANT_TYPE=password -NEXT_PUBLIC_LOCATION_SEARCH=/api/data/v1/location/search -NEXT_PUBLIC_LOGINPAGE=https://your-login-page-url.com/ -NEXT_PUBLIC_LOGIN_PATH=/auth/realms/sunbird/protocol/openid-connect/token -NEXT_PUBLIC_NEW_REGISTRATION=/interface/v1/account/create -NEXT_PUBLIC_ORGID=1 -NEXT_PUBLIC_PROGRAM_BASE_URL=https://your-program-base-url.com -NEXT_PUBLIC_PWA=http://localhost:8000/your-app/pwa -NEXT_PUBLIC_READ_USER=/api/user/v1/search -NEXT_PUBLIC_REGISTRATION=http://localhost:8000/your-app/registration/newUser -NEXT_PUBLIC_SEARCH_LOCATION=/interface/v1/user/locations/search -NEXT_PUBLIC_SEND_OTP=/api/otp/v1/generate -NEXT_PUBLIC_SHIKSHAGRAHA_BASEPATH=/your-app-basepath -NEXT_PUBLIC_SSUNBIRD_BASE_URL=https://your-sunbird-interface-url.com/interface/v1 -NEXT_PUBLIC_SSUNBIRD_HIERARCHY_PATH=/api/course/v1/ -NEXT_PUBLIC_TELEMETRY_URL=https://your-telemetry-url.com/telemetry -NEXT_PUBLIC_TENANT_ID=your_tenant_id_uuid -NEXT_PUBLIC_TRACKING_BASE_URL=https://your-tracking-url.com/tracking -NEXT_PUBLIC_UPDATE_USER=/api/framework/v1/update -NEXT_PUBLIC_VERIFT_OTP=/api/otp/v2/verify -NEXT_PUBLIC_VERIFY_OTP=/api/otp/v1/verify -created_time=2025-06-18T08:50:04.71092372Z -custom_metadata=null -destroyed=false -version=5 \ No newline at end of file +AUTH_API_TOKEN= "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJPc3NtSUhXaW1NMDN2MUxsVnFvNHBqaS0ydEMwTGhLY0o5dmtwQTlJZV9zIn0.eyJleHAiOjE3MzI4NjE5ODcsImlhdCI6MTczMjc3NTU4NywianRpIjoiOTM5NWM4N2QtOTliYy00YTRkLWIyNTUtNDQ4NjFhYTBjYWE2IiwiaXNzIjoiaHR0cHM6Ly9xYS5wcmF0aGFtdGVhY2hlcmFwcC50ZWtkaW5leHQuY29tL2F1dGgvcmVhbG1zL3ByYXRoYW0iLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiY2IwN2RlNjItZWM0Yy00YmRlLWI5YjYtOWIwZjM3OWMwMTExIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoicHJhdGhhbSIsInNlc3Npb25fc3RhdGUiOiI2MzQ0ZWZjNS05NmUwLTQyNzYtYjViYi1hNTcyMGI0YzVmYjkiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIi8qIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiZGVmYXVsdC1yb2xlcy1wcmF0aGFtIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwic2lkIjoiNjM0NGVmYzUtOTZlMC00Mjc2LWI1YmItYTU3MjBiNGM1ZmI5IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiUmFqbmlzaCIsInByZWZlcnJlZF91c2VybmFtZSI6InJham5pc2g5ODc2MSIsImdpdmVuX25hbWUiOiJSYWpuaXNoIiwiZmFtaWx5X25hbWUiOiIifQ.OpTwdzG8sWhVK_VY6iAYy1klR2cfSLn2gYCqgnu9FJi4zTjPY-B0d8F--cEPVGZ4HdJiSZnGvfOgalICPKxthG-HfYR-cwznGWJVfte4HsvL5UbteOq5KDT3lsyzUkScgQ0bTKztSsePdhU2ctAGXv52DtPK8u7xWkKD6GYDeQCIHJlFS2JgR9v50d6Mva-stvtDRS7LEFgoes1hKQ0_k_C-5g1w7Rh084XJQC7tPmczap_Q-RqI-jkJZvUl_cAJK6NppZArSFA0AePkY-0_pZKBx82nBJbho2IETMIa7KzvnhdRCtjP0ynoTY-YJ4eL3jYhmIJ5DzWj3FpOZkrpSw" +AWS_ACCESS_KEY_ID= "AWS_ACCESS_KEY_ID" +AWS_ACCESS_SECRET_KEY= "AWS_ACCESS_SECRET_KEY" +AWS_BUCKET_NAME= "qa-knowlg-inquiry" +AWS_REGION= "ap-south-1" +BASE_URL= "https://qa-middleware.tekdinext.com" +NEXT_API_BASE_URL= "https://middleware.prathamdigital.org" +NEXT_PRIVATE_LOCAL_WEBPACK= "true" +NEXT_PUBLIC_AUTH= "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5dndaeklzS3U0ZzRjSWxoZnE1MWQ2SlR1d0w4dktlZCJ9.4jPaZhi9dHMzqqoZAZvfD5t5QPAVAuWOr9SDf1apZb8" +NEXT_PUBLIC_BASE_URL= "https://dev.elevate-apis.shikshalokam.org" +NEXT_PUBLIC_BASE_URL_ENTITY= "https://shiksha-dev-interface.tekdinext.com/entity-management" +NEXT_PUBLIC_BASE_URL_READ= "https://saas-dev-interface.tekdinext.com" +NEXT_PUBLIC_BASE_URL_SCHEMA= "https://qa-interface.prathamdigital.org" +NEXT_PUBLIC_CHANNEL_ID= "scp-channel" +NEXT_PUBLIC_CLIENT_ID= "implementation" +NEXT_PUBLIC_CLIENT_SECRET= "3e92df83-a773-4e3e-89c6-3a9afe81211a" +NEXT_PUBLIC_CLOUD_STORAGE_URL= "https://qa-knowlg-inquiry.s3-ap-south-1.amazonaws.com/" +NEXT_PUBLIC_CONTENT= "http://localhost:8000/shikshalokam/content" +NEXT_PUBLIC_CONTENT_FRAMEWORK_ID= "level1arning-framework" +NEXT_PUBLIC_DELETE_USER= "/api/user/v1/block" +NEXT_PUBLIC_FORGOT_PASSWORD= "https://dev.sunbirdsaas.com/recover/identify/account" +NEXT_PUBLIC_FRAMEWORK_ID= "shiksha-fw" +NEXT_PUBLIC_GENRATE_OTP= "/api/otp/v2/generate" +NEXT_PUBLIC_GRANT_TYPE= "password" +NEXT_PUBLIC_LOCATION_SEARCH= "/api/data/v1/location/search" +NEXT_PUBLIC_LOGINPAGE= "https://dev.elevate-apis.shikshalokam.org/" +NEXT_PUBLIC_LOGIN_PATH= "/auth/realms/sunbird/protocol/openid-connect/token" +NEXT_PUBLIC_NEW_REGISTRATION= "/interface/v1/account/create" +NEXT_PUBLIC_ORGID= "1" +NEXT_PUBLIC_PROGRAM_BASE_URL= "https://dev.elevate-sandbox.shikshalokam.org" +NEXT_PUBLIC_PWA= "http://localhost:8000/shikshalokam/pwa" +NEXT_PUBLIC_READ_USER= "/api/user/v1/search" +NEXT_PUBLIC_REGISTRATION= "http://localhost:8000/shikshalokam/registration/newUser" +NEXT_PUBLIC_SEARCH_LOCATION= "/interface/v1/user/locations/search" +NEXT_PUBLIC_SEND_OTP= "/api/otp/v1/generate" +NEXT_PUBLIC_SHIKSHAGRAHA_BASEPATH= "/shikshalokam" +NEXT_PUBLIC_SSUNBIRD_BASE_URL= "https://saas-qa.tekdinext.com/interface/v1" +NEXT_PUBLIC_SSUNBIRD_HIERARCHY_PATH= "/api/course/v1/" +NEXT_PUBLIC_TELEMETRY_URL= "https://qa.prathamteacherapp.tekdinext.com/telemetry" +NEXT_PUBLIC_TENANT_ID= "ef99949b-7f3a-4a5f-806a-e67e683e38f3" +NEXT_PUBLIC_TRACKING_BASE_URL= "https://shiksha2-dev.tekdinext.com/tracking" +NEXT_PUBLIC_UPDATE_USER= "/api/framework/v1/update" +NEXT_PUBLIC_VERIFT_OTP= "/api/otp/v2/verify" +NEXT_PUBLIC_VERIFY_OTP= "/api/otp/v1/verify" +created_time= "2025-06-18T08:50:04.71092372Z" +custom_metadata= "null" +destroyed= "false" +version= "5" \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/entity_management_env b/documentation/3.4.0/native/envs/stand-alone/entity_management_env index 4b1c2eb5..60d2cb5e 100644 --- a/documentation/3.4.0/native/envs/stand-alone/entity_management_env +++ b/documentation/3.4.0/native/envs/stand-alone/entity_management_env @@ -1,21 +1,27 @@ -ACCESS_TOKEN_EXPIRY=1440m -ACCESS_TOKEN_SECRET=hsghasghj617237yuhdhhdqwu27hjadfhjghjadghhgfyrgjkhrhhl1 -API_DOC_URL=/entity-management/api-doc -APPLICATION_BASE_URL=/entity-management/ -APPLICATION_ENV=development -APPLICATION_HOST=localhost -APPLICATION_PORT=5001 -INTERNAL_ACCESS_TOKEN=qwertyhdgffs +# Entity service configurations file +APPLICATION_PORT = 5001 +APPLICATION_ENV ="development" +APPLICATION_BASE_URL='/entity-management/' +INTERNAL_ACCESS_TOKEN ="internal_access_token" +ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 +# DB MONGODB_URL=mongodb://localhost:27017/elevate-entity -IS_AUTH_TOKEN_BEARER=false -KAFKA_COMMUNICATIONS_ON_OFF=ON -KAFKA_GROUP_ID=entity -KAFKA_HEALTH_CHECK_TOPIC=entity-health-check-topic-check -KAFKA_URL=10.148.0.38:9092 -SERVICE_NAME=EntityManagementService +AUTH_METHOD = native +# USER_SERVICE +USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org USER_SERVICE_BASE_URL=/user -USER_SERVICE_URL=http://localhost:3567 -ADMIN_ACCESS_TOKEN=aADMINTOKEN -ADMIN_TOKEN_HEADER_NAME=admin-auth-token -INTERFACE_SERVICE_URL=http://localhost:3567 -AUTH_METHOD=native +KAFKA_HEALTH_CHECK_TOPIC=test +#service name +SERVICE_NAME = elevate-entity-service +API_DOC_URL="https://project-dev.elevate-apis.shikshalokam.org/entity-management/api-doc" +APPLICATION_HOST=localhost +IS_AUTH_TOKEN_BEARER="false" +ADMIN_ACCESS_TOKEN=rwwee3$123 +ADMIN_TOKEN_HEADER_NAME="admin-auth-token" +INTERFACE_SERVICE_URL="https://saas-qa.tekdinext.com" +KAFKA_HEALTH_CHECK_TOPIC = entity-health-check-topic-check +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_URL = kafka:9092 +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_GROUP_ID = entity +HEALTH_CHECK_DEBUG_MODE = true \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/interface_env b/documentation/3.4.0/native/envs/stand-alone/interface_env index 5f12ea5a..d12c7e5d 100644 --- a/documentation/3.4.0/native/envs/stand-alone/interface_env +++ b/documentation/3.4.0/native/envs/stand-alone/interface_env @@ -1,17 +1,26 @@ -API_DOC_URL= /interface/api-doc -APPLICATION_ENV= development -APPLICATION_PORT= 3569 -ENTITY_SERVICE_BASE_URL= http://localhost:5001 -INSTALLED_PACKAGES=elevate-project elevate-self-creation-portal elevate-survey-observation -NOTIFICATION_SERVICE_BASE_URL= http://localhost:3002 -PROJECT_SERVICE_BASE_URL= http://localhost:5000 -RATE_LIMITER_ENABLED= false -RATE_LIMITER_GENERAL_LIMIT= 50 -RATE_LIMITER_NUMBER_OF_PROXIES= 3 -RATE_LIMITER_PUBLIC_LOW_LIMIT= 5 -REQUIRED_BASE_PACKAGES= project,self-creation-portal,survey -REQUIRED_PACKAGES=elevate-project@1.1.34 elevate-self-creation-portal@1.0.64 elevate-survey-observation@1.0.3 -ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/survey-project-creation-service/story-1085-publish/src/constants/interface-routes/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/samiksha-service/refs/heads/develop/constants/interface-routes/elevate-survey-observation/configs.json,https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/develop/constants/interface-routes/elevate-project/configs.json -SCHEDULER_SERVICE_BASE_URL= http://localhost:4000 -SUPPORTED_HTTP_TYPES= GET POST PUT PATCH DELETE -USER_SERVICE_BASE_URL= http://localhost:3001 \ No newline at end of file +API_DOC_URL=/interface/api-doc +APPLICATION_ENV=development +APPLICATION_PORT=3569 +ELEVATE_NOTIFICATION_KAFKA_BROKERS=10.148.0.38:9092 +ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=dev.mentoring +ELEVATE_NOTIFICATION_KAFKA_TOPIC=dev.notification +ENTITY_SERVICE_BASE_URL=http://localhost:5001 +INSTALLED_PACKAGES=elevate-mentoring elevate-survey-observation@1.0.1 elevate-self-creation-portal +MENTORING_SERVICE_BASE_URL=http://localhost:7101 +NOTIFICATION_SERVICE_BASE_URL=http://localhost:7201 +PROJECT_SERVICE_BASE_URL=http://localhost:6000 +RATE_LIMITER_ENABLED=true +RATE_LIMITER_GENERAL_LIMIT=500 +RATE_LIMITER_NUMBER_OF_PROXIES=3 +RATE_LIMITER_PUBLIC_LOW_LIMIT=5 +REQUIRED_BASE_PACKAGES=elevate-mentoring elevate-project elevate-survey-observation self-creation-portal +REQUIRED_PACKAGES=elevate-mentoring@1.2.90 elevate-survey-observation@1.0.22 elevate-project@1.1.53 shiksha-notification@1.1.3 elevate-self-creation-portal@1.0.70 +ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json +SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw +SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw +SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 +SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 +SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001 +SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE +SURVEY_SERVICE_BASE_URL=http://localhost:5007 +USER_SERVICE_BASE_URL=http://localhost:3001 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/notification_env b/documentation/3.4.0/native/envs/stand-alone/notification_env index ce2f2d64..2d62719f 100644 --- a/documentation/3.4.0/native/envs/stand-alone/notification_env +++ b/documentation/3.4.0/native/envs/stand-alone/notification_env @@ -11,4 +11,5 @@ KAFKA_GROUP_ID=notification KAFKA_HOST=localhost:9092 KAFKA_TOPIC=develop.notifications SENDGRID_API_KEY=SG.asd9f87a9s8d7f. -SENDGRID_FROM_MAIL=no-reply@some.org \ No newline at end of file +SENDGRID_FROM_MAIL=no-reply@some.org +ZEST_ENV=ZEST_ENV diff --git a/documentation/3.4.0/native/envs/stand-alone/observation_portal_env b/documentation/3.4.0/native/envs/stand-alone/observation_portal_env index 84430043..50d7ba42 100644 --- a/documentation/3.4.0/native/envs/stand-alone/observation_portal_env +++ b/documentation/3.4.0/native/envs/stand-alone/observation_portal_env @@ -1,5 +1,4 @@ window["env"] = { - production: true, - surveyBaseURL: '', - hostPath: '/observations/', -}; \ No newline at end of file + production: true, + surveyBaseURL:"https://qa.elevate-apis.shikshalokam.org" +} \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env b/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env index ccd660b0..156e3796 100644 --- a/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env +++ b/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env @@ -1,17 +1,18 @@ window["env"] = { - production: true, - baseURL: '', - capabilities: 'all', - restrictedPages: ['DOWNLOADS','AUTH_PAGES','PROFILE','EDIT_PROFILE'], - unauthorizedRedirectUrl: "/", - isAuthBypassed: true, - profileRedirectPath: "", - showHeader: true, - config:{ - logoPath:'assets/images/logo.png', - faviconPath:'assets/icons/elevate-logo.png', - title:"Elevate", - redirectUrl:"/home" - }, - hostPath:'/ml/' - }; \ No newline at end of file + production: true, + baseURL: 'https://qa.elevate-apis.shikshalokam.org', + // baseURL: 'https://saas-qa.tekdinext.com', + capabilities: 'all', + restrictedPages: ['DOWNLOADS','AUTH_PAGES'], + unauthorizedRedirectUrl: "/", + isAuthBypassed: true, + profileRedirectPath: "/profile-edit", + showHeader: true, + config:{ + logoPath:'assets/images/logo.png', + faviconPath:'assets/icons/elevate-logo.png', + title:"Elevate", + redirectUrl:"/home" + }, + hostPath:'/ml/' +}; \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/project_env b/documentation/3.4.0/native/envs/stand-alone/project_env index b30cf93a..14192224 100644 --- a/documentation/3.4.0/native/envs/stand-alone/project_env +++ b/documentation/3.4.0/native/envs/stand-alone/project_env @@ -1,57 +1,72 @@ - ACCESS_TOKEN_EXPIRY=1440h - ACCESS_TOKEN_SECRET=hsghasghj617237yuhdhhdqwu27hjadfhjghjadghhgfyrgjkhrhhl1 - ADMIN_ACCESS_TOKEN=ADMINTOKEN - ADMIN_AUTH_TOKEN=ADMINAUTHTOKEN - ADMIN_TOKEN_HEADER_NAME=admin-auth-token - API_DOC_URL=/project/api-doc - APPLICATION_BASE_URL=/project/ - APPLICATION_ENV=development - APPLICATION_HOST=localhost - APPLICATION_PORT=5003 - APP_PORTAL_BASE_URL=https://localhost:8100 - AUTH_CONFIG_FILE_PATH=config.json - AUTH_METHOD=native - CLOUD_STORAGE=GCP - CLOUD_STORAGE_ACCOUNTNAME=sl-mentoring-dev-storage@sl-dev-project.iam.gserviceaccount.com - CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private - CLOUD_STORAGE_BUCKET_TYPE=private - CLOUD_STORAGE_PROJECT=sl-dev-project - CLOUD_STORAGE_PROVIDER=gcloud - CLOUD_STORAGE_SECRET=-----BEGIN PRIVATE KEY-----\nMIIEvAIBADA****ZoENzsgvIUA==\n-----END PRIVATE KEY-----\n - DEFAULT_ORGANISATION_CODE=default_code - DOWNLOADABLE_URL_EXPIRY_IN_SECONDS=300 - ELEVATE_PROJECT_SERVICE_URL=http://localhost:5000 - ENABLE_REFLECTION=false - ENTITY_BASE_URL=http://localhost:3567 - ENTITY_MANAGEMENT_SERVICE_BASE_URL=/entity-management - ENTITY_MONGODB_URL=mongodb://localhost:27017/elevate-entity - GOTENBERG_URL=http://localhost:3000 - INTERFACE_SERVICE_URL=http://localhost:3567 - INTERNAL_ACCESS_TOKEN=qwertyhdgffs - IS_AUTH_TOKEN_BEARER=false - KAFKA_COMMUNICATIONS_ON_OFF=ON - KAFKA_GROUP_ID=projects - KAFKA_HEALTH_CHECK_TOPIC=project-health-check-topic-check - KAFKA_URL=localhost:9092 - MONGODB_URL=mongodb://localhost:27017/elevate-project - ORGANIZATION_EXTENSION_TOPIC=elevate_project_org_extension_event_listener - ORG_ID_HEADER_NAME=Org-id - ORG_UPDATES_TOPIC=organizationEvent - PRESIGNED_URL_EXPIRY_IN_SECONDS=300 - PROGRAM_USER_MAPPING_TOPIC=program - PROJECT_SUBMISSION_TOPIC=elevate.improvement.project.submission - SERVICE_NAME=project - SOURCE_MONGODB_URL=mongodb://localhost:27017/elevate-project - SUBMISSION_LEVEL=USER - SUBMISSION_TOPIC=elevate_project_task_submissions - SURVEY_MONGODB_URL=mongodb://localhost:27017/elevate-samiksha - SURVEY_SERVICE_URL=http://localhost:3567/survey - TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC=+05:30 - USER_ACCOUNT_EVENT_TOPIC=userCreate - USER_ACTIVITY_TOPIC=user-activities - USER_COURSES_SUBMISSION_TOPIC=elevate_user_courses - USER_COURSES_TOPIC=elevate_user_courses_raw - USER_DELETE_ON_OFF=ON - USER_DELETE_TOPIC=userCreate - USER_SERVICE_BASE_URL=/user - VALIDATE_ENTITIES=ON +APPLICATION_PORT = 6000 +APPLICATION_ENV = development +ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 + +INTERNAL_ACCESS_TOKEN =internal_access_token +# Docker--------- +MONGODB_URL = mongodb://localhost:27017/elevate-project + +# ML Core Service +ML_CORE_SERVICE_URL = http://localhost:4000 +# ML Survey Service +# SURVEY_SERVICE_URL = https://saas-qa.tekdinext.com/survey +# OFFLINE VALIDATION +KEYCLOAK_PUBLIC_KEY_PATH = keycloak-public-keys +# KAFKA Configurations +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_URL =localhost:9092 + +# KAFKA_URL=10.148.0.38:9092 +KAFKA_GROUP_ID = projects +# KAFKA_GROUP_ID=dev.projects +KAFKA_HEALTH_CHECK_TOPIC = project-health-check-topic-check +# SUBMISSION TOPIC +PROJECT_SUBMISSION_TOPIC=sl-improvement-project-submission-dev +SUBMISSION_TOPIC = Projectsubmissions +PROJECT_CERTIFICATE_TOPIC = generateProjectCertificate +ELEVATE_PROJECT_SERVICE_URL= 'http://localhost:6000' +SERVICE_NAME = project +USER_DELETE_TOPIC = deleteuser +TELEMETRY_TOPIC=telemetry.raw +ID = projectservice +TELEMETRY_ON_OFF=ON +USER_DELETE_ON_OFF=OFF +CLOUD_STORAGE=ON +TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC = +05:30 +VALIDATE_ENTITIES = ON +APP_PORTAL_BASE_URL = "https://dev.elevate.org" +NO_OF_MINUTES = 30 +NO_OF_EXPIRY_TIME = 60 +# PRESIGNED_URL_EXPIRY_IN_SECONDS = 300 +# DOWNLOADABLE_URL_EXPIRY_IN_SECONDS = 300 +DEFAULT_ORGANISATION_CODE = 1 +# GOTENBERG_URL=http://localhost:3000 + +GOTENBERG_URL=http://gotenberg:3000 + +CERTIFICATE_SERVICE_URL = http://localhost:8081 +API_DOC_URL = "https://project-dev.elevate-apis.shikshalokam.org/project/api-doc" +#INTERFACE SERVICE URL +INTERFACE_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +# INTERFACE_SERVICE_URLL = "http://localhost:5001" +USER_SERVICE_BASE_URL = "/user" +ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" +SURVEY_SERVICE_URL = http://localhost:4301/survey +#GCP Cloud Configuration +CLOUD_STORAGE_PROVIDER=gcloud +CLOUD_STORAGE_ACCOUNTNAME=sl-mentoring-dev-storage@sl-dev-project.iam.gserviceaccount.com +CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDHwatCbtxcfqvt\n7rWWdgOsyQwH1/WGMJ2zTfQydZpRf2JGi6DaqbF85SEaoVnAKaN+33na2Vu5Kgep\n0wnZywCHCnz0W0Geo/4I4KUmzpm4gtG+ncuUhOd9bibx8M+yYhzWOijcPqaxTdpc\nWuenzqRmyNOHbYh4vz9cITrPnP95yPEl3o9gk+e4tD5MHwZTHw9/XKCp27Z/y9D2\nNzotaTjHNPZIxzxNkLzEC3PgYiGTiXBDdj5uag+Y5oV0+ydEZULyiqmr/IgWUZFL\nPsWnlraBgRDCJ/VsQOfU9EomyEapQdR1eBXYETqtMCFIT+lvbZherj0UQ7oRLAlZ\nqnKhnDchAgMBAAECggEADSJBtWN+n6JAgathSxxFT5YEcXuUjBckN0bX2H19AQDE\nIGlL0TS5E8Io9AxJz2Wtd0kQRQBnlHwb9uGGU0iSp05cOuDJJroXmNPUaAHLf6My\nUTskyIYYhlm4u82eilcDGF7IkvqXkS7SPaJIevMOQifQKKZeA7pnWxJgQIhND9+1\nls0OFQ77llh8pXiuAJ9fZbf7oLomKXUxlvfBFSj8NEiqzK7Vk+XCJVvuvUdsLSi6\nR8fputYgaoLJSDaGc/AFNlcec3gneok7zak4TyPQzSV3rwdMajbLEtBwwhsUVuFf\n5K6JHrYY3jYaOd0wqcu1v+WJw5LDexdawk1keD+08QKBgQDxMoAGNZQLxyuGPOnS\nYClPDJMZiSR+8oTaQyI0xvgQ8V7z741dEDNrbmYh2AKgDSec4zDfWga+xl2VSwsD\ndA42+HiD8Tji29iqT9aIJnhYWdk+DXwk/ySjLvUVY4dRGLI4kDwWjb5RAO4M5UEl\n1MeWhfMbgYLL/1gY4gX5BBQBXQKBgQDUBBW0lx9tXGjBr7c5dM8iO5J+O8K/zbds\nzE+oAwtN5saOtv9lhgDuhyFN67pCGW3M7fQgec9tigrDMKmy6ARHbORLes1zhSsd\nHH9aTA6/DkVzBnsDA3dT0klgOAFN2eP8QYhpNGN0My5jhhXNd5L2pDHpuIHkZPP4\ncuFxncJclQKBgHL2VAkhnnfirb8k53nrdaUE5FQmhuuvIl155CLtty00LsLsKh/y\nad/J1gpJkC7DNl9T9mZu3YouuEpBY3V46pGO6rpQzoFqsiGzPhjU5UWPRbmK6eIk\nbk0NQ6m3L7cao0/Mh6dkVhL783rYBq5Gdf8rx00T9MjQ4yexC5G+PN7NAoGAeWsN\ncyrI2Lx/UczrxX/bz+MF9j0LPwT08t3fEH0N0ENFmx26Dc48Yl4I+LLzLD+b3iy4\nDpEz9auEllwcE1VEfhMieweM+YdeNYHIfVHpcAkgRMuFTyiBAgP/+ZaZSJhsNF7j\nXDygaD+XZW+4tL6x74YA/7SmzsHx5msEKSkL0jECgYAOldGF28ujJHVA8kksXBkP\nlqIPki9Mg7qRHZBRFkmjskmEUFJTJP8TSWuo2c+J9idx6fxgXKmiXa5lH5ewQbXu\nQYbqpNsF167AjHEwxKS4qeU2u+fyw3VxB03gpNqEzolIIaGItAIfzyQ5KiN2thSl\nnhHTJ/psHBlZoENzsgvIUA==\n-----END PRIVATE KEY-----\n" +CLOUD_STORAGE_PROJECT =sl-dev-project +CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private +CLOUD_STORAGE_BUCKET_TYPE=private +ADMIN_ACCESS_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_AUTH_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_TOKEN_HEADER_NAME = 'admin-auth-token' +IS_AUTH_TOKEN_BEARER = false +AUTH_METHOD = native +REDIS_HOST=redis://127.0.0.1:6379 +# PUBLIC_ASSET_BUCKETNAME=mentoring-dev-storage-public + + +USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +RESOURCE_DELETION_TOPIC=RESOURCE_DELETION_TOPIC diff --git a/documentation/3.4.0/native/envs/stand-alone/scheduler_env b/documentation/3.4.0/native/envs/stand-alone/scheduler_env index ee239875..fa7dbfa1 100644 --- a/documentation/3.4.0/native/envs/stand-alone/scheduler_env +++ b/documentation/3.4.0/native/envs/stand-alone/scheduler_env @@ -9,4 +9,5 @@ ERROR_LOG_LEVEL=silly KAFKA_URL=localhost:9092 NOTIFICATION_KAFKA_TOPIC=develop.notifications REDIS_HOST=localhost -REDIS_PORT=6379 \ No newline at end of file +REDIS_PORT=6379 +MONGODB_URL="mongodb://localhost:27017/tl-cron-rest" diff --git a/documentation/3.4.0/native/envs/stand-alone/user_env b/documentation/3.4.0/native/envs/stand-alone/user_env index 6cc1e05d..4d382ea0 100644 --- a/documentation/3.4.0/native/envs/stand-alone/user_env +++ b/documentation/3.4.0/native/envs/stand-alone/user_env @@ -1,83 +1,83 @@ -ACCESS_TOKEN_EXPIRY=30m -ACCESS_TOKEN_SECRET=hsghasghj617237yuhdhhdqwu27hjadfhjghjadghhgfyrgjkhrhhl1 -ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE=test -ADMIN_SECRET_CODE=a98sd76fasdfasd +ACCESS_TOKEN_EXPIRY='30m' +ACCESS_TOKEN_SECRET='bsj82AHBxahusub12yexlashsbxAXADHBlaj' +# ACCESS_TOKEN_SECRET ='hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271' API_DOC_URL=/user/api-doc +APP_NAME=MentorED APPLICATION_ENV=development -APPLICATION_HOST=localhost APPLICATION_PORT=3001 -APPLICATION_BASE_URL=/user -APP_NAME=ELEVATE-Project -AZURE_ACCOUNT_KEY=asd897gfa09sd87f09as8d -AZURE_ACCOUNT_NAME=mentoring -AWS_ACCESS_KEY_ID=adsfg98a7sdfg -AWS_BUCKET_ENDPOINT=s3.ap-south-1.amazonaws.com -AWS_BUCKET_REGION=ap-south-1 -AWS_SECRET_ACCESS_KEY=asd9786fg9a8sd/asdfg9a8sd7fg -CAPTCHA_ENABLE=false -CHANGE_PASSWORD_TEMPLATE_CODE=change_password +CLOUD_STORAGE_PROVIDER = aws +CLOUD_STORAGE_BUCKETNAME =mentoring-prod-storage-private +CLOUD_STORAGE_SECRET= CLOUD_STORAGE_SECRET +CLOUD_STORAGE_REGION =ap-south-1 +CLOUD_ENDPOINT =CLOUD_ENDPOINT +CLOUD_STORAGE_ACCOUNTNAME =CLOUD_STORAGE_ACCOUNTNAME +CLOUD_STORAGE_BUCKET_TYPE = private +PUBLIC_ASSET_BUCKETNAME=mentoring-prod-storage-private +AZURE_ACCOUNT_KEY='AZURE_ACCOUNT_KEY' +AZURE_ACCOUNT_NAME=elevatementoringaccount CLEAR_INTERNAL_CACHE=userinternal -CLOUD_STORAGE=AWS -DEFAULT_AWS_BUCKET_NAME=mentoring-dev-storage -DEFAULT_AZURE_CONTAINER_NAME=mentoring-images -DEFAULT_GCP_BUCKET_NAME=mentoring-dev-storage -DEFAULT_OCI_BUCKET_NAME=dev-mentoring -DEFAULT_ORGANISATION_CODE=default_code -DEFAULT_ORG_ID=1 -DEFAULT_ROLE=mentee -DEFAULT_QUEUE=test -DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/users -DISABLE_LOG=false -EMAIL_ID_ENCRYPTION_ALGORITHM=aes-256-cbc -EMAIL_ID_ENCRYPTION_IV=c9c7bd480494409071847264652f5c95 -EMAIL_ID_ENCRYPTION_KEY=eef7e009626c18724be86afa41a2620e0718561a508c61f92d7ee0377177ef7b +CLOUD_STORAGE=GCP +DEFAULT_AZURE_CONTAINER_NAME=mentoring-azure-private +DEFAULT_GCP_BUCKET_NAME=DEFAULT_GCP_BUCKET_NAME ENABLE_EMAIL_OTP_VERIFICATION=false ENABLE_LOG=true -ERROR_LOG_LEVEL=silly -EVENT_ENABLE_ORG_EVENTS=true -EVENT_ORG_LISTENER_URLS=http://localhost:3567/mentoring/v1/organization/eventListener GCP_PATH=gcp.json GCP_PROJECT_ID=sl-dev-project -INTERNAL_ACCESS_TOKEN=qwertyhdgffs +INTERNAL_ACCESS_TOKEN=internal_access_token INTERNAL_CACHE_EXP_TIME=86400 -INVITEE_EMAIL_TEMPLATE_CODE=test -IV=09sdf8g098sdf/Q== -KAFKA_GROUP_ID=projects +IV=LHYOA5YnTonqcgrm15k3/Q== +KAFKA_GROUP_ID=mentoring KAFKA_TOPIC= -KAFKA_URL=localhost:9092 -KEY=fasd98fg9a8sydg98a7usd89fg -MENTEE_INVITATION_EMAIL_TEMPLATE_CODE=test -MENTOR_INVITATION_EMAIL_TEMPLATE_CODE=test -MENTOR_REQUEST_ACCEPTED_EMAIL_TEMPLATE_CODE=mentor_request_accepted -MENTOR_REQUEST_REJECTED_EMAIL_TEMPLATE_CODE=mentor_request_rejected -MENTORING_SERVICE_URL=http://mentoring:3000 -NOTIFICATION_KAFKA_TOPIC=develop.notifications -OCI_ACCESS_KEY_ID=asdgf6a0s98d76g9a8sasdasd7df987as98df -OCI_BUCKET_ENDPOINT=https://as98d7asdasdf.compat.objectstorage.ap-hyderabad-1.oraclecloud.com -OCI_BUCKET_REGION=ap-hyderabad-1 -OCI_SECRET_ACCESS_KEY=as09d7f8/as0d7f09as7d8f= -ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE=invite_org_admin +KAFKA_URL= localhost:9092 +KEY=E/m3RD/aM3Ed3lLfYVcKizakG9R+bFybAPZSLjIP2hY= +MENTOR_SECRET_CODE=4567 +MONGODB_URL=mongodb://localhost:27017/elevate-users +NOTIFICATION_KAFKA_TOPIC=dev.notifications OTP_EMAIL_TEMPLATE_CODE=emailotp OTP_EXP_TIME=86400 -PORTAL_URL=https://mentored.some.org/auth/login -RECAPTCHA_SECRET_KEY=temporary_recaptcha_secret_key -REFRESH_TOKEN_EXPIRY=7 -REFRESH_TOKEN_SECRET=as9d87fa9s87df98as7d9f87a9sd87f98as7dg987asf -REFRESH_VIEW_INTERVAL=540000 +RATING_KAFKA_TOPIC=dev.mentor_rating REDIS_HOST=redis://localhost:6379 +REFRESH_TOKEN_EXPIRY=183 +REFRESH_TOKEN_SECRET=371hkjkjady2y3ihdkajshdkiq23iuekw71yekhaskdvkvegavy23t78veqwexqvxveit6ttxyeeytt62tx236vv REGISTRATION_EMAIL_TEMPLATE_CODE=registration REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp -SAMPLE_CSV_FILE_PATH=sample/bulk_user_creation.csv -SCHEDULER_SERVICE_BASE_URL= /scheduler/ -SCHEDULER_SERVICE_ERROR_REPORTING_EMAIL_ID=rakesh.k@some.com -SCHEDULER_SERVICE_HOST=http://localhost:4000 -SCHEDULER_SERVICE_URL=http://localhost:4000/jobs/scheduleJob -ALLOWED_HOST=http://localhost:8100 -APPLICATION_BASE_URL=/user -CLOUD_STORAGE_ACCOUNTNAME=asdf -CLOUD_STORAGE_ACCOUNTNAME=asdf -CLOUD_STORAGE_PROVIDER=azure -CLOUD_STORAGE_SECRET=abcd -CLOUD_STORAGE_BUCKETNAME=abcd -CLOUD_STORAGE_BUCKET_TYPE=private -PUBLIC_ASSET_BUCKETNAME=abcd +SALT_ROUNDS=10 + +DEFAULT_OCI_BUCKET_NAME=mentoring-oci-private +OCI_ACCESS_KEY_ID= 81a4c2553026982360af6b24497c489b0fea9436 +OCI_BUCKET_ENDPOINT=https://axgqmpkrpmt5.compat.objectstorage.ap-hyderabad-1.oraclecloud.com +OCI_BUCKET_REGION= ap-hyderabad-1 +OCI_SECRET_ACCESS_KEY='+U4O+CjiC6M/mOcGjYh7K/9XjfSdJ79OoLuQrABPOJ8=' +ERROR_LOG_LEVEL= silly +DISABLE_LOG= false +DEFAULT_ORGANISATION_CODE=default_code +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/users +ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy +MENTORING_SERVICE_URL="http://localhost:3000" +INVITEE_EMAIL_TEMPLATE_CODE="emailcode" +ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="coeadmin" +DEFAULT_QUEUE="defaultque" +MENTOR_INVITATION_EMAIL_TEMPLATE_CODE="mentorinvitationTemplateCode" +MENTEE_INVITATION_EMAIL_TEMPLATE_CODE="mentee invitationTemplateCode" +DEFAULT_ROLE="mentee" +SAMPLE_CSV_FILE_PATH="sample path" +ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE = "code5" +DEFAULT_ORG_ID = 1 +PORTAL_URL = "portaladdress" +SCHEDULER_SERVICE_HOST = "host" +SCHEDULER_SERVICE_BASE_URL = "/scheduler/" +REFRESH_VIEW_INTERVAL = 100000 +EMAIL_ID_ENCRYPTION_IV = 'a390328e496f025249a88384f318a536' +EMAIL_ID_ENCRYPTION_KEY = '9bbf4698e081176b4e38c3f04f9c0cff6ae80b1960e5ac868cc234ac8537aa66' +EMAIL_ID_ENCRYPTION_ALGORITHM = 'aes-256-cbc' +GENERIC_INVITATION_EMAIL_TEMPLATE_CODE = 'check_code' +EVENT_ORG_LISTENER_URLS = "sample url" +EVENT_ENABLE_ORG_EVENTS = false +DOWNLOAD_URL_EXPIRATION_DURATION = 300 +APPLICATION_HOST= "localhost" +CHANGE_PASSWORD_TEMPLATE_CODE = "change_password" +CAPTCHA_ENABLE = false +RECAPTCHA_SECRET_KEY= "6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" +ALLOWED_IDLE_TIME=1200000 +APPLICATION_BASE_URL="/user" +ENTITY_MANAGEMENT_SERVICE_BASE_URL="/" \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/user_env b/documentation/3.4.0/native/envs/user_env deleted file mode 100644 index 4d382ea0..00000000 --- a/documentation/3.4.0/native/envs/user_env +++ /dev/null @@ -1,83 +0,0 @@ -ACCESS_TOKEN_EXPIRY='30m' -ACCESS_TOKEN_SECRET='bsj82AHBxahusub12yexlashsbxAXADHBlaj' -# ACCESS_TOKEN_SECRET ='hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271' -API_DOC_URL=/user/api-doc -APP_NAME=MentorED -APPLICATION_ENV=development -APPLICATION_PORT=3001 -CLOUD_STORAGE_PROVIDER = aws -CLOUD_STORAGE_BUCKETNAME =mentoring-prod-storage-private -CLOUD_STORAGE_SECRET= CLOUD_STORAGE_SECRET -CLOUD_STORAGE_REGION =ap-south-1 -CLOUD_ENDPOINT =CLOUD_ENDPOINT -CLOUD_STORAGE_ACCOUNTNAME =CLOUD_STORAGE_ACCOUNTNAME -CLOUD_STORAGE_BUCKET_TYPE = private -PUBLIC_ASSET_BUCKETNAME=mentoring-prod-storage-private -AZURE_ACCOUNT_KEY='AZURE_ACCOUNT_KEY' -AZURE_ACCOUNT_NAME=elevatementoringaccount -CLEAR_INTERNAL_CACHE=userinternal -CLOUD_STORAGE=GCP -DEFAULT_AZURE_CONTAINER_NAME=mentoring-azure-private -DEFAULT_GCP_BUCKET_NAME=DEFAULT_GCP_BUCKET_NAME -ENABLE_EMAIL_OTP_VERIFICATION=false -ENABLE_LOG=true -GCP_PATH=gcp.json -GCP_PROJECT_ID=sl-dev-project -INTERNAL_ACCESS_TOKEN=internal_access_token -INTERNAL_CACHE_EXP_TIME=86400 -IV=LHYOA5YnTonqcgrm15k3/Q== -KAFKA_GROUP_ID=mentoring -KAFKA_TOPIC= -KAFKA_URL= localhost:9092 -KEY=E/m3RD/aM3Ed3lLfYVcKizakG9R+bFybAPZSLjIP2hY= -MENTOR_SECRET_CODE=4567 -MONGODB_URL=mongodb://localhost:27017/elevate-users -NOTIFICATION_KAFKA_TOPIC=dev.notifications -OTP_EMAIL_TEMPLATE_CODE=emailotp -OTP_EXP_TIME=86400 -RATING_KAFKA_TOPIC=dev.mentor_rating -REDIS_HOST=redis://localhost:6379 -REFRESH_TOKEN_EXPIRY=183 -REFRESH_TOKEN_SECRET=371hkjkjady2y3ihdkajshdkiq23iuekw71yekhaskdvkvegavy23t78veqwexqvxveit6ttxyeeytt62tx236vv -REGISTRATION_EMAIL_TEMPLATE_CODE=registration -REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp -SALT_ROUNDS=10 - -DEFAULT_OCI_BUCKET_NAME=mentoring-oci-private -OCI_ACCESS_KEY_ID= 81a4c2553026982360af6b24497c489b0fea9436 -OCI_BUCKET_ENDPOINT=https://axgqmpkrpmt5.compat.objectstorage.ap-hyderabad-1.oraclecloud.com -OCI_BUCKET_REGION= ap-hyderabad-1 -OCI_SECRET_ACCESS_KEY='+U4O+CjiC6M/mOcGjYh7K/9XjfSdJ79OoLuQrABPOJ8=' -ERROR_LOG_LEVEL= silly -DISABLE_LOG= false -DEFAULT_ORGANISATION_CODE=default_code -DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/users -ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy -MENTORING_SERVICE_URL="http://localhost:3000" -INVITEE_EMAIL_TEMPLATE_CODE="emailcode" -ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="coeadmin" -DEFAULT_QUEUE="defaultque" -MENTOR_INVITATION_EMAIL_TEMPLATE_CODE="mentorinvitationTemplateCode" -MENTEE_INVITATION_EMAIL_TEMPLATE_CODE="mentee invitationTemplateCode" -DEFAULT_ROLE="mentee" -SAMPLE_CSV_FILE_PATH="sample path" -ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE = "code5" -DEFAULT_ORG_ID = 1 -PORTAL_URL = "portaladdress" -SCHEDULER_SERVICE_HOST = "host" -SCHEDULER_SERVICE_BASE_URL = "/scheduler/" -REFRESH_VIEW_INTERVAL = 100000 -EMAIL_ID_ENCRYPTION_IV = 'a390328e496f025249a88384f318a536' -EMAIL_ID_ENCRYPTION_KEY = '9bbf4698e081176b4e38c3f04f9c0cff6ae80b1960e5ac868cc234ac8537aa66' -EMAIL_ID_ENCRYPTION_ALGORITHM = 'aes-256-cbc' -GENERIC_INVITATION_EMAIL_TEMPLATE_CODE = 'check_code' -EVENT_ORG_LISTENER_URLS = "sample url" -EVENT_ENABLE_ORG_EVENTS = false -DOWNLOAD_URL_EXPIRATION_DURATION = 300 -APPLICATION_HOST= "localhost" -CHANGE_PASSWORD_TEMPLATE_CODE = "change_password" -CAPTCHA_ENABLE = false -RECAPTCHA_SECRET_KEY= "6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" -ALLOWED_IDLE_TIME=1200000 -APPLICATION_BASE_URL="/user" -ENTITY_MANAGEMENT_SERVICE_BASE_URL="/" \ No newline at end of file From 5f95bdb877c3a97ab77ab8520d9c99d0ac81fea9 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 24 Nov 2025 17:07:49 +0530 Subject: [PATCH 013/119] pushing-for-native --- .../native/envs/stand-alone/notification_env | 2 ++ .../setup/native/stand-alone/ubuntu/README.md | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/documentation/3.4.0/native/envs/stand-alone/notification_env b/documentation/3.4.0/native/envs/stand-alone/notification_env index 2d62719f..0728bffa 100644 --- a/documentation/3.4.0/native/envs/stand-alone/notification_env +++ b/documentation/3.4.0/native/envs/stand-alone/notification_env @@ -13,3 +13,5 @@ KAFKA_TOPIC=develop.notifications SENDGRID_API_KEY=SG.asd9f87a9s8d7f. SENDGRID_FROM_MAIL=no-reply@some.org ZEST_ENV=ZEST_ENV +EMAIL_SERVICE=email +FROM_EMAIL=email diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index 16c37fa9..05e9f721 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -118,15 +118,15 @@ Before setting up the following ELEVATE-Project application, dependencies given 4. **Download Environment Files** ``` - curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/project_env && \ - curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/entity_management_env && \ - curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/user_env && \ - curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env && \ - curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ - curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/scheduler_env && \ - curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_survey_projects_pwa_env && \ - curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/elevate_portal_env && \ - curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/observation_portal_env + curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/project_env && \ + curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/entity_management_env && \ + curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/user_env && \ + curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/notification_env && \ + curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/interface_env && \ + curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/scheduler_env && \ + curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/observation_survey_projects_pwa_env && \ + curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/elevate_portal_env && \ + curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/observation_portal_env ``` > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. From 1bb8650a81d2a649a40c27d10a26211c6e709095 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 26 Nov 2025 11:17:32 +0530 Subject: [PATCH 014/119] pushing-for-native --- .../stand-alone}/docker-compose-project.yml | 52 ++-- .../dockerized/envs/entity_management_env | 16 +- .../3.4.0/dockerized/envs/interface_env | 12 +- .../3.4.0/dockerized/envs/notification_env | 10 +- .../3.4.0/dockerized/envs/project_env | 65 ++--- .../3.4.0/dockerized/envs/scheduler_env | 2 +- documentation/3.4.0/dockerized/envs/user_env | 53 ++-- .../stand-alone/ubuntu/insert_sample_data.sh | 12 +- .../stand-alone/ubuntu/setup_project.sh | 17 +- .../envs/stand-alone/entity_management_env | 14 +- .../native/envs/stand-alone/notification_env | 2 +- .../3.4.0/native/envs/stand-alone/project_env | 45 +--- .../3.4.0/native/envs/stand-alone/user_env | 12 +- .../ubuntu/project_entity_sample_data.sh | 1 + .../setup/docker/stand-alone/ubuntu/README.md | 20 +- .../setup/native/stand-alone/ubuntu/README.md | 228 +++++++++--------- 16 files changed, 244 insertions(+), 317 deletions(-) rename documentation/3.4.0/dockerized/{ => dockerFiles/stand-alone}/docker-compose-project.yml (86%) diff --git a/documentation/3.4.0/dockerized/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml similarity index 86% rename from documentation/3.4.0/dockerized/docker-compose-project.yml rename to documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml index 61d48ead..06c7a979 100644 --- a/documentation/3.4.0/dockerized/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml @@ -24,27 +24,30 @@ services: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 depends_on: - zookeeper + healthcheck: + test: kafka-topics --bootstrap-server localhost:9092 --list || exit 1 + interval: 10s + timeout: 5s + retries: 9 networks: - project_net - # logging: - # driver: none redis: image: 'redis:7.0.0' restart: 'always' - #ports: - # - '6379:6379' expose: - 6379 + healthcheck: + test: ['CMD', 'redis-cli', 'ping'] + interval: 10s + timeout: 5s + retries: 5 networks: - project_net - # logging: - # driver: none project: - build: ./project-service + image: shikshalokamqa/elevate-project-service:3.3.6.1 container_name: project ports: - '6000:6000' - # command: ['nodemon', 'app.js'] environment: - MONGODB_URL=mongodb://mongo:27017/elevate-project env_file: @@ -53,26 +56,24 @@ services: - mongo - kafka volumes: - - ./project-service:/usr/app + - ./config.json:/opt/projects/config.json networks: - project_net - - # Entity-management config entity_management: - build: ./entity-management + image: shikshalokamqa/elevate-entity-management:3.3.13.1 ports: - '5001:5001' - # command: ['nodemon', 'app.js'] env_file: - ./entity_management_env depends_on: - mongo volumes: - - ./entity-management:/usr/src/app + - ./config.json:/var/src/config.json networks: - project_net user: build: ./user + image: shikshalokamqa/elevate-user:3.3.24 ports: - '3001:3001' command: > @@ -121,31 +122,33 @@ services: - kafka - citus environment: - - KAFKA_HOST=kafka:29092 + - KAFKA_HOST=kafka:9092 - DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/notification networks: - project_net - env_file: - - ./notification_env + # env_file: + # - ./notification_env scheduler: - # Update with latest image image: shikshalokamqa/elevate-scheduler:2.6.1 ports: - '4000:4000' command: ['nodemon', 'app.js'] - environment: - - KAFKA_URL=kafka:29092 + # environment: + # - KAFKA_URL=kafka:9092 depends_on: - - kafka - - redis + kafka: + condition: service_healthy + redis: + condition: service_started networks: - project_net env_file: - - scheduler_env + - ./scheduler_env interface: # Update with latest image - image: shikshalokamqa/elevate-interface:3.1.5 + # build: ./interface-service + image: shikshalokamqa/elevate-interface:3.3.2 ports: - '3569:3569' command: ['node', 'app.js'] @@ -211,7 +214,6 @@ services: restart: 'always' portal: - # Update with latest image image: shikshalokamqa/elevate-project-obervation-pwa:3.4.0 container_name: portal ports: diff --git a/documentation/3.4.0/dockerized/envs/entity_management_env b/documentation/3.4.0/dockerized/envs/entity_management_env index b363248e..4ec7b4d8 100644 --- a/documentation/3.4.0/dockerized/envs/entity_management_env +++ b/documentation/3.4.0/dockerized/envs/entity_management_env @@ -1,27 +1,23 @@ -# Entity service configurations file APPLICATION_PORT = 5001 APPLICATION_ENV ="development" APPLICATION_BASE_URL='/entity-management/' -INTERNAL_ACCESS_TOKEN ="internal_access_token" -ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 -# DB +INTERNAL_ACCESS_TOKEN =xahusub12yexlashsbxAXADHBlaj +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj MONGODB_URL=mongodb://mongo:27017/elevate-entity AUTH_METHOD = native -# USER_SERVICE -USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +USER_SERVICE_URL = http://interface:3569 USER_SERVICE_BASE_URL=/user KAFKA_HEALTH_CHECK_TOPIC=test -#service name SERVICE_NAME = elevate-entity-service -API_DOC_URL="https://project-dev.elevate-apis.shikshalokam.org/entity-management/api-doc" +API_DOC_URL="https://entity-management/entity-management/api-doc" APPLICATION_HOST=localhost IS_AUTH_TOKEN_BEARER="false" ADMIN_ACCESS_TOKEN=rwwee3$123 ADMIN_TOKEN_HEADER_NAME="admin-auth-token" -INTERFACE_SERVICE_URL="https://saas-qa.tekdinext.com" +INTERFACE_SERVICE_URL=http://interface:3569 KAFKA_HEALTH_CHECK_TOPIC = entity-health-check-topic-check KAFKA_COMMUNICATIONS_ON_OFF = ON -KAFKA_URL = kafka:9092 +KAFKA_URL = localhost:9092 KAFKA_COMMUNICATIONS_ON_OFF = ON KAFKA_GROUP_ID = entity HEALTH_CHECK_DEBUG_MODE = true \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/interface_env b/documentation/3.4.0/dockerized/envs/interface_env index d12c7e5d..f79f110b 100644 --- a/documentation/3.4.0/dockerized/envs/interface_env +++ b/documentation/3.4.0/dockerized/envs/interface_env @@ -1,14 +1,14 @@ API_DOC_URL=/interface/api-doc APPLICATION_ENV=development APPLICATION_PORT=3569 -ELEVATE_NOTIFICATION_KAFKA_BROKERS=10.148.0.38:9092 -ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=dev.mentoring -ELEVATE_NOTIFICATION_KAFKA_TOPIC=dev.notification -ENTITY_SERVICE_BASE_URL=http://localhost:5001 +ELEVATE_NOTIFICATION_KAFKA_BROKERS=kafka:9092 +ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=mentoring +ELEVATE_NOTIFICATION_KAFKA_TOPIC=notification +ENTITY_SERVICE_BASE_URL=http://entity_management:5001 INSTALLED_PACKAGES=elevate-mentoring elevate-survey-observation@1.0.1 elevate-self-creation-portal MENTORING_SERVICE_BASE_URL=http://localhost:7101 NOTIFICATION_SERVICE_BASE_URL=http://localhost:7201 -PROJECT_SERVICE_BASE_URL=http://localhost:6000 +PROJECT_SERVICE_BASE_URL=http://project:6000 RATE_LIMITER_ENABLED=true RATE_LIMITER_GENERAL_LIMIT=500 RATE_LIMITER_NUMBER_OF_PROXIES=3 @@ -23,4 +23,4 @@ SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001 SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE SURVEY_SERVICE_BASE_URL=http://localhost:5007 -USER_SERVICE_BASE_URL=http://localhost:3001 \ No newline at end of file +USER_SERVICE_BASE_URL=http://user:3001 \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/notification_env b/documentation/3.4.0/dockerized/envs/notification_env index 37037c7e..4d7616b8 100644 --- a/documentation/3.4.0/dockerized/envs/notification_env +++ b/documentation/3.4.0/dockerized/envs/notification_env @@ -6,9 +6,11 @@ DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/notification DISABLE_LOG=false ENABLE_LOG=true ERROR_LOG_LEVEL=silly -INTERNAL_ACCESS_TOKEN=internal_access_token +INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj KAFKA_GROUP_ID=notification -KAFKA_HOST=kafka:29092 -KAFKA_TOPIC=develop.notifications +KAFKA_HOST=kafka:9092 +KAFKA_TOPIC=notifications SENDGRID_API_KEY=SG.asd9f87a9s8d7f. -SENDGRID_FROM_MAIL=no-reply@some.org \ No newline at end of file +SENDGRID_FROM_MAIL=no-reply@some.org +ERROR_LOG_LEVEL=ERROR_LOG_LEVEL +DISABLE_LOG=true \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/project_env b/documentation/3.4.0/dockerized/envs/project_env index d3ff1273..1ec3d8c2 100644 --- a/documentation/3.4.0/dockerized/envs/project_env +++ b/documentation/3.4.0/dockerized/envs/project_env @@ -1,40 +1,17 @@ APPLICATION_PORT = 6000 APPLICATION_ENV = development -ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 - -INTERNAL_ACCESS_TOKEN =internal_access_token -# DB -# MONGODB_URL = mongodb://localhost:27017/elevate-diksha -# MONGODB_URL = mongodb://10.148.0.43:27017/elevate-project - -# MONGODB_URL = mongodb://13.127.166.58:27017/qa-saas-project -# MONGODB_URL = mongodb://localhost:27017/qadb - -# Docker--------- -MONGODB_URL = mongodb://mongodb:27017/qadb - -# MONGODB_URL = mongodb://localhost:27017/projectService -# ML Core Service -ML_CORE_SERVICE_URL = http://localhost:4000 -# ML Survey Service -# SURVEY_SERVICE_URL = https://saas-qa.tekdinext.com/survey -# OFFLINE VALIDATION +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj +INTERNAL_ACCESS_TOKEN =xahusub12yexlashsbxAXADHBlaj +MONGODB_URL = mongodb://mongodb:27017/elevate-project KEYCLOAK_PUBLIC_KEY_PATH = keycloak-public-keys -# KAFKA Configurations KAFKA_COMMUNICATIONS_ON_OFF = ON -# KAFKA_URL =localhost:9092 - KAFKA_URL =kafka:9092 - -# KAFKA_URL=10.148.0.38:9092 KAFKA_GROUP_ID = projects -# KAFKA_GROUP_ID=dev.projects KAFKA_HEALTH_CHECK_TOPIC = project-health-check-topic-check -# SUBMISSION TOPIC PROJECT_SUBMISSION_TOPIC=sl-improvement-project-submission-dev SUBMISSION_TOPIC = Projectsubmissions PROJECT_CERTIFICATE_TOPIC = generateProjectCertificate -ELEVATE_PROJECT_SERVICE_URL= 'http://localhost:6000' +ELEVATE_PROJECT_SERVICE_URL=http://project:6000 SERVICE_NAME = project USER_DELETE_TOPIC = deleteuser TELEMETRY_TOPIC=telemetry.raw @@ -44,39 +21,29 @@ USER_DELETE_ON_OFF=OFF CLOUD_STORAGE=ON TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC = +05:30 VALIDATE_ENTITIES = ON -APP_PORTAL_BASE_URL = "https://dev.elevate.org" +APP_PORTAL_BASE_URL =http://portal:7007 NO_OF_MINUTES = 30 NO_OF_EXPIRY_TIME = 60 -# PRESIGNED_URL_EXPIRY_IN_SECONDS = 300 -# DOWNLOADABLE_URL_EXPIRY_IN_SECONDS = 300 +PRESIGNED_URL_EXPIRY_IN_SECONDS = 300 +DOWNLOADABLE_URL_EXPIRY_IN_SECONDS = 300 DEFAULT_ORGANISATION_CODE = 1 -# GOTENBERG_URL=http://localhost:3000 - GOTENBERG_URL=http://gotenberg:3000 - -CERTIFICATE_SERVICE_URL = http://localhost:8081 -API_DOC_URL = "https://project-dev.elevate-apis.shikshalokam.org/project/api-doc" -#INTERFACE SERVICE URL -INTERFACE_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org -# INTERFACE_SERVICE_URLL = "http://localhost:5001" +API_DOC_URL = "https://project/project/api-doc" +INTERFACE_SERVICE_URLL = http://interface:3569 USER_SERVICE_BASE_URL = "/user" ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" -SURVEY_SERVICE_URL = http://localhost:4301/survey -#GCP Cloud Configuration CLOUD_STORAGE_PROVIDER=gcloud -CLOUD_STORAGE_ACCOUNTNAME=sl-mentoring-dev-storage@sl-dev-project.iam.gserviceaccount.com -CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDHwatCbtxcfqvt\n7rWWdgOsyQwH1/WGMJ2zTfQydZpRf2JGi6DaqbF85SEaoVnAKaN+33na2Vu5Kgep\n0wnZywCHCnz0W0Geo/4I4KUmzpm4gtG+ncuUhOd9bibx8M+yYhzWOijcPqaxTdpc\nWuenzqRmyNOHbYh4vz9cITrPnP95yPEl3o9gk+e4tD5MHwZTHw9/XKCp27Z/y9D2\nNzotaTjHNPZIxzxNkLzEC3PgYiGTiXBDdj5uag+Y5oV0+ydEZULyiqmr/IgWUZFL\nPsWnlraBgRDCJ/VsQOfU9EomyEapQdR1eBXYETqtMCFIT+lvbZherj0UQ7oRLAlZ\nqnKhnDchAgMBAAECggEADSJBtWN+n6JAgathSxxFT5YEcXuUjBckN0bX2H19AQDE\nIGlL0TS5E8Io9AxJz2Wtd0kQRQBnlHwb9uGGU0iSp05cOuDJJroXmNPUaAHLf6My\nUTskyIYYhlm4u82eilcDGF7IkvqXkS7SPaJIevMOQifQKKZeA7pnWxJgQIhND9+1\nls0OFQ77llh8pXiuAJ9fZbf7oLomKXUxlvfBFSj8NEiqzK7Vk+XCJVvuvUdsLSi6\nR8fputYgaoLJSDaGc/AFNlcec3gneok7zak4TyPQzSV3rwdMajbLEtBwwhsUVuFf\n5K6JHrYY3jYaOd0wqcu1v+WJw5LDexdawk1keD+08QKBgQDxMoAGNZQLxyuGPOnS\nYClPDJMZiSR+8oTaQyI0xvgQ8V7z741dEDNrbmYh2AKgDSec4zDfWga+xl2VSwsD\ndA42+HiD8Tji29iqT9aIJnhYWdk+DXwk/ySjLvUVY4dRGLI4kDwWjb5RAO4M5UEl\n1MeWhfMbgYLL/1gY4gX5BBQBXQKBgQDUBBW0lx9tXGjBr7c5dM8iO5J+O8K/zbds\nzE+oAwtN5saOtv9lhgDuhyFN67pCGW3M7fQgec9tigrDMKmy6ARHbORLes1zhSsd\nHH9aTA6/DkVzBnsDA3dT0klgOAFN2eP8QYhpNGN0My5jhhXNd5L2pDHpuIHkZPP4\ncuFxncJclQKBgHL2VAkhnnfirb8k53nrdaUE5FQmhuuvIl155CLtty00LsLsKh/y\nad/J1gpJkC7DNl9T9mZu3YouuEpBY3V46pGO6rpQzoFqsiGzPhjU5UWPRbmK6eIk\nbk0NQ6m3L7cao0/Mh6dkVhL783rYBq5Gdf8rx00T9MjQ4yexC5G+PN7NAoGAeWsN\ncyrI2Lx/UczrxX/bz+MF9j0LPwT08t3fEH0N0ENFmx26Dc48Yl4I+LLzLD+b3iy4\nDpEz9auEllwcE1VEfhMieweM+YdeNYHIfVHpcAkgRMuFTyiBAgP/+ZaZSJhsNF7j\nXDygaD+XZW+4tL6x74YA/7SmzsHx5msEKSkL0jECgYAOldGF28ujJHVA8kksXBkP\nlqIPki9Mg7qRHZBRFkmjskmEUFJTJP8TSWuo2c+J9idx6fxgXKmiXa5lH5ewQbXu\nQYbqpNsF167AjHEwxKS4qeU2u+fyw3VxB03gpNqEzolIIaGItAIfzyQ5KiN2thSl\nnhHTJ/psHBlZoENzsgvIUA==\n-----END PRIVATE KEY-----\n" -CLOUD_STORAGE_PROJECT =sl-dev-project -CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private +CLOUD_STORAGE_ACCOUNTNAME=CLOUD_STORAGE_ACCOUNTNAME +CLOUD_STORAGE_SECRET="CLOUD_STORAGE_SECRET" +CLOUD_STORAGE_BUCKETNAME=CLOUD_STORAGE_BUCKETNAME CLOUD_STORAGE_BUCKET_TYPE=private ADMIN_ACCESS_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl ADMIN_AUTH_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl ADMIN_TOKEN_HEADER_NAME = 'admin-auth-token' IS_AUTH_TOKEN_BEARER = false AUTH_METHOD = native -REDIS_HOST=redis://127.0.0.1:6379 -# PUBLIC_ASSET_BUCKETNAME=mentoring-dev-storage-public - - -USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +REDIS_HOST=redis://redis:6379 +PUBLIC_ASSET_BUCKETNAME=mentoring-storage-public +USER_SERVICE_URL = http://user:3569 RESOURCE_DELETION_TOPIC=RESOURCE_DELETION_TOPIC +CLOUD_STORAGE_PROJECT =sl-project \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/scheduler_env b/documentation/3.4.0/dockerized/envs/scheduler_env index ee35cc2a..9de73d13 100644 --- a/documentation/3.4.0/dockerized/envs/scheduler_env +++ b/documentation/3.4.0/dockerized/envs/scheduler_env @@ -7,6 +7,6 @@ DISABLE_LOG=false ENABLE_LOG=true ERROR_LOG_LEVEL=silly KAFKA_URL=kafka:9092 -NOTIFICATION_KAFKA_TOPIC=develop.notifications +NOTIFICATION_KAFKA_TOPIC=notifications REDIS_HOST=redis REDIS_PORT=6379 \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/user_env b/documentation/3.4.0/dockerized/envs/user_env index 77d735ce..ed3e3040 100644 --- a/documentation/3.4.0/dockerized/envs/user_env +++ b/documentation/3.4.0/dockerized/envs/user_env @@ -4,50 +4,43 @@ API_DOC_URL=/user/api-doc APP_NAME=MentorED APPLICATION_ENV=development APPLICATION_PORT=3001 -CLEAR_INTERNAL_CACHE=userinternal -ENABLE_EMAIL_OTP_VERIFICATION=false -ENABLE_LOG=true -GCP_PATH=gcp.json -GCP_PROJECT_ID=sl-dev-project -INTERNAL_ACCESS_TOKEN=internal_access_token -INTERNAL_CACHE_EXP_TIME=86400 -IV=LHYOA5YnTonqcgrm15k3/Q== -KAFKA_GROUP_ID=mentoring -KAFKA_TOPIC= -DEFAULT_AZURE_CONTAINER_NAME=mentoring-azure-private -DEFAULT_GCP_BUCKET_NAME=DEFAULT_GCP_BUCKET_NAME -# KAFKA_URL= localhost:9092 CLOUD_STORAGE_PROVIDER = aws CLOUD_STORAGE_BUCKETNAME =mentoring-prod-storage-private -CLOUD_STORAGE_SECRET= CLOUD_STORAGE_SECRET +CLOUD_STORAGE_SECRET= CLOUD_STORAGE_SECRET/H1UM8XLL CLOUD_STORAGE_REGION =ap-south-1 -CLOUD_ENDPOINT =CLOUD_ENDPOINT +CLOUD_ENDPOINT = s3.ap-south-1.amazonaws.com CLOUD_STORAGE_ACCOUNTNAME =CLOUD_STORAGE_ACCOUNTNAME CLOUD_STORAGE_BUCKET_TYPE = private PUBLIC_ASSET_BUCKETNAME=mentoring-prod-storage-private AZURE_ACCOUNT_KEY='AZURE_ACCOUNT_KEY' AZURE_ACCOUNT_NAME=elevatementoringaccount +CLEAR_INTERNAL_CACHE=userinternal +CLOUD_STORAGE=GCP +DEFAULT_AZURE_CONTAINER_NAME=mentoring-azure-private +DEFAULT_GCP_BUCKET_NAME=mentoring-dev-storage-private +ENABLE_EMAIL_OTP_VERIFICATION=false +ENABLE_LOG=true +GCP_PATH=gcp.json +GCP_PROJECT_ID=sl-dev-project +INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj +INTERNAL_CACHE_EXP_TIME=86400 +IV=LHYOA5YnTonqcgrm15k3/Q== +KAFKA_GROUP_ID=projects +KAFKA_TOPIC= KAFKA_URL= kafka:9092 - -KEY=key -MENTOR_SECRET_CODE=45MENTOR_SECRET_CODE67 -# MONGODB_URL=mongodb://localhost:27017/elevate-users - +KEY=E/m3RD/aM3Ed3lLfYVcKizakG9R+bFybAPZSLjIP2hY= +MENTOR_SECRET_CODE=4567 MONGODB_URL=mongodb://mongo:27017/elevate-users - -NOTIFICATION_KAFKA_TOPIC=dev.notifications +NOTIFICATION_KAFKA_TOPIC=notifications OTP_EMAIL_TEMPLATE_CODE=emailotp OTP_EXP_TIME=86400 RATING_KAFKA_TOPIC=dev.mentor_rating -# REDIS_HOST=redis://localhost:6379 REDIS_HOST=redis://redis:6379 - REFRESH_TOKEN_EXPIRY=183 REFRESH_TOKEN_SECRET=371hkjkjady2y3ihdkajshdkiq23iuekw71yekhaskdvkvegavy23t78veqwexqvxveit6ttxyeeytt62tx236vv REGISTRATION_EMAIL_TEMPLATE_CODE=registration REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp SALT_ROUNDS=10 - DEFAULT_OCI_BUCKET_NAME=mentoring-oci-private OCI_ACCESS_KEY_ID= 81a4c2553026982360af6b24497c489b0fea9436 OCI_BUCKET_ENDPOINT=https://axgqmpkrpmt5.compat.objectstorage.ap-hyderabad-1.oraclecloud.com @@ -56,14 +49,8 @@ OCI_SECRET_ACCESS_KEY='+U4O+CjiC6M/mOcGjYh7K/9XjfSdJ79OoLuQrABPOJ8=' ERROR_LOG_LEVEL= silly DISABLE_LOG= false DEFAULT_ORGANISATION_CODE=default_code - -#new -# DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/user_service_elevate - DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/user - ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy - MENTORING_SERVICE_URL="http://localhost:3000" INVITEE_EMAIL_TEMPLATE_CODE="emailcode" ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="coeadmin" @@ -75,10 +62,7 @@ SAMPLE_CSV_FILE_PATH="sample path" ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE = "code5" DEFAULT_ORG_ID = 1 PORTAL_URL = "portaladdress" -# SCHEDULER_SERVICE_HOST = "host" - SCHEDULER_SERVICE_HOST = scheduler - SCHEDULER_SERVICE_BASE_URL = "/scheduler/" REFRESH_VIEW_INTERVAL = 100000 EMAIL_ID_ENCRYPTION_IV = 'a390328e496f025249a88384f318a536' @@ -88,7 +72,6 @@ GENERIC_INVITATION_EMAIL_TEMPLATE_CODE = 'check_code' EVENT_ORG_LISTENER_URLS = "sample url" EVENT_ENABLE_ORG_EVENTS = false DOWNLOAD_URL_EXPIRATION_DURATION = 300 - APPLICATION_HOST= "localhost" CHANGE_PASSWORD_TEMPLATE_CODE = "change_password" CAPTCHA_ENABLE = false diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh index 7af34b16..64da00ee 100755 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -1,11 +1,5 @@ #!/bin/bash -# Ensure PGPASSWORD is set in your environment before running, e.g., export PGPASSWORD=postgres - -# --- 1. INSERT INTO public.user --- -# FIXES: -# - Quoted 'default' and the phone number hash which were missing quotes. -# - Quoted the user_name variables. psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e4','+91', NULL);" psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a767','+91', NULL);" psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e0','+91', NULL);" @@ -23,9 +17,9 @@ psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organi # FIXES: # - Quoted the organization_code and tenant_code variables. psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 2, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" # --- 4. INSERT INTO public.entity_types --- # FIXES: diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh index e92604d6..abf4293a 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh @@ -7,7 +7,7 @@ log() { # Step 1: Download Docker Compose file log "Downloading Docker Compose file..." -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/docker-compose-project.yml +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml log "Docker Compose file downloaded." # Step 2: Download environment files @@ -65,6 +65,13 @@ mkdir -p sample-data/user && \ curl -L https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/sample-data/mac-linux/user/sampleData.sql -o sample-data/user/sampleData.sql log "Sample-data directory created and sampleData.sql downloaded." + +# Install MongoDB driver (usually needed if connecting directly to MongoDB/Citus) +npm install mongodb + +# Install Mongoose (Object Data Modeling library, if the scripts use it) +npm install mongoose + # Step 11: Download additional scripts to add data log "Downloading sample data scripts..." curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -73,10 +80,10 @@ curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh log "sample data scripts downloaded." -# Step 13 : Run sample data insert script -# log "Running sample data insertion..." -# node insert_sample_solution.js -# log "Sample data inserted." + +log "Downloading config.json file..." +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/config.json +log "config.json file is downloaded." # Step 13: Run docker-compose-up.sh script log "Running docker-compose-up.sh script..." diff --git a/documentation/3.4.0/native/envs/stand-alone/entity_management_env b/documentation/3.4.0/native/envs/stand-alone/entity_management_env index 60d2cb5e..c8b99600 100644 --- a/documentation/3.4.0/native/envs/stand-alone/entity_management_env +++ b/documentation/3.4.0/native/envs/stand-alone/entity_management_env @@ -1,24 +1,20 @@ -# Entity service configurations file APPLICATION_PORT = 5001 APPLICATION_ENV ="development" APPLICATION_BASE_URL='/entity-management/' -INTERNAL_ACCESS_TOKEN ="internal_access_token" -ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 -# DB +INTERNAL_ACCESS_TOKEN =xahusub12yexlashsbxAXADHBlaj +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj MONGODB_URL=mongodb://localhost:27017/elevate-entity AUTH_METHOD = native -# USER_SERVICE -USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +USER_SERVICE_URL = http://localhost:3569 USER_SERVICE_BASE_URL=/user KAFKA_HEALTH_CHECK_TOPIC=test -#service name SERVICE_NAME = elevate-entity-service -API_DOC_URL="https://project-dev.elevate-apis.shikshalokam.org/entity-management/api-doc" +API_DOC_URL="http://localhost:3569/entity-management/api-doc" APPLICATION_HOST=localhost IS_AUTH_TOKEN_BEARER="false" ADMIN_ACCESS_TOKEN=rwwee3$123 ADMIN_TOKEN_HEADER_NAME="admin-auth-token" -INTERFACE_SERVICE_URL="https://saas-qa.tekdinext.com" +INTERFACE_SERVICE_URL=http://localhost:3569 KAFKA_HEALTH_CHECK_TOPIC = entity-health-check-topic-check KAFKA_COMMUNICATIONS_ON_OFF = ON KAFKA_URL = kafka:9092 diff --git a/documentation/3.4.0/native/envs/stand-alone/notification_env b/documentation/3.4.0/native/envs/stand-alone/notification_env index 0728bffa..18cf3570 100644 --- a/documentation/3.4.0/native/envs/stand-alone/notification_env +++ b/documentation/3.4.0/native/envs/stand-alone/notification_env @@ -6,7 +6,7 @@ DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/notification DISABLE_LOG=false ENABLE_LOG=true ERROR_LOG_LEVEL=silly -INTERNAL_ACCESS_TOKEN=qwertyhdgffs +INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj KAFKA_GROUP_ID=notification KAFKA_HOST=localhost:9092 KAFKA_TOPIC=develop.notifications diff --git a/documentation/3.4.0/native/envs/stand-alone/project_env b/documentation/3.4.0/native/envs/stand-alone/project_env index 14192224..f426c33d 100644 --- a/documentation/3.4.0/native/envs/stand-alone/project_env +++ b/documentation/3.4.0/native/envs/stand-alone/project_env @@ -1,26 +1,13 @@ APPLICATION_PORT = 6000 APPLICATION_ENV = development -ACCESS_TOKEN_SECRET=hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271 - -INTERNAL_ACCESS_TOKEN =internal_access_token -# Docker--------- +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj +INTERNAL_ACCESS_TOKEN =xahusub12yexlashsbxAXADHBlaj MONGODB_URL = mongodb://localhost:27017/elevate-project - -# ML Core Service -ML_CORE_SERVICE_URL = http://localhost:4000 -# ML Survey Service -# SURVEY_SERVICE_URL = https://saas-qa.tekdinext.com/survey -# OFFLINE VALIDATION KEYCLOAK_PUBLIC_KEY_PATH = keycloak-public-keys -# KAFKA Configurations KAFKA_COMMUNICATIONS_ON_OFF = ON -KAFKA_URL =localhost:9092 - -# KAFKA_URL=10.148.0.38:9092 +KAFKA_URL=localhost:9092 KAFKA_GROUP_ID = projects -# KAFKA_GROUP_ID=dev.projects KAFKA_HEALTH_CHECK_TOPIC = project-health-check-topic-check -# SUBMISSION TOPIC PROJECT_SUBMISSION_TOPIC=sl-improvement-project-submission-dev SUBMISSION_TOPIC = Projectsubmissions PROJECT_CERTIFICATE_TOPIC = generateProjectCertificate @@ -34,28 +21,19 @@ USER_DELETE_ON_OFF=OFF CLOUD_STORAGE=ON TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC = +05:30 VALIDATE_ENTITIES = ON -APP_PORTAL_BASE_URL = "https://dev.elevate.org" +APP_PORTAL_BASE_URL = "http://localhost:7007" NO_OF_MINUTES = 30 NO_OF_EXPIRY_TIME = 60 -# PRESIGNED_URL_EXPIRY_IN_SECONDS = 300 -# DOWNLOADABLE_URL_EXPIRY_IN_SECONDS = 300 DEFAULT_ORGANISATION_CODE = 1 -# GOTENBERG_URL=http://localhost:3000 - -GOTENBERG_URL=http://gotenberg:3000 - -CERTIFICATE_SERVICE_URL = http://localhost:8081 -API_DOC_URL = "https://project-dev.elevate-apis.shikshalokam.org/project/api-doc" -#INTERFACE SERVICE URL -INTERFACE_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org -# INTERFACE_SERVICE_URLL = "http://localhost:5001" +GOTENBERG_URL=http://localhost:3000 +API_DOC_URL = "https://http://localhost:3569/project/api-doc" +INTERFACE_SERVICE_URL=http://localhost:3569 USER_SERVICE_BASE_URL = "/user" ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" SURVEY_SERVICE_URL = http://localhost:4301/survey -#GCP Cloud Configuration CLOUD_STORAGE_PROVIDER=gcloud -CLOUD_STORAGE_ACCOUNTNAME=sl-mentoring-dev-storage@sl-dev-project.iam.gserviceaccount.com -CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDHwatCbtxcfqvt\n7rWWdgOsyQwH1/WGMJ2zTfQydZpRf2JGi6DaqbF85SEaoVnAKaN+33na2Vu5Kgep\n0wnZywCHCnz0W0Geo/4I4KUmzpm4gtG+ncuUhOd9bibx8M+yYhzWOijcPqaxTdpc\nWuenzqRmyNOHbYh4vz9cITrPnP95yPEl3o9gk+e4tD5MHwZTHw9/XKCp27Z/y9D2\nNzotaTjHNPZIxzxNkLzEC3PgYiGTiXBDdj5uag+Y5oV0+ydEZULyiqmr/IgWUZFL\nPsWnlraBgRDCJ/VsQOfU9EomyEapQdR1eBXYETqtMCFIT+lvbZherj0UQ7oRLAlZ\nqnKhnDchAgMBAAECggEADSJBtWN+n6JAgathSxxFT5YEcXuUjBckN0bX2H19AQDE\nIGlL0TS5E8Io9AxJz2Wtd0kQRQBnlHwb9uGGU0iSp05cOuDJJroXmNPUaAHLf6My\nUTskyIYYhlm4u82eilcDGF7IkvqXkS7SPaJIevMOQifQKKZeA7pnWxJgQIhND9+1\nls0OFQ77llh8pXiuAJ9fZbf7oLomKXUxlvfBFSj8NEiqzK7Vk+XCJVvuvUdsLSi6\nR8fputYgaoLJSDaGc/AFNlcec3gneok7zak4TyPQzSV3rwdMajbLEtBwwhsUVuFf\n5K6JHrYY3jYaOd0wqcu1v+WJw5LDexdawk1keD+08QKBgQDxMoAGNZQLxyuGPOnS\nYClPDJMZiSR+8oTaQyI0xvgQ8V7z741dEDNrbmYh2AKgDSec4zDfWga+xl2VSwsD\ndA42+HiD8Tji29iqT9aIJnhYWdk+DXwk/ySjLvUVY4dRGLI4kDwWjb5RAO4M5UEl\n1MeWhfMbgYLL/1gY4gX5BBQBXQKBgQDUBBW0lx9tXGjBr7c5dM8iO5J+O8K/zbds\nzE+oAwtN5saOtv9lhgDuhyFN67pCGW3M7fQgec9tigrDMKmy6ARHbORLes1zhSsd\nHH9aTA6/DkVzBnsDA3dT0klgOAFN2eP8QYhpNGN0My5jhhXNd5L2pDHpuIHkZPP4\ncuFxncJclQKBgHL2VAkhnnfirb8k53nrdaUE5FQmhuuvIl155CLtty00LsLsKh/y\nad/J1gpJkC7DNl9T9mZu3YouuEpBY3V46pGO6rpQzoFqsiGzPhjU5UWPRbmK6eIk\nbk0NQ6m3L7cao0/Mh6dkVhL783rYBq5Gdf8rx00T9MjQ4yexC5G+PN7NAoGAeWsN\ncyrI2Lx/UczrxX/bz+MF9j0LPwT08t3fEH0N0ENFmx26Dc48Yl4I+LLzLD+b3iy4\nDpEz9auEllwcE1VEfhMieweM+YdeNYHIfVHpcAkgRMuFTyiBAgP/+ZaZSJhsNF7j\nXDygaD+XZW+4tL6x74YA/7SmzsHx5msEKSkL0jECgYAOldGF28ujJHVA8kksXBkP\nlqIPki9Mg7qRHZBRFkmjskmEUFJTJP8TSWuo2c+J9idx6fxgXKmiXa5lH5ewQbXu\nQYbqpNsF167AjHEwxKS4qeU2u+fyw3VxB03gpNqEzolIIaGItAIfzyQ5KiN2thSl\nnhHTJ/psHBlZoENzsgvIUA==\n-----END PRIVATE KEY-----\n" +CLOUD_STORAGE_ACCOUNTNAME=CLOUD_STORAGE_ACCOUNTNAME +CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\n" CLOUD_STORAGE_PROJECT =sl-dev-project CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private CLOUD_STORAGE_BUCKET_TYPE=private @@ -65,8 +43,5 @@ ADMIN_TOKEN_HEADER_NAME = 'admin-auth-token' IS_AUTH_TOKEN_BEARER = false AUTH_METHOD = native REDIS_HOST=redis://127.0.0.1:6379 -# PUBLIC_ASSET_BUCKETNAME=mentoring-dev-storage-public - - -USER_SERVICE_URL = https://dev.elevate-apis.shikshalokam.org +USER_SERVICE_URL = http://localhost:3569 RESOURCE_DELETION_TOPIC=RESOURCE_DELETION_TOPIC diff --git a/documentation/3.4.0/native/envs/stand-alone/user_env b/documentation/3.4.0/native/envs/stand-alone/user_env index 4d382ea0..af029f35 100644 --- a/documentation/3.4.0/native/envs/stand-alone/user_env +++ b/documentation/3.4.0/native/envs/stand-alone/user_env @@ -1,6 +1,5 @@ ACCESS_TOKEN_EXPIRY='30m' -ACCESS_TOKEN_SECRET='bsj82AHBxahusub12yexlashsbxAXADHBlaj' -# ACCESS_TOKEN_SECRET ='hsghasghjab1273JHajnbabsjdj1273981273jhajksdh8y3123yhjkah812398yhjqwe7617237yuhdhhdqwu271' +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj API_DOC_URL=/user/api-doc APP_NAME=MentorED APPLICATION_ENV=development @@ -22,8 +21,8 @@ DEFAULT_GCP_BUCKET_NAME=DEFAULT_GCP_BUCKET_NAME ENABLE_EMAIL_OTP_VERIFICATION=false ENABLE_LOG=true GCP_PATH=gcp.json -GCP_PROJECT_ID=sl-dev-project -INTERNAL_ACCESS_TOKEN=internal_access_token +GCP_PROJECT_ID=sl-project +INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj INTERNAL_CACHE_EXP_TIME=86400 IV=LHYOA5YnTonqcgrm15k3/Q== KAFKA_GROUP_ID=mentoring @@ -32,10 +31,10 @@ KAFKA_URL= localhost:9092 KEY=E/m3RD/aM3Ed3lLfYVcKizakG9R+bFybAPZSLjIP2hY= MENTOR_SECRET_CODE=4567 MONGODB_URL=mongodb://localhost:27017/elevate-users -NOTIFICATION_KAFKA_TOPIC=dev.notifications +NOTIFICATION_KAFKA_TOPIC=notifications OTP_EMAIL_TEMPLATE_CODE=emailotp OTP_EXP_TIME=86400 -RATING_KAFKA_TOPIC=dev.mentor_rating +RATING_KAFKA_TOPIC=mentor_rating REDIS_HOST=redis://localhost:6379 REFRESH_TOKEN_EXPIRY=183 REFRESH_TOKEN_SECRET=371hkjkjady2y3ihdkajshdkiq23iuekw71yekhaskdvkvegavy23t78veqwexqvxveit6ttxyeeytt62tx236vv @@ -53,7 +52,6 @@ DISABLE_LOG= false DEFAULT_ORGANISATION_CODE=default_code DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/users ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy -MENTORING_SERVICE_URL="http://localhost:3000" INVITEE_EMAIL_TEMPLATE_CODE="emailcode" ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="coeadmin" DEFAULT_QUEUE="defaultque" diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh index d5ce17c5..06877a98 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh @@ -42,6 +42,7 @@ echo "Downloaded ${INSERT_SCRIPT}" echo "" echo "2. Installing required Node packages (mongoose)..." npm install mongoose +npm install mongodb # --- 4. Run Insertion Script --- echo "" diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index a2461a42..291ed782 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -28,11 +28,9 @@ The Project building block facilitates the creation and engagement with micro-im # Setup Options -**Project services can be setup using two methods:** +> Note : This guide outlines two setup methods, detailed below. For a quick, beginner-friendly setup and walkthrough of services, it is recommended to use the Dockerized Services & Dependencies setup with the Docker- -> Note : This guide outlines two setup methods, detailed below. For a quick, beginner-friendly setup and walkthrough of services, it is recommended to use the Dockerized Services & Dependencies setup with the Docker-Compose file. - -Dockerized Services & Dependencies Using Docker-Compose File + Compose file. ## Dockerized Services & Dependencies @@ -105,11 +103,11 @@ To enable the Citus extension for user services, follow these steps. ``` 2. Set up the citus_setup file by following the steps given below. + 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. - 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. - ``` - sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user - ``` + ``` + sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user + ``` ## Persistence Of Database Data In Docker Container (Optional) @@ -183,9 +181,9 @@ This step will guide us in implementing a sample project solution following the 1. **Insert Sample Data To Database:** - ``` - node insert_sample_solution.js - ``` + ``` + node insert_sample_solutions.js + ``` ## Default Forms Creation for Portal Configuration diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index 05e9f721..0b1db95f 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -28,8 +28,6 @@ The Project building block facilitates the creation and engagement with micro-im # Native Setup - Stand Alone -Natively Installed Services & Dependencies - ## PM2 Managed Services & Natively Installed Dependencies ### System Requirements @@ -48,37 +46,37 @@ Before setting up the following ELEVATE-Project application, dependencies given 1. Download dependency management scripts: - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh && \ - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh && \ - chmod +x check-dependencies.sh && \ - chmod +x install-dependencies.sh && \ - chmod +x uninstall-dependencies.sh - ``` + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh && \ + chmod +x check-dependencies.sh && \ + chmod +x install-dependencies.sh && \ + chmod +x uninstall-dependencies.sh + ``` 2. Verify installed dependencies by running `check-dependencies.sh`: - ``` - ./check-dependencies.sh - ``` + ``` + ./check-dependencies.sh + ``` - > Note: Keep note of any missing dependencies. + > Note: Keep note of any missing dependencies. 3. Install dependencies by running `install-dependencies.sh`: - ``` - ./install-dependencies.sh - ``` - > Note: Install all missing dependencies and use check-dependencies script to ensure everything is installed and running. + ``` + ./install-dependencies.sh + ``` + > Note: Install all missing dependencies and use check-dependencies script to ensure everything is installed and running. 4. Uninstall dependencies by running `uninstall-dependencies.sh`: - ``` - ./uninstall-dependencies.sh - ``` + ``` + ./uninstall-dependencies.sh + ``` - > Warning: Due to the destructive nature of the script (without further warnings), it should only be used during the initial setup of the dependencies. For example, Uninstalling PostgreSQL/Citus using script will lead to data loss. USE EXTREME CAUTION. + > Warning: Due to the destructive nature of the script (without further warnings), it should only be used during the initial setup of the dependencies. For example, Uninstalling PostgreSQL/Citus using script will lead to data loss. USE EXTREME CAUTION. - > Warning: This script should only be used to uninstall dependencies that were installed via installation script in step 3. If same dependencies were installed using other methods, refrain from using this script. This script is provided in-order to reverse installation in-case issues arise from a bad install. + > Warning: This script should only be used to uninstall dependencies that were installed via installation script in step 3. If same dependencies were installed using other methods, refrain from using this script. This script is provided in-order to reverse installation in-case issues arise from a bad install. ## Installation @@ -88,46 +86,46 @@ Before setting up the following ELEVATE-Project application, dependencies given 2. **Git Clone Services And Portal Repositories** - ``` - git clone -b develop https://github.com/ELEVATE-Project/project-service.git && \ - git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ - git clone -b develop https://github.com/ELEVATE-Project/user.git && \ - git clone -b master https://github.com/ELEVATE-Project/notification.git && \ - git clone -b main https://github.com/ELEVATE-Project/interface-service.git && \ - git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ - git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-survey-projects-pwa && \ - git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal && \ - git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal - ``` +``` +git clone -b develop https://github.com/ELEVATE-Project/project-service.git && \ +git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ +git clone -b develop https://github.com/ELEVATE-Project/user.git && \ +git clone -b master https://github.com/ELEVATE-Project/notification.git && \ +git clone -b main https://github.com/ELEVATE-Project/interface-service.git && \ +git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ +git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-survey-projects-pwa && \ +git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal && \ +git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal +``` 3. **Install NPM Packages** - ``` - cd project-service && npm install && cd ../ && \ - cd entity-management/src && npm install && cd ../.. && \ - cd user/src && npm install && cd ../.. && \ - cd entity-management\src && npm install && cd ..\.. && \ - cd notification/src && npm install && cd ../.. && \ - cd interface-service/src && npm install && cd ../.. && \ - cd scheduler/src && npm install && cd ../.. && \ - cd observation-survey-projects-pwa && npm install --force && cd .. && \ - cd observation-portal && npm install --force && cd .. && \ - cd elevate-portal && npm install --force && cd .. - ``` +``` +cd project-service && npm install && cd ../ && \ +cd entity-management/src && npm install && cd ../.. && \ +cd user/src && npm install && cd ../.. && \ +cd entity-management\src && npm install && cd ..\.. && \ +cd notification/src && npm install && cd ../.. && \ +cd interface-service/src && npm install && cd ../.. && \ +cd scheduler/src && npm install && cd ../.. && \ +cd observation-survey-projects-pwa && npm install --force && cd .. && \ +cd observation-portal && npm install --force && cd .. && \ +cd elevate-portal && npm install --force && cd .. +``` 4. **Download Environment Files** - ``` - curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/project_env && \ - curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/entity_management_env && \ - curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/user_env && \ - curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/notification_env && \ - curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/interface_env && \ - curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/scheduler_env && \ - curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/observation_survey_projects_pwa_env && \ - curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/elevate_portal_env && \ - curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/observation_portal_env - ``` +``` +curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/project_env && \ +curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/entity_management_env && \ +curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/user_env && \ +curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/notification_env && \ +curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/interface_env && \ +curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/scheduler_env && \ +curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/observation_survey_projects_pwa_env && \ +curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/elevate_portal_env && \ +curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/observation_portal_env +``` > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. @@ -135,31 +133,41 @@ Before setting up the following ELEVATE-Project application, dependencies given > **Important:** As mentioned in the above linked document, the **User SignUp** functionality may be compromised if key environment variables are not set correctly during deployment. If you opt to skip this setup, consider using the sample user account generator detailed in the `Sample User Accounts Generation` section of this document. -5. **Create Databases** +5. **Attaching Config File** + + ``` + curl -L -o project-service/config.json https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/config.json && \ + curl -L -o entity-management/src/config.json https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/config.json + ``` + +6. **Create Databases** 1. Download `create-databases.sh` Script File: - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh - ``` + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh + ``` 2. Make the executable by running the following command: - ``` - chmod +x create-databases.sh - ``` + + ``` + chmod +x create-databases.sh + ``` + 3. Run the script file: - ``` - ./create-databases.sh - ``` -6. **Run Migrations To Create Tables** + ``` + ./create-databases.sh + ``` - ``` - cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ - cd notification/src && npx sequelize-cli db:migrate && cd ../.. - ``` +7. **Run Migrations To Create Tables** -7. **Enabling Citus And Setting Distribution Columns (Optional)** + ``` + cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ + cd notification/src && npx sequelize-cli db:migrate && cd ../.. + ``` + +8. **Enabling Citus And Setting Distribution Columns (Optional)** To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. @@ -168,46 +176,46 @@ Before setting up the following ELEVATE-Project application, dependencies given 1. Download user `distributionColumns.sql` file. ``` - curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql + curl -o ./user/distributionColumns.sql -JL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/distribution-columns/user/distributionColumns.sql + ``` 2. Set up the `citus_setup` file by following the steps given below. - 1. Download the `citus_setup.sh` file: + 1. Download the `citus_setup.sh` file: - ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh - ``` + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh + ``` 2. Make the setup file executable by running the following command: - ``` - chmod +x citus_setup.sh - ``` + ``` + chmod +x citus_setup.sh + ``` 3. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. - ``` - ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users - ``` + ``` + ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users + ``` -8. **Insert Initial Data** +9. **Insert Initial Data** 1. Download `entity-project-sample-data.sh` Script File: - ``` - curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh && \ - chmod +x insert_sample_data.sh && \ - ./project_entity_sample_data.sh - ``` - -9. **Insert Forms Data into Database** + ``` + curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh && \ + chmod +x project_entity_sample_data.sh && \ + ./project_entity_sample_data.sh + ``` +10. **Insert Forms Data into Database** - ``` - curl -s https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/import_forms.js | node - ``` + ``` + curl -s https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/import_forms.js | node + ``` -10. **Start The Services** +11. **Start The Services** Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. @@ -220,39 +228,39 @@ Before setting up the following ELEVATE-Project application, dependencies given (cd scheduler/src && pm2 start app.js --name scheduler && cd -) ``` -11. **Run Service Scripts** +12. **Run Service Scripts** ``` cd user/src/scripts && node insertDefaultOrg.js && node viewsScript.js && cd ../../.. ``` -12. **Start The Portal** +13. **Start The Portal** ELEVATE-Project portal utilizes Ionic for building the browser bundle, follow the steps given below to install them and start the portal. 1. Install the Ionic framework: - ``` - npm install -g ionic - ``` + ``` + npm install -g ionic + ``` 2. Install the Ionic client: - ``` - npm install -g @ionic/cli - ``` + ``` + npm install -g @ionic/cli + ``` 3. Navigate to `observation-survey-projects-pwa` directory: - ``` - cd observation-survey-projects-pwa - ``` + ``` + cd observation-survey-projects-pwa + ``` 4. Run the project on your local system using the following command: - ``` - ionic serve - ``` + ``` + ionic serve + ``` Navigate to http://localhost:8100 to access the ELEVATE-Project Portal. From 8528c631faa9f2da8e5076c701e966712f770a30 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 26 Nov 2025 11:23:20 +0530 Subject: [PATCH 015/119] pushing-for-native --- README.md | 31 +- documentation/1.0.0/ReadMe.md | 1512 +++++++++++++++++++++++++++++++++ 2 files changed, 1538 insertions(+), 5 deletions(-) create mode 100644 documentation/1.0.0/ReadMe.md diff --git a/README.md b/README.md index b1cdf67d..a757287e 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ The Project building block facilitates the creation and engagement with micro-im ## šŸ’» Supported Operating Systems -* **Ubuntu** (Recommended: Version 20 and above) -* **Windows** (Recommended: Version 11 and above) -* **macOS** (Recommended: Version 12 and above) +- **Ubuntu** (Recommended: Version 20 and above) +- **Windows** (Recommended: Version 11 and above) +- **macOS** (Recommended: Version 12 and above) --- @@ -44,16 +44,19 @@ This setup is ideal for **local development, testing**, and deployments where on
1. Ubuntu Setup +
Go to the detailed Ubuntu Docker setup guide: **SETUP_STANDALONE_DOCKER_UBUNTU.md**
2. macOS Setup +
Go to the detailed macOS Docker setup guide: **SETUP_STANDALONE_DOCKER_MACOS.md**
3. Windows Setup +
Go to the detailed Windows Docker setup guide: **SETUP_STANDALONE_DOCKER_WINDOWS.md**
@@ -63,16 +66,19 @@ Go to the detailed Windows Docker setup guide: **SETUP_STANDALONE_NATIVE_UBUNTU.md**
2. macOS Setup +
Go to the detailed macOS Native setup guide: **SETUP_STANDALONE_NATIVE_MACOS.md**
3. Windows Setup +
Go to the detailed Windows Native setup guide: **SETUP_STANDALONE_NATIVE_WINDOWS.md**
@@ -92,16 +98,19 @@ This setup integrates the Projects Service with the **Samiksha Service**, provid
1. Ubuntu Setup +
Go to the detailed Ubuntu Docker setup guide: **SETUP_SAMIKSHA_DOCKER_UBUNTU.md**
2. macOS Setup +
Go to the detailed macOS Docker setup guide: **SETUP_SAMIKSHA_DOCKER_MACOS.md**
3. Windows Setup +
Go to the detailed Windows Docker setup guide: **SETUP_SAMIKSHA_DOCKER_WINDOWS.md**
@@ -111,16 +120,19 @@ Go to the detailed Windows Docker setup guide: **SETUP_SAMIKSHA_NATIVE_UBUNTU.md**
2. macOS Setup +
Go to the detailed macOS Native setup guide: **SETUP_SAMIKSHA_NATIVE_MACOS.md**
3. Windows Setup +
Go to the detailed Windows Native setup guide: **SETUP_SAMIKSHA_NATIVE_WINDOWS.md**
@@ -130,6 +142,17 @@ Go to the detailed Windows Native setup guide: **View 1.0.0 Documentation** + +### Postman Collections + +- **Projects Service API Collection** + ### Adding New Projects to the System With implementation scripts, you can seamlessly add new projects to the system. Once a project is successfully added, it becomes visible on the portal, ready for use and interaction. For a comprehensive guide on setting up and using the implementation script, please refer to the **documentation here**. @@ -151,5 +174,3 @@ Several open source dependencies that have aided Projects's development: ![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white) ![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white) ![Git](https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge&logo=git&logoColor=white) - ---- \ No newline at end of file diff --git a/documentation/1.0.0/ReadMe.md b/documentation/1.0.0/ReadMe.md new file mode 100644 index 00000000..fddde5a5 --- /dev/null +++ b/documentation/1.0.0/ReadMe.md @@ -0,0 +1,1512 @@ +
+ +# Projects Service + + + + + +![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/ELEVATE-Project/mentoring?filename=src%2Fpackage.json) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) + + + + +
+The Project building block facilitates the creation and engagement with micro-improvement projects. + +
+
+ +# Supported Operating Systems + +- **Ubuntu (Recommended: Version 20 and above)** +- **Windows (Recommended: Version 11 and above)** +- **macOs (Recommended: Version 12 and above)** + +# Setup Options + +**Project services can be setup using two methods:** + +> Note : This guide outlines two setup methods, detailed below. For a quick, beginner-friendly setup and walkthrough of services, it is recommended to use the Dockerized Services & Dependencies setup with the Docker-Compose file. + +
Dockerized Services & Dependencies Using Docker-Compose File + +## Dockerized Services & Dependencies + +Expectation: By diligently following the outlined steps, you will successfully establish a fully operational Project application setup, including both the portal and backend services. + +## Prerequisites + +To set up the Project application, ensure you have Docker and Docker Compose installed on your system. For Ubuntu users, detailed installation instructions for both can be found in the documentation here: [How To Install and Use Docker Compose on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04). To install and use Nodejs in Ubuntu machine, you can follow instructions here: [How To Install Nodejs in Ubuntu](https://nodejs.org/en/download/package-manager). For Windows and MacOS users, you can refer to the Docker documentation for installation instructions: [Docker Compose Installation Guide](https://docs.docker.com/compose/install/). Once these prerequisites are in place, you're all set to get started with setting up the Project application. + +## Installation + +**Create project Directory:** Establish a directory titled **project**. + +> Example Command: `mkdir project && cd project/` + +> Note: All commands are run from the project directory. + +## Operating Systems: Linux / macOS + +> **Caution:** Before proceeding, please ensure that the ports given here are available and open. It is essential to verify their availability prior to moving forward. You can run below command in your terminal to check this + +``` +for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 2707 3569; do + if lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then + echo "Port $port is in use" + else + echo "Port $port is available" + fi +done +``` + +1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. + ` curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh` + + > Note : The script will download all the essential files and launch the services in Docker. Once all services are successfully up and running, you can proceed to the next steps. + + **General Instructions :** + + 1. All containers which are part of the docker-compose can be gracefully stopped by pressing Ctrl + c in the same terminal where the services are running. + + 2. All docker containers can be stopped and removed by using below command. + ``` + sudo ./docker-compose-down.sh + ``` + 3. All services and dependencies can be started using below command. + ``` + sudo ./docker-compose-up.sh + ``` + + **Keep the current terminal session active, and kindly open a new terminal window within the project directory.** + +**After successfully completing this, please move to the next section: [Enable Citus Extension](#enable-citus-extension-optional)** + +## Operating Systems: Windows + +1. **Download Docker Compose File:** Retrieve the **[docker-compose-project.yml](https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/docker-compose-project.yml)** file from the Project service repository and save it to the project directory. + + ``` + curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/docker-compose-project.yml + ``` + + > Note: All commands are run from the project directory. + +2. **Download Environment Files**: Using the OS specific commands given below, download environment files for all the services. + + - **Windows** + + ``` + curl -L ^ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/interface_env ^ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/entity_management_env ^ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/project_env ^ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/notification_env ^ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/scheduler_env ^ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/user_env ^ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/env.js + ``` + + > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. + + > **Caution:** While the default values in the downloaded environment files enable the Project Application to operate, certain features may not function correctly or could be impaired unless the adopter-specific environment variables are properly configured. + +3. **Download `replace_volume_path` Script File** + + - **Windows** + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/dockerized/scripts/windows/replace_volume_path.bat + ``` + +4. **Run `replace_volume_path` Script File** + + - **Windows** + + Run the script file either by double clicking it or by executing the following command from the terminal. + + ``` + replace_volume_path.bat + ``` + + > **Note**: The provided script file replaces the host path for the **portal** service container volume in the `docker-compose-project.yml` file with your current directory path. + > + > volumes: + > + > \- /home/shikshalokam/elevate/single-click/linux/env.js:/usr/src/app/www/assets/env/env.js + +5. **Download `docker-compose-up` & `docker-compose-down` Script Files** + + - **Windows** + + ``` + curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/docker-compose-up.bat + ``` + + ``` + curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/docker-compose-down.bat + ``` + +6. **Run All Services & Dependencies**:All services and dependencies can be started using the `docker-compose-up` script file. + + - **Windows** + + ``` + docker-compose-up.bat + ``` + + > Double-click the file or run the above command from the terminal. + + > **Note**: During the first Docker Compose run, the database, migration seeder files, and the script to set the default organization will be executed automatically. + +7. **Remove All Service & Dependency Containers**: + All docker containers can be stopped and removed by using the `docker-compose-down` file. + + - **Windows** + + ``` + docker-compose-down.bat + ``` + + > **Caution**: As per the default configuration in the `docker-compose-project.yml` file, using the `down` command will lead to data loss since the database container does not persist data. To persist data across `down` commands and subsequent container removals, refer to the "Persistence of Database Data in Docker Containers" section of this documentation. + +## Enable Citus Extension (Optional) + +User management service comes with this bundle relies on PostgreSQL as its core database system. To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. + +For more information, refer **[Citus Data](https://www.citusdata.com/)**. + +To enable the Citus extension for user services, follow these steps. + +1. Create a sub-directory named `user` and download `distributionColumns.sql` into it. (Skip this for linux/macOs) + ``` + mkdir user && curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql + ``` +2. Set up the citus_setup file by following the steps given below. + + - **Ubuntu/Linux/Mac** + + 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. + ``` + sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user + ``` + + - **Windows** + 1. Download the `citus_setup.bat` file. + ``` + curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/citus_setup.bat + ``` + 2. Enable Citus and set distribution columns for `user` database by running the `citus_setup.bat`with the following arguments. + ``` + citus_setup.bat user postgres://postgres:postgres@citus_master:5432/user + ``` + > **Note:** Since the `citus_setup.bat` file requires arguments, it must be run from a terminal. + +## Persistence Of Database Data In Docker Container (Optional) + +To ensure the persistence of database data when running `docker compose down`, it is necessary to modify the `docker-compose-project.yml` file according to the steps given below: + +1. **Modification Of The `docker-compose-project.yml` File:** + + Begin by opening the `docker-compose-project.yml` file. Locate the section pertaining to the Citus and mongo container and proceed to uncomment the volume specification. This action is demonstrated in the snippet provided below: + + ```yaml + mongo: + image: 'mongo:4.4.14' + restart: 'always' + ports: + - '27017:27017' + networks: + - project_net + volumes: + - mongo-data:/data/db + logging: + driver: none + + citus: + image: citusdata/citus:11.2.0 + container_name: 'citus_master' + ports: + - 5432:5432 + volumes: + - citus-data:/var/lib/postgresql/data + ``` + +2. **Uncommenting Volume Names Under The Volumes Section:** + + Next, navigate to the volumes section of the file and proceed to uncomment the volume names as illustrated in the subsequent snippet: + + ```yaml + networks: + elevate_net: + external: false + + volumes: + citus-data: + mongo-data: + ``` + +By implementing these adjustments, the configuration ensures that when the `docker-compose down` command is executed, the database data is securely stored within the specified volumes. Consequently, this data will be retained and remain accessible, even after the containers are terminated and subsequently reinstated using the `docker-compose up` command. + +## Sample User Accounts Generation + +During the initial setup of Project services with the default configuration, you may encounter issues creating new accounts through the regular SignUp flow on the project portal. This typically occurs because the default SignUp process includes OTP verification to prevent abuse. Until the notification service is configured correctly to send actual emails, you will not be able to create new accounts. + +In such cases, you can generate sample user accounts using the steps below. This allows you to explore the Project services and portal immediately after setup. + +> **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. + +- **Ubuntu/Linux/Mac** + + ``` + sudo ./insert_sample_data.sh user postgres://postgres:postgres@citus_master:5432/user + ``` + +- **Windows** + + 1. **Download The `sampleData.sql` Files:** + + ``` + mkdir sample-data\user 2>nul & ^ + curl -L "https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/sample-data/windows/user/sampleData.sql" -o sample-data\user\sampleData.sql + ``` + + 2. **Download The `insert_sample_data` Script File:** + + ``` + curl -L -o insert_sample_data.bat https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/dockerized/scripts/windows/insert_sample_data.bat + ``` + + 3. **Run The `insert_sample_data` Script File:** + + ``` + insert_sample_data.bat user postgres://postgres:postgres@citus_master:5432/user + ``` + + After successfully running the script mentioned above, the following user accounts will be created and available for login: + + | Email ID | Password | Role | + | ------------------------ | ---------- | ----------------------- | + | aaravpatel@example.com | Password1@ | State Education Officer | + | arunimareddy@example.com | Password1@ | State Education Officer | + | devikasingh@example.com | Password1@ | State Education Officer | + +## Sample Data Creation For Projects + +This step will guide us in implementing a sample project solution following the initial setup of the project service. + +1. **Insert Sample Data To Database:** + + - **Ubuntu/Linux/Mac** + + 1. Insert sample data by running the following command. + + ``` + sudo ./add_sample_project_entity_data.sh + ``` + + - **Windows** + + 1. Download `entity-project-sample-data.bat` Script File: + + ``` + curl -L ^ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/entity-project-sample-data.bat ^ + ``` + + 2. Make the setup file executable by running the following command. + + ``` + entity-project-sample-data.bat + ``` + +## Default Forms Creation for Portal Configuration + +This step inserts configuration forms into MongoDB, enabling or disabling features and fields on portal pages. + +#### Insert Forms Data into Database + +- **Ubuntu/Linux/Mac**: + + ``` + curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/import_forms_mongo.sh && chmod +x import_forms_mongo.sh && sudo ./import_forms_mongo.sh mongodb://mongo:27017/elevate-project + ``` + +- **Windows**: + 1. Download the `import_forms_mongo.bat` file: + ```cmd + curl -L -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/windows/import_forms_mongo.bat + ``` + 2. Run the script: + ```cmd + import_forms_mongo.bat mongodb://localhost:27017/elevate-project + ``` + +## Explore the Portal + +Once the services are up and the front-end app bundle is built successfully, navigate to **[localhost:7007](http://localhost:7007/)** to access the Project app. + +> **Warning:** In this setup, features such as **Sign-Up, Project Certificate, Project Sharing, and Project PDF Report** will not be available because cloud storage credentials have been masked in the environment files for security reasons. + +
+ +
+Natively Installed Services & Dependencies + +## PM2 Managed Services & Natively Installed Dependencies + +### System Requirements + +- **Node.jsĀ®:** v20 +- **PostgreSQL:** 16 +- **Apache KafkaĀ®:** 3.5.0 +- **MongoDB:** 4.4.14 +- **Gotenberg:** 8.5.0 + +Expectation: Upon following the prescribed steps, you will achieve a fully operational ELEVATE-Project application setup. Both the portal and backend services are managed using PM2, with all dependencies installed natively on the host system. + +## Prerequisites + +Before setting up the following ELEVATE-Project application, dependencies given below should be installed and verified to be running. Refer to the steps given below to install them and verify. + +- **Ubuntu/Linux** + + 1. Download dependency management scripts: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/check-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/install-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/uninstall-dependencies.sh && \ + chmod +x check-dependencies.sh && \ + chmod +x install-dependencies.sh && \ + chmod +x uninstall-dependencies.sh + ``` + + 2. Verify installed dependencies by running `check-dependencies.sh`: + + ``` + ./check-dependencies.sh + ``` + + > Note: Keep note of any missing dependencies. + + 3. Install dependencies by running `install-dependencies.sh`: + ``` + ./install-dependencies.sh + ``` + > Note: Install all missing dependencies and use check-dependencies script to ensure everything is installed and running. + 4. Uninstall dependencies by running `uninstall-dependencies.sh`: + + ``` + ./uninstall-dependencies.sh + ``` + + > Warning: Due to the destructive nature of the script (without further warnings), it should only be used during the initial setup of the dependencies. For example, Uninstalling PostgreSQL/Citus using script will lead to data loss. USE EXTREME CAUTION. + + > Warning: This script should only be used to uninstall dependencies that were installed via installation script in step 3. If same dependencies were installed using other methods, refrain from using this script. This script is provided in-order to reverse installation in-case issues arise from a bad install. + +- **MacOS** + + 1. Install Node.js 20: + + ``` + brew install node@20 + ``` + + ``` + brew link --overwrite node@20 + ``` + + 2. Install Kafka: + + ``` + brew install kafka + ``` + + > Note: To install Kafka on older macOS versions like Monterey (Intel architecture), you need to follow the manual installation process instead of using Homebrew. The process includes downloading Kafka, setting up ZooKeeper, and running Kafka services. You can find the official Kafka installation guide here: [Kafka Quickstart Guide](https://kafka.apache.org/quickstart).This ensures compatibility with older macOS systems. Follow the steps outlined in the documentation for a smooth setup. + + 3. Install PostgreSQL 16: + + ``` + brew install postgresql@16 + ``` + + 4. Install PM2: + + ``` + sudo npm install pm2@latest -g + ``` + + 5. Install Redis: + + ``` + brew install redis + ``` + + 6. Install mongDB: + + ``` + brew tap mongodb/brew + ``` + + ``` + brew install mongodb-community@4.4 + ``` + + ``` + brew link mongodb-community@4.4 --force + ``` + + ``` + brew services start mongodb-community@4.4 + ``` + + 7. Download `check-dependencies.sh` file: + + ``` + curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/native/scripts/macos/check-dependencies.sh && \ + chmod +x check-dependencies.sh + ``` + + 8. Verify installed dependencies by running `check-dependencies.sh`: + + ``` + ./check-dependencies.sh + ``` + + > Note : If you've manually installed Kafka without Homebrew, the script might incorrectly indicate that Kafka and Homebrew are not installed, as it checks only for Homebrew installations. In such cases, you can safely ignore this warning. Ensure that both Kafka and ZooKeeper are running on their default ports (ZooKeeper on `2181`, Kafka on `9092`). This will confirm proper installation and functionality despite the script's output. + +- **Windows** + + 1. Install Node.js 20: + + Download and install Node.js v20 for Windows platform (x64) from official [Node.js download page](https://nodejs.org/en/download). + + 2. Install Kafka 3.5.0: + + 1. Adapt the instructions given in the following ["Apache Kafka on Windows"](https://www.conduktor.io/kafka/how-to-install-apache-kafka-on-windows/) documentation to install Kafka version 3.5.0. + + > Note: As per the instructions, Kafka server and Zookeeper has to be kept active on different WSL terminals for the entire lifetime of ELEVATE-Project services. + + > Note: Multiple WSL terminals can be opened by launching `Ubuntu` from start menu. + + 2. Open a new WSL terminal and execute the following command to get the IP of the WSL instance. + + ``` + ip addr show eth0 + ``` + + Sample Output: + + ``` + 2: eth0: mtu 1492 qdisc mq state UP group default qlen 1000 + link/ether 11:56:54:f0:as:vf brd ff:ff:ff:ff:ff:ff + inet 172.12.46.150/20 brd 172.24.79.255 scope global eth0 + valid_lft forever preferred_lft forever + inet6 fe80::215:5dff:fee7:dc52/64 scope link + valid_lft forever preferred_lft forever + ``` + + Keep note of the IP address shown alongside `inet`. In the above case, `172.12.46.150` is IP address of the WSL instance. + + 3. In the same WSL terminal, navigate to `config` directory of Kafka from step 1 and make the following changes to `server.properties` file. + + - Uncomment `listeners=PLAINTEXT://:9092` line and change it to `listeners=PLAINTEXT://0.0.0.0:9092` to allow connections from any IP. + + - Uncomment `advertised.listeners` line and set it to `advertised.listeners=PLAINTEXT://172.12.46.150:9092`. Replace `172.12.46.150` with the actual IP address of your WSL instance. + + 4. Restart the Zookeeper and Kafka Server from their own WSL terminals from step 1. + + 3. Install Redis: + + 1. Follow the instructions given in the official [Redis Documentation](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-windows/) to install Redis using WSL. + + 2. Using the WSL terminal, open the Redis configuration file in a text editor, such as nano: + + ``` + sudo nano /etc/redis/redis.conf + ``` + + 3. Find the line containing `bind 127.0.0.1 ::1` and change it to `bind 0.0.0.0 ::.`. This change allows Redis to accept connections from any IP address. Then save and exit the file. + + 4. Restart Redis to apply the changes: + + ``` + sudo service redis-server restart + ``` + + 4. Install PM2: + + ``` + npm install pm2@latest -g + ``` + + 5. Install PostgreSQL 16: + + 1. Download and install PostgreSQL 16 from [EnterpriseDB PostgreSQL](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads) download page. + + > Note: Set username and password for the default database to be 'postgres' during installation. + + 2. Once installed, Add `C:\Program Files\PostgreSQL\16\bin` to windows environment variables. Refer [here](https://www.computerhope.com/issues/ch000549.htm) or [here](https://stackoverflow.com/a/68851621) for more information regarding how to set it. + + 6. Install MongoDB: + + Follow the official [MongoDB Website](https://www.mongodb.com/try/download/community) to install MongoDB. + + 7. Install Gotenberg via Docker: + + 1. Download Docker Desktop for Windows from [Docker Website](https://docs.docker.com/desktop/setup/install/windows-install/) + + 2. Run the installer and follow the setup instructions. + + 3. Ensure Docker Desktop is running and configured to use Linux containers(default settings). + + 4. Open a terminal (e.g., Command Prompt). + + 5. Pull the Gotenberg image: + + ``` + docker pull gotenberg/gotenberg:latest + ``` + + 6. Run the Gotenberg container with the following command: + + ``` + docker run -d --name gotenberg -p 3000:3000 gotenberg/gotenberg:latest + ``` + + 7. Verify the container is running. You should see the Gotenberg container listed after running the below command. + ``` + docker ps + ``` + +## Installation + +1. **Create ELEVATE-Project Directory:** Create a directory named **ELEVATE-Project**. + + > Example Command: `mkdir ELEVATE-Project && cd ELEVATE-Project/` + +2. **Git Clone Services And Portal Repositories** + + - **Ubuntu/Linux/MacOS** + + ``` + git clone -b main https://github.com/ELEVATE-Project/project-service.git && \ + git clone -b main https://github.com/ELEVATE-Project/entity-management.git && \ + git clone -b master https://github.com/ELEVATE-Project/user.git && \ + git clone -b master https://github.com/ELEVATE-Project/notification.git && \ + git clone -b main https://github.com/ELEVATE-Project/interface-service.git && \ + git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ + git clone -b main https://github.com/ELEVATE-Project/observation-survey-projects-pwa + ``` + + - **Windows** + + ``` + git clone -b staging https://github.com/ELEVATE-Project/project-service.git & + git clone -b staging https://github.com/ELEVATE-Project/entity-management.git & + git clone -b master https://github.com/ELEVATE-Project/user.git & + git clone -b master https://github.com/ELEVATE-Project/notification.git & + git clone -b main https://github.com/ELEVATE-Project/interface-service.git & + git clone -b master https://github.com/ELEVATE-Project/scheduler.git & + git clone -b main https://github.com/ELEVATE-Project/observation-survey-projects-pwa + ``` + +3. **Install NPM Packages** + + - **Ubuntu/Linux/MacOS** + + ``` + cd project-service && npm install && cd ../ && \ + cd entity-management/src && npm install && cd ../.. && \ + cd user/src && npm install && cd ../.. && \ + cd notification/src && npm install && cd ../.. && \ + cd interface-service/src && npm install && cd ../.. && \ + cd scheduler/src && npm install && cd ../.. && \ + cd observation-survey-projects-pwa && npm install --force && cd .. + ``` + + - **Windows** + + ``` + cd project-service && npm install && cd .. + cd user\src && npm install && cd ..\.. + cd notification\src && npm install && cd ..\.. + cd interface-service\src && npm install && cd ..\.. + cd scheduler\src && npm install && cd ..\.. + cd observation-survey-projects-pwa && npm install --force && cd .. + ``` + + > Note: Entity-management service runs only on node-16 for Windows native setup. + + ``` + nvm use 16 + ``` + + ``` + cd entity-management\src && npm install && cd ..\.. + ``` + + > Note: Change the node version as it was before. + +4. **Download Environment Files** + + - **Ubuntu/Linux** + + ``` + curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/project_env && \ + curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/entity_management_env && \ + curl -L -o user/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/user_env && \ + curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env && \ + curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ + curl -L -o scheduler/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/scheduler_env && \ + curl -L -o observation-survey-projects-pwa/src/environments/environment.ts https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/enviroment.ts + ``` + + - **MacOs** + + ``` + curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/project_env && \ + curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/entity_management_env && \ + curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/non-citus/user_env && \ + curl -L -o notification/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/non-citus/notification_env && \ + curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env && \ + curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/scheduler_env && \ + curl -L -o observation-survey-projects-pwa/src/environments/environment.ts https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/enviroment.ts + ``` + + - **Windows** + + ``` + curl -L -o project-service\.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/project_env & + curl -L -o entity-management\src\.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/entity_management_env & + curl -L -o user\src\.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/user_env & + curl -L -o notification\src\.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/notification_env & + curl -L -o interface-service\src\.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/interface_env & + curl -L -o scheduler\src\.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/scheduler_env & + curl -L -o observation-survey-projects-pwa\src\environments\environment.ts https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/enviroment.ts + ``` + + > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. + + > **Caution:** While the default values in the downloaded environment files enable the ELEVATE-Project Application to operate, certain features may not function correctly or could be impaired unless the adopter-specific environment variables are properly configured. + + > **Important:** As mentioned in the above linked document, the **User SignUp** functionality may be compromised if key environment variables are not set correctly during deployment. If you opt to skip this setup, consider using the sample user account generator detailed in the `Sample User Accounts Generation` section of this document. + +5. **Create Databases** + + - **Ubuntu/Linux** + + 1. Download `create-databases.sh` Script File: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/create-databases.sh + ``` + + 2. Make the executable by running the following command: + ``` + chmod +x create-databases.sh + ``` + 3. Run the script file: + ``` + ./create-databases.sh + ``` + + - **MacOs** + + 1. Download `create-databases.sh` Script File: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/macos/create-databases.sh + + ``` + + 2. Make the executable by running the following command: + ``` + chmod +x create-databases.sh + ``` + 3. Run the script file: + ``` + ./create-databases.sh + ``` + + - **Windows** + + 1. Download `create-databases.bat` Script File: + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/windows/create-databases.bat + ``` + 2. Run the script file: + ``` + create-databases.bat + ``` + +6. **Run Migrations To Create Tables** + + - **Ubuntu/Linux/MacOS** + + 1. Run Migrations: + ``` + cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ + cd notification/src && npx sequelize-cli db:migrate && cd ../.. + ``` + + - **Windows** + + 1. Run Migrations: + ``` + cd user\src && npx sequelize-cli db:migrate && cd ..\.. && cd notification\src && npx sequelize-cli db:migrate && cd ..\.. + ``` + +7. **Enabling Citus And Setting Distribution Columns (Optional)** + + To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. + + > NOTE: Currently only available for Linux based operation systems. + + 1. Download user `distributionColumns.sql` file. + + ``` + curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql + ``` + + 2. Set up the `citus_setup` file by following the steps given below. + + - **Ubuntu/Linux** + + 1. Download the `citus_setup.sh` file: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh + + ``` + + 2. Make the setup file executable by running the following command: + + ``` + chmod +x citus_setup.sh + ``` + + 3. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. + ``` + ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users + ``` + +8. **Insert Initial Data** + + - **Ubuntu/Linux/MacOS** + + 1. Download `entity-project-sample-data.sh` Script File: + + 1.1. For ubuntu/linux + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/entity-project-sample-data.sh + ``` + + 1.1. For mac + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/macos/entity-project-sample-data.sh + ``` + + 2. Make the executable by running the following command: + ``` + chmod +x entity-project-sample-data.sh + ``` + 3. Run the script file: + ``` + ./entity-project-sample-data.sh + ``` + 4. Run seeders of user service + ``` + cd user/src && npm run db:seed:all && cd ../.. + ``` + + - **Windows** + + 1. Download `entity-project-sample-data.bat` Script File: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/windows/entity-project-sample-data.bat + ``` + + 2. Run the script file: + + ``` + entity-project-sample-data.bat + ``` + + 3. Run seeders of user service + + ``` + cd user\src && npm run db:seed:all && cd ..\.. + ``` + +9. **Insert Forms Data into Database** + + - **Ubuntu/Linux/MacOS** + + 1. Download `import_forms.js` Script File And Make the setup file executable by running the following command: + + ``` + curl -s https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/import_forms.js | node + ``` + + - **Windows** + + 1. Download `import_forms_mongo.bat` Script File and execute the file by running the following commands: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/windows/import_forms_mongo.bat + ``` + + ``` + import_forms_mongo.bat + ``` + +10. **Start The Services** + + Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. + + - **Ubuntu/Linux** + + ``` + (cd project-service && pm2 start app.js --name project-service && cd -) && \ + (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ + (cd user/src && pm2 start app.js --name user && cd -) && \ + (cd notification/src && pm2 start app.js --name notification && cd -) && \ + (cd interface-service/src && pm2 start app.js --name interface && cd -) && \ + (cd scheduler/src && pm2 start app.js --name scheduler && cd -) + ``` + + - **MacOs** + + ``` + cd project-service && npx pm2 start app.js -i 2 --name project-service && cd .. && \ + cd entity-management/src && npx pm2 start app.js -i 2 --name entity-management && cd ../.. && \ + cd user/src && npx pm2 start app.js -i 2 --name user && cd ../.. && \ + cd notification/src && npx pm2 start app.js -i 2 --name notification && cd ../.. && \ + cd interface-service/src && npx pm2 start app.js -i 2 --name interface && cd ../.. && \ + cd scheduler/src && npx pm2 start app.js -i 2 --name scheduler && cd ../.. + ``` + + - **Windows** + + ``` + cd project-service && pm2 start app.js --name project-service && cd .. + cd entity-management\src && pm2 start app.js --name entity-management && cd ..\.. + cd user\src && pm2 start app.js --name user && cd ..\.. + cd notification\src && pm2 start app.js --name notification && cd ..\.. + cd interface-service\src && pm2 start app.js --name interface && cd ..\.. + cd scheduler\src && pm2 start app.js --name scheduler && cd ..\.. + ``` + +11. **Run Service Scripts** + + - **Ubuntu/Linux/MacOS** + + ``` + cd user/src/scripts && node insertDefaultOrg.js && node viewsScript.js && cd ../../.. + ``` + + - **Windows** + + ``` + cd user\src\scripts && node insertDefaultOrg.js && node viewsScript.js && cd ..\..\.. + ``` + +12. **Start The Portal** + + ELEVATE-Project portal utilizes Ionic for building the browser bundle, follow the steps given below to install them and start the portal. + + - **Ubuntu/Linux/Windows** + + 1. Install the Ionic framework: + + ``` + npm install -g ionic + ``` + + 2. Install the Ionic client: + + ``` + npm install -g @ionic/cli + ``` + + 3. Navigate to `observation-survey-projects-pwa` directory: + + ``` + cd observation-survey-projects-pwa + ``` + + 4. Run the project on your local system using the following command: + + ``` + ionic serve + ``` + + Navigate to http://localhost:8100 to access the ELEVATE-Project Portal. + +## Sample User Accounts Generation + +During the initial setup of ELEVATE-Project services with the default configuration, you may encounter issues creating new accounts through the regular SignUp flow on the ELEVATE-Project portal. This typically occurs because the default SignUp process includes OTP verification to prevent abuse. Until the notification service is configured correctly to send actual emails, you will not be able to create new accounts. + +In such cases, you can generate sample user accounts using the steps below. This allows you to explore the ELEVATE-Project services and portal immediately after setup. + +> **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. + +- **Ubuntu/Linux** + + ``` + curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/linux/insert_sample_data.sh && \ + chmod +x insert_sample_data.sh && \ + ./insert_sample_data.sh + ``` + +- **MacOS** + + ``` + curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/macos/insert_sample_data.sh && \ + chmod +x insert_sample_data.sh && \ + ./insert_sample_data.sh + ``` + +- **Windows** + + ``` + curl -o insert_sample_data.bat https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/native/scripts/windows/insert_sample_data.bat && ^ + insert_sample_data.bat + ``` + +After successfully running the script mentioned above, the following user accounts will be created and available for login: + +| Email ID | Password | Role | +| ------------------------ | ---------- | ------------------------- | +| aaravpatel@example.com | Password1@ | State Educational Officer | +| arunimareddy@example.com | Password1@ | State Educational Officer | +| devikasingh@example.com | Password1@ | State Educational Officer | + +
+ +## Postman Collections + +- [Projects Service](https://github.com/ELEVATE-Project/project-service/tree/main/api-doc) + +## Adding New Projects to the System + +With implementation scripts, you can seamlessly add new projects to the system. Once a project is successfully added, it becomes visible on the portal, ready for use and interaction. For a comprehensive guide on setting up and using the implementation script, please refer to the [documentation here](https://github.com/ELEVATE-Project/project-service/tree/main/Project-Service-implementation-Script). + + + + + +# Team + + + + + +# Open Source Dependencies + +Several open source dependencies that have aided Projects's development: + +![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) +![Apache Kafka](https://img.shields.io/badge/Apache%20Kafka-000?style=for-the-badge&logo=apachekafka) +![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white) +![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white) +![Git](https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge&logo=git&logoColor=white) + + From 3445d90928792d63136e9b475210da5bf6f300db Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 26 Nov 2025 12:02:43 +0530 Subject: [PATCH 016/119] pushing-for-native --- documentation/3.4.0/dockerized/envs/project_env | 2 +- documentation/3.4.0/native/envs/stand-alone/project_env | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/3.4.0/dockerized/envs/project_env b/documentation/3.4.0/dockerized/envs/project_env index 1ec3d8c2..035d4f37 100644 --- a/documentation/3.4.0/dockerized/envs/project_env +++ b/documentation/3.4.0/dockerized/envs/project_env @@ -28,7 +28,7 @@ PRESIGNED_URL_EXPIRY_IN_SECONDS = 300 DOWNLOADABLE_URL_EXPIRY_IN_SECONDS = 300 DEFAULT_ORGANISATION_CODE = 1 GOTENBERG_URL=http://gotenberg:3000 -API_DOC_URL = "https://project/project/api-doc" +API_DOC_URL="http://project/project/api-doc" INTERFACE_SERVICE_URLL = http://interface:3569 USER_SERVICE_BASE_URL = "/user" ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" diff --git a/documentation/3.4.0/native/envs/stand-alone/project_env b/documentation/3.4.0/native/envs/stand-alone/project_env index f426c33d..59ef2b74 100644 --- a/documentation/3.4.0/native/envs/stand-alone/project_env +++ b/documentation/3.4.0/native/envs/stand-alone/project_env @@ -26,7 +26,7 @@ NO_OF_MINUTES = 30 NO_OF_EXPIRY_TIME = 60 DEFAULT_ORGANISATION_CODE = 1 GOTENBERG_URL=http://localhost:3000 -API_DOC_URL = "https://http://localhost:3569/project/api-doc" +API_DOC_URL="http://http://localhost:3569/project/api-doc" INTERFACE_SERVICE_URL=http://localhost:3569 USER_SERVICE_BASE_URL = "/user" ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" From bcf6346e8d89f7baf7c9ef95406566216742f00f Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 26 Nov 2025 12:18:41 +0530 Subject: [PATCH 017/119] pushing-for-native --- documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index 291ed782..8e55264f 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -64,7 +64,7 @@ done 1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. ``` - curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh ``` > Note : The script will download all the essential files and launch the services in Docker. Once all services are successfully up and running, you can proceed to the next steps. From 45f26b986723e790e4ae420cf96a1856e1192ee9 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 26 Nov 2025 12:35:52 +0530 Subject: [PATCH 018/119] pushing-for-native --- .../dockerFiles/stand-alone/docker-compose-project.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml index 06c7a979..293995dd 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml @@ -72,7 +72,6 @@ services: networks: - project_net user: - build: ./user image: shikshalokamqa/elevate-user:3.3.24 ports: - '3001:3001' From db7aa60f1be44dff5df8d40195c1e5ab23d73b45 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 27 Nov 2025 11:36:36 +0530 Subject: [PATCH 019/119] pushing-for-native --- documentation/3.4.0/dockerized/envs/entity_management_env | 4 ++-- .../scripts/stand-alone/ubuntu/docker-compose-down.sh | 2 +- .../scripts/stand-alone/ubuntu/docker-compose-up.sh | 2 +- .../dockerized/scripts/stand-alone/ubuntu/setup_project.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/documentation/3.4.0/dockerized/envs/entity_management_env b/documentation/3.4.0/dockerized/envs/entity_management_env index 4ec7b4d8..8f530d17 100644 --- a/documentation/3.4.0/dockerized/envs/entity_management_env +++ b/documentation/3.4.0/dockerized/envs/entity_management_env @@ -10,14 +10,14 @@ USER_SERVICE_BASE_URL=/user KAFKA_HEALTH_CHECK_TOPIC=test SERVICE_NAME = elevate-entity-service API_DOC_URL="https://entity-management/entity-management/api-doc" -APPLICATION_HOST=localhost +APPLICATION_HOST=entity_management IS_AUTH_TOKEN_BEARER="false" ADMIN_ACCESS_TOKEN=rwwee3$123 ADMIN_TOKEN_HEADER_NAME="admin-auth-token" INTERFACE_SERVICE_URL=http://interface:3569 KAFKA_HEALTH_CHECK_TOPIC = entity-health-check-topic-check KAFKA_COMMUNICATIONS_ON_OFF = ON -KAFKA_URL = localhost:9092 +KAFKA_URL=kafka:9092 KAFKA_COMMUNICATIONS_ON_OFF = ON KAFKA_GROUP_ID = entity HEALTH_CHECK_DEBUG_MODE = true \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh index 4ca32173..e26ce422 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh @@ -12,4 +12,4 @@ export interface_env="$SCRIPT_DIR/interface_env" export entity_management_env="$SCRIPT_DIR/entity_management_env" # Run docker-compose -docker-compose -f "$SCRIPT_DIR/docker-compose-project.yml" down \ No newline at end of file +docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" down \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh index 7315c530..bbab6136 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh @@ -12,4 +12,4 @@ export interface_env="$SCRIPT_DIR/interface_env" export entity_management_env="$SCRIPT_DIR/entity_management_env" # Run docker-compose -docker-compose -f "$SCRIPT_DIR/docker-compose-project.yml" up \ No newline at end of file +docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" up diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh index abf4293a..275c11d8 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh @@ -13,7 +13,7 @@ log "Docker Compose file downloaded." # Step 2: Download environment files log "Downloading environment files..." curl -L \ - -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/interface_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/interface_env \ -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/entity_management_env \ -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/project_env \ -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/notification_env \ From 221355f08b65bd871069eab86cfc30a85cb7f812 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 27 Nov 2025 11:37:29 +0530 Subject: [PATCH 020/119] pushing-for-native --- documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index 8e55264f..bf3a1d7e 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -28,9 +28,7 @@ The Project building block facilitates the creation and engagement with micro-im # Setup Options -> Note : This guide outlines two setup methods, detailed below. For a quick, beginner-friendly setup and walkthrough of services, it is recommended to use the Dockerized Services & Dependencies setup with the Docker- - - Compose file. +> Note : This guide outlines two setup methods, detailed below. For a quick, beginner-friendly setup and walkthrough of services, it is recommended to use the Dockerized Services & Dependencies setup with the Docker-Compose file. ## Dockerized Services & Dependencies From 34aba70eb00031e38f31830c2b634e29f0d61fc3 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 27 Nov 2025 12:18:17 +0530 Subject: [PATCH 021/119] pushing-for-native --- .../stand-alone/docker-compose-project.yml | 22 +++++-------------- .../setup/docker/stand-alone/ubuntu/README.md | 19 ++++++---------- .../setup/native/stand-alone/ubuntu/README.md | 4 ---- 3 files changed, 13 insertions(+), 32 deletions(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml index 293995dd..50a36f9f 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml @@ -120,21 +120,16 @@ services: depends_on: - kafka - citus - environment: - - KAFKA_HOST=kafka:9092 - - DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/notification networks: - project_net - # env_file: - # - ./notification_env + env_file: + - ./notification_env scheduler: image: shikshalokamqa/elevate-scheduler:2.6.1 ports: - '4000:4000' command: ['nodemon', 'app.js'] - # environment: - # - KAFKA_URL=kafka:9092 depends_on: kafka: condition: service_healthy @@ -145,12 +140,13 @@ services: env_file: - ./scheduler_env interface: - # Update with latest image - # build: ./interface-service image: shikshalokamqa/elevate-interface:3.3.2 ports: - '3569:3569' command: ['node', 'app.js'] + depends_on: + kafka: + condition: service_healthy networks: - project_net env_file: @@ -185,10 +181,6 @@ services: - PGADMIN_DEFAULT_PASSWORD=password networks: - project_net - # logging: - # driver: none - - # Mongo config mongo: image: 'mongo:4.4.14' container_name: project_mongo_1 @@ -201,8 +193,6 @@ services: # - mongo-data:/data/db # logging: # driver: none - - # Gotenberg config gotenberg: image: gotenberg/gotenberg:latest container_name: gotenberg @@ -218,7 +208,7 @@ services: ports: - '7007:7007' volumes: - - /home/user4/Workspace/Docker Image/env.js:/usr/src/app/www/assets/env/env.js + - /home/user4/project/env.js:/usr/src/app/www/assets/env/env.js command: > /bin/bash -c "ionic build --prod && ionic serve --host 0.0.0.0" networks: diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index bf3a1d7e..bfe38e46 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -22,13 +22,7 @@ The Project building block facilitates the creation and engagement with micro-im
-# Supported Operating Systems - -- **Ubuntu (Recommended: Version 20 and above)** - -# Setup Options - -> Note : This guide outlines two setup methods, detailed below. For a quick, beginner-friendly setup and walkthrough of services, it is recommended to use the Dockerized Services & Dependencies setup with the Docker-Compose file. +# Docker Setup - Stand Alone ## Dockerized Services & Dependencies @@ -60,7 +54,7 @@ for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 2707 3569; do done ``` -1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. +1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. ``` curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh ``` @@ -69,15 +63,14 @@ done > **General Instructions :** -1. All containers which are part of the docker-compose can be gracefully stopped by pressing Ctrl + c in the same terminal where the services are running. - -2. All docker containers can be stopped and removed by using below command. +1. All containers which are part of the docker-compose can be gracefully stopped by pressing Ctrl + c in the same terminal where the services are running. +2. All docker containers can be stopped and removed by using below command. ``` sudo ./docker-compose-down.sh ``` -3. All services and dependencies can be started using below command. +3. All services and dependencies can be started using below command. ``` sudo ./docker-compose-up.sh @@ -96,9 +89,11 @@ For more information, refer **[Citus Data](https://www.citusdata.com/)**. To enable the Citus extension for user services, follow these steps. 1. Create a sub-directory named `user` and download `distributionColumns.sql` into it. (Skip this for linux) + ``` mkdir user && curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql ``` + 2. Set up the citus_setup file by following the steps given below. 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index 0b1db95f..b5dcdb6b 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -22,10 +22,6 @@ The Project building block facilitates the creation and engagement with micro-im
-# Supported Operating Systems - -- **Ubuntu (Recommended: Version 20 and above)** - # Native Setup - Stand Alone ## PM2 Managed Services & Natively Installed Dependencies From a1d133fbfc3a798e6e178dc3920e8a38bd6310f9 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 27 Nov 2025 12:22:42 +0530 Subject: [PATCH 022/119] pushing-for-native --- documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index bfe38e46..5694a45d 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -45,7 +45,7 @@ To set up the Project application, ensure you have Docker and Docker Compose ins > **Caution:** Before proceeding, please ensure that the ports given here are available and open. It is essential to verify their availability prior to moving forward. You can run below command in your terminal to check this ``` -for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 2707 3569; do +for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569; do if lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then echo "Port $port is in use" else From 86f2b91d796a6bc6bdaa01c5020b57d00046bf0e Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 27 Nov 2025 14:50:16 +0530 Subject: [PATCH 023/119] pushing-for-native --- .../scripts/stand-alone/ubuntu/docker-compose-down.sh | 2 +- .../dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh index e26ce422..4ca32173 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh @@ -12,4 +12,4 @@ export interface_env="$SCRIPT_DIR/interface_env" export entity_management_env="$SCRIPT_DIR/entity_management_env" # Run docker-compose -docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" down \ No newline at end of file +docker-compose -f "$SCRIPT_DIR/docker-compose-project.yml" down \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh index bbab6136..1cc77024 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh @@ -12,4 +12,4 @@ export interface_env="$SCRIPT_DIR/interface_env" export entity_management_env="$SCRIPT_DIR/entity_management_env" # Run docker-compose -docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" up +docker-compose -f "$SCRIPT_DIR/docker-compose-project.yml" up From 3a88a55449ad4c9edbb27c542795dab66ddcb2d3 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 27 Nov 2025 15:31:30 +0530 Subject: [PATCH 024/119] pushing-for-native --- .../scripts/stand-alone/ubuntu/configFile.json | 11 +++++++++++ .../scripts/stand-alone/ubuntu/setup_project.sh | 2 +- .../native/scripts/stand-alone/ubuntu/configFile.json | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/configFile.json create mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/configFile.json diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/configFile.json b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/configFile.json new file mode 100644 index 00000000..b3d32b2f --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/configFile.json @@ -0,0 +1,11 @@ +{ + "authTokenUserInformation": { + "userId": "data.id", + "userName": "data.name", + "firstName": "data.name", + "organization_id": "data.organization_codes[0]", + "roles": "data.organizations[?code={{organization_id}}].roles", + "organizations": "data.organizations", + "tenant_id": "data.tenant_code" + } +} diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh index 275c11d8..2e0317da 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh @@ -82,7 +82,7 @@ log "sample data scripts downloaded." log "Downloading config.json file..." -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/config.json +curl -L https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/configFile.json -o config.json log "config.json file is downloaded." # Step 13: Run docker-compose-up.sh script diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/configFile.json b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/configFile.json new file mode 100644 index 00000000..b3d32b2f --- /dev/null +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/configFile.json @@ -0,0 +1,11 @@ +{ + "authTokenUserInformation": { + "userId": "data.id", + "userName": "data.name", + "firstName": "data.name", + "organization_id": "data.organization_codes[0]", + "roles": "data.organizations[?code={{organization_id}}].roles", + "organizations": "data.organizations", + "tenant_id": "data.tenant_code" + } +} From 5410ac28208294e8e665878e909b32c8b1540add Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 28 Nov 2025 15:43:53 +0530 Subject: [PATCH 025/119] pushing-for-native --- .../3.4.0/dockerized/envs/project_env | 2 +- .../stand-alone/ubuntu/docker-compose-down.sh | 2 +- .../stand-alone/ubuntu/docker-compose-up.sh | 2 +- .../stand-alone/ubuntu/entity_sampleData.js | 34 ++--- .../stand-alone/ubuntu/insert_sample_data.sh | 13 ++ .../stand-alone/ubuntu/project_sampleData.js | 140 +++++++++--------- .../stand-alone/ubuntu/entity_sampleData.js | 34 ++--- .../stand-alone/ubuntu/insert_sample_data.sh | 14 ++ .../stand-alone/ubuntu/project_sampleData.js | 140 +++++++++--------- 9 files changed, 202 insertions(+), 179 deletions(-) diff --git a/documentation/3.4.0/dockerized/envs/project_env b/documentation/3.4.0/dockerized/envs/project_env index 035d4f37..2494e2b2 100644 --- a/documentation/3.4.0/dockerized/envs/project_env +++ b/documentation/3.4.0/dockerized/envs/project_env @@ -29,7 +29,7 @@ DOWNLOADABLE_URL_EXPIRY_IN_SECONDS = 300 DEFAULT_ORGANISATION_CODE = 1 GOTENBERG_URL=http://gotenberg:3000 API_DOC_URL="http://project/project/api-doc" -INTERFACE_SERVICE_URLL = http://interface:3569 +INTERFACE_SERVICE_URL = http://interface:3569 USER_SERVICE_BASE_URL = "/user" ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" CLOUD_STORAGE_PROVIDER=gcloud diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh index 4ca32173..e26ce422 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh @@ -12,4 +12,4 @@ export interface_env="$SCRIPT_DIR/interface_env" export entity_management_env="$SCRIPT_DIR/entity_management_env" # Run docker-compose -docker-compose -f "$SCRIPT_DIR/docker-compose-project.yml" down \ No newline at end of file +docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" down \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh index 1cc77024..bbab6136 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh @@ -12,4 +12,4 @@ export interface_env="$SCRIPT_DIR/interface_env" export entity_management_env="$SCRIPT_DIR/entity_management_env" # Run docker-compose -docker-compose -f "$SCRIPT_DIR/docker-compose-project.yml" up +docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" up diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js index aebc1cfc..5c2bd2c8 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -15,11 +15,11 @@ let entityType = [ isDeleted: false, name: 'state', toBeMappedToParentEntities: true, - tenantId: 'shikshalokam', + tenantId: 'default', updatedAt: new Date('2025-05-15T07:01:31.680Z'), createdAt: new Date('2025-05-15T07:01:31.680Z'), __v: 0, - orgId: 'sl', + orgId: 'default_code', }, { _id: new ObjectId('6825915197b5680013e6a142'), @@ -35,11 +35,11 @@ let entityType = [ isDeleted: false, name: 'district', toBeMappedToParentEntities: true, - tenantId: 'shikshalokam', + tenantId: 'default', updatedAt: new Date('2025-05-15T07:01:37.892Z'), createdAt: new Date('2025-05-15T07:01:37.892Z'), __v: 0, - orgId: 'sl', + orgId: 'default_code', }, { _id: new ObjectId('682591cc97b5680013e6a15c'), @@ -55,11 +55,11 @@ let entityType = [ isDeleted: false, name: 'professional_role', toBeMappedToParentEntities: true, - tenantId: 'shikshalokam', + tenantId: 'default', updatedAt: new Date('2025-05-15T07:03:40.376Z'), createdAt: new Date('2025-05-15T07:03:40.376Z'), __v: 0, - orgId: 'sl', + orgId: 'default_code', }, { _id: new ObjectId('682591d397b5680013e6a15e'), @@ -75,13 +75,12 @@ let entityType = [ isDeleted: false, name: 'professional_subroles', toBeMappedToParentEntities: true, - tenantId: 'shikshalokam', + tenantId: 'default', updatedAt: new Date('2025-05-15T07:03:47.062Z'), createdAt: new Date('2025-05-15T07:03:47.062Z'), __v: 0, - orgId: 'sl', + orgId: 'default_code', }, - ] let entities = [ @@ -102,8 +101,8 @@ let entities = [ code: '16', locationId: '16', }, - tenantId: 'shikshalokam', - orgId: 'sl', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-06-18T14:29:00.266Z'), createdAt: new Date('2025-06-18T14:08:44.438Z'), __v: 0, @@ -128,8 +127,8 @@ let entities = [ code: 'westTripura', locationId: 'westTripura', }, - tenantId: 'shikshalokam', - orgId: 'sl', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-06-18T14:27:43.218Z'), createdAt: new Date('2025-06-18T14:09:50.337Z'), __v: 0, @@ -173,8 +172,8 @@ let entities = [ code: 'Facilitator', }, userId: '1', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-07-28T12:08:56.065Z'), createdAt: new Date('2025-07-28T12:04:22.011Z'), __v: 0, @@ -209,13 +208,12 @@ let entities = [ code: 'facilitator', }, userId: '1', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-07-29T07:28:05.355Z'), createdAt: new Date('2025-07-28T12:06:54.072Z'), __v: 0, }, - ] module.exports = { diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh index 64da00ee..43ca1ea6 100755 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -21,6 +21,19 @@ psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organi psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + +psql -h localhost -p 5432 -U postgres -d user -c " +UPDATE public.tenants +SET meta = '{ + \"factors\": [\"professional_role\", \"professional_subroles\"], + \"observableEntityKeys\": [\"professional_subroles\"], + \"optional_factors\": [\"state\", \"district\", \"block\", \"cluster\", \"school\"], + \"validationExcludedScopeKeys\": [\"language\", \"gender\"], + \"portalSignInUrl\": \"https://shikshagrah-qa.tekdinext.com/register\" +}' +WHERE code = 'default'; +" + # --- 4. INSERT INTO public.entity_types --- # FIXES: # - Quoted the JSON value for the 'meta' column. diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js index 84184d27..6c815cb2 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js @@ -39,15 +39,15 @@ let solutionData = [ programName: 'custom observation as a task check on oct 14th facilitator', programDescription: 'custom observation as a task check on oct 14th facilitator', status: 'active', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-14T13:11:17.993Z'), createdAt: new Date('2025-10-14T13:10:11.897Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -99,15 +99,15 @@ let solutionData = [ programName: 'custom observation as a task check on oct 10th facilitator', programDescription: 'custom observation as a task check on oct 10th facilitator', status: 'active', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-10T08:40:22.617Z'), createdAt: new Date('2025-10-10T08:39:17.519Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -160,15 +160,15 @@ let solutionData = [ programName: 'Program name is sep 16 9 30', programDescription: 'Description of the Program', status: 'active', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-16T16:17:25.599Z'), createdAt: new Date('2025-09-16T16:17:25.472Z'), __v: 0, scope: { professional_role: ['ALL'], professional_subroles: ['ALL'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['ALL'], district: ['ALL'], block: ['ALL'], @@ -215,15 +215,15 @@ let solutionData = [ programName: 'SUP_as_a_task_test_sept_24_1500', programDescription: 'This is the description of the program.', status: 'active', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-24T09:28:19.783Z'), createdAt: new Date('2025-09-24T09:28:07.900Z'), __v: 0, scope: { professional_role: ['ALL'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['ALL'], district: ['ALL', '6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -273,15 +273,15 @@ let programData = [ state: ['Tripura'], recommendedFor: ['Facilitator'], }, - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-14T13:18:46.936Z'), createdAt: new Date('2025-10-14T13:09:13.649Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -323,15 +323,15 @@ let programData = [ state: ['Tripura'], recommendedFor: ['Facilitator'], }, - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-10T08:44:35.535Z'), createdAt: new Date('2025-10-10T08:23:32.295Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -373,15 +373,15 @@ let programData = [ }, startDate: new Date('2025-07-29T18:30:00.000Z'), endDate: new Date('2026-01-30T18:29:59.000Z'), - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-16T17:06:14.752Z'), createdAt: new Date('2025-09-16T16:17:19.239Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -423,15 +423,15 @@ let programData = [ }, startDate: new Date('2025-07-29T18:30:00.000Z'), endDate: new Date('2025-12-30T18:29:59.000Z'), - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-03T09:20:39.907Z'), createdAt: new Date('2025-09-24T09:27:04.322Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -482,7 +482,7 @@ let projectTemplatesData = [ hasStory: false, text: [], visibility: 'CURRENT', - visibleToOrganizations: ['tan90'], + visibleToOrganizations: ['default_code'], deleted: false, title: 'pro with obsasatask oct 8 facilitator only 2nd', externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', @@ -507,8 +507,8 @@ let projectTemplatesData = [ approaches: '', }, status: 'published', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-14T13:11:17.899Z'), createdAt: new Date('2025-10-14T13:10:11.630Z'), __v: 0, @@ -559,7 +559,7 @@ let projectTemplatesData = [ hasStory: false, text: [], visibility: 'CURRENT', - visibleToOrganizations: ['tan90'], + visibleToOrganizations: ['default_code'], deleted: false, title: 'Testing Project For LED IMP facilitator only', externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', @@ -584,8 +584,8 @@ let projectTemplatesData = [ approaches: '', }, status: 'published', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-10T08:40:22.544Z'), createdAt: new Date('2025-10-10T08:39:17.260Z'), __v: 0, @@ -659,8 +659,8 @@ let projectTemplatesData = [ approaches: '', }, status: 'published', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-16T16:17:25.596Z'), createdAt: new Date('2025-09-16T16:17:25.301Z'), __v: 0, @@ -732,8 +732,8 @@ let projectTemplatesData = [ approaches: '', }, status: 'published', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-24T09:28:14.561Z'), createdAt: new Date('2025-09-24T09:28:03.404Z'), __v: 0, @@ -772,8 +772,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', description: '', sequenceNumber: '2', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -809,8 +809,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', description: '', sequenceNumber: '3', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -853,8 +853,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', description: '', sequenceNumber: '4', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -897,8 +897,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', description: '', sequenceNumber: '5', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -941,8 +941,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', description: '', sequenceNumber: '2', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -978,8 +978,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', description: '', sequenceNumber: '3', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1022,8 +1022,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', description: '', sequenceNumber: '4', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1066,8 +1066,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', description: '', sequenceNumber: '5', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1110,8 +1110,8 @@ let projectTemplateTasksData = [ externalId: 'Task1-1758039445176-1758039445561', description: '', sequenceNumber: '1', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1154,8 +1154,8 @@ let projectTemplateTasksData = [ externalId: 'Task2-1758039445176-1758039445567', description: '', sequenceNumber: '2', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1191,8 +1191,8 @@ let projectTemplateTasksData = [ externalId: 'Task3-1758039445176-1758039445575', description: '', sequenceNumber: '3', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1228,8 +1228,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', description: '', sequenceNumber: '3', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1278,8 +1278,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', description: '', sequenceNumber: '4', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1315,8 +1315,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', description: '', sequenceNumber: '5', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1428,13 +1428,13 @@ let certificateTemplatesData = [ }, }, issuer: { - name: 'Tan90', + name: 'default_code', }, solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-14T13:11:17.793Z'), createdAt: new Date('2025-10-14T13:11:17.628Z'), __v: 0, @@ -1550,13 +1550,13 @@ let certificateTemplatesData = [ }, }, issuer: { - name: 'Tan90', + name: 'default_code', }, solutionId: new ObjectId('68e8c635201642091e014914'), programId: new ObjectId('68e8c284201642091e0148c1'), baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-10T08:40:22.454Z'), createdAt: new Date('2025-10-10T08:40:22.298Z'), __v: 0, @@ -1572,7 +1572,7 @@ let certificateBaseTemplatesData = [ code: 'onelogo_onesign', name: 'onelogo_onesign', url: 'certificate/ef2058a1-92e0-4a63-af5f-b712f992bf90/1/81fc35ad-9519-4ec4-87bb-6cef64b940f0/9-8-2025-1757415647754_sl_s1l1.svg', - tenantId: 'shikshalokam', + tenantId: 'default', orgId: 'slorg', updatedAt: new Date('2025-09-09T11:00:47.878Z'), createdAt: new Date('2025-09-09T11:00:47.878Z'), @@ -1594,7 +1594,7 @@ let projectCategoriesData = [ deleted: false, name: 'teachers', externalId: 'teachers', - tenantId: 'shikshalokam', + tenantId: 'default', orgId: 'slorg', updatedAt: new Date('2025-06-24T17:55:44.720Z'), createdAt: new Date('2025-06-24T17:55:44.720Z'), diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js index aebc1cfc..5c2bd2c8 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -15,11 +15,11 @@ let entityType = [ isDeleted: false, name: 'state', toBeMappedToParentEntities: true, - tenantId: 'shikshalokam', + tenantId: 'default', updatedAt: new Date('2025-05-15T07:01:31.680Z'), createdAt: new Date('2025-05-15T07:01:31.680Z'), __v: 0, - orgId: 'sl', + orgId: 'default_code', }, { _id: new ObjectId('6825915197b5680013e6a142'), @@ -35,11 +35,11 @@ let entityType = [ isDeleted: false, name: 'district', toBeMappedToParentEntities: true, - tenantId: 'shikshalokam', + tenantId: 'default', updatedAt: new Date('2025-05-15T07:01:37.892Z'), createdAt: new Date('2025-05-15T07:01:37.892Z'), __v: 0, - orgId: 'sl', + orgId: 'default_code', }, { _id: new ObjectId('682591cc97b5680013e6a15c'), @@ -55,11 +55,11 @@ let entityType = [ isDeleted: false, name: 'professional_role', toBeMappedToParentEntities: true, - tenantId: 'shikshalokam', + tenantId: 'default', updatedAt: new Date('2025-05-15T07:03:40.376Z'), createdAt: new Date('2025-05-15T07:03:40.376Z'), __v: 0, - orgId: 'sl', + orgId: 'default_code', }, { _id: new ObjectId('682591d397b5680013e6a15e'), @@ -75,13 +75,12 @@ let entityType = [ isDeleted: false, name: 'professional_subroles', toBeMappedToParentEntities: true, - tenantId: 'shikshalokam', + tenantId: 'default', updatedAt: new Date('2025-05-15T07:03:47.062Z'), createdAt: new Date('2025-05-15T07:03:47.062Z'), __v: 0, - orgId: 'sl', + orgId: 'default_code', }, - ] let entities = [ @@ -102,8 +101,8 @@ let entities = [ code: '16', locationId: '16', }, - tenantId: 'shikshalokam', - orgId: 'sl', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-06-18T14:29:00.266Z'), createdAt: new Date('2025-06-18T14:08:44.438Z'), __v: 0, @@ -128,8 +127,8 @@ let entities = [ code: 'westTripura', locationId: 'westTripura', }, - tenantId: 'shikshalokam', - orgId: 'sl', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-06-18T14:27:43.218Z'), createdAt: new Date('2025-06-18T14:09:50.337Z'), __v: 0, @@ -173,8 +172,8 @@ let entities = [ code: 'Facilitator', }, userId: '1', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-07-28T12:08:56.065Z'), createdAt: new Date('2025-07-28T12:04:22.011Z'), __v: 0, @@ -209,13 +208,12 @@ let entities = [ code: 'facilitator', }, userId: '1', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-07-29T07:28:05.355Z'), createdAt: new Date('2025-07-28T12:06:54.072Z'), __v: 0, }, - ] module.exports = { diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh index fb61389e..713c8079 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -12,6 +12,20 @@ sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (3, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (4, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + +sudo -u postgres psql -p 5432 -d user -c " +UPDATE public.tenants +SET meta = '{ + \"factors\": [\"professional_role\", \"professional_subroles\"], + \"observableEntityKeys\": [\"professional_subroles\"], + \"optional_factors\": [\"state\", \"district\", \"block\", \"cluster\", \"school\"], + \"validationExcludedScopeKeys\": [\"language\", \"gender\"], + \"portalSignInUrl\": \"https://shikshagrah-qa.tekdinext.com/register\" +}' +WHERE code = 'default'; +" + + # FIXES: # - Quoted the organization_code and tenant_code variables. sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js index 84184d27..6c815cb2 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js @@ -39,15 +39,15 @@ let solutionData = [ programName: 'custom observation as a task check on oct 14th facilitator', programDescription: 'custom observation as a task check on oct 14th facilitator', status: 'active', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-14T13:11:17.993Z'), createdAt: new Date('2025-10-14T13:10:11.897Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -99,15 +99,15 @@ let solutionData = [ programName: 'custom observation as a task check on oct 10th facilitator', programDescription: 'custom observation as a task check on oct 10th facilitator', status: 'active', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-10T08:40:22.617Z'), createdAt: new Date('2025-10-10T08:39:17.519Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -160,15 +160,15 @@ let solutionData = [ programName: 'Program name is sep 16 9 30', programDescription: 'Description of the Program', status: 'active', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-16T16:17:25.599Z'), createdAt: new Date('2025-09-16T16:17:25.472Z'), __v: 0, scope: { professional_role: ['ALL'], professional_subroles: ['ALL'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['ALL'], district: ['ALL'], block: ['ALL'], @@ -215,15 +215,15 @@ let solutionData = [ programName: 'SUP_as_a_task_test_sept_24_1500', programDescription: 'This is the description of the program.', status: 'active', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-24T09:28:19.783Z'), createdAt: new Date('2025-09-24T09:28:07.900Z'), __v: 0, scope: { professional_role: ['ALL'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['ALL'], district: ['ALL', '6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -273,15 +273,15 @@ let programData = [ state: ['Tripura'], recommendedFor: ['Facilitator'], }, - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-14T13:18:46.936Z'), createdAt: new Date('2025-10-14T13:09:13.649Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -323,15 +323,15 @@ let programData = [ state: ['Tripura'], recommendedFor: ['Facilitator'], }, - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-10T08:44:35.535Z'), createdAt: new Date('2025-10-10T08:23:32.295Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -373,15 +373,15 @@ let programData = [ }, startDate: new Date('2025-07-29T18:30:00.000Z'), endDate: new Date('2026-01-30T18:29:59.000Z'), - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-16T17:06:14.752Z'), createdAt: new Date('2025-09-16T16:17:19.239Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -423,15 +423,15 @@ let programData = [ }, startDate: new Date('2025-07-29T18:30:00.000Z'), endDate: new Date('2025-12-30T18:29:59.000Z'), - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-03T09:20:39.907Z'), createdAt: new Date('2025-09-24T09:27:04.322Z'), __v: 0, scope: { professional_role: ['68876746b19aea00144c2af9'], professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['tan90'], + organizations: ['default_code'], state: ['6852c86c7248c20014b38a4d'], district: ['6852c8ae7248c20014b38a57'], block: ['ALL'], @@ -482,7 +482,7 @@ let projectTemplatesData = [ hasStory: false, text: [], visibility: 'CURRENT', - visibleToOrganizations: ['tan90'], + visibleToOrganizations: ['default_code'], deleted: false, title: 'pro with obsasatask oct 8 facilitator only 2nd', externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', @@ -507,8 +507,8 @@ let projectTemplatesData = [ approaches: '', }, status: 'published', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-14T13:11:17.899Z'), createdAt: new Date('2025-10-14T13:10:11.630Z'), __v: 0, @@ -559,7 +559,7 @@ let projectTemplatesData = [ hasStory: false, text: [], visibility: 'CURRENT', - visibleToOrganizations: ['tan90'], + visibleToOrganizations: ['default_code'], deleted: false, title: 'Testing Project For LED IMP facilitator only', externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', @@ -584,8 +584,8 @@ let projectTemplatesData = [ approaches: '', }, status: 'published', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-10T08:40:22.544Z'), createdAt: new Date('2025-10-10T08:39:17.260Z'), __v: 0, @@ -659,8 +659,8 @@ let projectTemplatesData = [ approaches: '', }, status: 'published', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-16T16:17:25.596Z'), createdAt: new Date('2025-09-16T16:17:25.301Z'), __v: 0, @@ -732,8 +732,8 @@ let projectTemplatesData = [ approaches: '', }, status: 'published', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-09-24T09:28:14.561Z'), createdAt: new Date('2025-09-24T09:28:03.404Z'), __v: 0, @@ -772,8 +772,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', description: '', sequenceNumber: '2', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -809,8 +809,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', description: '', sequenceNumber: '3', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -853,8 +853,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', description: '', sequenceNumber: '4', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -897,8 +897,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', description: '', sequenceNumber: '5', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -941,8 +941,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', description: '', sequenceNumber: '2', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -978,8 +978,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', description: '', sequenceNumber: '3', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1022,8 +1022,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', description: '', sequenceNumber: '4', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1066,8 +1066,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', description: '', sequenceNumber: '5', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1110,8 +1110,8 @@ let projectTemplateTasksData = [ externalId: 'Task1-1758039445176-1758039445561', description: '', sequenceNumber: '1', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1154,8 +1154,8 @@ let projectTemplateTasksData = [ externalId: 'Task2-1758039445176-1758039445567', description: '', sequenceNumber: '2', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1191,8 +1191,8 @@ let projectTemplateTasksData = [ externalId: 'Task3-1758039445176-1758039445575', description: '', sequenceNumber: '3', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1228,8 +1228,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', description: '', sequenceNumber: '3', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1278,8 +1278,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', description: '', sequenceNumber: '4', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1315,8 +1315,8 @@ let projectTemplateTasksData = [ externalId: 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', description: '', sequenceNumber: '5', - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', metaInformation: { hasAParentTask: 'NO', parentTaskOperator: '', @@ -1428,13 +1428,13 @@ let certificateTemplatesData = [ }, }, issuer: { - name: 'Tan90', + name: 'default_code', }, solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-14T13:11:17.793Z'), createdAt: new Date('2025-10-14T13:11:17.628Z'), __v: 0, @@ -1550,13 +1550,13 @@ let certificateTemplatesData = [ }, }, issuer: { - name: 'Tan90', + name: 'default_code', }, solutionId: new ObjectId('68e8c635201642091e014914'), programId: new ObjectId('68e8c284201642091e0148c1'), baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), - tenantId: 'shikshalokam', - orgId: 'tan90', + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date('2025-10-10T08:40:22.454Z'), createdAt: new Date('2025-10-10T08:40:22.298Z'), __v: 0, @@ -1572,7 +1572,7 @@ let certificateBaseTemplatesData = [ code: 'onelogo_onesign', name: 'onelogo_onesign', url: 'certificate/ef2058a1-92e0-4a63-af5f-b712f992bf90/1/81fc35ad-9519-4ec4-87bb-6cef64b940f0/9-8-2025-1757415647754_sl_s1l1.svg', - tenantId: 'shikshalokam', + tenantId: 'default', orgId: 'slorg', updatedAt: new Date('2025-09-09T11:00:47.878Z'), createdAt: new Date('2025-09-09T11:00:47.878Z'), @@ -1594,7 +1594,7 @@ let projectCategoriesData = [ deleted: false, name: 'teachers', externalId: 'teachers', - tenantId: 'shikshalokam', + tenantId: 'default', orgId: 'slorg', updatedAt: new Date('2025-06-24T17:55:44.720Z'), createdAt: new Date('2025-06-24T17:55:44.720Z'), From b3389c9e6d045548b55ba40d70ec712cce6015aa Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 28 Nov 2025 17:06:14 +0530 Subject: [PATCH 026/119] pushing-for-native --- .../ubuntu/insert_sample_solutions.js | 1 + .../stand-alone/ubuntu/project_sampleData.js | 31 +++++++++++++++++-- .../setup/docker/stand-alone/ubuntu/README.md | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js index 82a616ce..e11f9714 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js @@ -42,6 +42,7 @@ async function main({ dataToBeInserted }) { await insertData('certificateTemplates', dataToBeInserted.certificateTemplatesData) await insertData('certificateBaseTemplates', dataToBeInserted.certificateBaseTemplatesData) await insertData('projectCategories', dataToBeInserted.projectCategoriesData) + await insertData('configurations', dataToBeInserted.configurationData) } main({ dataToBeInserted: entityData }) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js index 6c815cb2..f0615b59 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js @@ -57,7 +57,7 @@ let solutionData = [ projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), updatedBy: '1', author: '1', - creator: 'Nevil', + creator: 'Mallanagouda', certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), link: 'f8a8e9ba397a29cf75ad5057db6cb7f9', }, @@ -117,7 +117,7 @@ let solutionData = [ projectTemplateId: new ObjectId('68e8c635201642091e01491c'), updatedBy: '1', author: '1', - creator: 'Nevil', + creator: 'Mallanagouda', certificateTemplateId: new ObjectId('68e8c676201642091e014943'), link: '178ac1fdff5b367ef3335ce0e1665a6c', }, @@ -233,7 +233,7 @@ let solutionData = [ projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), updatedBy: '1', author: '1', - creator: 'Nevil', + creator: 'Mallanagouda', link: 'a0acc357edbcf3287e9767d20a7d9f12', }, ] @@ -1601,6 +1601,30 @@ let projectCategoriesData = [ __v: 0, }, ] + +let configurationData = [ + { + _id: new ObjectId('6825a1982d46aa6df0cc36a8'), + code: 'keysAllowedForTargeting', + __v: 0, + createdAt: new Date('2025-05-15T08:11:04.674Z'), + meta: { + profileKeys: [ + 'state', + 'district', + 'block', + 'cluster', + 'school', + 'professional_role', + 'professional_subroles', + 'roles', + 'subject', + 'organizations', + ], + }, + updatedAt: new Date('2025-05-26T10:56:17.021Z'), + }, +] module.exports = { solutionData, programData, @@ -1609,4 +1633,5 @@ module.exports = { certificateTemplatesData, certificateBaseTemplatesData, projectCategoriesData, + configurationData, } diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index 5694a45d..b7bda030 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -157,7 +157,7 @@ In such cases, you can generate sample user accounts using the steps below. This > **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. ``` -sudo ./insert_sample_data.sh user postgres://postgres:postgres@citus_master:5432/user +sudo chmod +x ./insert_sample_data.sh && sudo ./insert_sample_data.sh user postgres://postgres:postgres@citus_master:5432/user ``` After successfully running the script mentioned above, the following user accounts will be created and available for login: From 8e901dfd7c459c1ccabd59b47b2b7d7dd811bcb9 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 1 Dec 2025 10:41:11 +0530 Subject: [PATCH 027/119] pushing-for-native --- .../distribution-columns/user/distributionColumns.sql | 4 +++- .../3.4.0/setup/docker/stand-alone/ubuntu/README.md | 8 +++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/documentation/3.4.0/distribution-columns/user/distributionColumns.sql b/documentation/3.4.0/distribution-columns/user/distributionColumns.sql index 230fe838..3f7b690d 100644 --- a/documentation/3.4.0/distribution-columns/user/distributionColumns.sql +++ b/documentation/3.4.0/distribution-columns/user/distributionColumns.sql @@ -9,4 +9,6 @@ SELECT create_distributed_table('organization_domains', 'domain'); SELECT create_distributed_table('organization_role_requests','organization_id'); SELECT create_distributed_table('organization_user_invites','organization_id'); SELECT create_distributed_table('users_credentials','email'); -SELECT create_distributed_table('users', 'organization_id'); \ No newline at end of file +SELECT create_distributed_table('users', 'organization_id'); +SELECT create_distributed_table('users', 'user_organizations'); +SELECT create_distributed_table('users', 'user_organization_roles'); \ No newline at end of file diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index b7bda030..12b0160f 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -22,15 +22,13 @@ The Project building block facilitates the creation and engagement with micro-im
-# Docker Setup - Stand Alone - -## Dockerized Services & Dependencies +# Docker Setup Project Service - Stand Alone Expectation: By diligently following the outlined steps, you will successfully establish a fully operational Project application setup, including both the portal and backend services. ## Prerequisites -To set up the Project application, ensure you have Docker and Docker Compose installed on your system. For Ubuntu users, detailed installation instructions for both can be found in the documentation here: [How To Install and Use Docker Compose on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04). To install and use Nodejs in Ubuntu machine, you can follow instructions here: [How To Install Nodejs in Ubuntu](https://nodejs.org/en/download/package-manager). +To set up the Project application, ensure you have Docker and Docker Compose installed on your system. For Linux users, detailed installation instructions for both can be found in the documentation here: [How To Install and Use Docker Compose on Linux](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04). To install and use Nodejs in Linux machine, you can follow instructions here: [How To Install Nodejs in Linux](https://nodejs.org/en/download/package-manager). ## Installation @@ -61,7 +59,7 @@ done > Note : The script will download all the essential files and launch the services in Docker. Once all services are successfully up and running, you can proceed to the next steps. -> **General Instructions :** +**General Instructions :** 1. All containers which are part of the docker-compose can be gracefully stopped by pressing Ctrl + c in the same terminal where the services are running. 2. All docker containers can be stopped and removed by using below command. From e478c797ba2545ec60cd533b5413ec076dd57bd4 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 1 Dec 2025 10:51:25 +0530 Subject: [PATCH 028/119] pushing-for-native --- .../scripts/stand-alone/ubuntu/setup_project.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh index 2e0317da..253cb343 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh @@ -51,21 +51,14 @@ log "Made docker-compose scripts executable." # Step 8: Create user directory and download SQL file log "Creating user directory and downloading distributionColumns.sql..." -mkdir -p user && curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql +mkdir -p user && curl -o ./user/distributionColumns.sql -JL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/distribution-columns/user/distributionColumns.sql log "User directory created and distributionColumns.sql downloaded." # Step 9: Download and make citus_setup.sh executable log "Downloading citus_setup.sh..." -curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/citus_setup.sh +curl -OJL https://github.com/ELEVATE-Project/project-service/blob/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh chmod +x citus_setup.sh -# Step 10: Create sample-data directory and download SQL file -log "Creating sample-data directory and downloading sampleData.sql..." -mkdir -p sample-data/user && \ -curl -L https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/sample-data/mac-linux/user/sampleData.sql -o sample-data/user/sampleData.sql -log "Sample-data directory created and sampleData.sql downloaded." - - # Install MongoDB driver (usually needed if connecting directly to MongoDB/Citus) npm install mongodb From 3f16a33259ac0a3a1d498ec2deeb07b5d163b9ff Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 1 Dec 2025 12:17:10 +0530 Subject: [PATCH 029/119] pushing-for-native --- .../scripts/stand-alone/ubuntu/insert_sample_data.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh index 43ca1ea6..ca9cd603 100755 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -1,9 +1,9 @@ #!/bin/bash -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e4','+91', NULL);" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a767','+91', NULL);" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e0','+91', NULL);" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a700','+91', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','','+91', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','','+91', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','','+91', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','','+91', NULL);" # --- 2. INSERT INTO public.user_organizations --- # FIXES: From 20c46cc707355f138e950df4b1ee5e2c1a243ddb Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 1 Dec 2025 12:36:23 +0530 Subject: [PATCH 030/119] pushing-for-native --- documentation/3.4.0/dockerized/envs/user_env | 3 ++- .../scripts/stand-alone/ubuntu/insert_sample_data.sh | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/documentation/3.4.0/dockerized/envs/user_env b/documentation/3.4.0/dockerized/envs/user_env index ed3e3040..f6287fa2 100644 --- a/documentation/3.4.0/dockerized/envs/user_env +++ b/documentation/3.4.0/dockerized/envs/user_env @@ -78,4 +78,5 @@ CAPTCHA_ENABLE = false RECAPTCHA_SECRET_KEY= "6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" ALLOWED_IDLE_TIME=1200000 APPLICATION_BASE_URL="/user" -ENTITY_MANAGEMENT_SERVICE_BASE_URL="/" \ No newline at end of file +ENTITY_MANAGEMENT_SERVICE_BASE_URL="/" +IS_AUTH_TOKEN_BEARER=false \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh index ca9cd603..dc5e8478 100755 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -1,9 +1,9 @@ #!/bin/bash -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','','+91', NULL);" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','','+91', NULL);" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','','+91', NULL);" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','','+91', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" # --- 2. INSERT INTO public.user_organizations --- # FIXES: From d6ab1a96c4462567c98a7fdb10a002c5d81b8e66 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 1 Dec 2025 16:24:33 +0530 Subject: [PATCH 031/119] with-survey-setup --- .../with-survey/docker-compose-project.yml | 233 + .../3.4.0/dockerized/envs/samiksha_env | 66 + .../scripts/with-survey/ubuntu/citus_setup.sh | 106 + .../with-survey/ubuntu/configFile.json | 11 + .../with-survey/ubuntu/docker-compose-down.sh | 15 + .../with-survey/ubuntu/docker-compose-up.sh | 15 + .../with-survey/ubuntu/entity_sampleData.js | 222 + .../with-survey/ubuntu/insert_sample_data.sh | 49 + .../ubuntu/insert_sample_solutions.js | 79 + .../with-survey/ubuntu/project_sampleData.js | 2109 +++++++ .../with-survey/ubuntu/replace_volume_path.sh | 21 + .../with-survey/ubuntu/setup_project.sh | 84 + .../with-survey/ubuntu/survey_sampleData.js | 4860 +++++++++++++++++ .../setup/docker/stand-alone/ubuntu/README.md | 2 +- .../setup/docker/with-survey/ubuntu/README.md | 217 + 15 files changed, 8088 insertions(+), 1 deletion(-) create mode 100644 documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml create mode 100644 documentation/3.4.0/dockerized/envs/samiksha_env create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/citus_setup.sh create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/configFile.json create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js create mode 100755 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/replace_volume_path.sh create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh create mode 100644 documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js create mode 100644 documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md diff --git a/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml new file mode 100644 index 00000000..caabdfc9 --- /dev/null +++ b/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml @@ -0,0 +1,233 @@ +version: '3' +services: + zookeeper: + image: 'confluentinc/cp-zookeeper:7.3.0' + ports: + - '2181:2181' + environment: + - ALLOW_ANONYMOUS_LOGIN=yes + - ZOOKEEPER_CLIENT_PORT=2181 + - ZOOKEEPER_TICK_TIME=2000 + networks: + - project_net + kafka: + image: 'confluentinc/cp-kafka:7.3.0' + ports: + - '9092:9092' + environment: + KAFKA_BROKER_ID: 1 + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:29092,PLAINTEXT_HOST://0.0.0.0:9092 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + depends_on: + - zookeeper + healthcheck: + test: kafka-topics --bootstrap-server localhost:9092 --list || exit 1 + interval: 10s + timeout: 5s + retries: 9 + networks: + - project_net + redis: + image: 'redis:7.0.0' + restart: 'always' + expose: + - 6379 + healthcheck: + test: ['CMD', 'redis-cli', 'ping'] + interval: 10s + timeout: 5s + retries: 5 + networks: + - project_net + project: + image: shikshalokamqa/elevate-project-service:3.3.6.1 + container_name: project + ports: + - '6000:6000' + environment: + - MONGODB_URL=mongodb://mongo:27017/elevate-project + env_file: + - ./project_env + depends_on: + - mongo + - kafka + volumes: + - ./config.json:/opt/projects/config.json + networks: + - project_net + samiksha: + image: shikshalokamqa/elevate-samiksha-service:3.3.8.1 + ports: + - '4301:4301' + command: ['nodemon', 'dev'] + env_file: + - ./samiksha_env + depends_on: + - mongo + networks: + - project_net + entity_management: + image: shikshalokamqa/elevate-entity-management:3.3.13.1 + ports: + - '5001:5001' + env_file: + - ./entity_management_env + depends_on: + - mongo + volumes: + - ./config.json:/var/src/config.json + networks: + - project_net + user: + image: shikshalokamqa/elevate-user:3.3.24 + ports: + - '3001:3001' + command: > + bash -c "echo 'Waiting for PostgreSQL on citus_master:5432 to accept connections...' && + while ! timeout 1 bash -c 'cat < /dev/null > /dev/tcp/citus_master/5432' 2> /dev/null; do + echo 'Waiting for citus_master to be ready...'; + sleep 1; + done; + echo 'Database is ready.'; + npm run db:init && npm run db:seed:all && + (echo 'Running nodeee' && nodemon app.js &) && + (while ! curl -sSf http://user:3001 > /dev/null; do + sleep 1; + done && echo 'Service is up' && + /bin/bash -c 'cd scripts && echo Running user service scripts && node insertDefaultOrg.js && node viewsScript.js && node -r module-alias/register uploadSampleCSV.js'); + tail -f /dev/null" + depends_on: + - kafka + - citus + - redis + - scheduler + environment: + - DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/user + - KAFKA_URL=kafka:29092 + - REDIS_HOST=redis://redis:6379 + volumes: + - ./user:/usr/src/app + networks: + - project_net + env_file: + - ./user_env + + notification: + image: shikshalokamqa/elevate-notification:2.6.1 + ports: + - '3002:3002' + command: > + bash -c "echo 'Waiting for PostgreSQL on citus_master:5432 to accept connections...' && + while ! timeout 1 bash -c 'cat < /dev/null > /dev/tcp/citus_master/5432' 2> /dev/null; do + echo 'Waiting for citus_master to be ready...'; + sleep 1; + done; + echo 'Database is ready.'; + npm run db:init && nodemon app.js" + depends_on: + - kafka + - citus + networks: + - project_net + env_file: + - ./notification_env + + scheduler: + image: shikshalokamqa/elevate-scheduler:2.6.1 + ports: + - '4000:4000' + command: ['nodemon', 'app.js'] + depends_on: + kafka: + condition: service_healthy + redis: + condition: service_started + networks: + - project_net + env_file: + - ./scheduler_env + interface: + image: shikshalokamqa/elevate-interface:3.3.2 + ports: + - '3569:3569' + command: ['node', 'app.js'] + depends_on: + kafka: + condition: service_healthy + networks: + - project_net + env_file: + - ./interface_env + citus: + image: citusdata/citus:11.2.0 + container_name: 'citus_master' + ports: + - 5432:5432 + expose: + - 5432 + environment: &AUTH + POSTGRES_USER: '${POSTGRES_USER:-postgres}' + POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-postgres}' + PGUSER: '${POSTGRES_USER:-postgres}' + PGPASSWORD: '${POSTGRES_PASSWORD:-postgres}' + POSTGRES_DB: 'postgres' + POSTGRES_HOST_AUTH_METHOD: '${POSTGRES_HOST_AUTH_METHOD:-trust}' + POSTGRES_LOG_STATEMENT: 'all' # Enable query logging (set to 'all' for all queries) + networks: + - project_net + #volumes: + # - citus-data:/var/lib/postgresql/data + pgadmin: + image: dpage/pgadmin4 + container_name: elevate-pgadmin + restart: always + ports: + - '5500:80' + environment: + - PGADMIN_DEFAULT_EMAIL=user@shikshalokam.org + - PGADMIN_DEFAULT_PASSWORD=password + networks: + - project_net + mongo: + image: 'mongo:4.4.14' + container_name: project_mongo_1 + restart: 'always' + ports: + - '27017:27017' + networks: + - project_net + # volumes: + # - mongo-data:/data/db + # logging: + # driver: none + gotenberg: + image: gotenberg/gotenberg:latest + container_name: gotenberg + ports: + - '3003:3000' + networks: + - project_net + restart: 'always' + + portal: + image: shikshalokamqa/elevate-project-obervation-pwa:3.4.0 + container_name: portal + ports: + - '7007:7007' + volumes: + - /home/user4/project/env.js:/usr/src/app/www/assets/env/env.js + command: > + /bin/bash -c "ionic build --prod && ionic serve --host 0.0.0.0" + networks: + - project_net + +networks: + project_net: + external: false +#volumes: +# mongo-data: +# citus-data: diff --git a/documentation/3.4.0/dockerized/envs/samiksha_env b/documentation/3.4.0/dockerized/envs/samiksha_env new file mode 100644 index 00000000..f83e99a4 --- /dev/null +++ b/documentation/3.4.0/dockerized/envs/samiksha_env @@ -0,0 +1,66 @@ +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj +ADMIN_ACCESS_TOKEN=CN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_AUTH_TOKEN=CN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_TOKEN_HEADER_NAME=admin-auth-token +API_DOC_URL=/survey/api-doc +APPLICATION_BASE_URL=/survey/ +APP_PORTAL_BASE_URL=http://portal:7007 +APP_PORTAL_DIRECTORY=/observations/ +AUTH_CONFIG_FILE_PATH=config.json +AUTH_METHOD=native +CLOUD_STORAGE=GCP +CLOUD_STORAGE_ACCOUNTNAME=CLOUD_STORAGE_ACCOUNTNAME +CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private +CLOUD_STORAGE_BUCKET_TYPE=private +CLOUD_STORAGE_PROJECT=sl-dev-project +CLOUD_STORAGE_PROVIDER=gcloud +CLOUD_STORAGE_SECRET=----BEGIN PRIVATE KEY----- +COMPLETED_OBSERVATION_SUBMISSION_TOPIC=elevate_observations_dev +COMPLETED_SUBMISSION_TOPIC=elevate_submissions_dev +COMPLETED_SURVEY_SUBMISSION_TOPIC=elevate_surveys_raw_dev +CSV_REPORTS_PATH=reports +DB=elevate-samiksha +DEFAULT_ORGANISATION_CODE=default_code +ELEVATE_SURVEY_SERVICE_URL=http://samiksha:7007 +ENTITY_BASE_URL=http://entity_management:3569 +ENTITY_MANAGEMENT_SERVICE_URL=http://entity_management:3569/entity-management +GOTENBERG_URL=http://gotenberg:3000 +HOST=localhost +IMPROVEMENT_PROJECT_BASE_URL=http://project:3567 +IMPROVEMENT_PROJECT_SUBMISSION_TOPIC=elevate_project_task_submissions_dev +INCOMPLETE_OBSERVATION_SUBMISSION_TOPIC=elevate_observations_dev +INCOMPLETE_SUBMISSION_TOPIC=elevate_submissions_dev +INCOMPLETE_SURVEY_SUBMISSION_TOPIC=elevate_surveys_raw_dev +INTERFACE_SERVICE_URL=http://interface:3569 +INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj +IS_AUTH_TOKEN_BEARER=false +Instance=ELEVATE +KAFKA_COMMUNICATIONS_ON_OFF=ON +KAFKA_GROUP_ID=dev.survey +KAFKA_HEALTH_CHECK_TOPIC=survey-health-check-topic-check +KAFKA_URL=kafka:9092 +LOG=debug +MOBILE_APPLICATION_APP_TYPE=assessment +MONGODB_URL=mongodb://mongo:27017 +NODE_ENV=development +NOTIFICATIONS_TOPIC=elevate_notifications_dev +ORG_UPDATES_TOPIC=dev.organizationEvent +PORT=4301 +PROGRAM_USER_MAPPING_TOPIC=dev.program +PROJECT_SERVICE_NAME=/project +PUBLIC_FOLDER_PATH=public +REQUEST_TIMEOUT_FOR_REPORTS=600000 +SERVICE_NAME=survey +SERVICE_NAME_HEALTH_CHECK=SamikshaService +SUBMISSION_RATING_QUEUE_TOPIC=elevate_submissions_rating_dev +SUBMISSION_UPDATE_KAFKA_PUSH_ON_OFF=ON +TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC=+05:30 +TOP_LEVEL_ENTITY_TYPE=state +USER_ACCOUNT_EVENT_TOPIC=dev.userCreate +USER_COURSES_SUBMISSION_TOPIC=elevate_user_courses_dev +USER_COURSES_TOPIC=elevate_user_courses_raw +USER_DELETE_ON_OFF=ON +USER_DELETE_TOPIC=dev.userCreate +USER_SERVICE_URL=http://user:3569/user +VALIDATE_ENTITIES=ON +VALIDATE_ROLE=ON diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/citus_setup.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/citus_setup.sh new file mode 100644 index 00000000..861094d4 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/citus_setup.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +# Exit on error +set -e + +# Ensure correct number of arguments are provided +if [ $# -lt 2 ]; then + echo "Error: Folder name and database URL not provided. Usage: $0 " + exit 1 +fi + +# Use the provided folder name +FOLDER_NAME="$1" + +# Check if folder exists +if [ ! -d "$FOLDER_NAME" ]; then + echo "Error: Folder '$FOLDER_NAME' not found." + exit 1 +fi + +# Use the provided database URL +DEV_DATABASE_URL="$2" + +# Extract database credentials and connection details using awk for portability +DB_USER=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $4}') +DB_PASSWORD=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $5}') +DB_HOST=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $6}') +DB_PORT=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{split($7,a,"/"); print a[1]}') +DB_NAME=$(echo $DEV_DATABASE_URL | awk -F '/' '{print $NF}') + +# Log database variables +echo "Extracted Database Variables:" +echo "DB_USER: $DB_USER" +echo "DB_PASSWORD: $DB_PASSWORD" +echo "DB_HOST: $DB_HOST" +echo "DB_PORT: $DB_PORT" +echo "DB_NAME: $DB_NAME" + +# Define the container name (same as DB_HOST) +CONTAINER_NAME="$DB_HOST" + +# Wait for Docker container to be up +echo "Waiting for Docker container '$CONTAINER_NAME' to be up..." +while ! docker inspect "$CONTAINER_NAME" &>/dev/null; do + echo "Waiting for container..." + sleep 1 +done +echo "Container is now up." + +# Wait for PostgreSQL to be ready to accept connections +echo "Waiting for PostgreSQL on '$DB_HOST:$DB_PORT' to accept connections..." +until docker exec "$CONTAINER_NAME" bash -c "pg_isready -h localhost -p $DB_PORT -U $DB_USER"; do + echo "Waiting for database to be ready..." + sleep 1 +done +echo "Database is ready." + +# Function to check if the database exists +check_database() { + docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -p $DB_PORT -lqt | cut -d \| -f 1 | grep -qw '$DB_NAME'" +} + +echo "Checking existence of database '$DB_NAME'..." +until check_database; do + echo "Database '$DB_NAME' does not exist, waiting..." + sleep 5 +done +echo "Database '$DB_NAME' exists, proceeding with script." + +# Retrieve and prepare SQL file operations +DISTRIBUTION_COLUMNS_FILE="$FOLDER_NAME/distributionColumns.sql" +if [ ! -f "$DISTRIBUTION_COLUMNS_FILE" ]; then + echo "Error: distributionColumns.sql not found in folder '$FOLDER_NAME'." + exit 1 +fi +echo "Copying distributionColumns.sql to container '$CONTAINER_NAME'..." +docker cp "$DISTRIBUTION_COLUMNS_FILE" "$CONTAINER_NAME:/distributionColumns.sql" + +echo "Creating Citus extension in the database..." +docker exec --user "$DB_USER" "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -c 'CREATE EXTENSION IF NOT EXISTS citus;'" + +# Function to check if table exists +check_table() { + local table=$1 + local exists=$(docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -t -c \"SELECT EXISTS(SELECT 1 FROM pg_tables WHERE schemaname = 'public' AND tablename = '$table');\"") + exists=$(echo "$exists" | tr -d '[:space:]') # Trim whitespace + echo "Debug: exists result for table $table = '$exists'" # Debug line + [[ "$exists" == "t" ]] # Checking specifically for 't' +} + +# Execute the SQL file with checks for table existence +echo "Creating distribution columns..." +while IFS= read -r line; do + if [[ $line =~ create_distributed_table\(\'([^\']+)\', ]]; then + table="${BASH_REMATCH[1]}" + echo "Checking existence of table '$table'..." + until check_table "$table"; do + echo "Table '$table' does not exist, waiting..." + sleep 1 + done + echo "Table '$table' exists, executing: $line" + docker exec --user "$DB_USER" "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -c \"$line\"" + fi +done <"$DISTRIBUTION_COLUMNS_FILE" + +echo "Citus extension setup complete." \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/configFile.json b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/configFile.json new file mode 100644 index 00000000..b3d32b2f --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/configFile.json @@ -0,0 +1,11 @@ +{ + "authTokenUserInformation": { + "userId": "data.id", + "userName": "data.name", + "firstName": "data.name", + "organization_id": "data.organization_codes[0]", + "roles": "data.organizations[?code={{organization_id}}].roles", + "organizations": "data.organizations", + "tenant_id": "data.tenant_code" + } +} diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh new file mode 100644 index 00000000..e26ce422 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Get the directory of the shell script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Set environment variables +export notification_env="$SCRIPT_DIR/notification_env" +export scheduler_env="$SCRIPT_DIR/scheduler_env" +export project_env="$SCRIPT_DIR/project_env" +export users_env="$SCRIPT_DIR/user_env" +export interface_env="$SCRIPT_DIR/interface_env" +export entity_management_env="$SCRIPT_DIR/entity_management_env" + +# Run docker-compose +docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" down \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh new file mode 100644 index 00000000..bbab6136 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Get the directory of the shell script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Set environment variables +export notification_env="$SCRIPT_DIR/notification_env" +export scheduler_env="$SCRIPT_DIR/scheduler_env" +export project_env="$SCRIPT_DIR/project_env" +export users_env="$SCRIPT_DIR/user_env" +export interface_env="$SCRIPT_DIR/interface_env" +export entity_management_env="$SCRIPT_DIR/entity_management_env" + +# Run docker-compose +docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" up diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js new file mode 100644 index 00000000..5c2bd2c8 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js @@ -0,0 +1,222 @@ +const { ObjectId } = require('mongodb') + +let entityType = [ + { + _id: new ObjectId('6825914b97b5680013e6a140'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'state', + toBeMappedToParentEntities: true, + tenantId: 'default', + updatedAt: new Date('2025-05-15T07:01:31.680Z'), + createdAt: new Date('2025-05-15T07:01:31.680Z'), + __v: 0, + orgId: 'default_code', + }, + { + _id: new ObjectId('6825915197b5680013e6a142'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'district', + toBeMappedToParentEntities: true, + tenantId: 'default', + updatedAt: new Date('2025-05-15T07:01:37.892Z'), + createdAt: new Date('2025-05-15T07:01:37.892Z'), + __v: 0, + orgId: 'default_code', + }, + { + _id: new ObjectId('682591cc97b5680013e6a15c'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'professional_role', + toBeMappedToParentEntities: true, + tenantId: 'default', + updatedAt: new Date('2025-05-15T07:03:40.376Z'), + createdAt: new Date('2025-05-15T07:03:40.376Z'), + __v: 0, + orgId: 'default_code', + }, + { + _id: new ObjectId('682591d397b5680013e6a15e'), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ['district'], + createdBy: '49', + updatedBy: '49', + deleted: false, + isDeleted: false, + name: 'professional_subroles', + toBeMappedToParentEntities: true, + tenantId: 'default', + updatedAt: new Date('2025-05-15T07:03:47.062Z'), + createdAt: new Date('2025-05-15T07:03:47.062Z'), + __v: 0, + orgId: 'default_code', + }, +] + +let entities = [ + { + _id: new ObjectId('6852c86c7248c20014b38a4d'), + metaInformation: { + targetedEntityTypes: [], + externalId: '16', + name: 'Tripura', + }, + childHierarchyPath: ['district', 'block', 'cluster', 'school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: new ObjectId('6825914b97b5680013e6a140'), + entityType: 'state', + registryDetails: { + code: '16', + locationId: '16', + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-06-18T14:29:00.266Z'), + createdAt: new Date('2025-06-18T14:08:44.438Z'), + __v: 0, + groups: { + district: [new ObjectId('6852c8ae7248c20014b38a57')], + }, + }, + { + _id: new ObjectId('6852c8ae7248c20014b38a57'), + metaInformation: { + targetedEntityTypes: [], + externalId: 'westTripura', + name: 'West Tripura', + }, + childHierarchyPath: ['block', 'cluster', 'school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: new ObjectId('6825915197b5680013e6a142'), + entityType: 'district', + registryDetails: { + code: 'westTripura', + locationId: 'westTripura', + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-06-18T14:27:43.218Z'), + createdAt: new Date('2025-06-18T14:09:50.337Z'), + __v: 0, + groups: { + block: [ + new ObjectId('6852c8de7248c20014b38a9d'), + new ObjectId('6852c8de7248c20014b38a9e'), + new ObjectId('6852c8de7248c20014b38a9f'), + new ObjectId('6852c8de7248c20014b38aa0'), + new ObjectId('6852c8de7248c20014b38aa1'), + new ObjectId('6852c8de7248c20014b38aa2'), + new ObjectId('6852c8de7248c20014b38aa3'), + new ObjectId('6852c8de7248c20014b38aa4'), + new ObjectId('6852c8de7248c20014b38aa5'), + new ObjectId('6852c8de7248c20014b38aa6'), + new ObjectId('6852c8de7248c20014b38aa7'), + new ObjectId('6852c8de7248c20014b38aa8'), + ], + }, + }, + { + _id: new ObjectId('68876746b19aea00144c2af9'), + metaInformation: { + targetedEntityTypes: [ + { + entityTypeId: '6825915197b5680013e6a142', + entityType: 'district', + }, + ], + externalId: 'Facilitator', + name: 'Facilitator', + }, + childHierarchyPath: ['professional_role', 'professional_subroles'], + createdBy: '1', + updatedBy: '1', + deleted: false, + entityTypeId: new ObjectId('682591cc97b5680013e6a15c'), + entityType: 'professional_role', + registryDetails: { + locationId: 'Facilitator', + code: 'Facilitator', + }, + userId: '1', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-07-28T12:08:56.065Z'), + createdAt: new Date('2025-07-28T12:04:22.011Z'), + __v: 0, + groups: { + professional_subroles: [new ObjectId('688767deb19aea00144c2b08')], + }, + }, + { + _id: new ObjectId('688767deb19aea00144c2b08'), + metaInformation: { + targetedEntityTypes: [ + { + entityType: 'Handbook1_Activity', + entityTypeId: '688762feb19aea00144c2a81', + }, + { + entityType: 'Handbook2_Activity', + entityTypeId: '68887766b19aea00144c3631', + }, + ], + externalId: 'facilitator', + name: 'Facilitator', + }, + childHierarchyPath: ['professional_subroles'], + createdBy: '1', + updatedBy: '1', + deleted: false, + entityTypeId: new ObjectId('682591d397b5680013e6a15e'), + entityType: 'professional_subroles', + registryDetails: { + locationId: 'facilitator', + code: 'facilitator', + }, + userId: '1', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-07-29T07:28:05.355Z'), + createdAt: new Date('2025-07-28T12:06:54.072Z'), + __v: 0, + }, +] + +module.exports = { + entities, + entityType, +} diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh new file mode 100755 index 00000000..dc5e8478 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" + +# --- 2. INSERT INTO public.user_organizations --- +# FIXES: +# - Quoted the organization_code and tenant_code variables. +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (1, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (2, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (3, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (4, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + +# --- 3. INSERT INTO public.user_organization_roles --- +# FIXES: +# - Quoted the organization_code and tenant_code variables. +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + + +psql -h localhost -p 5432 -U postgres -d user -c " +UPDATE public.tenants +SET meta = '{ + \"factors\": [\"professional_role\", \"professional_subroles\"], + \"observableEntityKeys\": [\"professional_subroles\"], + \"optional_factors\": [\"state\", \"district\", \"block\", \"cluster\", \"school\"], + \"validationExcludedScopeKeys\": [\"language\", \"gender\"], + \"portalSignInUrl\": \"https://shikshagrah-qa.tekdinext.com/register\" +}' +WHERE code = 'default'; +" + +# --- 4. INSERT INTO public.entity_types --- +# FIXES: +# - Quoted the JSON value for the 'meta' column. +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" + +# --- 5. UPDATES and SEQUENCES --- +psql -h localhost -p 5432 -U postgres -d user -c "UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3;" +psql -h localhost -p 5432 -U postgres -d user -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" +psql -h localhost -p 5432 -U postgres -d user -c "SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials;" +psql -h localhost -p 5432 -U postgres -d user -c "SELECT NULL;" + + + diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js new file mode 100644 index 00000000..3a2b1621 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js @@ -0,0 +1,79 @@ +const { MongoClient } = require("mongodb"); + +const url = "mongodb://localhost:27017/"; // MongoDB URL +const dbName = "elevate-project"; +const dbName2 = "elevate-entity"; +const dbName3 = "elevate-samiksha"; +const entityData = require("./entity_sampleData.js"); +const projectData = require("./project_sampleData.js"); +const surveyData = require("./survey_sampleData.js"); + +async function insertData(collectionName, dataFile, curretDB = dbName) { + const client = new MongoClient(url); + + try { + // Connect to MongoDB + await client.connect(); + console.log(`Connected to MongoDB for ${collectionName}`); + + const db = client.db(curretDB); + const collection = db.collection(collectionName); + + // Read the data from the file + const data = dataFile; + + if (!data) { + await client.close(); + return; + } + + const result = await collection.insertMany(data); + //console.log(`Inserted ${result.insertedCount} documents into ${collectionName}`); + } finally { + await client.close(); + } +} + +async function main({ dataToBeInserted }) { + await insertData("entities", dataToBeInserted.entities, dbName2); + await insertData("entityTypes", dataToBeInserted.entityType, dbName2); + await insertData("programs", dataToBeInserted.programData); + await insertData("solutions", dataToBeInserted.solutionData); + await insertData("projectTemplates", dataToBeInserted.projectTemplatesData); + await insertData( + "projectTemplateTasks", + dataToBeInserted.projectTemplateTasksData + ); + await insertData( + "certificateTemplates", + dataToBeInserted.certificateTemplatesData + ); + await insertData( + "certificateBaseTemplates", + dataToBeInserted.certificateBaseTemplatesData + ); + await insertData("projectCategories", dataToBeInserted.projectCategoriesData); + + await insertData("solutions", dataToBeInserted.solutionData, dbName3); + await insertData("criteria", dataToBeInserted.criteriaData, dbName3); + await insertData("criteriaQuestions", dataToBeInserted.criteriaQuestionsData,dbName3); + await insertData("frameworks", dataToBeInserted.frameworkData,dbName3); + await insertData("questions", dataToBeInserted.questionsData,dbName3); + +} + +main({ dataToBeInserted: entityData }) + .then(() => { + console.log("Entity data populated successfully."); + }) + .catch(console.error); +main({ dataToBeInserted: projectData }) + .then(() => { + console.log("project data populated successfully."); + }) + .catch(console.error); +main({ dataToBeInserted: surveyData }) + .then(() => { + console.log("Survey data populated successfully."); + }) + .catch(console.error); diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js new file mode 100644 index 00000000..d3ddeeab --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js @@ -0,0 +1,2109 @@ +const { ObjectId } = require("mongodb"); + +let solutionData = [ + { + _id: new ObjectId("68ee4bb3fb9bee08b93b6d68"), + resourceType: ["Improvement Project Solution"], + language: ["English"], + keywords: ["Improvement Project"], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: "Domains", + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: "USER", + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: + "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", + entityType: "school", + externalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION", + name: "pro with obsasatask oct 8 facilitator only 2nd", + description: "To construct a wired car using a DPDT switch.", + isReusable: false, + startDate: new Date("2025-09-09T00:00:00.000Z"), + endDate: new Date("2026-09-09T18:29:59.000Z"), + subType: "improvementProject", + type: "improvementProject", + programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), + programName: "custom observation as a task check on oct 14th facilitator", + programDescription: + "custom observation as a task check on oct 14th facilitator", + status: "active", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-14T13:11:17.993Z"), + createdAt: new Date("2025-10-14T13:10:11.897Z"), + __v: 0, + scope: { + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["tan90"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + updatedBy: "1", + author: "1", + creator: "Nevil", + certificateTemplateId: new ObjectId("68ee4bf5fb9bee08b93b6d97"), + link: "f8a8e9ba397a29cf75ad5057db6cb7f9", + }, + { + _id: new ObjectId("68e8c635201642091e014914"), + resourceType: ["Improvement Project Solution"], + language: ["English"], + keywords: ["Improvement Project"], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: "Domains", + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: "USER", + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456", + entityType: "school", + externalId: "PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION", + name: "Testing Project For LED IMP facilitator only", + description: "To construct a wired car using a DPDT switch.", + isReusable: false, + startDate: new Date("2025-09-09T00:00:00.000Z"), + endDate: new Date("2026-09-09T18:29:59.000Z"), + subType: "improvementProject", + type: "improvementProject", + programId: new ObjectId("68e8c284201642091e0148c1"), + programName: "custom observation as a task check on oct 10th facilitator", + programDescription: + "custom observation as a task check on oct 10th facilitator", + status: "active", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-10T08:40:22.617Z"), + createdAt: new Date("2025-10-10T08:39:17.519Z"), + __v: 0, + scope: { + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["tan90"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + projectTemplateId: new ObjectId("68e8c635201642091e01491c"), + updatedBy: "1", + author: "1", + creator: "Nevil", + certificateTemplateId: new ObjectId("68e8c676201642091e014943"), + link: "178ac1fdff5b367ef3335ce0e1665a6c", + }, + { + _id: new ObjectId("68c98d9538aee0086ee61096"), + resourceType: ["Improvement Project Solution"], + language: ["English"], + keywords: ["Improvement Project"], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: "Domains", + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: "USER", + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: "ProgramTestKey1", + entityType: "school", + externalId: "ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION", + name: "Project name sep 16 9 30", + description: + "Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.", + isReusable: false, + startDate: new Date("2025-07-29T18:30:00.000Z"), + endDate: new Date("2026-01-30T18:29:59.000Z"), + subType: "improvementProject", + type: "improvementProject", + programId: new ObjectId("68c98d8f38aee0086ee61070"), + programName: "Program name is sep 16 9 30", + programDescription: "Description of the Program", + status: "active", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-09-16T16:17:25.599Z"), + createdAt: new Date("2025-09-16T16:17:25.472Z"), + __v: 0, + scope: { + professional_role: ["ALL"], + professional_subroles: ["ALL"], + organizations: ["tan90"], + state: ["ALL"], + district: ["ALL"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + projectTemplateId: new ObjectId("68c98d9538aee0086ee6109e"), + }, + { + _id: new ObjectId("68d3b9a72ba17cc3cb238821"), + resourceType: ["Improvement Project Solution"], + language: ["English"], + keywords: ["Improvement Project"], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: "Domains", + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: "USER", + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: "SUP_as_a_task_test_sept_24_1500", + entityType: "school", + externalId: "DPDTSCH012025-1758706081315-PROJECT-SOLUTION", + name: "project sup test with obs or sur tasks sep 23 1520", + description: "To construct a wired car using a DPDT switch.", + isReusable: false, + startDate: new Date("2025-07-29T18:30:00.000Z"), + endDate: new Date("2025-12-30T18:29:59.000Z"), + subType: "improvementProject", + type: "improvementProject", + programId: new ObjectId("68d3b9681e09f9b5b1e0693d"), + programName: "SUP_as_a_task_test_sept_24_1500", + programDescription: "This is the description of the program.", + status: "active", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-09-24T09:28:19.783Z"), + createdAt: new Date("2025-09-24T09:28:07.900Z"), + __v: 0, + scope: { + professional_role: ["ALL"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["tan90"], + state: ["ALL"], + district: ["ALL", "6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + projectTemplateId: new ObjectId("68d3b9a92ba17cc3cb238829"), + updatedBy: "1", + author: "1", + creator: "Nevil", + link: "a0acc357edbcf3287e9767d20a7d9f12", + }, + { + _id: new ObjectId("68ee4bb3fb9bee08b93b6d68"), + resourceType: ["Improvement Project Solution"], + language: ["English"], + keywords: ["Improvement Project"], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: "Domains", + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: "USER", + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: + "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", + entityType: "school", + externalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION", + name: "pro with obsasatask oct 8 facilitator only 2nd", + description: "To construct a wired car using a DPDT switch.", + isReusable: false, + startDate: new Date("2025-09-09T00:00:00.000Z"), + endDate: new Date("2026-09-09T18:29:59.000Z"), + subType: "improvementProject", + type: "improvementProject", + programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), + programName: "custom observation as a task check on oct 14th facilitator", + programDescription: + "custom observation as a task check on oct 14th facilitator", + status: "active", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-14T13:11:17.993Z"), + createdAt: new Date("2025-10-14T13:10:11.897Z"), + __v: 0, + scope: { + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["tan90"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + updatedBy: "1", + author: "1", + creator: "Nevil", + certificateTemplateId: new ObjectId("68ee4bf5fb9bee08b93b6d97"), + link: "f8a8e9ba397a29cf75ad5057db6cb7f9", + }, +]; + +let programData = [ + { + _id: new ObjectId("68ee4b79fb9bee08b93b6d34"), + resourceType: ["program"], + language: ["English"], + keywords: ["CBSE", "SQAA"], + concepts: [], + components: [ + { + _id: new ObjectId("68ee4bb3fb9bee08b93b6d68"), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: "active", + owner: "1", + createdBy: "1", + updatedBy: "1", + externalId: "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", + name: "custom observation as a task check on oct 14th facilitator", + description: "custom observation as a task check on oct 14th facilitator", + startDate: new Date("2025-09-08T18:30:00.000Z"), + endDate: new Date("2026-09-09T18:29:59.000Z"), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ["Tripura"], + recommendedFor: ["Facilitator"], + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-14T13:18:46.936Z"), + createdAt: new Date("2025-10-14T13:09:13.649Z"), + __v: 0, + scope: { + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["tan90"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + }, + { + _id: new ObjectId("68e8c284201642091e0148c1"), + resourceType: ["program"], + language: ["English"], + keywords: ["CBSE", "SQAA"], + concepts: [], + components: [ + { + _id: new ObjectId("68e8c635201642091e014914"), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: "active", + owner: "1", + createdBy: "1", + updatedBy: "1", + externalId: "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456", + name: "custom observation as a task check on oct 10th facilitator", + description: "custom observation as a task check on oct 10th facilitator", + startDate: new Date("2025-09-08T18:30:00.000Z"), + endDate: new Date("2026-09-09T18:29:59.000Z"), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ["Tripura"], + recommendedFor: ["Facilitator"], + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-10T08:44:35.535Z"), + createdAt: new Date("2025-10-10T08:23:32.295Z"), + __v: 0, + scope: { + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["tan90"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + }, + { + _id: new ObjectId("68c98d8f38aee0086ee61070"), + resourceType: ["program"], + language: ["English"], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId("68c98d9538aee0086ee61096"), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: "active", + owner: "1", + createdBy: "1", + updatedBy: "1", + externalId: "ProgramTestKey1", + name: "Program name is sep 16 9 30", + description: "Description of the Program", + metaInformation: { + state: ["Tripura"], + recommendedFor: [ + "functionaries-officials", + "teacher-educators-coordinators", + ], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date("2025-07-29T18:30:00.000Z"), + endDate: new Date("2026-01-30T18:29:59.000Z"), + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-09-16T17:06:14.752Z"), + createdAt: new Date("2025-09-16T16:17:19.239Z"), + __v: 0, + scope: { + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["tan90"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + }, + { + _id: new ObjectId("68d3b9681e09f9b5b1e0693d"), + resourceType: ["program"], + language: ["English"], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId("68d3b9a72ba17cc3cb238821"), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: "active", + owner: "1", + createdBy: "1", + updatedBy: "1", + externalId: "SUP_as_a_task_test_sept_24_1500", + name: "SUP_as_a_task_test_sept_24_1500 oct 3", + description: "This is the description of the program.", + metaInformation: { + state: ["Tripura"], + recommendedFor: ["functionaries-officials"], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date("2025-07-29T18:30:00.000Z"), + endDate: new Date("2025-12-30T18:29:59.000Z"), + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-03T09:20:39.907Z"), + createdAt: new Date("2025-09-24T09:27:04.322Z"), + __v: 0, + scope: { + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["tan90"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + }, + { + _id: new ObjectId("691c1b06e71d83091cf9c336"), + resourceType: ["program"], + language: ["English"], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId("691c1b10e71d83091cf9c35d"), + order: 1, + }, + { + _id: new ObjectId("691c1b17266ef5649ce4104c"), + order: 2, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c474"), + order: 3, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c495"), + order: 4, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c4b6"), + order: 5, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c4da"), + order: 6, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c4fb"), + order: 7, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c51c"), + order: 8, + }, + { + _id: new ObjectId("691c1f96266ef5649ce41171"), + order: 9, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: "active", + owner: "1", + createdBy: "1", + updatedBy: "1", + externalId: "Testing_for_creation_sup_18_11", + name: "Testing for creation sup 18-11", + description: "This is the description of the program.", + metaInformation: { + state: ["Tripura"], + recommendedFor: ["student"], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date("2025-11-16T18:30:00.000Z"), + endDate: new Date("2025-11-28T18:29:59.000Z"), + tenantId: "shikshagrahanew", + orgId: "tripura", + updatedAt: new Date("2025-11-18T07:26:14.940Z"), + createdAt: new Date("2025-11-18T07:06:46.613Z"), + __v: 0, + scope: { + professional_role: ["6867a3c10d8d24001465c2d1"], + professional_subroles: ["6867a1420d8d24001465c28f"], + state: ["6863a9941d52e30014093ad9"], + district: ["6863aa5f1d52e30014093b41"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + }, + { + _id: new ObjectId("691b10a0dbb768073d67328c"), + resourceType: ["program"], + language: ["English"], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId("691b141a1ce3f5956e9f30e8"), + order: 1, + }, + { + _id: new ObjectId("691b1783dbb768073d67330d"), + order: 2, + }, + { + _id: new ObjectId("691b1790dbb768073d673366"), + order: 3, + }, + { + _id: new ObjectId("691b179e7b8c31191b8facee"), + order: 4, + }, + { + _id: new ObjectId("691b17ae1ce3f5956e9f319d"), + order: 5, + }, + { + _id: new ObjectId("691b192a1ce3f5956e9f320e"), + order: 6, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: "active", + owner: "1", + createdBy: "1", + updatedBy: "1", + externalId: "Testing_for_creation_sup_17_11", + name: "Testing for creation sup 17-11", + description: "This is the description of the program.", + metaInformation: { + state: ["Tripura"], + recommendedFor: ["student"], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date("2025-11-16T18:30:00.000Z"), + endDate: new Date("2025-11-28T18:29:59.000Z"), + tenantId: "shikshagrahanew", + orgId: "tripura", + updatedAt: new Date("2025-11-17T12:46:34.713Z"), + createdAt: new Date("2025-11-17T12:10:08.914Z"), + __v: 0, + scope: { + professional_role: ["6867a3c10d8d24001465c2d1"], + professional_subroles: ["6867a1420d8d24001465c28f"], + state: ["6863a9941d52e30014093ad9"], + district: ["6863aa5f1d52e30014093b41"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + }, +]; + +let projectTemplatesData = [ + { + _id: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + description: "To construct a wired car using a DPDT switch.", + concepts: [""], + keywords: [ + "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", + ], + isDeleted: false, + recommendedFor: ["Learner"], + tasks: [ + new ObjectId("68ee4bb4fb9bee08b93b6d7a"), + new ObjectId("68ee4bb4fb9bee08b93b6d7e"), + new ObjectId("68ee4bb4fb9bee08b93b6d82"), + new ObjectId("68ee4bb4fb9bee08b93b6d86"), + ], + createdBy: "1", + updatedBy: "1", + learningResources: [], + isReusable: false, + taskSequence: [ + "DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984", + "DPDTSC-HandBook-1-2025-Task2-1760447411369", + "DPDTSC-HandBook-1-2025-Task3-1760447411369", + "DPDTSC-HandBook-1-2025-Task4-1760447411369", + "DPDTSC-HandBook-1-2025-Task5-1760447411369", + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: "CURRENT", + visibleToOrganizations: ["tan90"], + deleted: false, + title: "pro with obsasatask oct 8 facilitator only 2nd", + externalId: "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + categories: [ + { + _id: new ObjectId("685ae6a0cb7c7200145dadae"), + externalId: "teachers", + name: "teachers", + }, + ], + entityType: "", + taskCreationForm: "", + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: "TEMP", + rationale: "", + primaryAudience: "", + duration: "1 year", + successIndicators: "", + risks: "", + approaches: "", + }, + status: "published", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-14T13:11:17.899Z"), + createdAt: new Date("2025-10-14T13:10:11.630Z"), + __v: 0, + solutionId: new ObjectId("68ee4bb3fb9bee08b93b6d68"), + solutionExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION", + programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), + programExternalId: + "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", + parentTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d4c"), + certificateTemplateId: new ObjectId("68ee4bf5fb9bee08b93b6d97"), + }, + { + _id: new ObjectId("68e8c635201642091e01491c"), + description: "To construct a wired car using a DPDT switch.", + concepts: [""], + keywords: [ + "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", + ], + isDeleted: false, + recommendedFor: ["Learner"], + tasks: [ + new ObjectId("68e8c635201642091e014926"), + new ObjectId("68e8c635201642091e01492a"), + new ObjectId("68e8c635201642091e01492e"), + new ObjectId("68e8c635201642091e014932"), + ], + createdBy: "1", + updatedBy: "1", + learningResources: [], + isReusable: false, + taskSequence: [ + "DPDTSC-HandBook-1-2025-Task1-1760085557008-1760085557606", + "DPDTSC-HandBook-1-2025-Task2-1760085557008", + "DPDTSC-HandBook-1-2025-Task3-1760085557008", + "DPDTSC-HandBook-1-2025-Task4-1760085557008", + "DPDTSC-HandBook-1-2025-Task5-1760085557008", + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: "CURRENT", + visibleToOrganizations: ["tan90"], + deleted: false, + title: "Testing Project For LED IMP facilitator only", + externalId: "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", + categories: [ + { + _id: new ObjectId("685ae6a0cb7c7200145dadae"), + externalId: "teachers", + name: "teachers", + }, + ], + entityType: "", + taskCreationForm: "", + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: "TEMP", + rationale: "", + primaryAudience: "", + duration: "1 year", + successIndicators: "", + risks: "", + approaches: "", + }, + status: "published", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-10T08:40:22.544Z"), + createdAt: new Date("2025-10-10T08:39:17.260Z"), + __v: 0, + solutionId: new ObjectId("68e8c635201642091e014914"), + solutionExternalId: + "PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION", + programId: new ObjectId("68e8c284201642091e0148c1"), + programExternalId: "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456", + parentTemplateId: new ObjectId("68e8c635201642091e0148f8"), + certificateTemplateId: new ObjectId("68e8c676201642091e014943"), + }, + { + _id: new ObjectId("68c98d9538aee0086ee6109e"), + description: + "Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.", + concepts: [""], + keywords: [ + "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", + ], + isDeleted: false, + recommendedFor: [""], + tasks: [ + new ObjectId("68c98d9538aee0086ee610a2"), + new ObjectId("68c98d9538aee0086ee610a6"), + new ObjectId("68c98d9538aee0086ee610aa"), + ], + createdBy: "1", + updatedBy: "1", + learningResources: [], + isReusable: false, + taskSequence: [ + "Task1-1758039445176", + "Task2-1758039445176", + "Task3-1758039445176", + "Task4-1758039445176", + "Task5-1758039445176", + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: "Project name sep 16 9 30", + externalId: "ProjectIdtestKey1-1758039445176_IMPORTED", + categories: [ + { + _id: new ObjectId("685ae6a0cb7c7200145dadae"), + externalId: "teachers", + name: "teachers", + }, + ], + entityType: "", + taskCreationForm: "", + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: "TEMP", + rationale: "", + primaryAudience: "", + duration: "1 year", + successIndicators: "", + risks: "", + approaches: "", + }, + status: "published", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-09-16T16:17:25.596Z"), + createdAt: new Date("2025-09-16T16:17:25.301Z"), + __v: 0, + solutionId: new ObjectId("68c98d9538aee0086ee61096"), + solutionExternalId: "ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION", + programId: new ObjectId("68c98d8f38aee0086ee61070"), + programExternalId: "ProgramTestKey1", + parentTemplateId: new ObjectId("68c98d9538aee0086ee6107a"), + }, + { + _id: new ObjectId("68d3b9a92ba17cc3cb238829"), + description: "To construct a wired car using a DPDT switch.", + concepts: [""], + keywords: [ + "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", + ], + isDeleted: false, + recommendedFor: ["Learner"], + tasks: [ + new ObjectId("68d3b9ad2ba17cc3cb238837"), + new ObjectId("68d3b9ad2ba17cc3cb23883b"), + new ObjectId("68d3b9ae2ba17cc3cb23883f"), + ], + createdBy: "1", + updatedBy: "1", + learningResources: [], + isReusable: false, + taskSequence: [ + "DPDTSC-HandBook-1/2025-Task1-1758706081315-1758706089304", + "DPDTSC-HandBook-1/2025-Task2-1758706081315", + "DPDTSC-HandBook-1/2025-Task3-1758706081315", + "DPDTSC-HandBook-1/2025-Task4-1758706081315", + "DPDTSC-HandBook-1/2025-Task5-1758706081315", + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: "project sup test with obs or sur tasks sep 23 1520", + externalId: "DPDTSCH012025-1758706081315_IMPORTED", + categories: [ + { + _id: new ObjectId("685ae6a0cb7c7200145dadae"), + externalId: "teachers", + name: "teachers", + }, + ], + entityType: "", + taskCreationForm: "", + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: "TEMP", + rationale: "", + primaryAudience: "", + duration: "1 year", + successIndicators: "", + risks: "", + approaches: "", + }, + status: "published", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-09-24T09:28:14.561Z"), + createdAt: new Date("2025-09-24T09:28:03.404Z"), + __v: 0, + solutionId: new ObjectId("68d3b9a72ba17cc3cb238821"), + solutionExternalId: "DPDTSCH012025-1758706081315-PROJECT-SOLUTION", + programId: new ObjectId("68d3b9681e09f9b5b1e0693d"), + programExternalId: "SUP_as_a_task_test_sept_24_1500", + parentTemplateId: new ObjectId("68d3b9a32ba17cc3cb238805"), + }, + { + _id: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + description: "To construct a wired car using a DPDT switch.", + concepts: [""], + keywords: [ + "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", + ], + isDeleted: false, + recommendedFor: ["Learner"], + tasks: [ + new ObjectId("68ee4bb4fb9bee08b93b6d75"), + new ObjectId("68ee4bb4fb9bee08b93b6d7a"), + new ObjectId("68ee4bb4fb9bee08b93b6d7e"), + new ObjectId("68ee4bb4fb9bee08b93b6d82"), + new ObjectId("68ee4bb4fb9bee08b93b6d86"), + ], + createdBy: "1", + updatedBy: "1", + learningResources: [], + isReusable: false, + taskSequence: [ + "DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984", + "DPDTSC-HandBook-1-2025-Task2-1760447411369", + "DPDTSC-HandBook-1-2025-Task3-1760447411369", + "DPDTSC-HandBook-1-2025-Task4-1760447411369", + "DPDTSC-HandBook-1-2025-Task5-1760447411369", + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: "CURRENT", + visibleToOrganizations: ["tan90"], + deleted: false, + title: "pro with obsasatask oct 8 facilitator only 2nd", + externalId: "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + categories: [ + { + _id: new ObjectId("685ae6a0cb7c7200145dadae"), + externalId: "teachers", + name: "teachers", + }, + ], + entityType: "", + taskCreationForm: "", + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: "TEMP", + rationale: "", + primaryAudience: "", + duration: "1 year", + successIndicators: "", + risks: "", + approaches: "", + }, + status: "published", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-14T13:11:17.899Z"), + createdAt: new Date("2025-10-14T13:10:11.630Z"), + __v: 0, + solutionId: new ObjectId("68ee4bb3fb9bee08b93b6d68"), + solutionExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION", + programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), + programExternalId: + "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", + parentTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d4c"), + certificateTemplateId: new ObjectId("68ee4bf5fb9bee08b93b6d97"), + }, +]; + +let projectTemplateTasksData = [ + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d7a"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "Activity Steps (Video)", + link: "https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih", + app: "projectService", + id: "MNvM_H9zD3Y?si=BdfslSzCkmDCggih", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Watch the Activity Video", + externalId: "DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188", + description: "", + sequenceNumber: "2", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.192Z"), + createdAt: new Date("2025-10-14T13:10:11.805Z"), + __v: 0, + }, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d7e"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: "simple", + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Conduct the Activity with students", + externalId: "DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197", + description: "", + sequenceNumber: "3", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.202Z"), + createdAt: new Date("2025-10-14T13:10:11.813Z"), + __v: 0, + }, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d82"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "learn", + link: "https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link", + app: "projectService", + id: "view?usp=drive_link", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Conduct the Activity Assessment", + externalId: "DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206", + description: "", + sequenceNumber: "4", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.210Z"), + createdAt: new Date("2025-10-14T13:10:11.825Z"), + __v: 0, + }, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d86"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "walking", + link: "https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing", + app: "projectService", + id: "view?usp=sharing", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: "DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214", + description: "", + sequenceNumber: "5", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.218Z"), + createdAt: new Date("2025-10-14T13:10:11.833Z"), + __v: 0, + }, + { + _id: new ObjectId("68e8c635201642091e014926"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "Activity Steps (Video)", + link: "https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih", + app: "projectService", + id: "MNvM_H9zD3Y?si=BdfslSzCkmDCggih", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68e8c635201642091e01491c"), + projectTemplateExternalId: + "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", + name: "Watch the Activity Video", + externalId: "DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809", + description: "", + sequenceNumber: "2", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2026", + endDate: "31/12/2026", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-10T08:39:17.813Z"), + createdAt: new Date("2025-10-10T08:39:17.430Z"), + __v: 0, + }, + { + _id: new ObjectId("68e8c635201642091e01492a"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: "simple", + projectTemplateId: new ObjectId("68e8c635201642091e01491c"), + projectTemplateExternalId: + "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", + name: "Conduct the Activity with students", + externalId: "DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818", + description: "", + sequenceNumber: "3", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2027", + endDate: "31/12/2027", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-10T08:39:17.822Z"), + createdAt: new Date("2025-10-10T08:39:17.439Z"), + __v: 0, + }, + { + _id: new ObjectId("68e8c635201642091e01492e"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "learn", + link: "https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link", + app: "projectService", + id: "view?usp=drive_link", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68e8c635201642091e01491c"), + projectTemplateExternalId: + "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", + name: "Conduct the Activity Assessment", + externalId: "DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827", + description: "", + sequenceNumber: "4", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2028", + endDate: "31/12/2028", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-10T08:39:17.831Z"), + createdAt: new Date("2025-10-10T08:39:17.449Z"), + __v: 0, + }, + { + _id: new ObjectId("68e8c635201642091e014932"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "walking", + link: "https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing", + app: "projectService", + id: "view?usp=sharing", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68e8c635201642091e01491c"), + projectTemplateExternalId: + "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: "DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835", + description: "", + sequenceNumber: "5", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2029", + endDate: "31/12/2029", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-10T08:39:17.840Z"), + createdAt: new Date("2025-10-10T08:39:17.458Z"), + __v: 0, + }, + { + _id: new ObjectId("68c98d9538aee0086ee610a2"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "Activity Manual (PDF)", + link: "https://docs.google.com/document/d/1NCUdj9nPAz82sPV5q2BJ8At31sFJdSDwocrDCh_g7W0/edit?tab=t.0", + app: "projectService", + id: "edit?tab=t.0", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68c98d9538aee0086ee6109e"), + projectTemplateExternalId: "ProjectIdtestKey1-1758039445176_IMPORTED", + name: "Review the Activity Manual", + externalId: "Task1-1758039445176-1758039445561", + description: "", + sequenceNumber: "1", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "28/07/2025", + endDate: "30/01/2026", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-09-16T16:17:25.564Z"), + createdAt: new Date("2025-09-16T16:17:25.375Z"), + __v: 0, + }, + { + _id: new ObjectId("68c98d9538aee0086ee610a6"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "Activity Steps (Video)", + link: "https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih", + app: "projectService", + id: "MNvM_H9zD3Y?si=BdfslSzCkmDCggih", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68c98d9538aee0086ee6109e"), + projectTemplateExternalId: "ProjectIdtestKey1-1758039445176_IMPORTED", + name: "Watch the Activity Video", + externalId: "Task2-1758039445176-1758039445567", + description: "", + sequenceNumber: "2", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "29/07/2025", + endDate: "30/01/2027", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-09-16T16:17:25.571Z"), + createdAt: new Date("2025-09-16T16:17:25.386Z"), + __v: 0, + }, + { + _id: new ObjectId("68c98d9538aee0086ee610aa"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: "simple", + projectTemplateId: new ObjectId("68c98d9538aee0086ee6109e"), + projectTemplateExternalId: "ProjectIdtestKey1-1758039445176_IMPORTED", + name: "Conduct the Activity with students", + externalId: "Task3-1758039445176-1758039445575", + description: "", + sequenceNumber: "3", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "30/07/2025", + endDate: "30/01/2028", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-09-16T16:17:25.579Z"), + createdAt: new Date("2025-09-16T16:17:25.396Z"), + __v: 0, + }, + { + _id: new ObjectId("68d3b9ad2ba17cc3cb238837"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: "simple", + projectTemplateId: new ObjectId("68d3b9a92ba17cc3cb238829"), + projectTemplateExternalId: "DPDTSCH012025-1758706081315_IMPORTED", + name: "Conduct the Activity with students", + externalId: "DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343", + description: "", + sequenceNumber: "3", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "30/07/2025", + endDate: "30/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-09-24T09:28:13.534Z"), + createdAt: new Date("2025-09-24T09:28:06.227Z"), + __v: 0, + }, + { + _id: new ObjectId("68d3b9ad2ba17cc3cb23883b"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "Activity Assessment (PDF)", + link: "https://sunbirdsaaspublic.blob.core.windows.net/content/content/assets/do_2143687931908833281255/dpdt-switch-car.pdf", + app: "projectService", + id: "dpdt-switch-car.pdf", + }, + { + name: "Activity OMR Sheet (PDF)", + link: "https://drive.google.com/file/d/1-f7Tg8bmZd-xlcxlhfOcf2ZO6vpc6qkH/view", + app: "projectService", + id: "view", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68d3b9a92ba17cc3cb238829"), + projectTemplateExternalId: "DPDTSCH012025-1758706081315_IMPORTED", + name: "Conduct the Activity Assessment", + externalId: "DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849", + description: "", + sequenceNumber: "4", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "30/07/2025", + endDate: "30/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-09-24T09:28:13.967Z"), + createdAt: new Date("2025-09-24T09:28:06.583Z"), + __v: 0, + }, + { + _id: new ObjectId("68d3b9ae2ba17cc3cb23883f"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: "simple", + projectTemplateId: new ObjectId("68d3b9a92ba17cc3cb238829"), + projectTemplateExternalId: "DPDTSCH012025-1758706081315_IMPORTED", + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: "DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241", + description: "", + sequenceNumber: "5", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "30/07/2025", + endDate: "30/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-09-24T09:28:14.374Z"), + createdAt: new Date("2025-09-24T09:28:07.083Z"), + __v: 0, + }, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d75"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: "observation", + solutionDetails: { + type: "observation", + subType: "Social Studies", + _id: "68ee4bb440fd155dceef08a9", + externalId: + "fb34d196-a8fe-11f0-9793-553f35f97dd1-OBSERVATION-TEMPLATE-1760447411986", + name: "obsasatask oct 8 facilitator only 2nd", + isReusable: false, + minNoOfSubmissionsRequired: "2.0", + }, + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Review the Activity Manual", + externalId: "DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984", + description: "", + sequenceNumber: "1", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "True", + minNoOfSubmissionsRequired: "2.0", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.146Z"), + createdAt: new Date("2025-10-14T13:10:11.744Z"), + __v: 0, + }, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d7a"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "Activity Steps (Video)", + link: "https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih", + app: "projectService", + id: "MNvM_H9zD3Y?si=BdfslSzCkmDCggih", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Watch the Activity Video", + externalId: "DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188", + description: "", + sequenceNumber: "2", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.192Z"), + createdAt: new Date("2025-10-14T13:10:11.805Z"), + __v: 0, + }, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d7e"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: "simple", + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Conduct the Activity with students", + externalId: "DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197", + description: "", + sequenceNumber: "3", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.202Z"), + createdAt: new Date("2025-10-14T13:10:11.813Z"), + __v: 0, + }, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d82"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "learn", + link: "https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link", + app: "projectService", + id: "view?usp=drive_link", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Conduct the Activity Assessment", + externalId: "DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206", + description: "", + sequenceNumber: "4", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.210Z"), + createdAt: new Date("2025-10-14T13:10:11.825Z"), + __v: 0, + }, +]; + +let certificateTemplatesData = [ + { + _id: new ObjectId("68ee4bf5fb9bee08b93b6d97"), + status: "active", + deleted: false, + criteria: { + validationText: "Complete validation message", + expression: "C1&&(C3||C4||C5||C6)", + conditions: { + C1: { + validationText: "Submit your project.", + expression: "C1", + conditions: { + C1: { + scope: "project", + key: "status", + operator: "==", + value: "submitted", + }, + }, + }, + C3: { + expression: "C1", + conditions: { + C1: { + scope: "task", + key: "attachments", + function: "count", + filter: { + key: "type", + value: "all", + }, + operator: ">=", + value: 2, + taskDetails: ["68ee4bb3fb9bee08b93b6d53"], + }, + }, + validationText: "Add 2 evidence for any task", + }, + C4: { + expression: "C1", + conditions: { + C1: { + scope: "task", + key: "attachments", + function: "count", + filter: { + key: "type", + value: "all", + }, + operator: ">=", + value: 2, + taskDetails: ["68ee4bb3fb9bee08b93b6d57"], + }, + }, + }, + C5: { + expression: "C1", + conditions: { + C1: { + scope: "task", + key: "attachments", + function: "count", + filter: { + key: "type", + value: "all", + }, + operator: ">=", + value: 2, + taskDetails: ["68ee4bb3fb9bee08b93b6d5b"], + }, + }, + }, + C6: { + expression: "C1", + conditions: { + C1: { + scope: "task", + key: "attachments", + function: "count", + filter: { + key: "type", + value: "all", + }, + operator: ">=", + value: 2, + taskDetails: ["68ee4bb3fb9bee08b93b6d63"], + }, + }, + }, + }, + }, + issuer: { + name: "Tan90", + }, + solutionId: new ObjectId("68ee4bb3fb9bee08b93b6d68"), + programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), + baseTemplateId: new ObjectId("68c008dfd113c30c11f1aca2"), + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-14T13:11:17.793Z"), + createdAt: new Date("2025-10-14T13:11:17.628Z"), + __v: 0, + templateUrl: + "certificate/aa8529e3-6754-4432-a669-72b73d358e2f/1/7042c718-a1bf-43e3-b296-586de247a440/68ee4bf5fb9bee08b93b6d97/14-9-2025-1760447477692_Dowloaded.svg", + }, + { + _id: new ObjectId("68e8c676201642091e014943"), + status: "active", + deleted: false, + criteria: { + validationText: "Complete validation message", + expression: "C1&&(C3||C4||C5||C6||C7)", + conditions: { + C1: { + validationText: "Submit your project.", + expression: "C1", + conditions: { + C1: { + scope: "project", + key: "status", + operator: "==", + value: "submitted", + }, + }, + }, + C3: { + expression: "C1", + conditions: { + C1: { + scope: "task", + key: "attachments", + function: "count", + filter: { + key: "type", + value: "all", + }, + operator: ">=", + value: 2, + taskDetails: ["68e8c635201642091e0148ff"], + }, + }, + validationText: "Add 2 evidence for any task", + }, + C4: { + expression: "C1", + conditions: { + C1: { + scope: "task", + key: "attachments", + function: "count", + filter: { + key: "type", + value: "all", + }, + operator: ">=", + value: 2, + taskDetails: ["68e8c635201642091e014903"], + }, + }, + }, + C5: { + expression: "C1", + conditions: { + C1: { + scope: "task", + key: "attachments", + function: "count", + filter: { + key: "type", + value: "all", + }, + operator: ">=", + value: 2, + taskDetails: ["68e8c635201642091e014907"], + }, + }, + }, + C6: { + expression: "C1", + conditions: { + C1: { + scope: "task", + key: "attachments", + function: "count", + filter: { + key: "type", + value: "all", + }, + operator: ">=", + value: 2, + taskDetails: ["68e8c635201642091e01490b"], + }, + }, + }, + C7: { + expression: "C1", + conditions: { + C1: { + scope: "task", + key: "attachments", + function: "count", + filter: { + key: "type", + value: "all", + }, + operator: ">=", + value: 2, + taskDetails: ["68e8c635201642091e01490f"], + }, + }, + }, + }, + }, + issuer: { + name: "Tan90", + }, + solutionId: new ObjectId("68e8c635201642091e014914"), + programId: new ObjectId("68e8c284201642091e0148c1"), + baseTemplateId: new ObjectId("68c008dfd113c30c11f1aca2"), + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-10-10T08:40:22.454Z"), + createdAt: new Date("2025-10-10T08:40:22.298Z"), + __v: 0, + templateUrl: + "certificate/0bcc856d-0145-448c-8188-300ca3f3250e/1/58cfdf3c-f1a2-4a94-bbb5-21dcd7286913/68e8c676201642091e014943/10-9-2025-1760085622353_Dowloaded.svg", + }, +]; + +let certificateBaseTemplatesData = [ + { + _id: new ObjectId("68c008dfd113c30c11f1aca2"), + deleted: false, + code: "onelogo_onesign", + name: "onelogo_onesign", + url: "certificate/ef2058a1-92e0-4a63-af5f-b712f992bf90/1/81fc35ad-9519-4ec4-87bb-6cef64b940f0/9-8-2025-1757415647754_sl_s1l1.svg", + tenantId: "default", + orgId: "slorg", + updatedAt: new Date("2025-09-09T11:00:47.878Z"), + createdAt: new Date("2025-09-09T11:00:47.878Z"), + __v: 0, + }, +]; + +let projectCategoriesData = [ + { + _id: new ObjectId("685ae6a0cb7c7200145dadae"), + createdBy: "SYSTEM", + updatedBy: "SYSTEM", + isDeleted: false, + isVisible: true, + status: "active", + icon: "", + noOfProjects: 361, + evidences: [], + deleted: false, + name: "teachers", + externalId: "teachers", + tenantId: "default", + orgId: "slorg", + updatedAt: new Date("2025-06-24T17:55:44.720Z"), + createdAt: new Date("2025-06-24T17:55:44.720Z"), + __v: 0, + }, +]; +module.exports = { + solutionData, + programData, + projectTemplatesData, + projectTemplateTasksData, + certificateTemplatesData, + certificateBaseTemplatesData, + projectCategoriesData, +}; diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/replace_volume_path.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/replace_volume_path.sh new file mode 100644 index 00000000..e427fe5e --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/replace_volume_path.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Define the path of your docker-compose file +DOCKER_COMPOSE_FILE="docker-compose-project.yml" + +# Check if the Docker Compose file exists +if [ ! -f "$DOCKER_COMPOSE_FILE" ]; then + echo "Error: Docker Compose file '$DOCKER_COMPOSE_FILE' does not exist." + exit 1 +fi + +# Get the current directory path +CURRENT_DIR=$(pwd) + +# Escape the current directory path to be used in a sed expression +ESCAPED_CURRENT_DIR=$(printf '%s\n' "$CURRENT_DIR" | sed -e 's/[\/&]/\\&/g') + +# Use sed to replace the path leading up to 'env.js' in the docker-compose file +# The pattern ensures that it only replaces the path component up to ':/usr/src/app/www/assets/env/env.js' +sed -i -e "s|/[^:]*\(\/env\.js\):/usr/src/app/www/assets/env/env.js|$ESCAPED_CURRENT_DIR\1:/usr/src/app/www/assets/env/env.js|" "$DOCKER_COMPOSE_FILE" +echo "Updated volume path for 'env.js' in $DOCKER_COMPOSE_FILE" \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh new file mode 100644 index 00000000..253cb343 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +# Logging function +log() { + echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" >> setup_log.txt +} + +# Step 1: Download Docker Compose file +log "Downloading Docker Compose file..." +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +log "Docker Compose file downloaded." + +# Step 2: Download environment files +log "Downloading environment files..." +curl -L \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/interface_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/entity_management_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/project_env \ + -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/notification_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/scheduler_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/user_env \ + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/env.js +log "Environment files downloaded." + +# Step 3: Download replace_volume_path.sh script +log "Downloading replace_volume_path.sh script..." +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/main/documentation/1.0.0/dockerized/scripts/mac-linux/replace_volume_path.sh +log "replace_volume_path.sh script downloaded." + +# Step 4: Make replace_volume_path.sh executable +log "Making replace_volume_path.sh executable..." +chmod +x replace_volume_path.sh +log "Made replace_volume_path.sh executable." + +# Step 5: Run replace_volume_path.sh script +log "Running replace_volume_path.sh script..." +./replace_volume_path.sh +log "replace_volume_path.sh script executed." + +# Step 6: Download additional scripts +log "Downloading docker-compose scripts..." +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh +log "docker-compose scripts downloaded." + +# Step 7: Make the scripts executable +log "Making docker-compose scripts executable..." +chmod +x docker-compose-up.sh +chmod +x docker-compose-down.sh +log "Made docker-compose scripts executable." + +# Step 8: Create user directory and download SQL file +log "Creating user directory and downloading distributionColumns.sql..." +mkdir -p user && curl -o ./user/distributionColumns.sql -JL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/distribution-columns/user/distributionColumns.sql +log "User directory created and distributionColumns.sql downloaded." + +# Step 9: Download and make citus_setup.sh executable +log "Downloading citus_setup.sh..." +curl -OJL https://github.com/ELEVATE-Project/project-service/blob/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh +chmod +x citus_setup.sh + +# Install MongoDB driver (usually needed if connecting directly to MongoDB/Citus) +npm install mongodb + +# Install Mongoose (Object Data Modeling library, if the scripts use it) +npm install mongoose + +# Step 11: Download additional scripts to add data +log "Downloading sample data scripts..." +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh +log "sample data scripts downloaded." + + +log "Downloading config.json file..." +curl -L https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/configFile.json -o config.json +log "config.json file is downloaded." + +# Step 13: Run docker-compose-up.sh script +log "Running docker-compose-up.sh script..." +./docker-compose-up.sh +log "docker-compose-up.sh script executed." diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js new file mode 100644 index 00000000..b3b5b472 --- /dev/null +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js @@ -0,0 +1,4860 @@ +const { ObjectId } = require("mongodb"); + +let solutionData = [ + { + _id: new ObjectId("691c1b17266ef5649ce4104c"), + externalId: "691c1b15266ef5649ce4100d_CHILD", + isReusable: false, + name: "Observation led imp fro sanity 18-11", + description: "Classrom Observation for Selection of Sectors", + author: "1", + parentSolutionId: new ObjectId("691c1b15266ef5649ce4100d"), + resourceType: ["Observations Framework"], + language: ["English"], + keywords: ["Framework", "Observation", "English"], + concepts: [], + scoringSystem: "pointsBasedScoring", + levelToScoreMapping: { + L1: { + points: 10, + label: "Level 1", + }, + L2: { + points: 20, + label: "Level 2", + }, + L3: { + points: 30, + label: "Level 3", + }, + }, + themes: [ + { + name: "Domain 1", + type: "theme", + label: "theme", + externalId: "D1", + weightage: 1, + criteria: [ + { + criteriaId: new ObjectId("691c1b17266ef5649ce41042"), + weightage: 1, + }, + ], + rubric: { + expressionVariables: { + SCORE: "D1.sumOfPointsOfAllChildren()", + }, + levels: { + L1: { + expression: "(20<=SCORE<=35)", + }, + L2: { + expression: "(35 **Caution:** Before proceeding, please ensure that the ports given here are available and open. It is essential to verify their availability prior to moving forward. You can run below command in your terminal to check this ``` -for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569; do +for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569 4301; do if lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then echo "Port $port is in use" else diff --git a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md new file mode 100644 index 00000000..12b0160f --- /dev/null +++ b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md @@ -0,0 +1,217 @@ +
+ +# Projects Service + + + + + +![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/ELEVATE-Project/mentoring?filename=src%2Fpackage.json) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) + + + + +
+The Project building block facilitates the creation and engagement with micro-improvement projects. + +
+
+ +# Docker Setup Project Service - Stand Alone + +Expectation: By diligently following the outlined steps, you will successfully establish a fully operational Project application setup, including both the portal and backend services. + +## Prerequisites + +To set up the Project application, ensure you have Docker and Docker Compose installed on your system. For Linux users, detailed installation instructions for both can be found in the documentation here: [How To Install and Use Docker Compose on Linux](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04). To install and use Nodejs in Linux machine, you can follow instructions here: [How To Install Nodejs in Linux](https://nodejs.org/en/download/package-manager). + +## Installation + +**Create project Directory:** Establish a directory titled **project**. + +> Example Command: `mkdir project && cd project/` + +> Note: All commands are run from the project directory. + +## Operating Systems: Linux + +> **Caution:** Before proceeding, please ensure that the ports given here are available and open. It is essential to verify their availability prior to moving forward. You can run below command in your terminal to check this + +``` +for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569; do + if lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then + echo "Port $port is in use" + else + echo "Port $port is available" + fi +done +``` + +1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh + ``` + +> Note : The script will download all the essential files and launch the services in Docker. Once all services are successfully up and running, you can proceed to the next steps. + +**General Instructions :** + +1. All containers which are part of the docker-compose can be gracefully stopped by pressing Ctrl + c in the same terminal where the services are running. +2. All docker containers can be stopped and removed by using below command. + +``` +sudo ./docker-compose-down.sh +``` + +3. All services and dependencies can be started using below command. + +``` +sudo ./docker-compose-up.sh +``` + +**Keep the current terminal session active, and kindly open a new terminal window within the project directory.** + +**After successfully completing this, please move to the next section: [Enable Citus Extension](#enable-citus-extension-optional)** + +## Enable Citus Extension (Optional) + +User management service comes with this bundle relies on PostgreSQL as its core database system. To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. + +For more information, refer **[Citus Data](https://www.citusdata.com/)**. + +To enable the Citus extension for user services, follow these steps. + +1. Create a sub-directory named `user` and download `distributionColumns.sql` into it. (Skip this for linux) + + ``` + mkdir user && curl -o ./user/distributionColumns.sql -JL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/distribution-columns/user/distributionColumns.sql + ``` + +2. Set up the citus_setup file by following the steps given below. + + 1. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. + + ``` + sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user + ``` + +## Persistence Of Database Data In Docker Container (Optional) + +To ensure the persistence of database data when running `docker compose down`, it is necessary to modify the `docker-compose-project.yml` file according to the steps given below: + +1. **Modification Of The `docker-compose-project.yml` File:** + + Begin by opening the `docker-compose-project.yml` file. Locate the section pertaining to the Citus and mongo container and proceed to uncomment the volume specification. This action is demonstrated in the snippet provided below: + + ```yaml + mongo: + image: 'mongo:4.4.14' + restart: 'always' + ports: + - '27017:27017' + networks: + - project_net + volumes: + - mongo-data:/data/db + logging: + driver: none + + citus: + image: citusdata/citus:11.2.0 + container_name: 'citus_master' + ports: + - 5432:5432 + volumes: + - citus-data:/var/lib/postgresql/data + ``` + +2. **Uncommenting Volume Names Under The Volumes Section:** + + Next, navigate to the volumes section of the file and proceed to uncomment the volume names as illustrated in the subsequent snippet: + + ```yaml + networks: + elevate_net: + external: false + + volumes: + citus-data: + mongo-data: + ``` + +By implementing these adjustments, the configuration ensures that when the `docker-compose down` command is executed, the database data is securely stored within the specified volumes. Consequently, this data will be retained and remain accessible, even after the containers are terminated and subsequently reinstated using the `docker-compose up` command. + +## Sample User Accounts Generation + +During the initial setup of Project services with the default configuration, you may encounter issues creating new accounts through the regular SignUp flow on the project portal. This typically occurs because the default SignUp process includes OTP verification to prevent abuse. Until the notification service is configured correctly to send actual emails, you will not be able to create new accounts. + +In such cases, you can generate sample user accounts using the steps below. This allows you to explore the Project services and portal immediately after setup. + +> **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. + +``` +sudo chmod +x ./insert_sample_data.sh && sudo ./insert_sample_data.sh user postgres://postgres:postgres@citus_master:5432/user +``` + +After successfully running the script mentioned above, the following user accounts will be created and available for login: + +| Email ID | Password | Role | +| ---------------------- | ---------- | ----------------------- | +| mallanagouda@gmail.com | Password1@ | State Education Officer | +| prajwal@gmail.com | Password1@ | State Education Officer | +| vishnu@gmail.com | Password1@ | State Education Officer | + +## Sample Data Creation For Projects + +This step will guide us in implementing a sample project solution following the initial setup of the project service. + +1. **Insert Sample Data To Database:** + + ``` + node insert_sample_solutions.js + ``` + +## Default Forms Creation for Portal Configuration + +This step inserts configuration forms into MongoDB, enabling or disabling features and fields on portal pages. + +#### Insert Forms Data into Database + +``` +curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/import_forms_mongo.sh && chmod +x import_forms_mongo.sh && sudo ./import_forms_mongo.sh mongodb://mongo:27017/elevate-project +``` + +## Explore the Portal + +Once the services are up and the front-end app bundle is built successfully, navigate to **[localhost:7007](http://localhost:7007/)** to access the Project app. + +> **Warning:** In this setup, features such as **Sign-Up, Project Certificate, Project Sharing, and Project PDF Report** will not be available because cloud storage credentials have been masked in the environment files for security reasons. + +## Postman Collections + +- [Projects Service](https://github.com/ELEVATE-Project/project-service/tree/main/api-doc) + +## Adding New Projects to the System + +With implementation scripts, you can seamlessly add new projects to the system. Once a project is successfully added, it becomes visible on the portal, ready for use and interaction. For a comprehensive guide on setting up and using the implementation script, please refer to the [documentation here](https://github.com/ELEVATE-Project/project-service/tree/main/Project-Service-implementation-Script). + +# Team + + + + + +# Open Source Dependencies + +Several open source dependencies that have aided Projects's development: + +![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) +![Apache Kafka](https://img.shields.io/badge/Apache%20Kafka-000?style=for-the-badge&logo=apachekafka) +![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white) +![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white) +![Git](https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge&logo=git&logoColor=white) From 47c7649c15ebf6f2bff21e9fe2a639641b737fde Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 1 Dec 2025 16:39:21 +0530 Subject: [PATCH 032/119] with-survey-setup --- .../with-survey/docker-compose-project.yml | 2 ++ .../with-survey/ubuntu/docker-compose-down.sh | 2 ++ .../with-survey/ubuntu/docker-compose-up.sh | 2 ++ .../with-survey/ubuntu/setup_project.sh | 19 ++++++++++--------- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml index caabdfc9..b7b3c68a 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml @@ -68,6 +68,8 @@ services: - ./samiksha_env depends_on: - mongo + volumes: + - ./config.json:/opt/survey/config.json networks: - project_net entity_management: diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh index e26ce422..921fed2b 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh @@ -10,6 +10,8 @@ export project_env="$SCRIPT_DIR/project_env" export users_env="$SCRIPT_DIR/user_env" export interface_env="$SCRIPT_DIR/interface_env" export entity_management_env="$SCRIPT_DIR/entity_management_env" +export samiksha_env="$SCRIPT_DIR/samiksha_env" + # Run docker-compose docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" down \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh index bbab6136..6aa48422 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh @@ -10,6 +10,8 @@ export project_env="$SCRIPT_DIR/project_env" export users_env="$SCRIPT_DIR/user_env" export interface_env="$SCRIPT_DIR/interface_env" export entity_management_env="$SCRIPT_DIR/entity_management_env" +export samiksha_env="$SCRIPT_DIR/samiksha_env" + # Run docker-compose docker compose -f "$SCRIPT_DIR/docker-compose-project.yml" up diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh index 253cb343..fe213b57 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh @@ -7,7 +7,7 @@ log() { # Step 1: Download Docker Compose file log "Downloading Docker Compose file..." -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml log "Docker Compose file downloaded." # Step 2: Download environment files @@ -19,7 +19,8 @@ curl -L \ -O https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/envs/notification_env \ -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/scheduler_env \ -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/user_env \ - -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/env.js + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/env.js \ + -o https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/envs/samiksha_env log "Environment files downloaded." # Step 3: Download replace_volume_path.sh script @@ -39,8 +40,8 @@ log "replace_volume_path.sh script executed." # Step 6: Download additional scripts log "Downloading docker-compose scripts..." -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-up.sh -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/docker-compose-down.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh log "docker-compose scripts downloaded." # Step 7: Make the scripts executable @@ -67,15 +68,15 @@ npm install mongoose # Step 11: Download additional scripts to add data log "Downloading sample data scripts..." -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh log "sample data scripts downloaded." log "Downloading config.json file..." -curl -L https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/configFile.json -o config.json +curl -L https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/configFile.json -o config.json log "config.json file is downloaded." # Step 13: Run docker-compose-up.sh script From 57dfcf453037a2b5e445481924c32a3715396a35 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 1 Dec 2025 16:42:17 +0530 Subject: [PATCH 033/119] with-survey-setup --- documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md index 12b0160f..3aa17f60 100644 --- a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md @@ -22,7 +22,7 @@ The Project building block facilitates the creation and engagement with micro-im
-# Docker Setup Project Service - Stand Alone +# Docker Setup Project Service - With Survey Expectation: By diligently following the outlined steps, you will successfully establish a fully operational Project application setup, including both the portal and backend services. From 6a7b23dbade0714c56cdb5a9d5b9dd9f4ec5e70a Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 1 Dec 2025 16:44:23 +0530 Subject: [PATCH 034/119] with-survey-setup --- documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md index 3aa17f60..a56baa90 100644 --- a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md @@ -54,7 +54,7 @@ done 1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh ``` > Note : The script will download all the essential files and launch the services in Docker. Once all services are successfully up and running, you can proceed to the next steps. From 2272db136cbd6c20c9c9574e62fcff8e9edda7f2 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 1 Dec 2025 16:49:14 +0530 Subject: [PATCH 035/119] with-survey-setup --- .../dockerized/scripts/with-survey/ubuntu/setup_project.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh index fe213b57..d0f350db 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh @@ -20,7 +20,7 @@ curl -L \ -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/scheduler_env \ -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/user_env \ -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/envs/env.js \ - -o https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/envs/samiksha_env + -O https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/envs/samiksha_env log "Environment files downloaded." # Step 3: Download replace_volume_path.sh script From 1d68d690ac2a5b63677bd21f049906ed01f688d3 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Tue, 2 Dec 2025 16:07:55 +0530 Subject: [PATCH 036/119] fix-for-front-end --- .../dockerFiles/stand-alone/docker-compose-project.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml index 50a36f9f..2e8ae378 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml @@ -203,12 +203,12 @@ services: restart: 'always' portal: - image: shikshalokamqa/elevate-project-obervation-pwa:3.4.0 + image: shikshalokamqa/elevate-project-obervation-pwa:3.4.0.1 container_name: portal ports: - '7007:7007' volumes: - - /home/user4/project/env.js:/usr/src/app/www/assets/env/env.js + - ./env.js:/usr/src/app/www/ml/assets/env/env.js command: > /bin/bash -c "ionic build --prod && ionic serve --host 0.0.0.0" networks: From c1d8c7eb639798b963a03ffaf4a8835d4cccbbfc Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Tue, 2 Dec 2025 16:08:49 +0530 Subject: [PATCH 037/119] fix-for-front-end --- .../dockerFiles/stand-alone/docker-compose-project.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml index 2e8ae378..00a61013 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml @@ -209,8 +209,6 @@ services: - '7007:7007' volumes: - ./env.js:/usr/src/app/www/ml/assets/env/env.js - command: > - /bin/bash -c "ionic build --prod && ionic serve --host 0.0.0.0" networks: - project_net From 0242a0c3fe714153653bc463213fab257d253725 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 5 Dec 2025 12:48:31 +0530 Subject: [PATCH 038/119] push-for-samiksha --- .../with-survey/docker-compose-project.yml | 2 +- .../3.4.0/dockerized/envs/interface_env | 2 +- .../with-survey/ubuntu/project_sampleData.js | 71 ++----------------- .../with-survey/ubuntu/setup_project.sh | 1 + .../with-survey/ubuntu/survey_sampleData.js | 10 +-- 5 files changed, 12 insertions(+), 74 deletions(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml index b7b3c68a..6d08d6ed 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml @@ -69,7 +69,7 @@ services: depends_on: - mongo volumes: - - ./config.json:/opt/survey/config.json + - ./config.json:/opt/samiksha/config.json networks: - project_net entity_management: diff --git a/documentation/3.4.0/dockerized/envs/interface_env b/documentation/3.4.0/dockerized/envs/interface_env index f79f110b..dce6a27a 100644 --- a/documentation/3.4.0/dockerized/envs/interface_env +++ b/documentation/3.4.0/dockerized/envs/interface_env @@ -22,5 +22,5 @@ SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001 SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE -SURVEY_SERVICE_BASE_URL=http://localhost:5007 +SURVEY_SERVICE_BASE_URL=http://samiksha:4301 USER_SERVICE_BASE_URL=http://user:3001 \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js index d3ddeeab..e4b59ffc 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js @@ -59,7 +59,7 @@ let solutionData = [ }, projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), updatedBy: "1", - author: "1", + author: "2", creator: "Nevil", certificateTemplateId: new ObjectId("68ee4bf5fb9bee08b93b6d97"), link: "f8a8e9ba397a29cf75ad5057db6cb7f9", @@ -120,7 +120,7 @@ let solutionData = [ }, projectTemplateId: new ObjectId("68e8c635201642091e01491c"), updatedBy: "1", - author: "1", + author: "2", creator: "Nevil", certificateTemplateId: new ObjectId("68e8c676201642091e014943"), link: "178ac1fdff5b367ef3335ce0e1665a6c", @@ -236,73 +236,10 @@ let solutionData = [ }, projectTemplateId: new ObjectId("68d3b9a92ba17cc3cb238829"), updatedBy: "1", - author: "1", + author: "2", creator: "Nevil", link: "a0acc357edbcf3287e9767d20a7d9f12", - }, - { - _id: new ObjectId("68ee4bb3fb9bee08b93b6d68"), - resourceType: ["Improvement Project Solution"], - language: ["English"], - keywords: ["Improvement Project"], - concepts: [], - themes: [], - flattenedThemes: [], - entities: [], - registry: [], - isRubricDriven: false, - enableQuestionReadOut: false, - captureGpsLocationAtQuestionLevel: false, - isAPrivateProgram: false, - allowMultipleAssessemts: false, - isDeleted: false, - pageHeading: "Domains", - minNoOfSubmissionsRequired: 1, - rootOrganisations: [], - createdFor: [], - submissionLevel: "USER", - availableForPrivateConsumption: true, - parentEntityKey: null, - deleted: false, - programExternalId: - "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", - entityType: "school", - externalId: - "PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION", - name: "pro with obsasatask oct 8 facilitator only 2nd", - description: "To construct a wired car using a DPDT switch.", - isReusable: false, - startDate: new Date("2025-09-09T00:00:00.000Z"), - endDate: new Date("2026-09-09T18:29:59.000Z"), - subType: "improvementProject", - type: "improvementProject", - programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), - programName: "custom observation as a task check on oct 14th facilitator", - programDescription: - "custom observation as a task check on oct 14th facilitator", - status: "active", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-14T13:11:17.993Z"), - createdAt: new Date("2025-10-14T13:10:11.897Z"), - __v: 0, - scope: { - professional_role: ["68876746b19aea00144c2af9"], - professional_subroles: ["688767deb19aea00144c2b08"], - organizations: ["tan90"], - state: ["6852c86c7248c20014b38a4d"], - district: ["6852c8ae7248c20014b38a57"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), - updatedBy: "1", - author: "1", - creator: "Nevil", - certificateTemplateId: new ObjectId("68ee4bf5fb9bee08b93b6d97"), - link: "f8a8e9ba397a29cf75ad5057db6cb7f9", - }, + } ]; let programData = [ diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh index d0f350db..44b2d272 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh @@ -70,6 +70,7 @@ npm install mongoose log "Downloading sample data scripts..." curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh log "sample data scripts downloaded." diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js index b3b5b472..60f0b90c 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js @@ -7,7 +7,7 @@ let solutionData = [ isReusable: false, name: "Observation led imp fro sanity 18-11", description: "Classrom Observation for Selection of Sectors", - author: "1", + author: "2", parentSolutionId: new ObjectId("691c1b15266ef5649ce4100d"), resourceType: ["Observations Framework"], language: ["English"], @@ -252,7 +252,7 @@ let solutionData = [ name: "Observation WOR Testing for sanity 17-11", description: "The Teacher will observe the activity and subsequently fill out a form to track its progress. This process will help identify how many schools have completed the activity, specify which activities have been accomplished in each school, and, if completed, allow stakeholders to provide feedback on the activity.", - author: "1", + author: "2", parentSolutionId: new ObjectId("691b17a71ce3f5956e9f313b"), resourceType: ["Observations Framework"], language: ["English"], @@ -363,7 +363,7 @@ let solutionData = [ name: "Testing Survey for sanity 17-11", description: "To capture user feedback and field insights on implementation effectiveness.", - author: "1", + author: "3", parentSolutionId: new ObjectId("691b179c1ce3f5956e9f30f5"), resourceType: ["Survey Solution"], language: ["English"], @@ -454,7 +454,7 @@ let solutionData = [ name: "Functionality SGTeacher survey within program dates", description: "To capture user feedback and field insights on implementation effectiveness.", - author: "1", + author: "3", parentSolutionId: new ObjectId("691ac8ad7b8c31191b8f9f00"), resourceType: ["Survey Solution"], language: ["English"], @@ -545,7 +545,7 @@ let solutionData = [ isReusable: false, name: "obsasatask oct 8 facilitator only 2nd", description: "obsasatask oct 8 facilitator only 2nd", - author: "1", + author: "3", parentSolutionId: new ObjectId("68ee4b7a40fd155dceef0873"), resourceType: ["Observations Framework"], language: ["English"], From 11ba609cbdb869e4e23c6f4bed0fca6ddc6740a9 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 8 Dec 2025 14:09:18 +0530 Subject: [PATCH 039/119] removed-logs --- .../stand-alone/docker-compose-project.yml | 31 +++- .../ubuntu/insert_sample_solutions.js | 169 +++++++++++++++--- .../stand-alone/ubuntu/project_sampleData.js | 34 ++-- .../stand-alone/ubuntu/setup_project.sh | 2 +- .../ubuntu/insert_sample_solutions.js | 168 ++++++++++++++--- .../stand-alone/ubuntu/project_sampleData.js | 65 ++++--- 6 files changed, 380 insertions(+), 89 deletions(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml index 00a61013..9d533acb 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml @@ -31,6 +31,22 @@ services: retries: 9 networks: - project_net + rabbitmq: + image: rabbitmq:3-management + container_name: rabbitmq + ports: + - '5672:5672' # Standard AMQP port + - '15672:15672' # Management plugin UI port + environment: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + healthcheck: + test: ['CMD', 'rabbitmqctl', 'status'] + interval: 5s + timeout: 10s + retries: 5 + networks: + - project_net redis: image: 'redis:7.0.0' restart: 'always' @@ -106,7 +122,7 @@ services: - ./user_env notification: - image: shikshalokamqa/elevate-notification:2.6.1 + image: ttpldevops/notification ports: - '3002:3002' command: > @@ -116,10 +132,12 @@ services: sleep 1; done; echo 'Database is ready.'; - npm run db:init && nodemon app.js" + npm run db:init && npx nodemon app.js" depends_on: - - kafka - - citus + citus: + condition: service_started + rabbitmq: + condition: service_started networks: - project_net env_file: @@ -166,6 +184,11 @@ services: POSTGRES_DB: 'postgres' POSTGRES_HOST_AUTH_METHOD: '${POSTGRES_HOST_AUTH_METHOD:-trust}' POSTGRES_LOG_STATEMENT: 'all' # Enable query logging (set to 'all' for all queries) + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB'] + interval: 5s + timeout: 3s + retries: 5 networks: - project_net #volumes: diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js index e11f9714..f789eab8 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_solutions.js @@ -6,52 +6,179 @@ const dbName2 = 'elevate-entity' const entityData = require('./entity_sampleData.js') const projectData = require('./project_sampleData.js') -async function insertData(collectionName, dataFile, curretDB = dbName) { +// MongoDB Error Code for Duplicate Key +const DUPLICATE_KEY_ERROR_CODE = 11000 + +// --- UTILITY FUNCTIONS --- + +/** + * Drops the specified collection, effectively deleting all data. + * @param {string} collectionName The name of the collection to drop. + * @param {string} currentDB The name of the database. + */ +async function cleanData(collectionName, currentDB) { + const client = new MongoClient(url) + try { + await client.connect() + const db = client.db(currentDB) + const collection = db.collection(collectionName) + + const exists = await collection.findOne({}) + if (exists) { + await collection.drop() + console.log(`šŸ—‘ļø Successfully dropped collection: ${currentDB}.${collectionName}`) + } else { + // Use .listCollections for a more definitive check if needed, but drop() is usually safe. + console.log(`ā„¹ļø Collection ${collectionName} in ${currentDB} does not exist or is empty. Skipping drop.`) + } + } catch (error) { + // This catches general connection or other drop errors + console.error(`āŒ Error dropping collection ${collectionName} in ${currentDB}: ${error.message}`) + } finally { + await client.close() + } +} + +/** + * Inserts data into the specified collection and provides detailed status messages. + * (This function is kept the same as your previous version for insertion logic) + * @param {string} collectionName The name of the collection. + * @param {Array} dataFile The array of documents to insert. + * @param {string} currentDB The name of the database. + */ +async function insertData(collectionName, dataFile, currentDB = dbName) { const client = new MongoClient(url) try { // Connect to MongoDB await client.connect() - console.log(`Connected to MongoDB for ${collectionName}`) - - const db = client.db(curretDB) + const db = client.db(currentDB) const collection = db.collection(collectionName) - // Read the data from the file const data = dataFile - if (!data) { - await client.close() + if (!data || data.length === 0) { return } - const result = await collection.insertMany(data) - //console.log(`Inserted ${result.insertedCount} documents into ${collectionName}`); + console.log(`\n--- Attempting insertion into: ${currentDB}.${collectionName} ---`) + + const results = [] + + // Use Promise.all with map for concurrent insertion (faster) + await Promise.all( + data.map(async (doc, index) => { + const tempId = doc._id || `(Document Index: ${index})` + + try { + const result = await collection.insertOne(doc) + + // The _id is either the one from the source doc or the generated one + const finalId = result.insertedId || doc._id + + results.push({ + id: finalId, + status: 'SUCCESS', + message: `Document successfully created with _id: ${finalId}`, + }) + } catch (error) { + if (error.code === DUPLICATE_KEY_ERROR_CODE) { + // This typically happens if the document has an _id or a unique index violation + results.push({ + id: tempId, + status: 'DUPLICATE', + message: `The data with identifier ${tempId} is already present in the DB. Please ensure unique identifiers are provided or clean the existing data.`, + }) + } else { + // Catch other errors (e.g., validation failure, connection issues) + results.push({ + id: tempId, + status: 'FAILURE', + message: `Error inserting document ${tempId}: ${error.message}`, + }) + } + } + }) + ) + + // Print the detailed results + results.forEach((res) => { + let message = '' + if (res.status === 'SUCCESS') { + message = `āœ… SUCCESS: ${res.message}` + } else if (res.status === 'DUPLICATE') { + message = `āš ļø DUPLICATE: ${res.message}` + } else { + message = `āŒ FAILURE: ${res.message}` + } + console.log(message) + }) + } catch (globalError) { + console.error(`\nFatal error connecting to or operating on the database: ${globalError.message}`) } finally { await client.close() } } +// --- MAIN EXECUTION LOGIC --- + async function main({ dataToBeInserted }) { - await insertData('entities', dataToBeInserted.entities, dbName2) - await insertData('entityTypes', dataToBeInserted.entityType, dbName2) - await insertData('programs', dataToBeInserted.programData) - await insertData('solutions', dataToBeInserted.solutionData) - await insertData('projectTemplates', dataToBeInserted.projectTemplatesData) - await insertData('projectTemplateTasks', dataToBeInserted.projectTemplateTasksData) - await insertData('certificateTemplates', dataToBeInserted.certificateTemplatesData) - await insertData('certificateBaseTemplates', dataToBeInserted.certificateBaseTemplatesData) - await insertData('projectCategories', dataToBeInserted.projectCategoriesData) - await insertData('configurations', dataToBeInserted.configurationData) + const collectionsToInsert = [ + { name: 'entities', data: dataToBeInserted.entities, db: dbName2 }, + { name: 'entityTypes', data: dataToBeInserted.entityType, db: dbName2 }, + { name: 'programs', data: dataToBeInserted.programData, db: dbName }, + { name: 'solutions', data: dataToBeInserted.solutionData, db: dbName }, + { name: 'projectTemplates', data: dataToBeInserted.projectTemplatesData, db: dbName }, + { name: 'projectTemplateTasks', data: dataToBeInserted.projectTemplateTasksData, db: dbName }, + { name: 'certificateTemplates', data: dataToBeInserted.certificateTemplatesData, db: dbName }, + { name: 'certificateBaseTemplates', data: dataToBeInserted.certificateBaseTemplatesData, db: dbName }, + { name: 'projectCategories', data: dataToBeInserted.projectCategoriesData, db: dbName }, + { name: 'configurations', data: dataToBeInserted.configurationData, db: dbName }, + ] + + console.log(`\n=================================================`) + console.log( + `šŸ—‘ļø Starting CLEANUP for ${dataToBeInserted === entityData ? 'Entity Data' : 'Project Data'} Collections...` + ) + console.log(`=================================================`) + + // 1. CLEANUP PHASE: Drop all relevant collections first + for (const item of collectionsToInsert) { + // Only call cleanData if there is corresponding data to be inserted, to avoid dropping unrelated collections + if (item.data) { + await cleanData(item.name, item.db) + } + } + + console.log(`\n=================================================`) + console.log( + `āž• Starting INSERTION for ${dataToBeInserted === entityData ? 'Entity Data' : 'Project Data'} Collections...` + ) + console.log(`=================================================`) + + // 2. INSERTION PHASE: Insert new data + for (const item of collectionsToInsert) { + if (item.data) { + // The insertData function already handles the database selection via the last argument + await insertData(item.name, item.data, item.db) + } + } } +// --- EXECUTION CALLS --- + main({ dataToBeInserted: entityData }) .then(() => { - console.log('Entity data populated successfully.') + console.log('\n=======================================') + console.log('āœ… Entity data population process finished.') + console.log('=======================================') }) .catch(console.error) + main({ dataToBeInserted: projectData }) .then(() => { - console.log('project data populated successfully.') + console.log('\n=======================================') + console.log('āœ… Project data population process finished.') + console.log('=======================================') }) .catch(console.error) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js index f0615b59..513763ae 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/project_sampleData.js @@ -460,11 +460,10 @@ let projectTemplatesData = [ learningResources: [], isReusable: false, taskSequence: [ - 'DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984', - 'DPDTSC-HandBook-1-2025-Task2-1760447411369', - 'DPDTSC-HandBook-1-2025-Task3-1760447411369', - 'DPDTSC-HandBook-1-2025-Task4-1760447411369', - 'DPDTSC-HandBook-1-2025-Task5-1760447411369', + 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', ], averageRating: 0, noOfRatings: 0, @@ -537,11 +536,10 @@ let projectTemplatesData = [ learningResources: [], isReusable: false, taskSequence: [ - 'DPDTSC-HandBook-1-2025-Task1-1760085557008-1760085557606', - 'DPDTSC-HandBook-1-2025-Task2-1760085557008', - 'DPDTSC-HandBook-1-2025-Task3-1760085557008', - 'DPDTSC-HandBook-1-2025-Task4-1760085557008', - 'DPDTSC-HandBook-1-2025-Task5-1760085557008', + 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', + 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', + 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', + 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', ], averageRating: 0, noOfRatings: 0, @@ -614,11 +612,9 @@ let projectTemplatesData = [ learningResources: [], isReusable: false, taskSequence: [ - 'Task1-1758039445176', - 'Task2-1758039445176', - 'Task3-1758039445176', - 'Task4-1758039445176', - 'Task5-1758039445176', + 'Task1-1758039445176-1758039445561', + 'Task2-1758039445176-1758039445567', + 'Task3-1758039445176-1758039445575', ], averageRating: 0, noOfRatings: 0, @@ -687,11 +683,9 @@ let projectTemplatesData = [ learningResources: [], isReusable: false, taskSequence: [ - 'DPDTSC-HandBook-1/2025-Task1-1758706081315-1758706089304', - 'DPDTSC-HandBook-1/2025-Task2-1758706081315', - 'DPDTSC-HandBook-1/2025-Task3-1758706081315', - 'DPDTSC-HandBook-1/2025-Task4-1758706081315', - 'DPDTSC-HandBook-1/2025-Task5-1758706081315', + 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', + 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', + 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', ], averageRating: 0, noOfRatings: 0, diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh index 253cb343..133bb1bd 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh @@ -56,7 +56,7 @@ log "User directory created and distributionColumns.sql downloaded." # Step 9: Download and make citus_setup.sh executable log "Downloading citus_setup.sh..." -curl -OJL https://github.com/ELEVATE-Project/project-service/blob/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh chmod +x citus_setup.sh # Install MongoDB driver (usually needed if connecting directly to MongoDB/Citus) diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js index 82a616ce..f789eab8 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js @@ -6,51 +6,179 @@ const dbName2 = 'elevate-entity' const entityData = require('./entity_sampleData.js') const projectData = require('./project_sampleData.js') -async function insertData(collectionName, dataFile, curretDB = dbName) { +// MongoDB Error Code for Duplicate Key +const DUPLICATE_KEY_ERROR_CODE = 11000 + +// --- UTILITY FUNCTIONS --- + +/** + * Drops the specified collection, effectively deleting all data. + * @param {string} collectionName The name of the collection to drop. + * @param {string} currentDB The name of the database. + */ +async function cleanData(collectionName, currentDB) { + const client = new MongoClient(url) + try { + await client.connect() + const db = client.db(currentDB) + const collection = db.collection(collectionName) + + const exists = await collection.findOne({}) + if (exists) { + await collection.drop() + console.log(`šŸ—‘ļø Successfully dropped collection: ${currentDB}.${collectionName}`) + } else { + // Use .listCollections for a more definitive check if needed, but drop() is usually safe. + console.log(`ā„¹ļø Collection ${collectionName} in ${currentDB} does not exist or is empty. Skipping drop.`) + } + } catch (error) { + // This catches general connection or other drop errors + console.error(`āŒ Error dropping collection ${collectionName} in ${currentDB}: ${error.message}`) + } finally { + await client.close() + } +} + +/** + * Inserts data into the specified collection and provides detailed status messages. + * (This function is kept the same as your previous version for insertion logic) + * @param {string} collectionName The name of the collection. + * @param {Array} dataFile The array of documents to insert. + * @param {string} currentDB The name of the database. + */ +async function insertData(collectionName, dataFile, currentDB = dbName) { const client = new MongoClient(url) try { // Connect to MongoDB await client.connect() - console.log(`Connected to MongoDB for ${collectionName}`) - - const db = client.db(curretDB) + const db = client.db(currentDB) const collection = db.collection(collectionName) - // Read the data from the file const data = dataFile - if (!data) { - await client.close() + if (!data || data.length === 0) { return } - const result = await collection.insertMany(data) - //console.log(`Inserted ${result.insertedCount} documents into ${collectionName}`); + console.log(`\n--- Attempting insertion into: ${currentDB}.${collectionName} ---`) + + const results = [] + + // Use Promise.all with map for concurrent insertion (faster) + await Promise.all( + data.map(async (doc, index) => { + const tempId = doc._id || `(Document Index: ${index})` + + try { + const result = await collection.insertOne(doc) + + // The _id is either the one from the source doc or the generated one + const finalId = result.insertedId || doc._id + + results.push({ + id: finalId, + status: 'SUCCESS', + message: `Document successfully created with _id: ${finalId}`, + }) + } catch (error) { + if (error.code === DUPLICATE_KEY_ERROR_CODE) { + // This typically happens if the document has an _id or a unique index violation + results.push({ + id: tempId, + status: 'DUPLICATE', + message: `The data with identifier ${tempId} is already present in the DB. Please ensure unique identifiers are provided or clean the existing data.`, + }) + } else { + // Catch other errors (e.g., validation failure, connection issues) + results.push({ + id: tempId, + status: 'FAILURE', + message: `Error inserting document ${tempId}: ${error.message}`, + }) + } + } + }) + ) + + // Print the detailed results + results.forEach((res) => { + let message = '' + if (res.status === 'SUCCESS') { + message = `āœ… SUCCESS: ${res.message}` + } else if (res.status === 'DUPLICATE') { + message = `āš ļø DUPLICATE: ${res.message}` + } else { + message = `āŒ FAILURE: ${res.message}` + } + console.log(message) + }) + } catch (globalError) { + console.error(`\nFatal error connecting to or operating on the database: ${globalError.message}`) } finally { await client.close() } } +// --- MAIN EXECUTION LOGIC --- + async function main({ dataToBeInserted }) { - await insertData('entities', dataToBeInserted.entities, dbName2) - await insertData('entityTypes', dataToBeInserted.entityType, dbName2) - await insertData('programs', dataToBeInserted.programData) - await insertData('solutions', dataToBeInserted.solutionData) - await insertData('projectTemplates', dataToBeInserted.projectTemplatesData) - await insertData('projectTemplateTasks', dataToBeInserted.projectTemplateTasksData) - await insertData('certificateTemplates', dataToBeInserted.certificateTemplatesData) - await insertData('certificateBaseTemplates', dataToBeInserted.certificateBaseTemplatesData) - await insertData('projectCategories', dataToBeInserted.projectCategoriesData) + const collectionsToInsert = [ + { name: 'entities', data: dataToBeInserted.entities, db: dbName2 }, + { name: 'entityTypes', data: dataToBeInserted.entityType, db: dbName2 }, + { name: 'programs', data: dataToBeInserted.programData, db: dbName }, + { name: 'solutions', data: dataToBeInserted.solutionData, db: dbName }, + { name: 'projectTemplates', data: dataToBeInserted.projectTemplatesData, db: dbName }, + { name: 'projectTemplateTasks', data: dataToBeInserted.projectTemplateTasksData, db: dbName }, + { name: 'certificateTemplates', data: dataToBeInserted.certificateTemplatesData, db: dbName }, + { name: 'certificateBaseTemplates', data: dataToBeInserted.certificateBaseTemplatesData, db: dbName }, + { name: 'projectCategories', data: dataToBeInserted.projectCategoriesData, db: dbName }, + { name: 'configurations', data: dataToBeInserted.configurationData, db: dbName }, + ] + + console.log(`\n=================================================`) + console.log( + `šŸ—‘ļø Starting CLEANUP for ${dataToBeInserted === entityData ? 'Entity Data' : 'Project Data'} Collections...` + ) + console.log(`=================================================`) + + // 1. CLEANUP PHASE: Drop all relevant collections first + for (const item of collectionsToInsert) { + // Only call cleanData if there is corresponding data to be inserted, to avoid dropping unrelated collections + if (item.data) { + await cleanData(item.name, item.db) + } + } + + console.log(`\n=================================================`) + console.log( + `āž• Starting INSERTION for ${dataToBeInserted === entityData ? 'Entity Data' : 'Project Data'} Collections...` + ) + console.log(`=================================================`) + + // 2. INSERTION PHASE: Insert new data + for (const item of collectionsToInsert) { + if (item.data) { + // The insertData function already handles the database selection via the last argument + await insertData(item.name, item.data, item.db) + } + } } +// --- EXECUTION CALLS --- + main({ dataToBeInserted: entityData }) .then(() => { - console.log('Entity data populated successfully.') + console.log('\n=======================================') + console.log('āœ… Entity data population process finished.') + console.log('=======================================') }) .catch(console.error) + main({ dataToBeInserted: projectData }) .then(() => { - console.log('project data populated successfully.') + console.log('\n=======================================') + console.log('āœ… Project data population process finished.') + console.log('=======================================') }) .catch(console.error) diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js index 6c815cb2..513763ae 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_sampleData.js @@ -57,7 +57,7 @@ let solutionData = [ projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), updatedBy: '1', author: '1', - creator: 'Nevil', + creator: 'Mallanagouda', certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), link: 'f8a8e9ba397a29cf75ad5057db6cb7f9', }, @@ -117,7 +117,7 @@ let solutionData = [ projectTemplateId: new ObjectId('68e8c635201642091e01491c'), updatedBy: '1', author: '1', - creator: 'Nevil', + creator: 'Mallanagouda', certificateTemplateId: new ObjectId('68e8c676201642091e014943'), link: '178ac1fdff5b367ef3335ce0e1665a6c', }, @@ -233,7 +233,7 @@ let solutionData = [ projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), updatedBy: '1', author: '1', - creator: 'Nevil', + creator: 'Mallanagouda', link: 'a0acc357edbcf3287e9767d20a7d9f12', }, ] @@ -460,11 +460,10 @@ let projectTemplatesData = [ learningResources: [], isReusable: false, taskSequence: [ - 'DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984', - 'DPDTSC-HandBook-1-2025-Task2-1760447411369', - 'DPDTSC-HandBook-1-2025-Task3-1760447411369', - 'DPDTSC-HandBook-1-2025-Task4-1760447411369', - 'DPDTSC-HandBook-1-2025-Task5-1760447411369', + 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', ], averageRating: 0, noOfRatings: 0, @@ -537,11 +536,10 @@ let projectTemplatesData = [ learningResources: [], isReusable: false, taskSequence: [ - 'DPDTSC-HandBook-1-2025-Task1-1760085557008-1760085557606', - 'DPDTSC-HandBook-1-2025-Task2-1760085557008', - 'DPDTSC-HandBook-1-2025-Task3-1760085557008', - 'DPDTSC-HandBook-1-2025-Task4-1760085557008', - 'DPDTSC-HandBook-1-2025-Task5-1760085557008', + 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', + 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', + 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', + 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', ], averageRating: 0, noOfRatings: 0, @@ -614,11 +612,9 @@ let projectTemplatesData = [ learningResources: [], isReusable: false, taskSequence: [ - 'Task1-1758039445176', - 'Task2-1758039445176', - 'Task3-1758039445176', - 'Task4-1758039445176', - 'Task5-1758039445176', + 'Task1-1758039445176-1758039445561', + 'Task2-1758039445176-1758039445567', + 'Task3-1758039445176-1758039445575', ], averageRating: 0, noOfRatings: 0, @@ -687,11 +683,9 @@ let projectTemplatesData = [ learningResources: [], isReusable: false, taskSequence: [ - 'DPDTSC-HandBook-1/2025-Task1-1758706081315-1758706089304', - 'DPDTSC-HandBook-1/2025-Task2-1758706081315', - 'DPDTSC-HandBook-1/2025-Task3-1758706081315', - 'DPDTSC-HandBook-1/2025-Task4-1758706081315', - 'DPDTSC-HandBook-1/2025-Task5-1758706081315', + 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', + 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', + 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', ], averageRating: 0, noOfRatings: 0, @@ -1601,6 +1595,30 @@ let projectCategoriesData = [ __v: 0, }, ] + +let configurationData = [ + { + _id: new ObjectId('6825a1982d46aa6df0cc36a8'), + code: 'keysAllowedForTargeting', + __v: 0, + createdAt: new Date('2025-05-15T08:11:04.674Z'), + meta: { + profileKeys: [ + 'state', + 'district', + 'block', + 'cluster', + 'school', + 'professional_role', + 'professional_subroles', + 'roles', + 'subject', + 'organizations', + ], + }, + updatedAt: new Date('2025-05-26T10:56:17.021Z'), + }, +] module.exports = { solutionData, programData, @@ -1609,4 +1627,5 @@ module.exports = { certificateTemplatesData, certificateBaseTemplatesData, projectCategoriesData, + configurationData, } From 6e7193ed7b60b1126fab4e89e3aa0397922461fe Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 8 Dec 2025 16:15:59 +0530 Subject: [PATCH 040/119] native-push --- .../3.4.0/native/envs/stand-alone/user_env | 3 +- .../stand-alone/ubuntu/insert_sample_data.sh | 47 ++++++++++++------- .../ubuntu/project_entity_sample_data.sh | 8 +++- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/documentation/3.4.0/native/envs/stand-alone/user_env b/documentation/3.4.0/native/envs/stand-alone/user_env index af029f35..4d5653f7 100644 --- a/documentation/3.4.0/native/envs/stand-alone/user_env +++ b/documentation/3.4.0/native/envs/stand-alone/user_env @@ -41,7 +41,7 @@ REFRESH_TOKEN_SECRET=371hkjkjady2y3ihdkajshdkiq23iuekw71yekhaskdvkvegavy23t78veq REGISTRATION_EMAIL_TEMPLATE_CODE=registration REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp SALT_ROUNDS=10 - +MENTORING_SERVICE_URL='localhost' DEFAULT_OCI_BUCKET_NAME=mentoring-oci-private OCI_ACCESS_KEY_ID= 81a4c2553026982360af6b24497c489b0fea9436 OCI_BUCKET_ENDPOINT=https://axgqmpkrpmt5.compat.objectstorage.ap-hyderabad-1.oraclecloud.com @@ -61,6 +61,7 @@ DEFAULT_ROLE="mentee" SAMPLE_CSV_FILE_PATH="sample path" ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE = "code5" DEFAULT_ORG_ID = 1 +IS_AUTH_TOKEN_BEARER=false PORTAL_URL = "portaladdress" SCHEDULER_SERVICE_HOST = "host" SCHEDULER_SERVICE_BASE_URL = "/scheduler/" diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh index 713c8079..be156dd3 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -1,19 +1,30 @@ #!/bin/bash -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e4','+91', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a767','+91', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e0','+91', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a700','+91', NULL);" + +# --- 0. PRE-REQUISITE: INSERT MISSING ROLES (for foreign key resolution) --- +# NOTE: Role IDs 1 and 8 are required for subsequent inserts. +# You should verify the tenant_code column and other required fields for user_roles table. +# Assuming the necessary role records (1 and 8) are missing and need to be created first. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_roles (id, title, tenant_code, created_at, updated_at) VALUES (1, 'admin', 'default', NOW(), NOW()) ON CONFLICT (id, tenant_code) DO NOTHING;" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_roles (id, title, tenant_code, created_at, updated_at) VALUES (8, 'state_education_officer', 'default', NOW(), NOW()) ON CONFLICT (id, tenant_code) DO NOTHING;" + + +# --- 1. INSERT INTO public.users --- +# These inserts appear correct and should result in 'INSERT 0 1' output. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" # --- 2. INSERT INTO public.user_organizations --- -# FIXES: -# - Quoted the organization_code and tenant_code variables. +# These inserts should be fine. sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (1, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (2, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (3, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (4, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" - -sudo -u postgres psql -p 5432 -d user -c " +# --- 3. UPDATE public.tenants --- +# FIX: Changed -d user to -d users +sudo -u postgres psql -p 5432 -d users -c " UPDATE public.tenants SET meta = '{ \"factors\": [\"professional_role\", \"professional_subroles\"], @@ -25,19 +36,21 @@ SET meta = '{ WHERE code = 'default'; " - -# FIXES: -# - Quoted the organization_code and tenant_code variables. +# --- 4. INSERT INTO public.user_organization_roles --- +# These inserts now occur AFTER the required user_roles (ID 1 and 8) have been added. sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 2, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + +# --- 5. INSERT INTO public.entity_types --- +# FIX: Added 'tenant_code' to the columns list and provided the value 'default'. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code) VALUES (4, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL, 'default');" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex) VALUES (4, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL);" +# --- 6. Final Commands --- sudo -u postgres psql -p 5432 -d users -c "UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3;" sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials;" sudo -u postgres psql -p 5432 -d users -c "UPDATE role_permission_mapping SET role_title = 'state_education_officer' WHERE role_title = 'mentor';" -sudo -u postgres psql -p 5432 -d users -c "SELECT NULL;" - +sudo -u postgres psql -p 5432 -d users -c "SELECT NULL;" \ No newline at end of file diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh index 06877a98..035742a6 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh @@ -38,9 +38,13 @@ echo "Downloaded ${INSERT_SCRIPT}" # NOTE on Original Request: If you need to populate 'user/src/.env' with a specific file, # you would add another 'curl' command here, but the file you linked was a JS script. -# --- 3. Install Dependencies --- echo "" -echo "2. Installing required Node packages (mongoose)..." +echo "2. Installing required Node packages (mongoose, mongodb)..." + +# Initialize a package.json file if one doesn't exist to prevent climbing up the directory tree +if [ ! -f "package.json" ]; then + npm init -y > /dev/null +fi npm install mongoose npm install mongodb From 5411f134c5bf51372941b012378941397925156b Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 10 Dec 2025 15:14:23 +0530 Subject: [PATCH 041/119] native-fix --- .../stand-alone/docker-compose-project.yml | 49 ++++++++++++- .../3.4.0/dockerized/envs/interface_env | 2 - documentation/3.4.0/dockerized/envs/user_env | 4 +- .../stand-alone/ubuntu/entity_sampleData.js | 69 +++++++++++++++---- .../stand-alone/ubuntu/insert_sample_data.sh | 9 ++- .../native/envs/stand-alone/interface_env | 2 - .../3.4.0/native/envs/stand-alone/user_env | 2 +- .../stand-alone/ubuntu/entity_sampleData.js | 69 +++++++++++++++---- .../stand-alone/ubuntu/insert_sample_data.sh | 18 ++--- 9 files changed, 177 insertions(+), 47 deletions(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml index 9d533acb..d24907a2 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml @@ -87,6 +87,40 @@ services: - ./config.json:/var/src/config.json networks: - project_net + # user: + # image: shikshalokamqa/elevate-user:3.3.24 + # ports: + # - '3001:3001' + # command: > + # bash -c "echo 'Waiting for PostgreSQL on citus_master:5432 to accept connections...' && + # while ! timeout 1 bash -c 'cat < /dev/null > /dev/tcp/citus_master/5432' 2> /dev/null; do + # echo 'Waiting for citus_master to be ready...'; + # sleep 1; + # done; + # echo 'Database is ready.'; + # npm run db:init && npm run db:seed:all && + # (echo 'Running nodeee' && nodemon app.js &) && + # (while ! curl -sSf http://user:3001 > /dev/null; do + # sleep 1; + # done && echo 'Service is up' && + # /bin/bash -c 'cd scripts && echo Running user service scripts && node insertDefaultOrg.js && node viewsScript.js && node -r module-alias/register uploadSampleCSV.js'); + # tail -f /dev/null" + # depends_on: + # - kafka + # - citus + # - redis + # - scheduler + # environment: + # - DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/user + # - KAFKA_URL=kafka:29092 + # - REDIS_HOST=redis://redis:6379 + # volumes: + # - ./user:/usr/src/app + # networks: + # - project_net + # env_file: + # - ./user_env + user: image: shikshalokamqa/elevate-user:3.3.24 ports: @@ -98,12 +132,23 @@ services: sleep 1; done; echo 'Database is ready.'; - npm run db:init && npm run db:seed:all && + # --- Run Migrations --- + echo 'Running Migrations...' && + cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ + + # --- Run Seeds --- + echo 'Running Seeds...' && + cd user/src && npx sequelize-cli db:seed:all && cd ../.. && + + # --- Start Service and Wait for Startup --- (echo 'Running nodeee' && nodemon app.js &) && (while ! curl -sSf http://user:3001 > /dev/null; do sleep 1; done && echo 'Service is up' && - /bin/bash -c 'cd scripts && echo Running user service scripts && node insertDefaultOrg.js && node viewsScript.js && node -r module-alias/register uploadSampleCSV.js'); + # This section that ran extra scripts has been removed as requested. + echo 'Skipping user service scripts (insertDefaultOrg.js, viewsScript.js, uploadSampleCSV.js)') && + + # --- Keep Container Running --- tail -f /dev/null" depends_on: - kafka diff --git a/documentation/3.4.0/dockerized/envs/interface_env b/documentation/3.4.0/dockerized/envs/interface_env index f79f110b..9fd89127 100644 --- a/documentation/3.4.0/dockerized/envs/interface_env +++ b/documentation/3.4.0/dockerized/envs/interface_env @@ -6,7 +6,6 @@ ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=mentoring ELEVATE_NOTIFICATION_KAFKA_TOPIC=notification ENTITY_SERVICE_BASE_URL=http://entity_management:5001 INSTALLED_PACKAGES=elevate-mentoring elevate-survey-observation@1.0.1 elevate-self-creation-portal -MENTORING_SERVICE_BASE_URL=http://localhost:7101 NOTIFICATION_SERVICE_BASE_URL=http://localhost:7201 PROJECT_SERVICE_BASE_URL=http://project:6000 RATE_LIMITER_ENABLED=true @@ -20,7 +19,6 @@ SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 -SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001 SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE SURVEY_SERVICE_BASE_URL=http://localhost:5007 USER_SERVICE_BASE_URL=http://user:3001 \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/user_env b/documentation/3.4.0/dockerized/envs/user_env index f6287fa2..a3998f8e 100644 --- a/documentation/3.4.0/dockerized/envs/user_env +++ b/documentation/3.4.0/dockerized/envs/user_env @@ -78,5 +78,5 @@ CAPTCHA_ENABLE = false RECAPTCHA_SECRET_KEY= "6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" ALLOWED_IDLE_TIME=1200000 APPLICATION_BASE_URL="/user" -ENTITY_MANAGEMENT_SERVICE_BASE_URL="/" -IS_AUTH_TOKEN_BEARER=false \ No newline at end of file +IS_AUTH_TOKEN_BEARER=false +ENTITY_MANAGEMENT_SERVICE_BASE_URL="http://entity_management:3569/entity-management/" \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js index 5c2bd2c8..bdb59d6b 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -108,6 +108,9 @@ let entities = [ __v: 0, groups: { district: [new ObjectId('6852c8ae7248c20014b38a57')], + block: [new ObjectId('6852c8de7248c20014b38a9d')], + cluster: [new ObjectId('6852c9027248c20014b38c34')], + school: [new ObjectId('6852c9237248c20014b39fa0')], }, }, { @@ -133,21 +136,59 @@ let entities = [ createdAt: new Date('2025-06-18T14:09:50.337Z'), __v: 0, groups: { - block: [ - new ObjectId('6852c8de7248c20014b38a9d'), - new ObjectId('6852c8de7248c20014b38a9e'), - new ObjectId('6852c8de7248c20014b38a9f'), - new ObjectId('6852c8de7248c20014b38aa0'), - new ObjectId('6852c8de7248c20014b38aa1'), - new ObjectId('6852c8de7248c20014b38aa2'), - new ObjectId('6852c8de7248c20014b38aa3'), - new ObjectId('6852c8de7248c20014b38aa4'), - new ObjectId('6852c8de7248c20014b38aa5'), - new ObjectId('6852c8de7248c20014b38aa6'), - new ObjectId('6852c8de7248c20014b38aa7'), - new ObjectId('6852c8de7248c20014b38aa8'), - ], + block: [new ObjectId('6852c8de7248c20014b38a9d')], + cluster: [new ObjectId('6852c9027248c20014b38c34')], + school: [new ObjectId('6852c9237248c20014b39fa0')], + }, + }, + { + _id: new ObjectId('6852c9027248c20014b38c34'), + metaInformation: { + targetedEntityTypes: [], + externalId: '1601010004', + name: 'ACHARYA PRAFULLA CHANDRA H/S SCHOOL', }, + childHierarchyPath: ['school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: new ObjectId('6825915897b5680013e6a146'), + entityType: 'cluster', + registryDetails: { + code: '1601010004', + locationId: '1601010004', + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-06-18T14:22:16.044Z'), + createdAt: new Date('2025-06-18T14:11:14.746Z'), + __v: 0, + groups: { + school: [new ObjectId('6852c9237248c20014b39fa0')], + }, + }, + { + _id: new ObjectId('6852c9237248c20014b39fa0'), + metaInformation: { + targetedEntityTypes: [], + externalId: '16010100422', + name: 'ABINASH GOPE SMRITI (SAROJANI) JB SCHOOL', + }, + childHierarchyPath: [], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: new ObjectId('6825915c97b5680013e6a148'), + entityType: 'school', + registryDetails: { + code: '16010100422', + locationId: '16010100422', + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-06-18T14:11:49.194Z'), + createdAt: new Date('2025-06-18T14:11:49.194Z'), + __v: 0, }, { _id: new ObjectId('68876746b19aea00144c2af9'), diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh index dc5e8478..273ae65e 100755 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -37,10 +37,15 @@ WHERE code = 'default'; # --- 4. INSERT INTO public.entity_types --- # FIXES: # - Quoted the JSON value for the 'meta' column. -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (3, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (4, 'block', 'Block', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'school', 'School', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (6, 'district', 'District', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (7, 'cluster', 'Cluster', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (8, 'professional_role','Professional Role','ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (9, 'professional_subroles','Professional Subroles', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" # --- 5. UPDATES and SEQUENCES --- -psql -h localhost -p 5432 -U postgres -d user -c "UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3;" psql -h localhost -p 5432 -U postgres -d user -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" psql -h localhost -p 5432 -U postgres -d user -c "SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials;" psql -h localhost -p 5432 -U postgres -d user -c "SELECT NULL;" diff --git a/documentation/3.4.0/native/envs/stand-alone/interface_env b/documentation/3.4.0/native/envs/stand-alone/interface_env index d12c7e5d..bd700eda 100644 --- a/documentation/3.4.0/native/envs/stand-alone/interface_env +++ b/documentation/3.4.0/native/envs/stand-alone/interface_env @@ -6,7 +6,6 @@ ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=dev.mentoring ELEVATE_NOTIFICATION_KAFKA_TOPIC=dev.notification ENTITY_SERVICE_BASE_URL=http://localhost:5001 INSTALLED_PACKAGES=elevate-mentoring elevate-survey-observation@1.0.1 elevate-self-creation-portal -MENTORING_SERVICE_BASE_URL=http://localhost:7101 NOTIFICATION_SERVICE_BASE_URL=http://localhost:7201 PROJECT_SERVICE_BASE_URL=http://localhost:6000 RATE_LIMITER_ENABLED=true @@ -20,7 +19,6 @@ SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 -SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001 SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE SURVEY_SERVICE_BASE_URL=http://localhost:5007 USER_SERVICE_BASE_URL=http://localhost:3001 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/user_env b/documentation/3.4.0/native/envs/stand-alone/user_env index 4d5653f7..193d7859 100644 --- a/documentation/3.4.0/native/envs/stand-alone/user_env +++ b/documentation/3.4.0/native/envs/stand-alone/user_env @@ -79,4 +79,4 @@ CAPTCHA_ENABLE = false RECAPTCHA_SECRET_KEY= "6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" ALLOWED_IDLE_TIME=1200000 APPLICATION_BASE_URL="/user" -ENTITY_MANAGEMENT_SERVICE_BASE_URL="/" \ No newline at end of file +ENTITY_MANAGEMENT_SERVICE_BASE_URL="http://localhost:3569/entity-management/" \ No newline at end of file diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js index 5c2bd2c8..bdb59d6b 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -108,6 +108,9 @@ let entities = [ __v: 0, groups: { district: [new ObjectId('6852c8ae7248c20014b38a57')], + block: [new ObjectId('6852c8de7248c20014b38a9d')], + cluster: [new ObjectId('6852c9027248c20014b38c34')], + school: [new ObjectId('6852c9237248c20014b39fa0')], }, }, { @@ -133,21 +136,59 @@ let entities = [ createdAt: new Date('2025-06-18T14:09:50.337Z'), __v: 0, groups: { - block: [ - new ObjectId('6852c8de7248c20014b38a9d'), - new ObjectId('6852c8de7248c20014b38a9e'), - new ObjectId('6852c8de7248c20014b38a9f'), - new ObjectId('6852c8de7248c20014b38aa0'), - new ObjectId('6852c8de7248c20014b38aa1'), - new ObjectId('6852c8de7248c20014b38aa2'), - new ObjectId('6852c8de7248c20014b38aa3'), - new ObjectId('6852c8de7248c20014b38aa4'), - new ObjectId('6852c8de7248c20014b38aa5'), - new ObjectId('6852c8de7248c20014b38aa6'), - new ObjectId('6852c8de7248c20014b38aa7'), - new ObjectId('6852c8de7248c20014b38aa8'), - ], + block: [new ObjectId('6852c8de7248c20014b38a9d')], + cluster: [new ObjectId('6852c9027248c20014b38c34')], + school: [new ObjectId('6852c9237248c20014b39fa0')], + }, + }, + { + _id: new ObjectId('6852c9027248c20014b38c34'), + metaInformation: { + targetedEntityTypes: [], + externalId: '1601010004', + name: 'ACHARYA PRAFULLA CHANDRA H/S SCHOOL', }, + childHierarchyPath: ['school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: new ObjectId('6825915897b5680013e6a146'), + entityType: 'cluster', + registryDetails: { + code: '1601010004', + locationId: '1601010004', + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-06-18T14:22:16.044Z'), + createdAt: new Date('2025-06-18T14:11:14.746Z'), + __v: 0, + groups: { + school: [new ObjectId('6852c9237248c20014b39fa0')], + }, + }, + { + _id: new ObjectId('6852c9237248c20014b39fa0'), + metaInformation: { + targetedEntityTypes: [], + externalId: '16010100422', + name: 'ABINASH GOPE SMRITI (SAROJANI) JB SCHOOL', + }, + childHierarchyPath: [], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: new ObjectId('6825915c97b5680013e6a148'), + entityType: 'school', + registryDetails: { + code: '16010100422', + locationId: '16010100422', + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-06-18T14:11:49.194Z'), + createdAt: new Date('2025-06-18T14:11:49.194Z'), + __v: 0, }, { _id: new ObjectId('68876746b19aea00144c2af9'), diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh index be156dd3..fabcff4d 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -4,9 +4,6 @@ # NOTE: Role IDs 1 and 8 are required for subsequent inserts. # You should verify the tenant_code column and other required fields for user_roles table. # Assuming the necessary role records (1 and 8) are missing and need to be created first. -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_roles (id, title, tenant_code, created_at, updated_at) VALUES (1, 'admin', 'default', NOW(), NOW()) ON CONFLICT (id, tenant_code) DO NOTHING;" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_roles (id, title, tenant_code, created_at, updated_at) VALUES (8, 'state_education_officer', 'default', NOW(), NOW()) ON CONFLICT (id, tenant_code) DO NOTHING;" - # --- 1. INSERT INTO public.users --- # These inserts appear correct and should result in 'INSERT 0 1' output. @@ -39,17 +36,22 @@ WHERE code = 'default'; # --- 4. INSERT INTO public.user_organization_roles --- # These inserts now occur AFTER the required user_roles (ID 1 and 8) have been added. sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 8, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" # --- 5. INSERT INTO public.entity_types --- # FIX: Added 'tenant_code' to the columns list and provided the value 'default'. -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code) VALUES (4, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL, 'default');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (6, 'block', 'Block', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (7, 'school', 'School', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (8, 'district', 'District', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (9, 'cluster', 'Cluster', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (10, 'professional_role','Professional Role','ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_cod');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (11, 'professional_subroles','Professional Subroles', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_cod');" # --- 6. Final Commands --- -sudo -u postgres psql -p 5432 -d users -c "UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3;" sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials;" sudo -u postgres psql -p 5432 -d users -c "UPDATE role_permission_mapping SET role_title = 'state_education_officer' WHERE role_title = 'mentor';" From 546b9d3e012aa551c8326aec63cb61def7da2ee2 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 10 Dec 2025 15:28:37 +0530 Subject: [PATCH 042/119] native-fix --- .../stand-alone/docker-compose-project.yml | 49 +------------------ .../stand-alone/ubuntu/insert_sample_data.sh | 14 +++--- 2 files changed, 9 insertions(+), 54 deletions(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml index d24907a2..9d533acb 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml @@ -87,40 +87,6 @@ services: - ./config.json:/var/src/config.json networks: - project_net - # user: - # image: shikshalokamqa/elevate-user:3.3.24 - # ports: - # - '3001:3001' - # command: > - # bash -c "echo 'Waiting for PostgreSQL on citus_master:5432 to accept connections...' && - # while ! timeout 1 bash -c 'cat < /dev/null > /dev/tcp/citus_master/5432' 2> /dev/null; do - # echo 'Waiting for citus_master to be ready...'; - # sleep 1; - # done; - # echo 'Database is ready.'; - # npm run db:init && npm run db:seed:all && - # (echo 'Running nodeee' && nodemon app.js &) && - # (while ! curl -sSf http://user:3001 > /dev/null; do - # sleep 1; - # done && echo 'Service is up' && - # /bin/bash -c 'cd scripts && echo Running user service scripts && node insertDefaultOrg.js && node viewsScript.js && node -r module-alias/register uploadSampleCSV.js'); - # tail -f /dev/null" - # depends_on: - # - kafka - # - citus - # - redis - # - scheduler - # environment: - # - DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/user - # - KAFKA_URL=kafka:29092 - # - REDIS_HOST=redis://redis:6379 - # volumes: - # - ./user:/usr/src/app - # networks: - # - project_net - # env_file: - # - ./user_env - user: image: shikshalokamqa/elevate-user:3.3.24 ports: @@ -132,23 +98,12 @@ services: sleep 1; done; echo 'Database is ready.'; - # --- Run Migrations --- - echo 'Running Migrations...' && - cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ - - # --- Run Seeds --- - echo 'Running Seeds...' && - cd user/src && npx sequelize-cli db:seed:all && cd ../.. && - - # --- Start Service and Wait for Startup --- + npm run db:init && npm run db:seed:all && (echo 'Running nodeee' && nodemon app.js &) && (while ! curl -sSf http://user:3001 > /dev/null; do sleep 1; done && echo 'Service is up' && - # This section that ran extra scripts has been removed as requested. - echo 'Skipping user service scripts (insertDefaultOrg.js, viewsScript.js, uploadSampleCSV.js)') && - - # --- Keep Container Running --- + /bin/bash -c 'cd scripts && echo Running user service scripts && node insertDefaultOrg.js && node viewsScript.js && node -r module-alias/register uploadSampleCSV.js'); tail -f /dev/null" depends_on: - kafka diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh index 273ae65e..59284c92 100755 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -37,13 +37,13 @@ WHERE code = 'default'; # --- 4. INSERT INTO public.entity_types --- # FIXES: # - Quoted the JSON value for the 'meta' column. -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (3, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (4, 'block', 'Block', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'school', 'School', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (6, 'district', 'District', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (7, 'cluster', 'Cluster', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (8, 'professional_role','Professional Role','ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" -psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (9, 'professional_subroles','Professional Subroles', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (6, 'block', 'Block', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (7, 'school', 'School', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (8, 'district', 'District', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (9, 'cluster', 'Cluster', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (10, 'professional_role','Professional Role','ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (11, 'professional_subroles','Professional Subroles', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" # --- 5. UPDATES and SEQUENCES --- psql -h localhost -p 5432 -U postgres -d user -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" From 573968ac242a41c785e53a34b4c91a8de890ebc8 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 11 Dec 2025 14:10:09 +0530 Subject: [PATCH 043/119] docker-fix --- .../stand-alone/docker-compose-project.yml | 20 ++-- .../3.4.0/dockerized/envs/notification_env | 28 +++--- documentation/3.4.0/dockerized/envs/user_env | 95 +++++++++++-------- 3 files changed, 74 insertions(+), 69 deletions(-) diff --git a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml index 9d533acb..58efcfe3 100644 --- a/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml +++ b/documentation/3.4.0/dockerized/dockerFiles/stand-alone/docker-compose-project.yml @@ -5,7 +5,7 @@ services: ports: - '2181:2181' environment: - - ALLOW_ANONYMOUS_LOGIN=yes + - ALLOW_ANONYMOUS_LOGIN='yes' - ZOOKEEPER_CLIENT_PORT=2181 - ZOOKEEPER_TICK_TIME=2000 networks: @@ -17,9 +17,9 @@ services: environment: KAFKA_BROKER_ID: 1 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:29092,PLAINTEXT_HOST://0.0.0.0:9092 - KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 depends_on: @@ -103,7 +103,7 @@ services: (while ! curl -sSf http://user:3001 > /dev/null; do sleep 1; done && echo 'Service is up' && - /bin/bash -c 'cd scripts && echo Running user service scripts && node insertDefaultOrg.js && node viewsScript.js && node -r module-alias/register uploadSampleCSV.js'); + /bin/bash -c 'cd scripts && echo Running user service scripts && node -r module-alias/register uploadSampleCSV.js'); tail -f /dev/null" depends_on: - kafka @@ -112,7 +112,7 @@ services: - scheduler environment: - DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/user - - KAFKA_URL=kafka:29092 + - KAFKA_URL=kafka:9092 - REDIS_HOST=redis://redis:6379 volumes: - ./user:/usr/src/app @@ -125,14 +125,6 @@ services: image: ttpldevops/notification ports: - '3002:3002' - command: > - bash -c "echo 'Waiting for PostgreSQL on citus_master:5432 to accept connections...' && - while ! timeout 1 bash -c 'cat < /dev/null > /dev/tcp/citus_master/5432' 2> /dev/null; do - echo 'Waiting for citus_master to be ready...'; - sleep 1; - done; - echo 'Database is ready.'; - npm run db:init && npx nodemon app.js" depends_on: citus: condition: service_started diff --git a/documentation/3.4.0/dockerized/envs/notification_env b/documentation/3.4.0/dockerized/envs/notification_env index 4d7616b8..c821b118 100644 --- a/documentation/3.4.0/dockerized/envs/notification_env +++ b/documentation/3.4.0/dockerized/envs/notification_env @@ -1,16 +1,12 @@ -API_DOC_URL=/api-doc -APPLICATION_BASE_URL=/notification/ -APPLICATION_ENV=development -APPLICATION_PORT=3002 -DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/notification -DISABLE_LOG=false -ENABLE_LOG=true -ERROR_LOG_LEVEL=silly -INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj -KAFKA_GROUP_ID=notification -KAFKA_HOST=kafka:9092 -KAFKA_TOPIC=notifications -SENDGRID_API_KEY=SG.asd9f87a9s8d7f. -SENDGRID_FROM_MAIL=no-reply@some.org -ERROR_LOG_LEVEL=ERROR_LOG_LEVEL -DISABLE_LOG=true \ No newline at end of file +# Database +POSTGRES_HOST=citus_master +POSTGRES_PORT=5432 +POSTGRES_DATABASE=notification +POSTGRES_USERNAME=postgres + +RABBITMQ_URL=amqp://rabbitmq:5672 + + +# Application +PORT=3002 +NODE_ENV=development \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/envs/user_env b/documentation/3.4.0/dockerized/envs/user_env index a3998f8e..b7925284 100644 --- a/documentation/3.4.0/dockerized/envs/user_env +++ b/documentation/3.4.0/dockerized/envs/user_env @@ -1,16 +1,17 @@ ACCESS_TOKEN_EXPIRY='30m' +ALLOWED_HOST='*' ACCESS_TOKEN_SECRET='bsj82AHBxahusub12yexlashsbxAXADHBlaj' API_DOC_URL=/user/api-doc APP_NAME=MentorED APPLICATION_ENV=development APPLICATION_PORT=3001 -CLOUD_STORAGE_PROVIDER = aws -CLOUD_STORAGE_BUCKETNAME =mentoring-prod-storage-private -CLOUD_STORAGE_SECRET= CLOUD_STORAGE_SECRET/H1UM8XLL -CLOUD_STORAGE_REGION =ap-south-1 -CLOUD_ENDPOINT = s3.ap-south-1.amazonaws.com -CLOUD_STORAGE_ACCOUNTNAME =CLOUD_STORAGE_ACCOUNTNAME -CLOUD_STORAGE_BUCKET_TYPE = private +CLOUD_STORAGE_PROVIDER=aws +CLOUD_STORAGE_BUCKETNAME=mentoring-prod-storage-private +CLOUD_STORAGE_SECRET=AKIAIOSFODNN7EXAMPLE +CLOUD_STORAGE_REGION=ap-south-1 +CLOUD_ENDPOINT=s3.ap-south-1.amazonaws.com +CLOUD_STORAGE_ACCOUNTNAME=mentoring-prod-storage-private +CLOUD_STORAGE_BUCKET_TYPE=private PUBLIC_ASSET_BUCKETNAME=mentoring-prod-storage-private AZURE_ACCOUNT_KEY='AZURE_ACCOUNT_KEY' AZURE_ACCOUNT_NAME=elevatementoringaccount @@ -25,13 +26,13 @@ GCP_PROJECT_ID=sl-dev-project INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj INTERNAL_CACHE_EXP_TIME=86400 IV=LHYOA5YnTonqcgrm15k3/Q== -KAFKA_GROUP_ID=projects -KAFKA_TOPIC= -KAFKA_URL= kafka:9092 +KAFKA_GROUP_ID=users +KAFKA_TOPIC=dev.topic.user +KAFKA_URL=kafka:9092 KEY=E/m3RD/aM3Ed3lLfYVcKizakG9R+bFybAPZSLjIP2hY= MENTOR_SECRET_CODE=4567 MONGODB_URL=mongodb://mongo:27017/elevate-users -NOTIFICATION_KAFKA_TOPIC=notifications +NOTIFICATION_KAFKA_TOPIC=dev.notifications OTP_EMAIL_TEMPLATE_CODE=emailotp OTP_EXP_TIME=86400 RATING_KAFKA_TOPIC=dev.mentor_rating @@ -42,41 +43,57 @@ REGISTRATION_EMAIL_TEMPLATE_CODE=registration REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp SALT_ROUNDS=10 DEFAULT_OCI_BUCKET_NAME=mentoring-oci-private -OCI_ACCESS_KEY_ID= 81a4c2553026982360af6b24497c489b0fea9436 +OCI_ACCESS_KEY_ID=81a4c2553026982360af6b24497c489b0fea9436 OCI_BUCKET_ENDPOINT=https://axgqmpkrpmt5.compat.objectstorage.ap-hyderabad-1.oraclecloud.com -OCI_BUCKET_REGION= ap-hyderabad-1 +OCI_BUCKET_REGION=ap-hyderabad-1 OCI_SECRET_ACCESS_KEY='+U4O+CjiC6M/mOcGjYh7K/9XjfSdJ79OoLuQrABPOJ8=' -ERROR_LOG_LEVEL= silly -DISABLE_LOG= false +ERROR_LOG_LEVEL=silly +DISABLE_LOG=false DEFAULT_ORGANISATION_CODE=default_code DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/user ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy -MENTORING_SERVICE_URL="http://localhost:3000" -INVITEE_EMAIL_TEMPLATE_CODE="emailcode" -ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="coeadmin" +MENTORING_SERVICE_URL="http://mentoring:3000" +INVITEE_EMAIL_TEMPLATE_CODE="invite_user" +ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="invitee_upload_status" DEFAULT_QUEUE="defaultque" -MENTOR_INVITATION_EMAIL_TEMPLATE_CODE="mentorinvitationTemplateCode" -MENTEE_INVITATION_EMAIL_TEMPLATE_CODE="mentee invitationTemplateCode" +MENTOR_INVITATION_EMAIL_TEMPLATE_CODE="invite_mentor" +MENTEE_INVITATION_EMAIL_TEMPLATE_CODE="invite_mentee" DEFAULT_ROLE="mentee" -SAMPLE_CSV_FILE_PATH="sample path" -ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE = "code5" -DEFAULT_ORG_ID = 1 -PORTAL_URL = "portaladdress" -SCHEDULER_SERVICE_HOST = scheduler -SCHEDULER_SERVICE_BASE_URL = "/scheduler/" -REFRESH_VIEW_INTERVAL = 100000 -EMAIL_ID_ENCRYPTION_IV = 'a390328e496f025249a88384f318a536' -EMAIL_ID_ENCRYPTION_KEY = '9bbf4698e081176b4e38c3f04f9c0cff6ae80b1960e5ac868cc234ac8537aa66' -EMAIL_ID_ENCRYPTION_ALGORITHM = 'aes-256-cbc' -GENERIC_INVITATION_EMAIL_TEMPLATE_CODE = 'check_code' -EVENT_ORG_LISTENER_URLS = "sample url" -EVENT_ENABLE_ORG_EVENTS = false -DOWNLOAD_URL_EXPIRATION_DURATION = 300 -APPLICATION_HOST= "localhost" -CHANGE_PASSWORD_TEMPLATE_CODE = "change_password" -CAPTCHA_ENABLE = false -RECAPTCHA_SECRET_KEY= "6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" +SAMPLE_CSV_FILE_PATH="sample/bulk_user_creation.csv" +ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE="invite_org_admin" +DEFAULT_ORG_ID=1 +PORTAL_URL="portaladdress" +SCHEDULER_SERVICE_HOST="http://scheduler:4000" +SCHEDULER_SERVICE_BASE_URL="/scheduler/" +REFRESH_VIEW_INTERVAL=100000 +EMAIL_ID_ENCRYPTION_IV='a390328e496f025249a88384f318a536' +EMAIL_ID_ENCRYPTION_KEY='9bbf4698e081176b4e38c3f04f9c0cff6ae80b1960e5ac868cc234ac8537aa66' +EMAIL_ID_ENCRYPTION_ALGORITHM='aes-256-cbc' +GENERIC_INVITATION_EMAIL_TEMPLATE_CODE='check_code' +EVENT_ORG_LISTENER_URLS="http://interface:3569/mentoring/v1/organization/eventListener" +EVENT_ENABLE_ORG_EVENTS=false +DOWNLOAD_URL_EXPIRATION_DURATION=300 +APPLICATION_HOST="user" +CHANGE_PASSWORD_TEMPLATE_CODE="change_password" +CAPTCHA_ENABLE=false +RECAPTCHA_SECRET_KEY="6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" ALLOWED_IDLE_TIME=1200000 APPLICATION_BASE_URL="/user" +ENTITY_MANAGEMENT_SERVICE_BASE_URL="http://entity_management:3569/entity-management/" IS_AUTH_TOKEN_BEARER=false -ENTITY_MANAGEMENT_SERVICE_BASE_URL="http://entity_management:3569/entity-management/" \ No newline at end of file +DEFAULT_TENANT_ORG_CODE=default_code +DEFAULT_TENANT_ORG_NAME="Default Organization" +EVENT_ENABLE_ORG_KAFKA_EVENTS=true +EVENT_ENABLE_TENANT_KAFKA_EVENTS=true +EVENT_ENABLE_USER_KAFKA_EVENTS=true +EVENT_ORGANIZATION_KAFKA_TOPIC="dev.organizationEvent" +EVENT_TENANT_KAFKA_TOPIC="dev.tenantEvent" +EVENT_USER_KAFKA_TOPIC="dev.userCreate" +INTERFACE_SERVICE_HOST="http://interface:3569" +JWT_SECRET='bsj82AHBxahusub12yexlashsbxAXADHBlaj' +SCHEDULER_SERVICE_ERROR_REPORTING_EMAIL_ID="test@yopmail.com" +SCHEDULER_SERVICE_URL="http://interface:3569/jobs/scheduleJob" +SERVICE_NAME="UserService" +SIGNED_URL_EXPIRY_IN_SECONDS="900" +ORG_CODE_HEADER_NAME=organization-id +ORG_ID_HEADER_NAME=organization-id From 6b6d1db87c0e50417c1a09bae32e2b42666b8762 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 12 Dec 2025 12:11:53 +0530 Subject: [PATCH 044/119] Survey-setup-fix --- .../3.4.0/dockerized/envs/interface_env | 2 +- .../with-survey/ubuntu/project_sampleData.js | 84 +------------------ .../setup/docker/with-survey/ubuntu/README.md | 6 +- 3 files changed, 5 insertions(+), 87 deletions(-) diff --git a/documentation/3.4.0/dockerized/envs/interface_env b/documentation/3.4.0/dockerized/envs/interface_env index dce6a27a..4972a830 100644 --- a/documentation/3.4.0/dockerized/envs/interface_env +++ b/documentation/3.4.0/dockerized/envs/interface_env @@ -18,7 +18,7 @@ REQUIRED_PACKAGES=elevate-mentoring@1.2.90 elevate-survey-observation@1.0.22 ele ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw -SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 +SAMIKSHA_SERVICE_BASE_URL=http://localhost:4301 SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 SELF-CREATION-PORTAL_SERVICE_BASE_URL=http://localhost:6001 SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js index e4b59ffc..732927c1 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js @@ -910,89 +910,7 @@ let projectTemplatesData = [ programId: new ObjectId("68d3b9681e09f9b5b1e0693d"), programExternalId: "SUP_as_a_task_test_sept_24_1500", parentTemplateId: new ObjectId("68d3b9a32ba17cc3cb238805"), - }, - { - _id: new ObjectId("68ee4bb3fb9bee08b93b6d70"), - description: "To construct a wired car using a DPDT switch.", - concepts: [""], - keywords: [ - "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", - ], - isDeleted: false, - recommendedFor: ["Learner"], - tasks: [ - new ObjectId("68ee4bb4fb9bee08b93b6d75"), - new ObjectId("68ee4bb4fb9bee08b93b6d7a"), - new ObjectId("68ee4bb4fb9bee08b93b6d7e"), - new ObjectId("68ee4bb4fb9bee08b93b6d82"), - new ObjectId("68ee4bb4fb9bee08b93b6d86"), - ], - createdBy: "1", - updatedBy: "1", - learningResources: [], - isReusable: false, - taskSequence: [ - "DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984", - "DPDTSC-HandBook-1-2025-Task2-1760447411369", - "DPDTSC-HandBook-1-2025-Task3-1760447411369", - "DPDTSC-HandBook-1-2025-Task4-1760447411369", - "DPDTSC-HandBook-1-2025-Task5-1760447411369", - ], - averageRating: 0, - noOfRatings: 0, - ratings: { - 1: 0, - 2: 0, - 3: 0, - 4: 0, - 5: 0, - }, - importCount: 0, - evidences: [], - isPrivate: false, - hasSpotlight: false, - hasStory: false, - text: [], - visibility: "CURRENT", - visibleToOrganizations: ["tan90"], - deleted: false, - title: "pro with obsasatask oct 8 facilitator only 2nd", - externalId: "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", - categories: [ - { - _id: new ObjectId("685ae6a0cb7c7200145dadae"), - externalId: "teachers", - name: "teachers", - }, - ], - entityType: "", - taskCreationForm: "", - durationInDays: 365, - metaInformation: { - testimonials: [], - goal: "TEMP", - rationale: "", - primaryAudience: "", - duration: "1 year", - successIndicators: "", - risks: "", - approaches: "", - }, - status: "published", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-14T13:11:17.899Z"), - createdAt: new Date("2025-10-14T13:10:11.630Z"), - __v: 0, - solutionId: new ObjectId("68ee4bb3fb9bee08b93b6d68"), - solutionExternalId: - "PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION", - programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), - programExternalId: - "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", - parentTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d4c"), - certificateTemplateId: new ObjectId("68ee4bf5fb9bee08b93b6d97"), - }, + } ]; let projectTemplateTasksData = [ diff --git a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md index a56baa90..0e4fe420 100644 --- a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md @@ -43,9 +43,9 @@ To set up the Project application, ensure you have Docker and Docker Compose ins > **Caution:** Before proceeding, please ensure that the ports given here are available and open. It is essential to verify their availability prior to moving forward. You can run below command in your terminal to check this ``` -for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569; do - if lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then - echo "Port $port is in use" +for port in 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569; do + if sudo lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then + echo "Port $port is IN USE" else echo "Port $port is available" fi From d97f1a953870590bbdc56ed1b4889dbc68c085b8 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 12 Dec 2025 14:53:08 +0530 Subject: [PATCH 045/119] docker-fix --- documentation/3.4.0/dockerized/envs/user_env | 2 +- .../scripts/stand-alone/ubuntu/citus_setup.sh | 123 +++++++++++------- .../stand-alone/ubuntu/entity_sampleData.js | 27 ++++ .../stand-alone/ubuntu/entity_sampleData.js | 27 ++++ .../ubuntu/insert_sample_solutions.js | 14 -- .../setup/docker/stand-alone/ubuntu/README.md | 6 +- 6 files changed, 131 insertions(+), 68 deletions(-) diff --git a/documentation/3.4.0/dockerized/envs/user_env b/documentation/3.4.0/dockerized/envs/user_env index b7925284..c72a1d2c 100644 --- a/documentation/3.4.0/dockerized/envs/user_env +++ b/documentation/3.4.0/dockerized/envs/user_env @@ -79,7 +79,7 @@ CAPTCHA_ENABLE=false RECAPTCHA_SECRET_KEY="6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" ALLOWED_IDLE_TIME=1200000 APPLICATION_BASE_URL="/user" -ENTITY_MANAGEMENT_SERVICE_BASE_URL="http://entity_management:3569/entity-management/" +ENTITY_MANAGEMENT_SERVICE_BASE_URL="http://interface:3569/entity-management/" IS_AUTH_TOKEN_BEARER=false DEFAULT_TENANT_ORG_CODE=default_code DEFAULT_TENANT_ORG_NAME="Default Organization" diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh index 861094d4..34066c39 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh @@ -1,106 +1,129 @@ #!/bin/bash -# Exit on error +# Exit immediately if a command exits with a non-zero status. set -e -# Ensure correct number of arguments are provided +# --- 1. ARGUMENT VALIDATION --- if [ $# -lt 2 ]; then - echo "Error: Folder name and database URL not provided. Usage: $0 " + echo "Error: Folder name and database URL not provided." >&2 + echo "Usage: $0 " >&2 exit 1 fi # Use the provided folder name FOLDER_NAME="$1" +DEV_DATABASE_URL="$2" # Check if folder exists if [ ! -d "$FOLDER_NAME" ]; then - echo "Error: Folder '$FOLDER_NAME' not found." + echo "Error: Folder '$FOLDER_NAME' not found." >&2 exit 1 fi -# Use the provided database URL -DEV_DATABASE_URL="$2" +# --- 2. HIGHLY RELIABLE DATABASE URL PARSING --- +echo "Parsing database URL..." + +# Remove the protocol part (e.g., 'postgres://') +DB_CLEAN_URL=$(echo "$DEV_DATABASE_URL" | sed 's/.*:\/\///') -# Extract database credentials and connection details using awk for portability -DB_USER=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $4}') -DB_PASSWORD=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $5}') -DB_HOST=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $6}') -DB_PORT=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{split($7,a,"/"); print a[1]}') -DB_NAME=$(echo $DEV_DATABASE_URL | awk -F '/' '{print $NF}') +# 1. Extract DB_NAME (last part after the final slash) +DB_NAME=$(echo "$DB_CLEAN_URL" | awk -F '/' '{print $NF}') +# 2. Extract HOST and PORT (remove DB_NAME and the preceding slash) +HOST_PORT_PATH=$(echo "$DB_CLEAN_URL" | sed "s/\/$DB_NAME//") -# Log database variables +# 3. Use standard ':' and '@' delimiters on the remaining string +DB_USER=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $1}') +DB_PASSWORD=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $2}') +DB_HOST=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $3}') +DB_PORT=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $4}') + +# Define the container name (assumes container name is the DB_HOST, which is 'citus_master') +CONTAINER_NAME="$DB_HOST" + +# Log database variables (excluding password) echo "Extracted Database Variables:" echo "DB_USER: $DB_USER" -echo "DB_PASSWORD: $DB_PASSWORD" echo "DB_HOST: $DB_HOST" echo "DB_PORT: $DB_PORT" echo "DB_NAME: $DB_NAME" +echo "" -# Define the container name (same as DB_HOST) -CONTAINER_NAME="$DB_HOST" +# Check the extracted port +if [[ -z "$DB_PORT" ]]; then + echo "Error: Could not extract database port. Check URL format." >&2 + exit 1 +fi + +# --- 3. WAIT FOR CONTAINER AND DATABASE --- # Wait for Docker container to be up echo "Waiting for Docker container '$CONTAINER_NAME' to be up..." -while ! docker inspect "$CONTAINER_NAME" &>/dev/null; do - echo "Waiting for container..." +until docker inspect "$CONTAINER_NAME" &>/dev/null; do + echo -n "." sleep 1 done -echo "Container is now up." +echo -e "\nContainer is now up." # Wait for PostgreSQL to be ready to accept connections +# Use DB_USER for the check, as it must be a valid user echo "Waiting for PostgreSQL on '$DB_HOST:$DB_PORT' to accept connections..." -until docker exec "$CONTAINER_NAME" bash -c "pg_isready -h localhost -p $DB_PORT -U $DB_USER"; do - echo "Waiting for database to be ready..." +until docker exec "$CONTAINER_NAME" bash -c "pg_isready -h localhost -p $DB_PORT -U $DB_USER > /dev/null 2>&1"; do + echo -n "." sleep 1 done -echo "Database is ready." - -# Function to check if the database exists -check_database() { - docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -p $DB_PORT -lqt | cut -d \| -f 1 | grep -qw '$DB_NAME'" -} +echo -e "\nDatabase server is ready." +# Check and wait for the target database to exist echo "Checking existence of database '$DB_NAME'..." -until check_database; do - echo "Database '$DB_NAME' does not exist, waiting..." +until docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d postgres -p $DB_PORT -lqt | grep -qw '$DB_NAME'"; do + echo -n "." sleep 5 done -echo "Database '$DB_NAME' exists, proceeding with script." +echo -e "\nDatabase '$DB_NAME' exists, proceeding with script." + +# --- 4. CITUS EXTENSION SETUP --- -# Retrieve and prepare SQL file operations DISTRIBUTION_COLUMNS_FILE="$FOLDER_NAME/distributionColumns.sql" if [ ! -f "$DISTRIBUTION_COLUMNS_FILE" ]; then - echo "Error: distributionColumns.sql not found in folder '$FOLDER_NAME'." + echo "Error: distributionColumns.sql not found in folder '$FOLDER_NAME'." >&2 exit 1 fi + echo "Copying distributionColumns.sql to container '$CONTAINER_NAME'..." -docker cp "$DISTRIBUTION_COLUMNS_FILE" "$CONTAINER_NAME:/distributionColumns.sql" +CONTAINER_SQL_PATH="/tmp/distributionColumns.sql" +docker cp "$DISTRIBUTION_COLUMNS_FILE" "$CONTAINER_NAME:$CONTAINER_SQL_PATH" echo "Creating Citus extension in the database..." -docker exec --user "$DB_USER" "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -c 'CREATE EXTENSION IF NOT EXISTS citus;'" +docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT --set ON_ERROR_STOP=1 -c 'CREATE EXTENSION IF NOT EXISTS citus;'" + +# --- 5. EXECUTE SQL FILE WITH ROBUST TABLE CHECK --- -# Function to check if table exists check_table() { - local table=$1 - local exists=$(docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -t -c \"SELECT EXISTS(SELECT 1 FROM pg_tables WHERE schemaname = 'public' AND tablename = '$table');\"") - exists=$(echo "$exists" | tr -d '[:space:]') # Trim whitespace - echo "Debug: exists result for table $table = '$exists'" # Debug line - [[ "$exists" == "t" ]] # Checking specifically for 't' + local table_name=$1 + # Check if we can select from the table. If we can't, it returns non-zero. + docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -q -t --set ON_ERROR_STOP=1 -c \"SELECT 1 FROM $table_name LIMIT 1;\"" > /dev/null 2>&1 } -# Execute the SQL file with checks for table existence -echo "Creating distribution columns..." -while IFS= read -r line; do - if [[ $line =~ create_distributed_table\(\'([^\']+)\', ]]; then +echo "Starting creation of distributed tables..." +docker exec "$CONTAINER_NAME" bash -c "cat $CONTAINER_SQL_PATH" | while IFS= read -r line; do + trimmed_line=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + + if [[ "$trimmed_line" =~ ^create_distributed_table\(\'([^\']+)\', ]]; then table="${BASH_REMATCH[1]}" - echo "Checking existence of table '$table'..." + echo "Processing table: '$table'" + + # Robust wait loop for the table to be created by the preceding process (e.g., migration) until check_table "$table"; do - echo "Table '$table' does not exist, waiting..." + echo "Table '$table' does not exist yet (waiting for migration to finish)..." sleep 1 done - echo "Table '$table' exists, executing: $line" - docker exec --user "$DB_USER" "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT -c \"$line\"" + + echo "Table '$table' exists. Executing Citus distribution command..." + docker exec "$CONTAINER_NAME" bash -c "PGPASSWORD='$DB_PASSWORD' psql -h localhost -U $DB_USER -d $DB_NAME -p $DB_PORT --set ON_ERROR_STOP=1 -c \"$trimmed_line\"" fi -done <"$DISTRIBUTION_COLUMNS_FILE" +done + +# Clean up temporary file in the container +docker exec "$CONTAINER_NAME" rm "$CONTAINER_SQL_PATH" -echo "Citus extension setup complete." \ No newline at end of file +echo "āœ… Citus extension setup and distribution columns complete successfully!" \ No newline at end of file diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js index bdb59d6b..8bcbfcb6 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -141,6 +141,33 @@ let entities = [ school: [new ObjectId('6852c9237248c20014b39fa0')], }, }, + { + _id: new ObjectId('6852c8de7248c20014b38a9d'), + metaInformation: { + targetedEntityTypes: [], + externalId: '160101', + name: 'AGARTALA MUNICIPAL COORPORATION', + }, + childHierarchyPath: ['cluster', 'school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: new ObjectId('6825915597b5680013e6a144'), + entityType: 'block', + registryDetails: { + code: '160101', + locationId: '160101', + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-06-18T14:24:30.469Z'), + createdAt: new Date('2025-06-18T14:10:38.736Z'), + __v: 0, + groups: { + cluster: [new ObjectId('6852c9027248c20014b38c34')], + school: [new ObjectId('6852c9237248c20014b39fa0')], + }, + }, { _id: new ObjectId('6852c9027248c20014b38c34'), metaInformation: { diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js index bdb59d6b..8bcbfcb6 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/entity_sampleData.js @@ -141,6 +141,33 @@ let entities = [ school: [new ObjectId('6852c9237248c20014b39fa0')], }, }, + { + _id: new ObjectId('6852c8de7248c20014b38a9d'), + metaInformation: { + targetedEntityTypes: [], + externalId: '160101', + name: 'AGARTALA MUNICIPAL COORPORATION', + }, + childHierarchyPath: ['cluster', 'school'], + createdBy: '20', + updatedBy: '20', + deleted: false, + entityTypeId: new ObjectId('6825915597b5680013e6a144'), + entityType: 'block', + registryDetails: { + code: '160101', + locationId: '160101', + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-06-18T14:24:30.469Z'), + createdAt: new Date('2025-06-18T14:10:38.736Z'), + __v: 0, + groups: { + cluster: [new ObjectId('6852c9027248c20014b38c34')], + school: [new ObjectId('6852c9237248c20014b39fa0')], + }, + }, { _id: new ObjectId('6852c9027248c20014b38c34'), metaInformation: { diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js index f789eab8..6eeed017 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_solutions.js @@ -50,7 +50,6 @@ async function insertData(collectionName, dataFile, currentDB = dbName) { const client = new MongoClient(url) try { - // Connect to MongoDB await client.connect() const db = client.db(currentDB) const collection = db.collection(collectionName) @@ -64,16 +63,12 @@ async function insertData(collectionName, dataFile, currentDB = dbName) { console.log(`\n--- Attempting insertion into: ${currentDB}.${collectionName} ---`) const results = [] - - // Use Promise.all with map for concurrent insertion (faster) await Promise.all( data.map(async (doc, index) => { const tempId = doc._id || `(Document Index: ${index})` try { const result = await collection.insertOne(doc) - - // The _id is either the one from the source doc or the generated one const finalId = result.insertedId || doc._id results.push({ @@ -83,7 +78,6 @@ async function insertData(collectionName, dataFile, currentDB = dbName) { }) } catch (error) { if (error.code === DUPLICATE_KEY_ERROR_CODE) { - // This typically happens if the document has an _id or a unique index violation results.push({ id: tempId, status: 'DUPLICATE', @@ -120,8 +114,6 @@ async function insertData(collectionName, dataFile, currentDB = dbName) { } } -// --- MAIN EXECUTION LOGIC --- - async function main({ dataToBeInserted }) { const collectionsToInsert = [ { name: 'entities', data: dataToBeInserted.entities, db: dbName2 }, @@ -142,9 +134,7 @@ async function main({ dataToBeInserted }) { ) console.log(`=================================================`) - // 1. CLEANUP PHASE: Drop all relevant collections first for (const item of collectionsToInsert) { - // Only call cleanData if there is corresponding data to be inserted, to avoid dropping unrelated collections if (item.data) { await cleanData(item.name, item.db) } @@ -156,17 +146,13 @@ async function main({ dataToBeInserted }) { ) console.log(`=================================================`) - // 2. INSERTION PHASE: Insert new data for (const item of collectionsToInsert) { if (item.data) { - // The insertData function already handles the database selection via the last argument await insertData(item.name, item.data, item.db) } } } -// --- EXECUTION CALLS --- - main({ dataToBeInserted: entityData }) .then(() => { console.log('\n=======================================') diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index 12b0160f..4c10b551 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -43,9 +43,9 @@ To set up the Project application, ensure you have Docker and Docker Compose ins > **Caution:** Before proceeding, please ensure that the ports given here are available and open. It is essential to verify their availability prior to moving forward. You can run below command in your terminal to check this ``` -for port in 3000 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569; do - if lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then - echo "Port $port is in use" +for port in 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569; do + if sudo lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then + echo "Port $port is IN USE" else echo "Port $port is available" fi From 70547f10d5c51beb4b1a643bb2b4d06c395f5e32 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Fri, 12 Dec 2025 15:20:15 +0530 Subject: [PATCH 046/119] docker-fix --- .../with-survey/ubuntu/entity_sampleData.js | 500 ++++++++++-------- .../with-survey/ubuntu/insert_sample_data.sh | 7 +- .../ubuntu/insert_sample_solutions.js | 231 +++++--- .../with-survey/ubuntu/project_sampleData.js | 73 +-- .../stand-alone/ubuntu/insert_sample_data.sh | 47 +- 5 files changed, 519 insertions(+), 339 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js index 5c2bd2c8..8f17d82b 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js @@ -1,222 +1,290 @@ -const { ObjectId } = require('mongodb') +const { ObjectId } = require("mongodb"); let entityType = [ - { - _id: new ObjectId('6825914b97b5680013e6a140'), - profileForm: [], - profileFields: [], - types: [], - callResponseTypes: [], - isObservable: true, - immediateChildrenEntityType: ['district'], - createdBy: '49', - updatedBy: '49', - deleted: false, - isDeleted: false, - name: 'state', - toBeMappedToParentEntities: true, - tenantId: 'default', - updatedAt: new Date('2025-05-15T07:01:31.680Z'), - createdAt: new Date('2025-05-15T07:01:31.680Z'), - __v: 0, - orgId: 'default_code', - }, - { - _id: new ObjectId('6825915197b5680013e6a142'), - profileForm: [], - profileFields: [], - types: [], - callResponseTypes: [], - isObservable: true, - immediateChildrenEntityType: ['district'], - createdBy: '49', - updatedBy: '49', - deleted: false, - isDeleted: false, - name: 'district', - toBeMappedToParentEntities: true, - tenantId: 'default', - updatedAt: new Date('2025-05-15T07:01:37.892Z'), - createdAt: new Date('2025-05-15T07:01:37.892Z'), - __v: 0, - orgId: 'default_code', - }, - { - _id: new ObjectId('682591cc97b5680013e6a15c'), - profileForm: [], - profileFields: [], - types: [], - callResponseTypes: [], - isObservable: true, - immediateChildrenEntityType: ['district'], - createdBy: '49', - updatedBy: '49', - deleted: false, - isDeleted: false, - name: 'professional_role', - toBeMappedToParentEntities: true, - tenantId: 'default', - updatedAt: new Date('2025-05-15T07:03:40.376Z'), - createdAt: new Date('2025-05-15T07:03:40.376Z'), - __v: 0, - orgId: 'default_code', - }, - { - _id: new ObjectId('682591d397b5680013e6a15e'), - profileForm: [], - profileFields: [], - types: [], - callResponseTypes: [], - isObservable: true, - immediateChildrenEntityType: ['district'], - createdBy: '49', - updatedBy: '49', - deleted: false, - isDeleted: false, - name: 'professional_subroles', - toBeMappedToParentEntities: true, - tenantId: 'default', - updatedAt: new Date('2025-05-15T07:03:47.062Z'), - createdAt: new Date('2025-05-15T07:03:47.062Z'), - __v: 0, - orgId: 'default_code', - }, -] + { + _id: new ObjectId("6825914b97b5680013e6a140"), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ["district"], + createdBy: "49", + updatedBy: "49", + deleted: false, + isDeleted: false, + name: "state", + toBeMappedToParentEntities: true, + tenantId: "default", + updatedAt: new Date("2025-05-15T07:01:31.680Z"), + createdAt: new Date("2025-05-15T07:01:31.680Z"), + __v: 0, + orgId: "default_code", + }, + { + _id: new ObjectId("6825915197b5680013e6a142"), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ["district"], + createdBy: "49", + updatedBy: "49", + deleted: false, + isDeleted: false, + name: "district", + toBeMappedToParentEntities: true, + tenantId: "default", + updatedAt: new Date("2025-05-15T07:01:37.892Z"), + createdAt: new Date("2025-05-15T07:01:37.892Z"), + __v: 0, + orgId: "default_code", + }, + { + _id: new ObjectId("682591cc97b5680013e6a15c"), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ["district"], + createdBy: "49", + updatedBy: "49", + deleted: false, + isDeleted: false, + name: "professional_role", + toBeMappedToParentEntities: true, + tenantId: "default", + updatedAt: new Date("2025-05-15T07:03:40.376Z"), + createdAt: new Date("2025-05-15T07:03:40.376Z"), + __v: 0, + orgId: "default_code", + }, + { + _id: new ObjectId("682591d397b5680013e6a15e"), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ["district"], + createdBy: "49", + updatedBy: "49", + deleted: false, + isDeleted: false, + name: "professional_subroles", + toBeMappedToParentEntities: true, + tenantId: "default", + updatedAt: new Date("2025-05-15T07:03:47.062Z"), + createdAt: new Date("2025-05-15T07:03:47.062Z"), + __v: 0, + orgId: "default_code", + }, +]; let entities = [ - { - _id: new ObjectId('6852c86c7248c20014b38a4d'), - metaInformation: { - targetedEntityTypes: [], - externalId: '16', - name: 'Tripura', - }, - childHierarchyPath: ['district', 'block', 'cluster', 'school'], - createdBy: '20', - updatedBy: '20', - deleted: false, - entityTypeId: new ObjectId('6825914b97b5680013e6a140'), - entityType: 'state', - registryDetails: { - code: '16', - locationId: '16', - }, - tenantId: 'default', - orgId: 'default_code', - updatedAt: new Date('2025-06-18T14:29:00.266Z'), - createdAt: new Date('2025-06-18T14:08:44.438Z'), - __v: 0, - groups: { - district: [new ObjectId('6852c8ae7248c20014b38a57')], - }, - }, - { - _id: new ObjectId('6852c8ae7248c20014b38a57'), - metaInformation: { - targetedEntityTypes: [], - externalId: 'westTripura', - name: 'West Tripura', - }, - childHierarchyPath: ['block', 'cluster', 'school'], - createdBy: '20', - updatedBy: '20', - deleted: false, - entityTypeId: new ObjectId('6825915197b5680013e6a142'), - entityType: 'district', - registryDetails: { - code: 'westTripura', - locationId: 'westTripura', - }, - tenantId: 'default', - orgId: 'default_code', - updatedAt: new Date('2025-06-18T14:27:43.218Z'), - createdAt: new Date('2025-06-18T14:09:50.337Z'), - __v: 0, - groups: { - block: [ - new ObjectId('6852c8de7248c20014b38a9d'), - new ObjectId('6852c8de7248c20014b38a9e'), - new ObjectId('6852c8de7248c20014b38a9f'), - new ObjectId('6852c8de7248c20014b38aa0'), - new ObjectId('6852c8de7248c20014b38aa1'), - new ObjectId('6852c8de7248c20014b38aa2'), - new ObjectId('6852c8de7248c20014b38aa3'), - new ObjectId('6852c8de7248c20014b38aa4'), - new ObjectId('6852c8de7248c20014b38aa5'), - new ObjectId('6852c8de7248c20014b38aa6'), - new ObjectId('6852c8de7248c20014b38aa7'), - new ObjectId('6852c8de7248c20014b38aa8'), - ], - }, - }, - { - _id: new ObjectId('68876746b19aea00144c2af9'), - metaInformation: { - targetedEntityTypes: [ - { - entityTypeId: '6825915197b5680013e6a142', - entityType: 'district', - }, - ], - externalId: 'Facilitator', - name: 'Facilitator', - }, - childHierarchyPath: ['professional_role', 'professional_subroles'], - createdBy: '1', - updatedBy: '1', - deleted: false, - entityTypeId: new ObjectId('682591cc97b5680013e6a15c'), - entityType: 'professional_role', - registryDetails: { - locationId: 'Facilitator', - code: 'Facilitator', - }, - userId: '1', - tenantId: 'default', - orgId: 'default_code', - updatedAt: new Date('2025-07-28T12:08:56.065Z'), - createdAt: new Date('2025-07-28T12:04:22.011Z'), - __v: 0, - groups: { - professional_subroles: [new ObjectId('688767deb19aea00144c2b08')], - }, - }, - { - _id: new ObjectId('688767deb19aea00144c2b08'), - metaInformation: { - targetedEntityTypes: [ - { - entityType: 'Handbook1_Activity', - entityTypeId: '688762feb19aea00144c2a81', - }, - { - entityType: 'Handbook2_Activity', - entityTypeId: '68887766b19aea00144c3631', - }, - ], - externalId: 'facilitator', - name: 'Facilitator', - }, - childHierarchyPath: ['professional_subroles'], - createdBy: '1', - updatedBy: '1', - deleted: false, - entityTypeId: new ObjectId('682591d397b5680013e6a15e'), - entityType: 'professional_subroles', - registryDetails: { - locationId: 'facilitator', - code: 'facilitator', - }, - userId: '1', - tenantId: 'default', - orgId: 'default_code', - updatedAt: new Date('2025-07-29T07:28:05.355Z'), - createdAt: new Date('2025-07-28T12:06:54.072Z'), - __v: 0, - }, -] + { + _id: new ObjectId("6852c86c7248c20014b38a4d"), + metaInformation: { + targetedEntityTypes: [], + externalId: "16", + name: "Tripura", + }, + childHierarchyPath: ["district", "block", "cluster", "school"], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825914b97b5680013e6a140"), + entityType: "state", + registryDetails: { + code: "16", + locationId: "16", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:29:00.266Z"), + createdAt: new Date("2025-06-18T14:08:44.438Z"), + __v: 0, + groups: { + district: [new ObjectId("6852c8ae7248c20014b38a57")], + block: [new ObjectId("6852c8de7248c20014b38a9d")], + cluster: [new ObjectId("6852c9027248c20014b38c34")], + school: [new ObjectId("6852c9237248c20014b39fa0")], + }, + }, + { + _id: new ObjectId("6852c8ae7248c20014b38a57"), + metaInformation: { + targetedEntityTypes: [], + externalId: "westTripura", + name: "West Tripura", + }, + childHierarchyPath: ["block", "cluster", "school"], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825915197b5680013e6a142"), + entityType: "district", + registryDetails: { + code: "westTripura", + locationId: "westTripura", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:27:43.218Z"), + createdAt: new Date("2025-06-18T14:09:50.337Z"), + __v: 0, + groups: { + block: [new ObjectId("6852c8de7248c20014b38a9d")], + cluster: [new ObjectId("6852c9027248c20014b38c34")], + school: [new ObjectId("6852c9237248c20014b39fa0")], + }, + }, + { + _id: new ObjectId("6852c8de7248c20014b38a9d"), + metaInformation: { + targetedEntityTypes: [], + externalId: "160101", + name: "AGARTALA MUNICIPAL COORPORATION", + }, + childHierarchyPath: ["cluster", "school"], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825915597b5680013e6a144"), + entityType: "block", + registryDetails: { + code: "160101", + locationId: "160101", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:24:30.469Z"), + createdAt: new Date("2025-06-18T14:10:38.736Z"), + __v: 0, + groups: { + cluster: [new ObjectId("6852c9027248c20014b38c34")], + school: [new ObjectId("6852c9237248c20014b39fa0")], + }, + }, + { + _id: new ObjectId("6852c9027248c20014b38c34"), + metaInformation: { + targetedEntityTypes: [], + externalId: "1601010004", + name: "ACHARYA PRAFULLA CHANDRA H/S SCHOOL", + }, + childHierarchyPath: ["school"], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825915897b5680013e6a146"), + entityType: "cluster", + registryDetails: { + code: "1601010004", + locationId: "1601010004", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:22:16.044Z"), + createdAt: new Date("2025-06-18T14:11:14.746Z"), + __v: 0, + groups: { + school: [new ObjectId("6852c9237248c20014b39fa0")], + }, + }, + { + _id: new ObjectId("6852c9237248c20014b39fa0"), + metaInformation: { + targetedEntityTypes: [], + externalId: "16010100422", + name: "ABINASH GOPE SMRITI (SAROJANI) JB SCHOOL", + }, + childHierarchyPath: [], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825915c97b5680013e6a148"), + entityType: "school", + registryDetails: { + code: "16010100422", + locationId: "16010100422", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:11:49.194Z"), + createdAt: new Date("2025-06-18T14:11:49.194Z"), + __v: 0, + }, + { + _id: new ObjectId("68876746b19aea00144c2af9"), + metaInformation: { + targetedEntityTypes: [ + { + entityTypeId: "6825915197b5680013e6a142", + entityType: "district", + }, + ], + externalId: "Facilitator", + name: "Facilitator", + }, + childHierarchyPath: ["professional_role", "professional_subroles"], + createdBy: "1", + updatedBy: "1", + deleted: false, + entityTypeId: new ObjectId("682591cc97b5680013e6a15c"), + entityType: "professional_role", + registryDetails: { + locationId: "Facilitator", + code: "Facilitator", + }, + userId: "1", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-07-28T12:08:56.065Z"), + createdAt: new Date("2025-07-28T12:04:22.011Z"), + __v: 0, + groups: { + professional_subroles: [new ObjectId("688767deb19aea00144c2b08")], + }, + }, + { + _id: new ObjectId("688767deb19aea00144c2b08"), + metaInformation: { + targetedEntityTypes: [ + { + entityType: "Handbook1_Activity", + entityTypeId: "688762feb19aea00144c2a81", + }, + { + entityType: "Handbook2_Activity", + entityTypeId: "68887766b19aea00144c3631", + }, + ], + externalId: "facilitator", + name: "Facilitator", + }, + childHierarchyPath: ["professional_subroles"], + createdBy: "1", + updatedBy: "1", + deleted: false, + entityTypeId: new ObjectId("682591d397b5680013e6a15e"), + entityType: "professional_subroles", + registryDetails: { + locationId: "facilitator", + code: "facilitator", + }, + userId: "1", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-07-29T07:28:05.355Z"), + createdAt: new Date("2025-07-28T12:06:54.072Z"), + __v: 0, + }, +]; module.exports = { - entities, - entityType, -} + entities, + entityType, +}; diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh index dc5e8478..59284c92 100755 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh @@ -38,9 +38,14 @@ WHERE code = 'default'; # FIXES: # - Quoted the JSON value for the 'meta' column. psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (6, 'block', 'Block', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (7, 'school', 'School', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (8, 'district', 'District', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (9, 'cluster', 'Cluster', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (10, 'professional_role','Professional Role','ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +psql -h localhost -p 5432 -U postgres -d user -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (11, 'professional_subroles','Professional Subroles', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" # --- 5. UPDATES and SEQUENCES --- -psql -h localhost -p 5432 -U postgres -d user -c "UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3;" psql -h localhost -p 5432 -U postgres -d user -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" psql -h localhost -p 5432 -U postgres -d user -c "SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials;" psql -h localhost -p 5432 -U postgres -d user -c "SELECT NULL;" diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js index 3a2b1621..381ae252 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js @@ -1,79 +1,188 @@ -const { MongoClient } = require("mongodb"); +const { MongoClient } = require('mongodb') -const url = "mongodb://localhost:27017/"; // MongoDB URL -const dbName = "elevate-project"; -const dbName2 = "elevate-entity"; +const url = 'mongodb://localhost:27017/' // MongoDB URL +const dbName = 'elevate-project' +const dbName2 = 'elevate-entity' const dbName3 = "elevate-samiksha"; -const entityData = require("./entity_sampleData.js"); -const projectData = require("./project_sampleData.js"); +const entityData = require('./entity_sampleData.js') +const projectData = require('./project_sampleData.js') const surveyData = require("./survey_sampleData.js"); -async function insertData(collectionName, dataFile, curretDB = dbName) { - const client = new MongoClient(url); +// MongoDB Error Code for Duplicate Key +const DUPLICATE_KEY_ERROR_CODE = 11000 - try { - // Connect to MongoDB - await client.connect(); - console.log(`Connected to MongoDB for ${collectionName}`); +// --- UTILITY FUNCTIONS --- - const db = client.db(curretDB); - const collection = db.collection(collectionName); +/** + * Drops the specified collection, effectively deleting all data. + * @param {string} collectionName The name of the collection to drop. + * @param {string} currentDB The name of the database. + */ +async function cleanData(collectionName, currentDB) { + const client = new MongoClient(url) + try { + await client.connect() + const db = client.db(currentDB) + const collection = db.collection(collectionName) - // Read the data from the file - const data = dataFile; + const exists = await collection.findOne({}) + if (exists) { + await collection.drop() + console.log(`šŸ—‘ļø Successfully dropped collection: ${currentDB}.${collectionName}`) + } else { + // Use .listCollections for a more definitive check if needed, but drop() is usually safe. + console.log(`ā„¹ļø Collection ${collectionName} in ${currentDB} does not exist or is empty. Skipping drop.`) + } + } catch (error) { + // This catches general connection or other drop errors + console.error(`āŒ Error dropping collection ${collectionName} in ${currentDB}: ${error.message}`) + } finally { + await client.close() + } +} + +/** + * Inserts data into the specified collection and provides detailed status messages. + * (This function is kept the same as your previous version for insertion logic) + * @param {string} collectionName The name of the collection. + * @param {Array} dataFile The array of documents to insert. + * @param {string} currentDB The name of the database. + */ +async function insertData(collectionName, dataFile, currentDB = dbName) { + const client = new MongoClient(url) + + try { + await client.connect() + const db = client.db(currentDB) + const collection = db.collection(collectionName) + + const data = dataFile + + if (!data || data.length === 0) { + return + } + + console.log(`\n--- Attempting insertion into: ${currentDB}.${collectionName} ---`) + + const results = [] + await Promise.all( + data.map(async (doc, index) => { + const tempId = doc._id || `(Document Index: ${index})` + + try { + const result = await collection.insertOne(doc) + const finalId = result.insertedId || doc._id - if (!data) { - await client.close(); - return; - } + results.push({ + id: finalId, + status: 'SUCCESS', + message: `Document successfully created with _id: ${finalId}`, + }) + } catch (error) { + if (error.code === DUPLICATE_KEY_ERROR_CODE) { + results.push({ + id: tempId, + status: 'DUPLICATE', + message: `The data with identifier ${tempId} is already present in the DB. Please ensure unique identifiers are provided or clean the existing data.`, + }) + } else { + // Catch other errors (e.g., validation failure, connection issues) + results.push({ + id: tempId, + status: 'FAILURE', + message: `Error inserting document ${tempId}: ${error.message}`, + }) + } + } + }) + ) - const result = await collection.insertMany(data); - //console.log(`Inserted ${result.insertedCount} documents into ${collectionName}`); - } finally { - await client.close(); - } + // Print the detailed results + results.forEach((res) => { + let message = '' + if (res.status === 'SUCCESS') { + message = `āœ… SUCCESS: ${res.message}` + } else if (res.status === 'DUPLICATE') { + message = `āš ļø DUPLICATE: ${res.message}` + } else { + message = `āŒ FAILURE: ${res.message}` + } + console.log(message) + }) + } catch (globalError) { + console.error(`\nFatal error connecting to or operating on the database: ${globalError.message}`) + } finally { + await client.close() + } } + async function main({ dataToBeInserted }) { - await insertData("entities", dataToBeInserted.entities, dbName2); - await insertData("entityTypes", dataToBeInserted.entityType, dbName2); - await insertData("programs", dataToBeInserted.programData); - await insertData("solutions", dataToBeInserted.solutionData); - await insertData("projectTemplates", dataToBeInserted.projectTemplatesData); - await insertData( - "projectTemplateTasks", - dataToBeInserted.projectTemplateTasksData - ); - await insertData( - "certificateTemplates", - dataToBeInserted.certificateTemplatesData - ); - await insertData( - "certificateBaseTemplates", - dataToBeInserted.certificateBaseTemplatesData - ); - await insertData("projectCategories", dataToBeInserted.projectCategoriesData); - - await insertData("solutions", dataToBeInserted.solutionData, dbName3); - await insertData("criteria", dataToBeInserted.criteriaData, dbName3); - await insertData("criteriaQuestions", dataToBeInserted.criteriaQuestionsData,dbName3); - await insertData("frameworks", dataToBeInserted.frameworkData,dbName3); - await insertData("questions", dataToBeInserted.questionsData,dbName3); + const collectionsToInsert = [ + { name: 'entities', data: dataToBeInserted.entities, db: dbName2 }, + { name: 'entityTypes', data: dataToBeInserted.entityType, db: dbName2 }, + { name: 'programs', data: dataToBeInserted.programData, db: dbName }, + { name: 'solutions', data: dataToBeInserted.solutionData, db: dbName }, + { name: 'projectTemplates', data: dataToBeInserted.projectTemplatesData, db: dbName }, + { name: 'projectTemplateTasks', data: dataToBeInserted.projectTemplateTasksData, db: dbName }, + { name: 'certificateTemplates', data: dataToBeInserted.certificateTemplatesData, db: dbName }, + { name: 'certificateBaseTemplates', data: dataToBeInserted.certificateBaseTemplatesData, db: dbName }, + { name: 'projectCategories', data: dataToBeInserted.projectCategoriesData, db: dbName }, + { name: 'configurations', data: dataToBeInserted.configurationData, db: dbName }, + { name: "solutions", data: dataToBeInserted.solutionData, dbName3}, + { name: "criteria", data:dataToBeInserted.criteriaData, dbName3}, + { name: "criteriaQuestions", data: dataToBeInserted.criteriaQuestionsData,dbName3}, + { name: "frameworks", data: dataToBeInserted.frameworkData,dbName3}, + { name: "questions", data: dataToBeInserted.questionsData,dbName3}, + + ] + + console.log(`\n=================================================`) + console.log( + `šŸ—‘ļø Starting CLEANUP for ${dataToBeInserted === entityData ? 'Entity Data' : 'Project Data & Survey Data' } Collections...` + ) + console.log(`=================================================`) + + for (const item of collectionsToInsert) { + if (item.data) { + await cleanData(item.name, item.db) + } + } + console.log(`\n=================================================`) + console.log( + `āž• Starting INSERTION for ${dataToBeInserted === entityData ? 'Entity Data' : 'Project Data & Survey Data '} Collections...` + ) + console.log(`=================================================`) + + for (const item of collectionsToInsert) { + if (item.data) { + await insertData(item.name, item.data, item.db) + } + } } main({ dataToBeInserted: entityData }) - .then(() => { - console.log("Entity data populated successfully."); - }) - .catch(console.error); + .then(() => { + console.log('\n=======================================') + console.log('āœ… Entity data population process finished.') + console.log('=======================================') + }) + .catch(console.error) + main({ dataToBeInserted: projectData }) - .then(() => { - console.log("project data populated successfully."); - }) - .catch(console.error); + .then(() => { + console.log('\n=======================================') + console.log('āœ… Project data population process finished.') + console.log('=======================================') + }) + .catch(console.error) + + main({ dataToBeInserted: surveyData }) - .then(() => { - console.log("Survey data populated successfully."); - }) - .catch(console.error); +.then(() => { + console.log('\n=======================================') + console.log('āœ… survey data population process finished.') + console.log('=======================================') +}) +.catch(console.error) diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js index 732927c1..c7cb9fc6 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js @@ -1557,51 +1557,6 @@ let projectTemplateTasksData = [ createdAt: new Date("2025-10-14T13:10:11.744Z"), __v: 0, }, - { - _id: new ObjectId("68ee4bb4fb9bee08b93b6d7a"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ - { - name: "Activity Steps (Video)", - link: "https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih", - app: "projectService", - id: "MNvM_H9zD3Y?si=BdfslSzCkmDCggih", - }, - ], - deleted: false, - type: "content", - projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), - projectTemplateExternalId: - "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", - name: "Watch the Activity Video", - externalId: "DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188", - description: "", - sequenceNumber: "2", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "01/08/2025", - endDate: "31/12/2025", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-10-14T13:10:12.192Z"), - createdAt: new Date("2025-10-14T13:10:11.805Z"), - __v: 0, - }, { _id: new ObjectId("68ee4bb4fb9bee08b93b6d7e"), createdBy: "1", @@ -1953,6 +1908,33 @@ let projectCategoriesData = [ __v: 0, }, ]; + + +let configurationData = [ + { + _id: new ObjectId('6825a1982d46aa6df0cc36a8'), + code: 'keysAllowedForTargeting', + __v: 0, + createdAt: new Date('2025-05-15T08:11:04.674Z'), + meta: { + profileKeys: [ + 'state', + 'district', + 'block', + 'cluster', + 'school', + 'professional_role', + 'professional_subroles', + 'roles', + 'subject', + 'organizations', + ], + }, + updatedAt: new Date('2025-05-26T10:56:17.021Z'), + }, +] + + module.exports = { solutionData, programData, @@ -1961,4 +1943,5 @@ module.exports = { certificateTemplatesData, certificateBaseTemplatesData, projectCategoriesData, + configurationData }; diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh index 713c8079..fabcff4d 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh @@ -1,19 +1,27 @@ #!/bin/bash -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e4','+91', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a767','+91', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a7e0','+91', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default','53bc5d0ff0c53bee460c08b8afe087455050dc7529a2f1d4f7319c0da653a700','+91', NULL);" + +# --- 0. PRE-REQUISITE: INSERT MISSING ROLES (for foreign key resolution) --- +# NOTE: Role IDs 1 and 8 are required for subsequent inserts. +# You should verify the tenant_code column and other required fields for user_roles table. +# Assuming the necessary role records (1 and 8) are missing and need to be created first. + +# --- 1. INSERT INTO public.users --- +# These inserts appear correct and should result in 'INSERT 0 1' output. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" # --- 2. INSERT INTO public.user_organizations --- -# FIXES: -# - Quoted the organization_code and tenant_code variables. +# These inserts should be fine. sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (1, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (2, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (3, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (4, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" - -sudo -u postgres psql -p 5432 -d user -c " +# --- 3. UPDATE public.tenants --- +# FIX: Changed -d user to -d users +sudo -u postgres psql -p 5432 -d users -c " UPDATE public.tenants SET meta = '{ \"factors\": [\"professional_role\", \"professional_subroles\"], @@ -25,19 +33,26 @@ SET meta = '{ WHERE code = 'default'; " - -# FIXES: -# - Quoted the organization_code and tenant_code variables. +# --- 4. INSERT INTO public.user_organization_roles --- +# These inserts now occur AFTER the required user_roles (ID 1 and 8) have been added. sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 2, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" -sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex) VALUES (4, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, NULL, true, false, NULL);" -sudo -u postgres psql -p 5432 -d users -c "UPDATE public.entity_types SET status = 'INACTIVE' WHERE id = 3;" +# --- 5. INSERT INTO public.entity_types --- +# FIX: Added 'tenant_code' to the columns list and provided the value 'default'. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (6, 'block', 'Block', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (7, 'school', 'School', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (8, 'district', 'District', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (9, 'cluster', 'Cluster', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (10, 'professional_role','Professional Role','ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_cod');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (11, 'professional_subroles','Professional Subroles', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_cod');" + +# --- 6. Final Commands --- sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials;" sudo -u postgres psql -p 5432 -d users -c "UPDATE role_permission_mapping SET role_title = 'state_education_officer' WHERE role_title = 'mentor';" -sudo -u postgres psql -p 5432 -d users -c "SELECT NULL;" - +sudo -u postgres psql -p 5432 -d users -c "SELECT NULL;" \ No newline at end of file From 15ec625a0ac1ace9f2eace7d1867888dbf612404 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 12:10:22 +0530 Subject: [PATCH 047/119] added-cloud-FE-in-ReadMe --- .../stand-alone/ubuntu/setup_project.sh | 2 +- .../native/envs/stand-alone/interface_env | 2 +- .../scripts/stand-alone/ubuntu/citus_setup.sh | 134 ++++++++++++------ .../setup/docker/stand-alone/ubuntu/README.md | 34 +++-- .../setup/native/stand-alone/ubuntu/README.md | 108 ++++++-------- 5 files changed, 156 insertions(+), 124 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh index 133bb1bd..b0e3d124 100644 --- a/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/setup_project.sh @@ -56,7 +56,7 @@ log "User directory created and distributionColumns.sql downloaded." # Step 9: Download and make citus_setup.sh executable log "Downloading citus_setup.sh..." -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh chmod +x citus_setup.sh # Install MongoDB driver (usually needed if connecting directly to MongoDB/Citus) diff --git a/documentation/3.4.0/native/envs/stand-alone/interface_env b/documentation/3.4.0/native/envs/stand-alone/interface_env index bd700eda..62f2bbf6 100644 --- a/documentation/3.4.0/native/envs/stand-alone/interface_env +++ b/documentation/3.4.0/native/envs/stand-alone/interface_env @@ -1,7 +1,7 @@ API_DOC_URL=/interface/api-doc APPLICATION_ENV=development APPLICATION_PORT=3569 -ELEVATE_NOTIFICATION_KAFKA_BROKERS=10.148.0.38:9092 +ELEVATE_NOTIFICATION_KAFKA_BROKERS=localhost:9092 ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=dev.mentoring ELEVATE_NOTIFICATION_KAFKA_TOPIC=dev.notification ENTITY_SERVICE_BASE_URL=http://localhost:5001 diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/citus_setup.sh b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/citus_setup.sh index 7bba4af4..3e9996ac 100644 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/citus_setup.sh +++ b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/citus_setup.sh @@ -1,93 +1,133 @@ #!/bin/bash -# Exit on error +# Exit immediately if a command exits with a non-zero status. set -e -# Ensure correct number of arguments are provided +# --- 1. ARGUMENT VALIDATION --- if [ $# -lt 2 ]; then - echo "Error: Folder name and database URL not provided. Usage: $0 " + echo "Error: Folder name and database URL not provided." >&2 + echo "Usage: $0 " >&2 exit 1 fi -# Use the provided folder name FOLDER_NAME="$1" +DEV_DATABASE_URL="$2" # Check if folder exists if [ ! -d "$FOLDER_NAME" ]; then - echo "Error: Folder '$FOLDER_NAME' not found." + echo "Error: Folder '$FOLDER_NAME' not found." >&2 exit 1 fi -# Use the provided database URL -DEV_DATABASE_URL="$2" +# --- 2. HIGHLY RELIABLE DATABASE URL PARSING --- +echo "Parsing database URL..." + +# Remove protocol (postgres://) +DB_CLEAN_URL=$(echo "$DEV_DATABASE_URL" | sed 's/.*:\/\///') + +# Extract DB_NAME +DB_NAME=$(echo "$DB_CLEAN_URL" | awk -F '/' '{print $NF}') + +# Remove DB_NAME from path +HOST_PORT_PATH=$(echo "$DB_CLEAN_URL" | sed "s/\/$DB_NAME//") -# Extract database credentials and connection details using awk for portability -DB_USER=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $4}') -DB_PASSWORD=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $5}') -DB_HOST=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{print $6}') -DB_PORT=$(echo $DEV_DATABASE_URL | awk -F '[:@/]' '{split($7,a,"/"); print a[1]}') -DB_NAME=$(echo $DEV_DATABASE_URL | awk -F '/' '{print $NF}') +# Extract components +DB_USER=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $1}') +DB_PASSWORD=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $2}') +DB_HOST=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $3}') +DB_PORT=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $4}') -# Log database variables +# Log extracted values (excluding password) echo "Extracted Database Variables:" echo "DB_USER: $DB_USER" -echo "DB_PASSWORD: $DB_PASSWORD" echo "DB_HOST: $DB_HOST" echo "DB_PORT: $DB_PORT" echo "DB_NAME: $DB_NAME" +echo "" + +if [[ -z "$DB_PORT" ]]; then + echo "Error: Could not extract database port. Check URL format." >&2 + exit 1 +fi + +# --- 3. WAIT FOR LOCAL POSTGRESQL --- -# Wait for PostgreSQL to be ready to accept connections -echo "Waiting for PostgreSQL on '$DB_HOST:$DB_PORT' to accept connections..." -until pg_isready -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER"; do - echo "Waiting for database to be ready..." +echo "Waiting for PostgreSQL on $DB_HOST:$DB_PORT to accept connections..." +until pg_isready -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" > /dev/null 2>&1; do + echo -n "." sleep 1 done -echo "Database is ready." - -# Function to check if the database exists -check_database() { - PGPASSWORD="$DB_PASSWORD" psql -h "$DB_HOST" -U "$DB_USER" -p "$DB_PORT" -lqt | cut -d \| -f 1 | grep -qw "$DB_NAME" -} +echo -e "\nPostgreSQL is ready." +# Wait until database exists echo "Checking existence of database '$DB_NAME'..." -until check_database; do - echo "Database '$DB_NAME' does not exist, waiting..." +until PGPASSWORD="$DB_PASSWORD" psql \ + -h "$DB_HOST" \ + -U "$DB_USER" \ + -p "$DB_PORT" \ + -d postgres \ + -lqt | awk '{print $1}' | grep -qw "$DB_NAME"; do + echo -n "." sleep 5 done -echo "Database '$DB_NAME' exists, proceeding with script." +echo -e "\nDatabase '$DB_NAME' exists." + +# --- 4. CITUS EXTENSION SETUP --- -# Retrieve and prepare SQL file operations DISTRIBUTION_COLUMNS_FILE="$FOLDER_NAME/distributionColumns.sql" if [ ! -f "$DISTRIBUTION_COLUMNS_FILE" ]; then - echo "Error: distributionColumns.sql not found in folder '$FOLDER_NAME'." + echo "Error: distributionColumns.sql not found in folder '$FOLDER_NAME'." >&2 exit 1 fi -echo "Creating Citus extension in the database..." -PGPASSWORD="$DB_PASSWORD" psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -p "$DB_PORT" -c 'CREATE EXTENSION IF NOT EXISTS citus;' +echo "Creating Citus extension (if not exists)..." +PGPASSWORD="$DB_PASSWORD" psql \ + -h "$DB_HOST" \ + -U "$DB_USER" \ + -d "$DB_NAME" \ + -p "$DB_PORT" \ + --set ON_ERROR_STOP=1 \ + -c "CREATE EXTENSION IF NOT EXISTS citus;" + +# --- 5. EXECUTE SQL FILE WITH ROBUST TABLE CHECK --- -# Function to check if table exists check_table() { - local table=$1 - local exists=$(PGPASSWORD="$DB_PASSWORD" psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -p "$DB_PORT" -t -c "SELECT EXISTS(SELECT 1 FROM pg_tables WHERE schemaname = 'public' AND tablename = '$table');") - exists=$(echo "$exists" | tr -d '[:space:]') # Trim whitespace - echo "Debug: exists result for table $table = '$exists'" # Debug line - [[ "$exists" == "t" ]] # Checking specifically for 't' + local table_name=$1 + PGPASSWORD="$DB_PASSWORD" psql \ + -h "$DB_HOST" \ + -U "$DB_USER" \ + -d "$DB_NAME" \ + -p "$DB_PORT" \ + -q -t \ + --set ON_ERROR_STOP=1 \ + -c "SELECT 1 FROM $table_name LIMIT 1;" \ + > /dev/null 2>&1 } -# Execute the SQL file with checks for table existence -echo "Creating distribution columns..." +echo "Starting creation of distributed tables..." + while IFS= read -r line; do - if [[ $line =~ create_distributed_table\(\'([^\']+)\', ]]; then + trimmed_line=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + + if [[ "$trimmed_line" =~ ^create_distributed_table\(\'([^\']+)\', ]]; then table="${BASH_REMATCH[1]}" - echo "Checking existence of table '$table'..." + echo "Processing table: '$table'" + + # Wait until table exists until check_table "$table"; do - echo "Table '$table' does not exist, waiting..." + echo "Table '$table' does not exist yet (waiting for migration)..." sleep 1 done - echo "Table '$table' exists, executing: $line" - PGPASSWORD="$DB_PASSWORD" psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -p "$DB_PORT" -c "$line" + + echo "Table '$table' exists. Applying Citus distribution..." + PGPASSWORD="$DB_PASSWORD" psql \ + -h "$DB_HOST" \ + -U "$DB_USER" \ + -d "$DB_NAME" \ + -p "$DB_PORT" \ + --set ON_ERROR_STOP=1 \ + -c "$trimmed_line" fi -done <"$DISTRIBUTION_COLUMNS_FILE" +done < "$DISTRIBUTION_COLUMNS_FILE" -echo "Citus extension setup complete." +echo "āœ… Local PostgreSQL Citus setup and table distribution completed successfully!" diff --git a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md index 4c10b551..629c8e10 100644 --- a/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/stand-alone/ubuntu/README.md @@ -100,6 +100,25 @@ To enable the Citus extension for user services, follow these steps. sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user ``` +## Update Cloud Credentials for Project Service + +To enable full functionality, including certificate generation and report storage, you must configure cloud credentials in the Project Service environment file. + + Path: project_env + +Add or update the following variables in the .env file, substituting the example values with your actual cloud credentials: + + CLOUD_STORAGE_PROVIDER=gcloud + CLOUD_STORAGE_ACCOUNTNAME=your_account_name + CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\n..." + CLOUD_STORAGE_PROJECT=your_cloud_project_id + CLOUD_STORAGE_BUCKETNAME=your_bucket_name + CLOUD_STORAGE_BUCKET_TYPE=private + +> NOTE : This service is designed to support multiple cloud storage providers and offers flexible cloud integration capabilities. Based on your selected cloud provider, the service can be configured accordingly to enable seamless storage, certificate generation, and report handling. + +For detailed configuration options, supported cloud providers, and integration guidelines, please refer to the official documentation available in this [ReadMe](https://www.npmjs.com/package/client-cloud-services?activeTab=readme) + ## Persistence Of Database Data In Docker Container (Optional) To ensure the persistence of database data when running `docker compose down`, it is necessary to modify the `docker-compose-project.yml` file according to the steps given below: @@ -176,19 +195,14 @@ This step will guide us in implementing a sample project solution following the node insert_sample_solutions.js ``` -## Default Forms Creation for Portal Configuration - -This step inserts configuration forms into MongoDB, enabling or disabling features and fields on portal pages. - -#### Insert Forms Data into Database +## 🌐 Micro-Frontend (FE) Setup -``` -curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/import_forms_mongo.sh && chmod +x import_forms_mongo.sh && sudo ./import_forms_mongo.sh mongodb://mongo:27017/elevate-project -``` +The ELEVATE application uses a micro-frontend architecture. After setting up the backend services, you must configure and run the frontend repositories to access the application via the portal. -## Explore the Portal +Follow the setup guides for the frontend repositories: -Once the services are up and the front-end app bundle is built successfully, navigate to **[localhost:7007](http://localhost:7007/)** to access the Project app. +- **Login Portal:** [elevate-portal](https://github.com/ELEVATE-Project/elevate-portal/tree/releaase-1.1.0) +- **Projects Program Module (PWA):** [observation-survey-projects-pwa](https://github.com/ELEVATE-Project/observation-survey-projects-pwa/tree/release-3.4.0) > **Warning:** In this setup, features such as **Sign-Up, Project Certificate, Project Sharing, and Project PDF Report** will not be available because cloud storage credentials have been masked in the environment files for security reasons. diff --git a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md index b5dcdb6b..1cb3eb4e 100644 --- a/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/stand-alone/ubuntu/README.md @@ -22,7 +22,7 @@ The Project building block facilitates the creation and engagement with micro-im
-# Native Setup - Stand Alone +# Native Setup Project Service - Stand Alone ## PM2 Managed Services & Natively Installed Dependencies @@ -86,12 +86,8 @@ Before setting up the following ELEVATE-Project application, dependencies given git clone -b develop https://github.com/ELEVATE-Project/project-service.git && \ git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ git clone -b develop https://github.com/ELEVATE-Project/user.git && \ -git clone -b master https://github.com/ELEVATE-Project/notification.git && \ git clone -b main https://github.com/ELEVATE-Project/interface-service.git && \ -git clone -b master https://github.com/ELEVATE-Project/scheduler.git && \ -git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-survey-projects-pwa && \ -git clone -b releaase-1.1.0 https://github.com/ELEVATE-Project/elevate-portal && \ -git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal +git clone -b master https://github.com/ELEVATE-Project/scheduler.git ``` 3. **Install NPM Packages** @@ -100,13 +96,8 @@ git clone -b release-3.4.0 https://github.com/ELEVATE-Project/observation-portal cd project-service && npm install && cd ../ && \ cd entity-management/src && npm install && cd ../.. && \ cd user/src && npm install && cd ../.. && \ -cd entity-management\src && npm install && cd ..\.. && \ -cd notification/src && npm install && cd ../.. && \ cd interface-service/src && npm install && cd ../.. && \ -cd scheduler/src && npm install && cd ../.. && \ -cd observation-survey-projects-pwa && npm install --force && cd .. && \ -cd observation-portal && npm install --force && cd .. && \ -cd elevate-portal && npm install --force && cd .. +cd scheduler/src && npm install && cd ../.. ``` 4. **Download Environment Files** @@ -115,12 +106,8 @@ cd elevate-portal && npm install --force && cd .. curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/project_env && \ curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/entity_management_env && \ curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/user_env && \ -curl -L -o notification/src/.env https://github.com/ELEVATE-Project/project-service/raw/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/notification_env && \ -curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/interface_env && \ -curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/scheduler_env && \ -curl -L -o observation-survey-projects-pwa/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/observation_survey_projects_pwa_env && \ -curl -L -o elevate-portal/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/elevate_portal_env && \ -curl -L -o observation-portal/src/assets/env/env.js https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/envs/stand-alone/observation_portal_env +curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/interface_env && \ +curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/scheduler_env ``` > **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. @@ -132,8 +119,8 @@ curl -L -o observation-portal/src/assets/env/env.js https://raw.githubuserconten 5. **Attaching Config File** ``` - curl -L -o project-service/config.json https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/config.json && \ - curl -L -o entity-management/src/config.json https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/config.json + curl -L -o project-service/config.json https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/configFile.json && \ + curl -L -o entity-management/src/config.json https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/configFile.json ``` 6. **Create Databases** @@ -156,12 +143,18 @@ curl -L -o observation-portal/src/assets/env/env.js https://raw.githubuserconten ./create-databases.sh ``` -7. **Run Migrations To Create Tables** +7. **Run Migrations and Seed To Create Tables** - ``` - cd user/src && npx sequelize-cli db:migrate && cd ../.. && \ - cd notification/src && npx sequelize-cli db:migrate && cd ../.. - ``` + 1. run migrations + + ``` + cd user/src && npx sequelize-cli db:migrate && cd ../.. + ``` + + 2. run Seed + ``` + cd user/src && npx sequelize-cli db:seed:all && cd ../../ + ``` 8. **Enabling Citus And Setting Distribution Columns (Optional)** @@ -195,7 +188,26 @@ curl -L -o observation-portal/src/assets/env/env.js https://raw.githubuserconten ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users ``` -9. **Insert Initial Data** +9. **Update Cloud Credentials for Project Service** + + To enable full functionality, including certificate generation and report storage, you must configure cloud credentials in the Project Service environment file. + + Path: ./ELEVATE-Project/project-service/.env + + Add or update the following variables in the .env file, substituting the example values with your actual cloud credentials: + + CLOUD_STORAGE_PROVIDER=gcloud + CLOUD_STORAGE_ACCOUNTNAME=your_account_name + CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\n..." + CLOUD_STORAGE_PROJECT=your_cloud_project_id + CLOUD_STORAGE_BUCKETNAME=your_bucket_name + CLOUD_STORAGE_BUCKET_TYPE=private + + > NOTE : This service is designed to support multiple cloud storage providers and offers flexible cloud integration capabilities. Based on your selected cloud provider, the service can be configured accordingly to enable seamless storage, certificate generation, and report handling. + + For detailed configuration options, supported cloud providers, and integration guidelines, please refer to the official documentation available in this [ReadMe](https://www.npmjs.com/package/client-cloud-services?activeTab=readme) + +10. **Insert Initial Data** 1. Download `entity-project-sample-data.sh` Script File: @@ -205,12 +217,6 @@ curl -L -o observation-portal/src/assets/env/env.js https://raw.githubuserconten ./project_entity_sample_data.sh ``` -10. **Insert Forms Data into Database** - - ``` - curl -s https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/import_forms.js | node - ``` - 11. **Start The Services** Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. @@ -219,46 +225,18 @@ curl -L -o observation-portal/src/assets/env/env.js https://raw.githubuserconten (cd project-service && pm2 start app.js --name project-service && cd -) && \ (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ (cd user/src && pm2 start app.js --name user && cd -) && \ - (cd notification/src && pm2 start app.js --name notification && cd -) && \ (cd interface-service/src && pm2 start app.js --name interface && cd -) && \ (cd scheduler/src && pm2 start app.js --name scheduler && cd -) ``` -12. **Run Service Scripts** +## 🌐 Micro-Frontend (FE) Setup - ``` - cd user/src/scripts && node insertDefaultOrg.js && node viewsScript.js && cd ../../.. - ``` - -13. **Start The Portal** - - ELEVATE-Project portal utilizes Ionic for building the browser bundle, follow the steps given below to install them and start the portal. - - 1. Install the Ionic framework: +The ELEVATE application uses a micro-frontend architecture. After setting up the backend services, you must configure and run the frontend repositories to access the application via the portal. - ``` - npm install -g ionic - ``` - - 2. Install the Ionic client: - - ``` - npm install -g @ionic/cli - ``` - - 3. Navigate to `observation-survey-projects-pwa` directory: - - ``` - cd observation-survey-projects-pwa - ``` - - 4. Run the project on your local system using the following command: - - ``` - ionic serve - ``` +Follow the setup guides for the frontend repositories: - Navigate to http://localhost:8100 to access the ELEVATE-Project Portal. +- **Login Portal:** [elevate-portal](https://github.com/ELEVATE-Project/elevate-portal/tree/releaase-1.1.0) +- **Projects Program Module (PWA):** [observation-survey-projects-pwa](https://github.com/ELEVATE-Project/observation-survey-projects-pwa/tree/release-3.4.0) ## Sample User Accounts Generation From fa44121ef74191ddeebd116639a15d498f2dc411 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 13:15:56 +0530 Subject: [PATCH 048/119] added-survey-native --- .../3.4.0/dockerized/envs/samiksha_env | 6 +- .../with-survey/ubuntu/project_sampleData.js | 3361 ++++++------ .../with-survey/ubuntu/setup_project.sh | 2 +- .../envs/with-survey/elevate_portal_env | 48 + .../envs/with-survey/entity_management_env | 23 + .../native/envs/with-survey/interface_env | 24 + .../native/envs/with-survey/notification_env | 17 + .../envs/with-survey/observation_portal_env | 4 + .../observation_survey_projects_pwa_env | 18 + .../3.4.0/native/envs/with-survey/project_env | 47 + .../native/envs/with-survey/samiksha_env | 66 + .../native/envs/with-survey/scheduler_env | 13 + .../3.4.0/native/envs/with-survey/user_env | 82 + .../scripts/stand-alone/ubuntu/common.js | 39 - .../stand-alone/ubuntu/import_forms.js | 51 - .../with-survey/ubuntu/check-dependencies.sh | 139 + .../scripts/with-survey/ubuntu/citus_setup.sh | 133 + .../with-survey/ubuntu/configFile.json | 11 + .../with-survey/ubuntu/create-databases.sh | 16 + .../with-survey/ubuntu/entity_sampleData.js | 290 + .../with-survey/ubuntu/insert_sample_data.sh | 58 + .../ubuntu/insert_sample_solutions.js | 188 + .../ubuntu/install-dependencies.sh | 206 + .../ubuntu/project_entity_sample_data.sh | 62 + .../with-survey/ubuntu/project_sampleData.js | 1912 +++++++ .../with-survey/ubuntu/survey_sampleData.js | 4860 +++++++++++++++++ .../ubuntu/uninstall-dependencies.sh | 131 + .../setup/native/with-survey/ubuntu/README.md | 290 + 28 files changed, 10305 insertions(+), 1792 deletions(-) create mode 100644 documentation/3.4.0/native/envs/with-survey/elevate_portal_env create mode 100644 documentation/3.4.0/native/envs/with-survey/entity_management_env create mode 100644 documentation/3.4.0/native/envs/with-survey/interface_env create mode 100644 documentation/3.4.0/native/envs/with-survey/notification_env create mode 100644 documentation/3.4.0/native/envs/with-survey/observation_portal_env create mode 100644 documentation/3.4.0/native/envs/with-survey/observation_survey_projects_pwa_env create mode 100644 documentation/3.4.0/native/envs/with-survey/project_env create mode 100644 documentation/3.4.0/native/envs/with-survey/samiksha_env create mode 100644 documentation/3.4.0/native/envs/with-survey/scheduler_env create mode 100644 documentation/3.4.0/native/envs/with-survey/user_env delete mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/common.js delete mode 100644 documentation/3.4.0/native/scripts/stand-alone/ubuntu/import_forms.js create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/check-dependencies.sh create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/citus_setup.sh create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/configFile.json create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/create-databases.sh create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_data.sh create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/install-dependencies.sh create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/project_entity_sample_data.sh create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js create mode 100644 documentation/3.4.0/native/scripts/with-survey/ubuntu/uninstall-dependencies.sh create mode 100644 documentation/3.4.0/setup/native/with-survey/ubuntu/README.md diff --git a/documentation/3.4.0/dockerized/envs/samiksha_env b/documentation/3.4.0/dockerized/envs/samiksha_env index f83e99a4..2943aba8 100644 --- a/documentation/3.4.0/dockerized/envs/samiksha_env +++ b/documentation/3.4.0/dockerized/envs/samiksha_env @@ -22,11 +22,11 @@ CSV_REPORTS_PATH=reports DB=elevate-samiksha DEFAULT_ORGANISATION_CODE=default_code ELEVATE_SURVEY_SERVICE_URL=http://samiksha:7007 -ENTITY_BASE_URL=http://entity_management:3569 -ENTITY_MANAGEMENT_SERVICE_URL=http://entity_management:3569/entity-management +ENTITY_BASE_URL=http://interface:3569 +ENTITY_MANAGEMENT_SERVICE_URL=http://interface:3569/entity-management GOTENBERG_URL=http://gotenberg:3000 HOST=localhost -IMPROVEMENT_PROJECT_BASE_URL=http://project:3567 +IMPROVEMENT_PROJECT_BASE_URL=http://project:3569 IMPROVEMENT_PROJECT_SUBMISSION_TOPIC=elevate_project_task_submissions_dev INCOMPLETE_OBSERVATION_SUBMISSION_TOPIC=elevate_observations_dev INCOMPLETE_SUBMISSION_TOPIC=elevate_submissions_dev diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js index c7cb9fc6..54dbfcc5 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js @@ -1,451 +1,444 @@ -const { ObjectId } = require("mongodb"); +const { ObjectId } = require('mongodb') let solutionData = [ - { - _id: new ObjectId("68ee4bb3fb9bee08b93b6d68"), - resourceType: ["Improvement Project Solution"], - language: ["English"], - keywords: ["Improvement Project"], - concepts: [], - themes: [], - flattenedThemes: [], - entities: [], - registry: [], - isRubricDriven: false, - enableQuestionReadOut: false, - captureGpsLocationAtQuestionLevel: false, - isAPrivateProgram: false, - allowMultipleAssessemts: false, - isDeleted: false, - pageHeading: "Domains", - minNoOfSubmissionsRequired: 1, - rootOrganisations: [], - createdFor: [], - submissionLevel: "USER", - availableForPrivateConsumption: true, - parentEntityKey: null, - deleted: false, - programExternalId: - "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", - entityType: "school", - externalId: - "PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION", - name: "pro with obsasatask oct 8 facilitator only 2nd", - description: "To construct a wired car using a DPDT switch.", - isReusable: false, - startDate: new Date("2025-09-09T00:00:00.000Z"), - endDate: new Date("2026-09-09T18:29:59.000Z"), - subType: "improvementProject", - type: "improvementProject", - programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), - programName: "custom observation as a task check on oct 14th facilitator", - programDescription: - "custom observation as a task check on oct 14th facilitator", - status: "active", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-14T13:11:17.993Z"), - createdAt: new Date("2025-10-14T13:10:11.897Z"), - __v: 0, - scope: { - professional_role: ["68876746b19aea00144c2af9"], - professional_subroles: ["688767deb19aea00144c2b08"], - organizations: ["tan90"], - state: ["6852c86c7248c20014b38a4d"], - district: ["6852c8ae7248c20014b38a57"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), - updatedBy: "1", - author: "2", - creator: "Nevil", - certificateTemplateId: new ObjectId("68ee4bf5fb9bee08b93b6d97"), - link: "f8a8e9ba397a29cf75ad5057db6cb7f9", - }, - { - _id: new ObjectId("68e8c635201642091e014914"), - resourceType: ["Improvement Project Solution"], - language: ["English"], - keywords: ["Improvement Project"], - concepts: [], - themes: [], - flattenedThemes: [], - entities: [], - registry: [], - isRubricDriven: false, - enableQuestionReadOut: false, - captureGpsLocationAtQuestionLevel: false, - isAPrivateProgram: false, - allowMultipleAssessemts: false, - isDeleted: false, - pageHeading: "Domains", - minNoOfSubmissionsRequired: 1, - rootOrganisations: [], - createdFor: [], - submissionLevel: "USER", - availableForPrivateConsumption: true, - parentEntityKey: null, - deleted: false, - programExternalId: "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456", - entityType: "school", - externalId: "PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION", - name: "Testing Project For LED IMP facilitator only", - description: "To construct a wired car using a DPDT switch.", - isReusable: false, - startDate: new Date("2025-09-09T00:00:00.000Z"), - endDate: new Date("2026-09-09T18:29:59.000Z"), - subType: "improvementProject", - type: "improvementProject", - programId: new ObjectId("68e8c284201642091e0148c1"), - programName: "custom observation as a task check on oct 10th facilitator", - programDescription: - "custom observation as a task check on oct 10th facilitator", - status: "active", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-10T08:40:22.617Z"), - createdAt: new Date("2025-10-10T08:39:17.519Z"), - __v: 0, - scope: { - professional_role: ["68876746b19aea00144c2af9"], - professional_subroles: ["688767deb19aea00144c2b08"], - organizations: ["tan90"], - state: ["6852c86c7248c20014b38a4d"], - district: ["6852c8ae7248c20014b38a57"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - projectTemplateId: new ObjectId("68e8c635201642091e01491c"), - updatedBy: "1", - author: "2", - creator: "Nevil", - certificateTemplateId: new ObjectId("68e8c676201642091e014943"), - link: "178ac1fdff5b367ef3335ce0e1665a6c", - }, - { - _id: new ObjectId("68c98d9538aee0086ee61096"), - resourceType: ["Improvement Project Solution"], - language: ["English"], - keywords: ["Improvement Project"], - concepts: [], - themes: [], - flattenedThemes: [], - entities: [], - registry: [], - isRubricDriven: false, - enableQuestionReadOut: false, - captureGpsLocationAtQuestionLevel: false, - isAPrivateProgram: false, - allowMultipleAssessemts: false, - isDeleted: false, - pageHeading: "Domains", - minNoOfSubmissionsRequired: 1, - rootOrganisations: [], - createdFor: [], - submissionLevel: "USER", - availableForPrivateConsumption: true, - parentEntityKey: null, - deleted: false, - programExternalId: "ProgramTestKey1", - entityType: "school", - externalId: "ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION", - name: "Project name sep 16 9 30", - description: - "Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.", - isReusable: false, - startDate: new Date("2025-07-29T18:30:00.000Z"), - endDate: new Date("2026-01-30T18:29:59.000Z"), - subType: "improvementProject", - type: "improvementProject", - programId: new ObjectId("68c98d8f38aee0086ee61070"), - programName: "Program name is sep 16 9 30", - programDescription: "Description of the Program", - status: "active", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-09-16T16:17:25.599Z"), - createdAt: new Date("2025-09-16T16:17:25.472Z"), - __v: 0, - scope: { - professional_role: ["ALL"], - professional_subroles: ["ALL"], - organizations: ["tan90"], - state: ["ALL"], - district: ["ALL"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - projectTemplateId: new ObjectId("68c98d9538aee0086ee6109e"), - }, - { - _id: new ObjectId("68d3b9a72ba17cc3cb238821"), - resourceType: ["Improvement Project Solution"], - language: ["English"], - keywords: ["Improvement Project"], - concepts: [], - themes: [], - flattenedThemes: [], - entities: [], - registry: [], - isRubricDriven: false, - enableQuestionReadOut: false, - captureGpsLocationAtQuestionLevel: false, - isAPrivateProgram: false, - allowMultipleAssessemts: false, - isDeleted: false, - pageHeading: "Domains", - minNoOfSubmissionsRequired: 1, - rootOrganisations: [], - createdFor: [], - submissionLevel: "USER", - availableForPrivateConsumption: true, - parentEntityKey: null, - deleted: false, - programExternalId: "SUP_as_a_task_test_sept_24_1500", - entityType: "school", - externalId: "DPDTSCH012025-1758706081315-PROJECT-SOLUTION", - name: "project sup test with obs or sur tasks sep 23 1520", - description: "To construct a wired car using a DPDT switch.", - isReusable: false, - startDate: new Date("2025-07-29T18:30:00.000Z"), - endDate: new Date("2025-12-30T18:29:59.000Z"), - subType: "improvementProject", - type: "improvementProject", - programId: new ObjectId("68d3b9681e09f9b5b1e0693d"), - programName: "SUP_as_a_task_test_sept_24_1500", - programDescription: "This is the description of the program.", - status: "active", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-09-24T09:28:19.783Z"), - createdAt: new Date("2025-09-24T09:28:07.900Z"), - __v: 0, - scope: { - professional_role: ["ALL"], - professional_subroles: ["688767deb19aea00144c2b08"], - organizations: ["tan90"], - state: ["ALL"], - district: ["ALL", "6852c8ae7248c20014b38a57"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - projectTemplateId: new ObjectId("68d3b9a92ba17cc3cb238829"), - updatedBy: "1", - author: "2", - creator: "Nevil", - link: "a0acc357edbcf3287e9767d20a7d9f12", - } -]; + { + _id: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + entityType: 'school', + externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', + name: 'pro with obsasatask oct 8 facilitator only 2nd', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-09-09T00:00:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), + programName: 'custom observation as a task check on oct 14th facilitator', + programDescription: 'custom observation as a task check on oct 14th facilitator', + status: 'active', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-14T13:11:17.993Z'), + createdAt: new Date('2025-10-14T13:10:11.897Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + updatedBy: '1', + author: '1', + creator: 'Mallanagouda', + certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), + link: 'f8a8e9ba397a29cf75ad5057db6cb7f9', + }, + { + _id: new ObjectId('68e8c635201642091e014914'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + entityType: 'school', + externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION', + name: 'Testing Project For LED IMP facilitator only', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-09-09T00:00:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68e8c284201642091e0148c1'), + programName: 'custom observation as a task check on oct 10th facilitator', + programDescription: 'custom observation as a task check on oct 10th facilitator', + status: 'active', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-10T08:40:22.617Z'), + createdAt: new Date('2025-10-10T08:39:17.519Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + updatedBy: '1', + author: '1', + creator: 'Mallanagouda', + certificateTemplateId: new ObjectId('68e8c676201642091e014943'), + link: '178ac1fdff5b367ef3335ce0e1665a6c', + }, + { + _id: new ObjectId('68c98d9538aee0086ee61096'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'ProgramTestKey1', + entityType: 'school', + externalId: 'ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION', + name: 'Project name sep 16 9 30', + description: + 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', + isReusable: false, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2026-01-30T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68c98d8f38aee0086ee61070'), + programName: 'Program name is sep 16 9 30', + programDescription: 'Description of the Program', + status: 'active', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-16T16:17:25.599Z'), + createdAt: new Date('2025-09-16T16:17:25.472Z'), + __v: 0, + scope: { + professional_role: ['ALL'], + professional_subroles: ['ALL'], + organizations: ['default_code'], + state: ['ALL'], + district: ['ALL'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + }, + { + _id: new ObjectId('68d3b9a72ba17cc3cb238821'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'SUP_as_a_task_test_sept_24_1500', + entityType: 'school', + externalId: 'DPDTSCH012025-1758706081315-PROJECT-SOLUTION', + name: 'project sup test with obs or sur tasks sep 23 1520', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2025-12-30T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), + programName: 'SUP_as_a_task_test_sept_24_1500', + programDescription: 'This is the description of the program.', + status: 'active', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-24T09:28:19.783Z'), + createdAt: new Date('2025-09-24T09:28:07.900Z'), + __v: 0, + scope: { + professional_role: ['ALL'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['ALL'], + district: ['ALL', '6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + updatedBy: '1', + author: '1', + creator: 'Mallanagouda', + link: 'a0acc357edbcf3287e9767d20a7d9f12', + }, +] let programData = [ - { - _id: new ObjectId("68ee4b79fb9bee08b93b6d34"), - resourceType: ["program"], - language: ["English"], - keywords: ["CBSE", "SQAA"], - concepts: [], - components: [ - { - _id: new ObjectId("68ee4bb3fb9bee08b93b6d68"), - order: 1, - }, - ], - isAPrivateProgram: false, - isDeleted: false, - requestForPIIConsent: true, - rootOrganisations: [], - createdFor: [], - deleted: false, - status: "active", - owner: "1", - createdBy: "1", - updatedBy: "1", - externalId: "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", - name: "custom observation as a task check on oct 14th facilitator", - description: "custom observation as a task check on oct 14th facilitator", - startDate: new Date("2025-09-08T18:30:00.000Z"), - endDate: new Date("2026-09-09T18:29:59.000Z"), - imageCompression: { - quality: 10, - }, - metaInformation: { - state: ["Tripura"], - recommendedFor: ["Facilitator"], - }, - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-14T13:18:46.936Z"), - createdAt: new Date("2025-10-14T13:09:13.649Z"), - __v: 0, - scope: { - professional_role: ["68876746b19aea00144c2af9"], - professional_subroles: ["688767deb19aea00144c2b08"], - organizations: ["tan90"], - state: ["6852c86c7248c20014b38a4d"], - district: ["6852c8ae7248c20014b38a57"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - }, - { - _id: new ObjectId("68e8c284201642091e0148c1"), - resourceType: ["program"], - language: ["English"], - keywords: ["CBSE", "SQAA"], - concepts: [], - components: [ - { - _id: new ObjectId("68e8c635201642091e014914"), - order: 1, - }, - ], - isAPrivateProgram: false, - isDeleted: false, - requestForPIIConsent: true, - rootOrganisations: [], - createdFor: [], - deleted: false, - status: "active", - owner: "1", - createdBy: "1", - updatedBy: "1", - externalId: "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456", - name: "custom observation as a task check on oct 10th facilitator", - description: "custom observation as a task check on oct 10th facilitator", - startDate: new Date("2025-09-08T18:30:00.000Z"), - endDate: new Date("2026-09-09T18:29:59.000Z"), - imageCompression: { - quality: 10, - }, - metaInformation: { - state: ["Tripura"], - recommendedFor: ["Facilitator"], - }, - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-10T08:44:35.535Z"), - createdAt: new Date("2025-10-10T08:23:32.295Z"), - __v: 0, - scope: { - professional_role: ["68876746b19aea00144c2af9"], - professional_subroles: ["688767deb19aea00144c2b08"], - organizations: ["tan90"], - state: ["6852c86c7248c20014b38a4d"], - district: ["6852c8ae7248c20014b38a57"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - }, - { - _id: new ObjectId("68c98d8f38aee0086ee61070"), - resourceType: ["program"], - language: ["English"], - keywords: [], - concepts: [], - components: [ - { - _id: new ObjectId("68c98d9538aee0086ee61096"), - order: 1, - }, - ], - isAPrivateProgram: false, - isDeleted: false, - requestForPIIConsent: true, - rootOrganisations: [], - createdFor: [], - deleted: false, - status: "active", - owner: "1", - createdBy: "1", - updatedBy: "1", - externalId: "ProgramTestKey1", - name: "Program name is sep 16 9 30", - description: "Description of the Program", - metaInformation: { - state: ["Tripura"], - recommendedFor: [ - "functionaries-officials", - "teacher-educators-coordinators", - ], - }, - imageCompression: { - quality: 10, - }, - startDate: new Date("2025-07-29T18:30:00.000Z"), - endDate: new Date("2026-01-30T18:29:59.000Z"), - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-09-16T17:06:14.752Z"), - createdAt: new Date("2025-09-16T16:17:19.239Z"), - __v: 0, - scope: { - professional_role: ["68876746b19aea00144c2af9"], - professional_subroles: ["688767deb19aea00144c2b08"], - organizations: ["tan90"], - state: ["6852c86c7248c20014b38a4d"], - district: ["6852c8ae7248c20014b38a57"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - }, - { - _id: new ObjectId("68d3b9681e09f9b5b1e0693d"), - resourceType: ["program"], - language: ["English"], - keywords: [], - concepts: [], - components: [ - { - _id: new ObjectId("68d3b9a72ba17cc3cb238821"), - order: 1, - }, - ], - isAPrivateProgram: false, - isDeleted: false, - requestForPIIConsent: true, - rootOrganisations: [], - createdFor: [], - deleted: false, - status: "active", - owner: "1", - createdBy: "1", - updatedBy: "1", - externalId: "SUP_as_a_task_test_sept_24_1500", - name: "SUP_as_a_task_test_sept_24_1500 oct 3", - description: "This is the description of the program.", - metaInformation: { - state: ["Tripura"], - recommendedFor: ["functionaries-officials"], - }, - imageCompression: { - quality: 10, - }, - startDate: new Date("2025-07-29T18:30:00.000Z"), - endDate: new Date("2025-12-30T18:29:59.000Z"), - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-03T09:20:39.907Z"), - createdAt: new Date("2025-09-24T09:27:04.322Z"), - __v: 0, - scope: { - professional_role: ["68876746b19aea00144c2af9"], - professional_subroles: ["688767deb19aea00144c2b08"], - organizations: ["tan90"], - state: ["6852c86c7248c20014b38a4d"], - district: ["6852c8ae7248c20014b38a57"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - }, + { + _id: new ObjectId('68ee4b79fb9bee08b93b6d34'), + resourceType: ['program'], + language: ['English'], + keywords: ['CBSE', 'SQAA'], + concepts: [], + components: [ + { + _id: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + name: 'custom observation as a task check on oct 14th facilitator', + description: 'custom observation as a task check on oct 14th facilitator', + startDate: new Date('2025-09-08T18:30:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ['Tripura'], + recommendedFor: ['Facilitator'], + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-14T13:18:46.936Z'), + createdAt: new Date('2025-10-14T13:09:13.649Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: new ObjectId('68e8c284201642091e0148c1'), + resourceType: ['program'], + language: ['English'], + keywords: ['CBSE', 'SQAA'], + concepts: [], + components: [ + { + _id: new ObjectId('68e8c635201642091e014914'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + name: 'custom observation as a task check on oct 10th facilitator', + description: 'custom observation as a task check on oct 10th facilitator', + startDate: new Date('2025-09-08T18:30:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ['Tripura'], + recommendedFor: ['Facilitator'], + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-10T08:44:35.535Z'), + createdAt: new Date('2025-10-10T08:23:32.295Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: new ObjectId('68c98d8f38aee0086ee61070'), + resourceType: ['program'], + language: ['English'], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId('68c98d9538aee0086ee61096'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'ProgramTestKey1', + name: 'Program name is sep 16 9 30', + description: 'Description of the Program', + metaInformation: { + state: ['Tripura'], + recommendedFor: ['functionaries-officials', 'teacher-educators-coordinators'], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2026-01-30T18:29:59.000Z'), + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-16T17:06:14.752Z'), + createdAt: new Date('2025-09-16T16:17:19.239Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: new ObjectId('68d3b9681e09f9b5b1e0693d'), + resourceType: ['program'], + language: ['English'], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId('68d3b9a72ba17cc3cb238821'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'SUP_as_a_task_test_sept_24_1500', + name: 'SUP_as_a_task_test_sept_24_1500 oct 3', + description: 'This is the description of the program.', + metaInformation: { + state: ['Tripura'], + recommendedFor: ['functionaries-officials'], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2025-12-30T18:29:59.000Z'), + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-03T09:20:39.907Z'), + createdAt: new Date('2025-09-24T09:27:04.322Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + },, { _id: new ObjectId("691c1b06e71d83091cf9c336"), resourceType: ["program"], @@ -513,1002 +506,977 @@ let programData = [ startDate: new Date("2025-11-16T18:30:00.000Z"), endDate: new Date("2025-11-28T18:29:59.000Z"), tenantId: "shikshagrahanew", - orgId: "tripura", - updatedAt: new Date("2025-11-18T07:26:14.940Z"), - createdAt: new Date("2025-11-18T07:06:46.613Z"), - __v: 0, - scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["6863aa5f1d52e30014093b41"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - }, - { - _id: new ObjectId("691b10a0dbb768073d67328c"), - resourceType: ["program"], - language: ["English"], - keywords: [], - concepts: [], - components: [ - { - _id: new ObjectId("691b141a1ce3f5956e9f30e8"), - order: 1, - }, - { - _id: new ObjectId("691b1783dbb768073d67330d"), - order: 2, - }, - { - _id: new ObjectId("691b1790dbb768073d673366"), - order: 3, - }, - { - _id: new ObjectId("691b179e7b8c31191b8facee"), - order: 4, - }, - { - _id: new ObjectId("691b17ae1ce3f5956e9f319d"), - order: 5, - }, - { - _id: new ObjectId("691b192a1ce3f5956e9f320e"), - order: 6, - }, - ], - isAPrivateProgram: false, - isDeleted: false, - requestForPIIConsent: true, - rootOrganisations: [], - createdFor: [], - deleted: false, - status: "active", - owner: "1", - createdBy: "1", - updatedBy: "1", - externalId: "Testing_for_creation_sup_17_11", - name: "Testing for creation sup 17-11", - description: "This is the description of the program.", - metaInformation: { - state: ["Tripura"], - recommendedFor: ["student"], - }, - imageCompression: { - quality: 10, - }, - startDate: new Date("2025-11-16T18:30:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), - tenantId: "shikshagrahanew", - orgId: "tripura", - updatedAt: new Date("2025-11-17T12:46:34.713Z"), - createdAt: new Date("2025-11-17T12:10:08.914Z"), - __v: 0, - scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["6863aa5f1d52e30014093b41"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, - }, -]; - -let projectTemplatesData = [ - { - _id: new ObjectId("68ee4bb3fb9bee08b93b6d70"), - description: "To construct a wired car using a DPDT switch.", - concepts: [""], - keywords: [ - "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", - ], - isDeleted: false, - recommendedFor: ["Learner"], - tasks: [ - new ObjectId("68ee4bb4fb9bee08b93b6d7a"), - new ObjectId("68ee4bb4fb9bee08b93b6d7e"), - new ObjectId("68ee4bb4fb9bee08b93b6d82"), - new ObjectId("68ee4bb4fb9bee08b93b6d86"), - ], - createdBy: "1", - updatedBy: "1", - learningResources: [], - isReusable: false, - taskSequence: [ - "DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984", - "DPDTSC-HandBook-1-2025-Task2-1760447411369", - "DPDTSC-HandBook-1-2025-Task3-1760447411369", - "DPDTSC-HandBook-1-2025-Task4-1760447411369", - "DPDTSC-HandBook-1-2025-Task5-1760447411369", - ], - averageRating: 0, - noOfRatings: 0, - ratings: { - 1: 0, - 2: 0, - 3: 0, - 4: 0, - 5: 0, - }, - importCount: 0, - evidences: [], - isPrivate: false, - hasSpotlight: false, - hasStory: false, - text: [], - visibility: "CURRENT", - visibleToOrganizations: ["tan90"], - deleted: false, - title: "pro with obsasatask oct 8 facilitator only 2nd", - externalId: "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", - categories: [ - { - _id: new ObjectId("685ae6a0cb7c7200145dadae"), - externalId: "teachers", - name: "teachers", - }, - ], - entityType: "", - taskCreationForm: "", - durationInDays: 365, - metaInformation: { - testimonials: [], - goal: "TEMP", - rationale: "", - primaryAudience: "", - duration: "1 year", - successIndicators: "", - risks: "", - approaches: "", - }, - status: "published", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-14T13:11:17.899Z"), - createdAt: new Date("2025-10-14T13:10:11.630Z"), - __v: 0, - solutionId: new ObjectId("68ee4bb3fb9bee08b93b6d68"), - solutionExternalId: - "PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION", - programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), - programExternalId: - "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY", - parentTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d4c"), - certificateTemplateId: new ObjectId("68ee4bf5fb9bee08b93b6d97"), - }, - { - _id: new ObjectId("68e8c635201642091e01491c"), - description: "To construct a wired car using a DPDT switch.", - concepts: [""], - keywords: [ - "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", - ], - isDeleted: false, - recommendedFor: ["Learner"], - tasks: [ - new ObjectId("68e8c635201642091e014926"), - new ObjectId("68e8c635201642091e01492a"), - new ObjectId("68e8c635201642091e01492e"), - new ObjectId("68e8c635201642091e014932"), - ], - createdBy: "1", - updatedBy: "1", - learningResources: [], - isReusable: false, - taskSequence: [ - "DPDTSC-HandBook-1-2025-Task1-1760085557008-1760085557606", - "DPDTSC-HandBook-1-2025-Task2-1760085557008", - "DPDTSC-HandBook-1-2025-Task3-1760085557008", - "DPDTSC-HandBook-1-2025-Task4-1760085557008", - "DPDTSC-HandBook-1-2025-Task5-1760085557008", - ], - averageRating: 0, - noOfRatings: 0, - ratings: { - 1: 0, - 2: 0, - 3: 0, - 4: 0, - 5: 0, - }, - importCount: 0, - evidences: [], - isPrivate: false, - hasSpotlight: false, - hasStory: false, - text: [], - visibility: "CURRENT", - visibleToOrganizations: ["tan90"], - deleted: false, - title: "Testing Project For LED IMP facilitator only", - externalId: "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", - categories: [ - { - _id: new ObjectId("685ae6a0cb7c7200145dadae"), - externalId: "teachers", - name: "teachers", - }, - ], - entityType: "", - taskCreationForm: "", - durationInDays: 365, - metaInformation: { - testimonials: [], - goal: "TEMP", - rationale: "", - primaryAudience: "", - duration: "1 year", - successIndicators: "", - risks: "", - approaches: "", - }, - status: "published", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-10T08:40:22.544Z"), - createdAt: new Date("2025-10-10T08:39:17.260Z"), - __v: 0, - solutionId: new ObjectId("68e8c635201642091e014914"), - solutionExternalId: - "PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION", - programId: new ObjectId("68e8c284201642091e0148c1"), - programExternalId: "Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456", - parentTemplateId: new ObjectId("68e8c635201642091e0148f8"), - certificateTemplateId: new ObjectId("68e8c676201642091e014943"), - }, - { - _id: new ObjectId("68c98d9538aee0086ee6109e"), - description: - "Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.", - concepts: [""], - keywords: [ - "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", - ], - isDeleted: false, - recommendedFor: [""], - tasks: [ - new ObjectId("68c98d9538aee0086ee610a2"), - new ObjectId("68c98d9538aee0086ee610a6"), - new ObjectId("68c98d9538aee0086ee610aa"), - ], - createdBy: "1", - updatedBy: "1", - learningResources: [], - isReusable: false, - taskSequence: [ - "Task1-1758039445176", - "Task2-1758039445176", - "Task3-1758039445176", - "Task4-1758039445176", - "Task5-1758039445176", - ], - averageRating: 0, - noOfRatings: 0, - ratings: { - 1: 0, - 2: 0, - 3: 0, - 4: 0, - 5: 0, - }, - importCount: 0, - evidences: [], - isPrivate: false, - hasSpotlight: false, - hasStory: false, - text: [], - deleted: false, - title: "Project name sep 16 9 30", - externalId: "ProjectIdtestKey1-1758039445176_IMPORTED", - categories: [ - { - _id: new ObjectId("685ae6a0cb7c7200145dadae"), - externalId: "teachers", - name: "teachers", - }, - ], - entityType: "", - taskCreationForm: "", - durationInDays: 365, - metaInformation: { - testimonials: [], - goal: "TEMP", - rationale: "", - primaryAudience: "", - duration: "1 year", - successIndicators: "", - risks: "", - approaches: "", - }, - status: "published", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-09-16T16:17:25.596Z"), - createdAt: new Date("2025-09-16T16:17:25.301Z"), - __v: 0, - solutionId: new ObjectId("68c98d9538aee0086ee61096"), - solutionExternalId: "ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION", - programId: new ObjectId("68c98d8f38aee0086ee61070"), - programExternalId: "ProgramTestKey1", - parentTemplateId: new ObjectId("68c98d9538aee0086ee6107a"), - }, - { - _id: new ObjectId("68d3b9a92ba17cc3cb238829"), - description: "To construct a wired car using a DPDT switch.", - concepts: [""], - keywords: [ - "Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car", - ], - isDeleted: false, - recommendedFor: ["Learner"], - tasks: [ - new ObjectId("68d3b9ad2ba17cc3cb238837"), - new ObjectId("68d3b9ad2ba17cc3cb23883b"), - new ObjectId("68d3b9ae2ba17cc3cb23883f"), - ], - createdBy: "1", - updatedBy: "1", - learningResources: [], - isReusable: false, - taskSequence: [ - "DPDTSC-HandBook-1/2025-Task1-1758706081315-1758706089304", - "DPDTSC-HandBook-1/2025-Task2-1758706081315", - "DPDTSC-HandBook-1/2025-Task3-1758706081315", - "DPDTSC-HandBook-1/2025-Task4-1758706081315", - "DPDTSC-HandBook-1/2025-Task5-1758706081315", - ], - averageRating: 0, - noOfRatings: 0, - ratings: { - 1: 0, - 2: 0, - 3: 0, - 4: 0, - 5: 0, - }, - importCount: 0, - evidences: [], - isPrivate: false, - hasSpotlight: false, - hasStory: false, - text: [], - deleted: false, - title: "project sup test with obs or sur tasks sep 23 1520", - externalId: "DPDTSCH012025-1758706081315_IMPORTED", - categories: [ - { - _id: new ObjectId("685ae6a0cb7c7200145dadae"), - externalId: "teachers", - name: "teachers", - }, - ], - entityType: "", - taskCreationForm: "", - durationInDays: 365, - metaInformation: { - testimonials: [], - goal: "TEMP", - rationale: "", - primaryAudience: "", - duration: "1 year", - successIndicators: "", - risks: "", - approaches: "", - }, - status: "published", - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-09-24T09:28:14.561Z"), - createdAt: new Date("2025-09-24T09:28:03.404Z"), - __v: 0, - solutionId: new ObjectId("68d3b9a72ba17cc3cb238821"), - solutionExternalId: "DPDTSCH012025-1758706081315-PROJECT-SOLUTION", - programId: new ObjectId("68d3b9681e09f9b5b1e0693d"), - programExternalId: "SUP_as_a_task_test_sept_24_1500", - parentTemplateId: new ObjectId("68d3b9a32ba17cc3cb238805"), - } -]; - -let projectTemplateTasksData = [ - { - _id: new ObjectId("68ee4bb4fb9bee08b93b6d7a"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ - { - name: "Activity Steps (Video)", - link: "https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih", - app: "projectService", - id: "MNvM_H9zD3Y?si=BdfslSzCkmDCggih", - }, - ], - deleted: false, - type: "content", - projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), - projectTemplateExternalId: - "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", - name: "Watch the Activity Video", - externalId: "DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188", - description: "", - sequenceNumber: "2", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "01/08/2025", - endDate: "31/12/2025", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-10-14T13:10:12.192Z"), - createdAt: new Date("2025-10-14T13:10:11.805Z"), - __v: 0, - }, - { - _id: new ObjectId("68ee4bb4fb9bee08b93b6d7e"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [], - deleted: false, - type: "simple", - projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), - projectTemplateExternalId: - "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", - name: "Conduct the Activity with students", - externalId: "DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197", - description: "", - sequenceNumber: "3", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "01/08/2025", - endDate: "31/12/2025", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-10-14T13:10:12.202Z"), - createdAt: new Date("2025-10-14T13:10:11.813Z"), - __v: 0, - }, - { - _id: new ObjectId("68ee4bb4fb9bee08b93b6d82"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ - { - name: "learn", - link: "https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link", - app: "projectService", - id: "view?usp=drive_link", - }, - ], - deleted: false, - type: "content", - projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), - projectTemplateExternalId: - "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", - name: "Conduct the Activity Assessment", - externalId: "DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206", - description: "", - sequenceNumber: "4", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "01/08/2025", - endDate: "31/12/2025", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-10-14T13:10:12.210Z"), - createdAt: new Date("2025-10-14T13:10:11.825Z"), - __v: 0, - }, - { - _id: new ObjectId("68ee4bb4fb9bee08b93b6d86"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ - { - name: "walking", - link: "https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing", - app: "projectService", - id: "view?usp=sharing", - }, - ], - deleted: false, - type: "content", - projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), - projectTemplateExternalId: - "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", - name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", - externalId: "DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214", - description: "", - sequenceNumber: "5", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "01/08/2025", - endDate: "31/12/2025", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-10-14T13:10:12.218Z"), - createdAt: new Date("2025-10-14T13:10:11.833Z"), - __v: 0, - }, - { - _id: new ObjectId("68e8c635201642091e014926"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ - { - name: "Activity Steps (Video)", - link: "https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih", - app: "projectService", - id: "MNvM_H9zD3Y?si=BdfslSzCkmDCggih", - }, - ], - deleted: false, - type: "content", - projectTemplateId: new ObjectId("68e8c635201642091e01491c"), - projectTemplateExternalId: - "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", - name: "Watch the Activity Video", - externalId: "DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809", - description: "", - sequenceNumber: "2", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "01/08/2026", - endDate: "31/12/2026", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-10-10T08:39:17.813Z"), - createdAt: new Date("2025-10-10T08:39:17.430Z"), - __v: 0, - }, - { - _id: new ObjectId("68e8c635201642091e01492a"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [], - deleted: false, - type: "simple", - projectTemplateId: new ObjectId("68e8c635201642091e01491c"), - projectTemplateExternalId: - "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", - name: "Conduct the Activity with students", - externalId: "DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818", - description: "", - sequenceNumber: "3", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "01/08/2027", - endDate: "31/12/2027", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-10-10T08:39:17.822Z"), - createdAt: new Date("2025-10-10T08:39:17.439Z"), - __v: 0, - }, - { - _id: new ObjectId("68e8c635201642091e01492e"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ - { - name: "learn", - link: "https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link", - app: "projectService", - id: "view?usp=drive_link", - }, - ], - deleted: false, - type: "content", - projectTemplateId: new ObjectId("68e8c635201642091e01491c"), - projectTemplateExternalId: - "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", - name: "Conduct the Activity Assessment", - externalId: "DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827", - description: "", - sequenceNumber: "4", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "01/08/2028", - endDate: "31/12/2028", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-10-10T08:39:17.831Z"), - createdAt: new Date("2025-10-10T08:39:17.449Z"), - __v: 0, - }, - { - _id: new ObjectId("68e8c635201642091e014932"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ - { - name: "walking", - link: "https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing", - app: "projectService", - id: "view?usp=sharing", - }, - ], - deleted: false, - type: "content", - projectTemplateId: new ObjectId("68e8c635201642091e01491c"), - projectTemplateExternalId: - "PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED", - name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", - externalId: "DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835", - description: "", - sequenceNumber: "5", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "01/08/2029", - endDate: "31/12/2029", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-10-10T08:39:17.840Z"), - createdAt: new Date("2025-10-10T08:39:17.458Z"), - __v: 0, - }, - { - _id: new ObjectId("68c98d9538aee0086ee610a2"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ - { - name: "Activity Manual (PDF)", - link: "https://docs.google.com/document/d/1NCUdj9nPAz82sPV5q2BJ8At31sFJdSDwocrDCh_g7W0/edit?tab=t.0", - app: "projectService", - id: "edit?tab=t.0", - }, - ], - deleted: false, - type: "content", - projectTemplateId: new ObjectId("68c98d9538aee0086ee6109e"), - projectTemplateExternalId: "ProjectIdtestKey1-1758039445176_IMPORTED", - name: "Review the Activity Manual", - externalId: "Task1-1758039445176-1758039445561", - description: "", - sequenceNumber: "1", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "28/07/2025", - endDate: "30/01/2026", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-09-16T16:17:25.564Z"), - createdAt: new Date("2025-09-16T16:17:25.375Z"), - __v: 0, - }, - { - _id: new ObjectId("68c98d9538aee0086ee610a6"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ - { - name: "Activity Steps (Video)", - link: "https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih", - app: "projectService", - id: "MNvM_H9zD3Y?si=BdfslSzCkmDCggih", - }, - ], - deleted: false, - type: "content", - projectTemplateId: new ObjectId("68c98d9538aee0086ee6109e"), - projectTemplateExternalId: "ProjectIdtestKey1-1758039445176_IMPORTED", - name: "Watch the Activity Video", - externalId: "Task2-1758039445176-1758039445567", - description: "", - sequenceNumber: "2", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "29/07/2025", - endDate: "30/01/2027", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-09-16T16:17:25.571Z"), - createdAt: new Date("2025-09-16T16:17:25.386Z"), - __v: 0, - }, - { - _id: new ObjectId("68c98d9538aee0086ee610aa"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [], - deleted: false, - type: "simple", - projectTemplateId: new ObjectId("68c98d9538aee0086ee6109e"), - projectTemplateExternalId: "ProjectIdtestKey1-1758039445176_IMPORTED", - name: "Conduct the Activity with students", - externalId: "Task3-1758039445176-1758039445575", - description: "", - sequenceNumber: "3", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "30/07/2025", - endDate: "30/01/2028", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-09-16T16:17:25.579Z"), - createdAt: new Date("2025-09-16T16:17:25.396Z"), - __v: 0, - }, - { - _id: new ObjectId("68d3b9ad2ba17cc3cb238837"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [], - deleted: false, - type: "simple", - projectTemplateId: new ObjectId("68d3b9a92ba17cc3cb238829"), - projectTemplateExternalId: "DPDTSCH012025-1758706081315_IMPORTED", - name: "Conduct the Activity with students", - externalId: "DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343", - description: "", - sequenceNumber: "3", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "30/07/2025", - endDate: "30/12/2025", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-09-24T09:28:13.534Z"), - createdAt: new Date("2025-09-24T09:28:06.227Z"), + orgId: "tripura", + updatedAt: new Date("2025-11-18T07:26:14.940Z"), + createdAt: new Date("2025-11-18T07:06:46.613Z"), __v: 0, + scope: { + professional_role: ["6867a3c10d8d24001465c2d1"], + professional_subroles: ["6867a1420d8d24001465c28f"], + state: ["6863a9941d52e30014093ad9"], + district: ["6863aa5f1d52e30014093b41"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, }, { - _id: new ObjectId("68d3b9ad2ba17cc3cb23883b"), - createdBy: "1", - updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [ + _id: new ObjectId("691b10a0dbb768073d67328c"), + resourceType: ["program"], + language: ["English"], + keywords: [], + concepts: [], + components: [ { - name: "Activity Assessment (PDF)", - link: "https://sunbirdsaaspublic.blob.core.windows.net/content/content/assets/do_2143687931908833281255/dpdt-switch-car.pdf", - app: "projectService", - id: "dpdt-switch-car.pdf", + _id: new ObjectId("691b141a1ce3f5956e9f30e8"), + order: 1, }, { - name: "Activity OMR Sheet (PDF)", - link: "https://drive.google.com/file/d/1-f7Tg8bmZd-xlcxlhfOcf2ZO6vpc6qkH/view", - app: "projectService", - id: "view", + _id: new ObjectId("691b1783dbb768073d67330d"), + order: 2, + }, + { + _id: new ObjectId("691b1790dbb768073d673366"), + order: 3, + }, + { + _id: new ObjectId("691b179e7b8c31191b8facee"), + order: 4, + }, + { + _id: new ObjectId("691b17ae1ce3f5956e9f319d"), + order: 5, + }, + { + _id: new ObjectId("691b192a1ce3f5956e9f320e"), + order: 6, }, ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], deleted: false, - type: "content", - projectTemplateId: new ObjectId("68d3b9a92ba17cc3cb238829"), - projectTemplateExternalId: "DPDTSCH012025-1758706081315_IMPORTED", - name: "Conduct the Activity Assessment", - externalId: "DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849", - description: "", - sequenceNumber: "4", - tenantId: "default", - orgId: "default_code", - metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "30/07/2025", - endDate: "30/12/2025", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", - }, - updatedAt: new Date("2025-09-24T09:28:13.967Z"), - createdAt: new Date("2025-09-24T09:28:06.583Z"), - __v: 0, - }, - { - _id: new ObjectId("68d3b9ae2ba17cc3cb23883f"), + status: "active", + owner: "1", createdBy: "1", updatedBy: "1", - isDeleted: false, - isDeletable: false, - taskSequence: [], - children: [], - visibleIf: [], - hasSubTasks: false, - learningResources: [], - deleted: false, - type: "simple", - projectTemplateId: new ObjectId("68d3b9a92ba17cc3cb238829"), - projectTemplateExternalId: "DPDTSCH012025-1758706081315_IMPORTED", - name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", - externalId: "DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241", - description: "", - sequenceNumber: "5", - tenantId: "default", - orgId: "default_code", + externalId: "Testing_for_creation_sup_17_11", + name: "Testing for creation sup 17-11", + description: "This is the description of the program.", metaInformation: { - hasAParentTask: "NO", - parentTaskOperator: "", - parentTaskValue: "", - parentTaskId: "", - startDate: "30/07/2025", - endDate: "30/12/2025", - isAnExternalTask: "", - minNoOfSubmissionsRequired: "", - redirectLink: "", - buttonLabel: "", + state: ["Tripura"], + recommendedFor: ["student"], }, - updatedAt: new Date("2025-09-24T09:28:14.374Z"), - createdAt: new Date("2025-09-24T09:28:07.083Z"), + imageCompression: { + quality: 10, + }, + startDate: new Date("2025-11-16T18:30:00.000Z"), + endDate: new Date("2025-11-28T18:29:59.000Z"), + tenantId: "shikshagrahanew", + orgId: "tripura", + updatedAt: new Date("2025-11-17T12:46:34.713Z"), + createdAt: new Date("2025-11-17T12:10:08.914Z"), __v: 0, + scope: { + professional_role: ["6867a3c10d8d24001465c2d1"], + professional_subroles: ["6867a1420d8d24001465c28f"], + state: ["6863a9941d52e30014093ad9"], + district: ["6863aa5f1d52e30014093b41"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, }, +]; + +let projectTemplatesData = [ + { + _id: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + new ObjectId('68ee4bb4fb9bee08b93b6d7a'), + new ObjectId('68ee4bb4fb9bee08b93b6d7e'), + new ObjectId('68ee4bb4fb9bee08b93b6d82'), + new ObjectId('68ee4bb4fb9bee08b93b6d86'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: 'CURRENT', + visibleToOrganizations: ['default_code'], + deleted: false, + title: 'pro with obsasatask oct 8 facilitator only 2nd', + externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-14T13:11:17.899Z'), + createdAt: new Date('2025-10-14T13:10:11.630Z'), + __v: 0, + solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + solutionExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + parentTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d4c'), + certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), + }, + { + _id: new ObjectId('68e8c635201642091e01491c'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + new ObjectId('68e8c635201642091e014926'), + new ObjectId('68e8c635201642091e01492a'), + new ObjectId('68e8c635201642091e01492e'), + new ObjectId('68e8c635201642091e014932'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', + 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', + 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', + 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: 'CURRENT', + visibleToOrganizations: ['default_code'], + deleted: false, + title: 'Testing Project For LED IMP facilitator only', + externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-10T08:40:22.544Z'), + createdAt: new Date('2025-10-10T08:39:17.260Z'), + __v: 0, + solutionId: new ObjectId('68e8c635201642091e014914'), + solutionExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION', + programId: new ObjectId('68e8c284201642091e0148c1'), + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + parentTemplateId: new ObjectId('68e8c635201642091e0148f8'), + certificateTemplateId: new ObjectId('68e8c676201642091e014943'), + }, + { + _id: new ObjectId('68c98d9538aee0086ee6109e'), + description: + 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: [''], + tasks: [ + new ObjectId('68c98d9538aee0086ee610a2'), + new ObjectId('68c98d9538aee0086ee610a6'), + new ObjectId('68c98d9538aee0086ee610aa'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'Task1-1758039445176-1758039445561', + 'Task2-1758039445176-1758039445567', + 'Task3-1758039445176-1758039445575', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: 'Project name sep 16 9 30', + externalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-16T16:17:25.596Z'), + createdAt: new Date('2025-09-16T16:17:25.301Z'), + __v: 0, + solutionId: new ObjectId('68c98d9538aee0086ee61096'), + solutionExternalId: 'ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION', + programId: new ObjectId('68c98d8f38aee0086ee61070'), + programExternalId: 'ProgramTestKey1', + parentTemplateId: new ObjectId('68c98d9538aee0086ee6107a'), + }, + { + _id: new ObjectId('68d3b9a92ba17cc3cb238829'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + new ObjectId('68d3b9ad2ba17cc3cb238837'), + new ObjectId('68d3b9ad2ba17cc3cb23883b'), + new ObjectId('68d3b9ae2ba17cc3cb23883f'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', + 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', + 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: 'project sup test with obs or sur tasks sep 23 1520', + externalId: 'DPDTSCH012025-1758706081315_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-24T09:28:14.561Z'), + createdAt: new Date('2025-09-24T09:28:03.404Z'), + __v: 0, + solutionId: new ObjectId('68d3b9a72ba17cc3cb238821'), + solutionExternalId: 'DPDTSCH012025-1758706081315-PROJECT-SOLUTION', + programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), + programExternalId: 'SUP_as_a_task_test_sept_24_1500', + parentTemplateId: new ObjectId('68d3b9a32ba17cc3cb238805'), + }, +] + +let projectTemplateTasksData = [ + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7a'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + description: '', + sequenceNumber: '2', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.192Z'), + createdAt: new Date('2025-10-14T13:10:11.805Z'), + __v: 0, + }, + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7e'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + description: '', + sequenceNumber: '3', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.202Z'), + createdAt: new Date('2025-10-14T13:10:11.813Z'), + __v: 0, + }, + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d82'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'learn', + link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + app: 'projectService', + id: 'view?usp=drive_link', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + description: '', + sequenceNumber: '4', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.210Z'), + createdAt: new Date('2025-10-14T13:10:11.825Z'), + __v: 0, + }, + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d86'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'walking', + link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', + app: 'projectService', + id: 'view?usp=sharing', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', + description: '', + sequenceNumber: '5', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.218Z'), + createdAt: new Date('2025-10-14T13:10:11.833Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e014926'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', + description: '', + sequenceNumber: '2', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2026', + endDate: '31/12/2026', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.813Z'), + createdAt: new Date('2025-10-10T08:39:17.430Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e01492a'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', + description: '', + sequenceNumber: '3', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2027', + endDate: '31/12/2027', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.822Z'), + createdAt: new Date('2025-10-10T08:39:17.439Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e01492e'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'learn', + link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + app: 'projectService', + id: 'view?usp=drive_link', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', + description: '', + sequenceNumber: '4', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2028', + endDate: '31/12/2028', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.831Z'), + createdAt: new Date('2025-10-10T08:39:17.449Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e014932'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'walking', + link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', + app: 'projectService', + id: 'view?usp=sharing', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', + description: '', + sequenceNumber: '5', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2029', + endDate: '31/12/2029', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.840Z'), + createdAt: new Date('2025-10-10T08:39:17.458Z'), + __v: 0, + }, + { + _id: new ObjectId('68c98d9538aee0086ee610a2'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Manual (PDF)', + link: 'https://docs.google.com/document/d/1NCUdj9nPAz82sPV5q2BJ8At31sFJdSDwocrDCh_g7W0/edit?tab=t.0', + app: 'projectService', + id: 'edit?tab=t.0', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Review the Activity Manual', + externalId: 'Task1-1758039445176-1758039445561', + description: '', + sequenceNumber: '1', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '28/07/2025', + endDate: '30/01/2026', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.564Z'), + createdAt: new Date('2025-09-16T16:17:25.375Z'), + __v: 0, + }, + { + _id: new ObjectId('68c98d9538aee0086ee610a6'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'Task2-1758039445176-1758039445567', + description: '', + sequenceNumber: '2', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '29/07/2025', + endDate: '30/01/2027', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.571Z'), + createdAt: new Date('2025-09-16T16:17:25.386Z'), + __v: 0, + }, + { + _id: new ObjectId('68c98d9538aee0086ee610aa'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'Task3-1758039445176-1758039445575', + description: '', + sequenceNumber: '3', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/01/2028', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.579Z'), + createdAt: new Date('2025-09-16T16:17:25.396Z'), + __v: 0, + }, + { + _id: new ObjectId('68d3b9ad2ba17cc3cb238837'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', + description: '', + sequenceNumber: '3', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:13.534Z'), + createdAt: new Date('2025-09-24T09:28:06.227Z'), + __v: 0, + }, + { + _id: new ObjectId('68d3b9ad2ba17cc3cb23883b'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Assessment (PDF)', + link: 'https://sunbirdsaaspublic.blob.core.windows.net/content/content/assets/do_2143687931908833281255/dpdt-switch-car.pdf', + app: 'projectService', + id: 'dpdt-switch-car.pdf', + }, + { + name: 'Activity OMR Sheet (PDF)', + link: 'https://drive.google.com/file/d/1-f7Tg8bmZd-xlcxlhfOcf2ZO6vpc6qkH/view', + app: 'projectService', + id: 'view', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', + description: '', + sequenceNumber: '4', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:13.967Z'), + createdAt: new Date('2025-09-24T09:28:06.583Z'), + __v: 0, + }, + { + _id: new ObjectId('68d3b9ae2ba17cc3cb23883f'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', + description: '', + sequenceNumber: '5', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:14.374Z'), + createdAt: new Date('2025-09-24T09:28:07.083Z'), + __v: 0, + },, { _id: new ObjectId("68ee4bb4fb9bee08b93b6d75"), createdBy: "1", @@ -1643,272 +1611,271 @@ let projectTemplateTasksData = [ ]; let certificateTemplatesData = [ - { - _id: new ObjectId("68ee4bf5fb9bee08b93b6d97"), - status: "active", - deleted: false, - criteria: { - validationText: "Complete validation message", - expression: "C1&&(C3||C4||C5||C6)", - conditions: { - C1: { - validationText: "Submit your project.", - expression: "C1", - conditions: { - C1: { - scope: "project", - key: "status", - operator: "==", - value: "submitted", - }, - }, - }, - C3: { - expression: "C1", - conditions: { - C1: { - scope: "task", - key: "attachments", - function: "count", - filter: { - key: "type", - value: "all", - }, - operator: ">=", - value: 2, - taskDetails: ["68ee4bb3fb9bee08b93b6d53"], - }, - }, - validationText: "Add 2 evidence for any task", - }, - C4: { - expression: "C1", - conditions: { - C1: { - scope: "task", - key: "attachments", - function: "count", - filter: { - key: "type", - value: "all", - }, - operator: ">=", - value: 2, - taskDetails: ["68ee4bb3fb9bee08b93b6d57"], - }, - }, - }, - C5: { - expression: "C1", - conditions: { - C1: { - scope: "task", - key: "attachments", - function: "count", - filter: { - key: "type", - value: "all", - }, - operator: ">=", - value: 2, - taskDetails: ["68ee4bb3fb9bee08b93b6d5b"], - }, - }, - }, - C6: { - expression: "C1", - conditions: { - C1: { - scope: "task", - key: "attachments", - function: "count", - filter: { - key: "type", - value: "all", - }, - operator: ">=", - value: 2, - taskDetails: ["68ee4bb3fb9bee08b93b6d63"], - }, - }, - }, - }, - }, - issuer: { - name: "Tan90", - }, - solutionId: new ObjectId("68ee4bb3fb9bee08b93b6d68"), - programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), - baseTemplateId: new ObjectId("68c008dfd113c30c11f1aca2"), - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-14T13:11:17.793Z"), - createdAt: new Date("2025-10-14T13:11:17.628Z"), - __v: 0, - templateUrl: - "certificate/aa8529e3-6754-4432-a669-72b73d358e2f/1/7042c718-a1bf-43e3-b296-586de247a440/68ee4bf5fb9bee08b93b6d97/14-9-2025-1760447477692_Dowloaded.svg", - }, - { - _id: new ObjectId("68e8c676201642091e014943"), - status: "active", - deleted: false, - criteria: { - validationText: "Complete validation message", - expression: "C1&&(C3||C4||C5||C6||C7)", - conditions: { - C1: { - validationText: "Submit your project.", - expression: "C1", - conditions: { - C1: { - scope: "project", - key: "status", - operator: "==", - value: "submitted", - }, - }, - }, - C3: { - expression: "C1", - conditions: { - C1: { - scope: "task", - key: "attachments", - function: "count", - filter: { - key: "type", - value: "all", - }, - operator: ">=", - value: 2, - taskDetails: ["68e8c635201642091e0148ff"], - }, - }, - validationText: "Add 2 evidence for any task", - }, - C4: { - expression: "C1", - conditions: { - C1: { - scope: "task", - key: "attachments", - function: "count", - filter: { - key: "type", - value: "all", - }, - operator: ">=", - value: 2, - taskDetails: ["68e8c635201642091e014903"], - }, - }, - }, - C5: { - expression: "C1", - conditions: { - C1: { - scope: "task", - key: "attachments", - function: "count", - filter: { - key: "type", - value: "all", - }, - operator: ">=", - value: 2, - taskDetails: ["68e8c635201642091e014907"], - }, - }, - }, - C6: { - expression: "C1", - conditions: { - C1: { - scope: "task", - key: "attachments", - function: "count", - filter: { - key: "type", - value: "all", - }, - operator: ">=", - value: 2, - taskDetails: ["68e8c635201642091e01490b"], - }, - }, - }, - C7: { - expression: "C1", - conditions: { - C1: { - scope: "task", - key: "attachments", - function: "count", - filter: { - key: "type", - value: "all", - }, - operator: ">=", - value: 2, - taskDetails: ["68e8c635201642091e01490f"], - }, - }, - }, - }, - }, - issuer: { - name: "Tan90", - }, - solutionId: new ObjectId("68e8c635201642091e014914"), - programId: new ObjectId("68e8c284201642091e0148c1"), - baseTemplateId: new ObjectId("68c008dfd113c30c11f1aca2"), - tenantId: "default", - orgId: "default_code", - updatedAt: new Date("2025-10-10T08:40:22.454Z"), - createdAt: new Date("2025-10-10T08:40:22.298Z"), - __v: 0, - templateUrl: - "certificate/0bcc856d-0145-448c-8188-300ca3f3250e/1/58cfdf3c-f1a2-4a94-bbb5-21dcd7286913/68e8c676201642091e014943/10-9-2025-1760085622353_Dowloaded.svg", - }, -]; + { + _id: new ObjectId('68ee4bf5fb9bee08b93b6d97'), + status: 'active', + deleted: false, + criteria: { + validationText: 'Complete validation message', + expression: 'C1&&(C3||C4||C5||C6)', + conditions: { + C1: { + validationText: 'Submit your project.', + expression: 'C1', + conditions: { + C1: { + scope: 'project', + key: 'status', + operator: '==', + value: 'submitted', + }, + }, + }, + C3: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d53'], + }, + }, + validationText: 'Add 2 evidence for any task', + }, + C4: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d57'], + }, + }, + }, + C5: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d5b'], + }, + }, + }, + C6: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d63'], + }, + }, + }, + }, + }, + issuer: { + name: 'default_code', + }, + solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), + baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-14T13:11:17.793Z'), + createdAt: new Date('2025-10-14T13:11:17.628Z'), + __v: 0, + templateUrl: + 'certificate/aa8529e3-6754-4432-a669-72b73d358e2f/1/7042c718-a1bf-43e3-b296-586de247a440/68ee4bf5fb9bee08b93b6d97/14-9-2025-1760447477692_Dowloaded.svg', + }, + { + _id: new ObjectId('68e8c676201642091e014943'), + status: 'active', + deleted: false, + criteria: { + validationText: 'Complete validation message', + expression: 'C1&&(C3||C4||C5||C6||C7)', + conditions: { + C1: { + validationText: 'Submit your project.', + expression: 'C1', + conditions: { + C1: { + scope: 'project', + key: 'status', + operator: '==', + value: 'submitted', + }, + }, + }, + C3: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e0148ff'], + }, + }, + validationText: 'Add 2 evidence for any task', + }, + C4: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e014903'], + }, + }, + }, + C5: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e014907'], + }, + }, + }, + C6: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e01490b'], + }, + }, + }, + C7: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e01490f'], + }, + }, + }, + }, + }, + issuer: { + name: 'default_code', + }, + solutionId: new ObjectId('68e8c635201642091e014914'), + programId: new ObjectId('68e8c284201642091e0148c1'), + baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-10T08:40:22.454Z'), + createdAt: new Date('2025-10-10T08:40:22.298Z'), + __v: 0, + templateUrl: + 'certificate/0bcc856d-0145-448c-8188-300ca3f3250e/1/58cfdf3c-f1a2-4a94-bbb5-21dcd7286913/68e8c676201642091e014943/10-9-2025-1760085622353_Dowloaded.svg', + }, +] let certificateBaseTemplatesData = [ - { - _id: new ObjectId("68c008dfd113c30c11f1aca2"), - deleted: false, - code: "onelogo_onesign", - name: "onelogo_onesign", - url: "certificate/ef2058a1-92e0-4a63-af5f-b712f992bf90/1/81fc35ad-9519-4ec4-87bb-6cef64b940f0/9-8-2025-1757415647754_sl_s1l1.svg", - tenantId: "default", - orgId: "slorg", - updatedAt: new Date("2025-09-09T11:00:47.878Z"), - createdAt: new Date("2025-09-09T11:00:47.878Z"), - __v: 0, - }, -]; + { + _id: new ObjectId('68c008dfd113c30c11f1aca2'), + deleted: false, + code: 'onelogo_onesign', + name: 'onelogo_onesign', + url: 'certificate/ef2058a1-92e0-4a63-af5f-b712f992bf90/1/81fc35ad-9519-4ec4-87bb-6cef64b940f0/9-8-2025-1757415647754_sl_s1l1.svg', + tenantId: 'default', + orgId: 'slorg', + updatedAt: new Date('2025-09-09T11:00:47.878Z'), + createdAt: new Date('2025-09-09T11:00:47.878Z'), + __v: 0, + }, +] let projectCategoriesData = [ - { - _id: new ObjectId("685ae6a0cb7c7200145dadae"), - createdBy: "SYSTEM", - updatedBy: "SYSTEM", - isDeleted: false, - isVisible: true, - status: "active", - icon: "", - noOfProjects: 361, - evidences: [], - deleted: false, - name: "teachers", - externalId: "teachers", - tenantId: "default", - orgId: "slorg", - updatedAt: new Date("2025-06-24T17:55:44.720Z"), - createdAt: new Date("2025-06-24T17:55:44.720Z"), - __v: 0, - }, -]; - + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + createdBy: 'SYSTEM', + updatedBy: 'SYSTEM', + isDeleted: false, + isVisible: true, + status: 'active', + icon: '', + noOfProjects: 361, + evidences: [], + deleted: false, + name: 'teachers', + externalId: 'teachers', + tenantId: 'default', + orgId: 'slorg', + updatedAt: new Date('2025-06-24T17:55:44.720Z'), + createdAt: new Date('2025-06-24T17:55:44.720Z'), + __v: 0, + }, +] let configurationData = [ { @@ -1933,15 +1900,13 @@ let configurationData = [ updatedAt: new Date('2025-05-26T10:56:17.021Z'), }, ] - - module.exports = { - solutionData, - programData, - projectTemplatesData, - projectTemplateTasksData, - certificateTemplatesData, - certificateBaseTemplatesData, - projectCategoriesData, - configurationData -}; + solutionData, + programData, + projectTemplatesData, + projectTemplateTasksData, + certificateTemplatesData, + certificateBaseTemplatesData, + projectCategoriesData, + configurationData, +} diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh index 44b2d272..0f0064aa 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh @@ -57,7 +57,7 @@ log "User directory created and distributionColumns.sql downloaded." # Step 9: Download and make citus_setup.sh executable log "Downloading citus_setup.sh..." -curl -OJL https://github.com/ELEVATE-Project/project-service/blob/setupGuide-3.4/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/stand-alone/ubuntu/citus_setup.sh chmod +x citus_setup.sh # Install MongoDB driver (usually needed if connecting directly to MongoDB/Citus) diff --git a/documentation/3.4.0/native/envs/with-survey/elevate_portal_env b/documentation/3.4.0/native/envs/with-survey/elevate_portal_env new file mode 100644 index 00000000..14b3959f --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/elevate_portal_env @@ -0,0 +1,48 @@ +AUTH_API_TOKEN= "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJPc3NtSUhXaW1NMDN2MUxsVnFvNHBqaS0ydEMwTGhLY0o5dmtwQTlJZV9zIn0.eyJleHAiOjE3MzI4NjE5ODcsImlhdCI6MTczMjc3NTU4NywianRpIjoiOTM5NWM4N2QtOTliYy00YTRkLWIyNTUtNDQ4NjFhYTBjYWE2IiwiaXNzIjoiaHR0cHM6Ly9xYS5wcmF0aGFtdGVhY2hlcmFwcC50ZWtkaW5leHQuY29tL2F1dGgvcmVhbG1zL3ByYXRoYW0iLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiY2IwN2RlNjItZWM0Yy00YmRlLWI5YjYtOWIwZjM3OWMwMTExIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoicHJhdGhhbSIsInNlc3Npb25fc3RhdGUiOiI2MzQ0ZWZjNS05NmUwLTQyNzYtYjViYi1hNTcyMGI0YzVmYjkiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIi8qIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiZGVmYXVsdC1yb2xlcy1wcmF0aGFtIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwic2lkIjoiNjM0NGVmYzUtOTZlMC00Mjc2LWI1YmItYTU3MjBiNGM1ZmI5IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiUmFqbmlzaCIsInByZWZlcnJlZF91c2VybmFtZSI6InJham5pc2g5ODc2MSIsImdpdmVuX25hbWUiOiJSYWpuaXNoIiwiZmFtaWx5X25hbWUiOiIifQ.OpTwdzG8sWhVK_VY6iAYy1klR2cfSLn2gYCqgnu9FJi4zTjPY-B0d8F--cEPVGZ4HdJiSZnGvfOgalICPKxthG-HfYR-cwznGWJVfte4HsvL5UbteOq5KDT3lsyzUkScgQ0bTKztSsePdhU2ctAGXv52DtPK8u7xWkKD6GYDeQCIHJlFS2JgR9v50d6Mva-stvtDRS7LEFgoes1hKQ0_k_C-5g1w7Rh084XJQC7tPmczap_Q-RqI-jkJZvUl_cAJK6NppZArSFA0AePkY-0_pZKBx82nBJbho2IETMIa7KzvnhdRCtjP0ynoTY-YJ4eL3jYhmIJ5DzWj3FpOZkrpSw" +AWS_ACCESS_KEY_ID= "AWS_ACCESS_KEY_ID" +AWS_ACCESS_SECRET_KEY= "AWS_ACCESS_SECRET_KEY" +AWS_BUCKET_NAME= "qa-knowlg-inquiry" +AWS_REGION= "ap-south-1" +BASE_URL= "https://qa-middleware.tekdinext.com" +NEXT_API_BASE_URL= "https://middleware.prathamdigital.org" +NEXT_PRIVATE_LOCAL_WEBPACK= "true" +NEXT_PUBLIC_AUTH= "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5dndaeklzS3U0ZzRjSWxoZnE1MWQ2SlR1d0w4dktlZCJ9.4jPaZhi9dHMzqqoZAZvfD5t5QPAVAuWOr9SDf1apZb8" +NEXT_PUBLIC_BASE_URL= "https://dev.elevate-apis.shikshalokam.org" +NEXT_PUBLIC_BASE_URL_ENTITY= "https://shiksha-dev-interface.tekdinext.com/entity-management" +NEXT_PUBLIC_BASE_URL_READ= "https://saas-dev-interface.tekdinext.com" +NEXT_PUBLIC_BASE_URL_SCHEMA= "https://qa-interface.prathamdigital.org" +NEXT_PUBLIC_CHANNEL_ID= "scp-channel" +NEXT_PUBLIC_CLIENT_ID= "implementation" +NEXT_PUBLIC_CLIENT_SECRET= "3e92df83-a773-4e3e-89c6-3a9afe81211a" +NEXT_PUBLIC_CLOUD_STORAGE_URL= "https://qa-knowlg-inquiry.s3-ap-south-1.amazonaws.com/" +NEXT_PUBLIC_CONTENT= "http://localhost:8000/shikshalokam/content" +NEXT_PUBLIC_CONTENT_FRAMEWORK_ID= "level1arning-framework" +NEXT_PUBLIC_DELETE_USER= "/api/user/v1/block" +NEXT_PUBLIC_FORGOT_PASSWORD= "https://dev.sunbirdsaas.com/recover/identify/account" +NEXT_PUBLIC_FRAMEWORK_ID= "shiksha-fw" +NEXT_PUBLIC_GENRATE_OTP= "/api/otp/v2/generate" +NEXT_PUBLIC_GRANT_TYPE= "password" +NEXT_PUBLIC_LOCATION_SEARCH= "/api/data/v1/location/search" +NEXT_PUBLIC_LOGINPAGE= "https://dev.elevate-apis.shikshalokam.org/" +NEXT_PUBLIC_LOGIN_PATH= "/auth/realms/sunbird/protocol/openid-connect/token" +NEXT_PUBLIC_NEW_REGISTRATION= "/interface/v1/account/create" +NEXT_PUBLIC_ORGID= "1" +NEXT_PUBLIC_PROGRAM_BASE_URL= "https://dev.elevate-sandbox.shikshalokam.org" +NEXT_PUBLIC_PWA= "http://localhost:8000/shikshalokam/pwa" +NEXT_PUBLIC_READ_USER= "/api/user/v1/search" +NEXT_PUBLIC_REGISTRATION= "http://localhost:8000/shikshalokam/registration/newUser" +NEXT_PUBLIC_SEARCH_LOCATION= "/interface/v1/user/locations/search" +NEXT_PUBLIC_SEND_OTP= "/api/otp/v1/generate" +NEXT_PUBLIC_SHIKSHAGRAHA_BASEPATH= "/shikshalokam" +NEXT_PUBLIC_SSUNBIRD_BASE_URL= "https://saas-qa.tekdinext.com/interface/v1" +NEXT_PUBLIC_SSUNBIRD_HIERARCHY_PATH= "/api/course/v1/" +NEXT_PUBLIC_TELEMETRY_URL= "https://qa.prathamteacherapp.tekdinext.com/telemetry" +NEXT_PUBLIC_TENANT_ID= "ef99949b-7f3a-4a5f-806a-e67e683e38f3" +NEXT_PUBLIC_TRACKING_BASE_URL= "https://shiksha2-dev.tekdinext.com/tracking" +NEXT_PUBLIC_UPDATE_USER= "/api/framework/v1/update" +NEXT_PUBLIC_VERIFT_OTP= "/api/otp/v2/verify" +NEXT_PUBLIC_VERIFY_OTP= "/api/otp/v1/verify" +created_time= "2025-06-18T08:50:04.71092372Z" +custom_metadata= "null" +destroyed= "false" +version= "5" \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/with-survey/entity_management_env b/documentation/3.4.0/native/envs/with-survey/entity_management_env new file mode 100644 index 00000000..c8b99600 --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/entity_management_env @@ -0,0 +1,23 @@ +APPLICATION_PORT = 5001 +APPLICATION_ENV ="development" +APPLICATION_BASE_URL='/entity-management/' +INTERNAL_ACCESS_TOKEN =xahusub12yexlashsbxAXADHBlaj +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj +MONGODB_URL=mongodb://localhost:27017/elevate-entity +AUTH_METHOD = native +USER_SERVICE_URL = http://localhost:3569 +USER_SERVICE_BASE_URL=/user +KAFKA_HEALTH_CHECK_TOPIC=test +SERVICE_NAME = elevate-entity-service +API_DOC_URL="http://localhost:3569/entity-management/api-doc" +APPLICATION_HOST=localhost +IS_AUTH_TOKEN_BEARER="false" +ADMIN_ACCESS_TOKEN=rwwee3$123 +ADMIN_TOKEN_HEADER_NAME="admin-auth-token" +INTERFACE_SERVICE_URL=http://localhost:3569 +KAFKA_HEALTH_CHECK_TOPIC = entity-health-check-topic-check +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_URL = kafka:9092 +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_GROUP_ID = entity +HEALTH_CHECK_DEBUG_MODE = true \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/with-survey/interface_env b/documentation/3.4.0/native/envs/with-survey/interface_env new file mode 100644 index 00000000..62f2bbf6 --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/interface_env @@ -0,0 +1,24 @@ +API_DOC_URL=/interface/api-doc +APPLICATION_ENV=development +APPLICATION_PORT=3569 +ELEVATE_NOTIFICATION_KAFKA_BROKERS=localhost:9092 +ELEVATE_NOTIFICATION_KAFKA_GROUP_ID=dev.mentoring +ELEVATE_NOTIFICATION_KAFKA_TOPIC=dev.notification +ENTITY_SERVICE_BASE_URL=http://localhost:5001 +INSTALLED_PACKAGES=elevate-mentoring elevate-survey-observation@1.0.1 elevate-self-creation-portal +NOTIFICATION_SERVICE_BASE_URL=http://localhost:7201 +PROJECT_SERVICE_BASE_URL=http://localhost:6000 +RATE_LIMITER_ENABLED=true +RATE_LIMITER_GENERAL_LIMIT=500 +RATE_LIMITER_NUMBER_OF_PROXIES=3 +RATE_LIMITER_PUBLIC_LOW_LIMIT=5 +REQUIRED_BASE_PACKAGES=elevate-mentoring elevate-project elevate-survey-observation self-creation-portal +REQUIRED_PACKAGES=elevate-mentoring@1.2.90 elevate-survey-observation@1.0.22 elevate-project@1.1.53 shiksha-notification@1.1.3 elevate-self-creation-portal@1.0.70 +ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json +SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw +SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw +SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 +SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 +SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE +SURVEY_SERVICE_BASE_URL=http://localhost:5007 +USER_SERVICE_BASE_URL=http://localhost:3001 \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/with-survey/notification_env b/documentation/3.4.0/native/envs/with-survey/notification_env new file mode 100644 index 00000000..18cf3570 --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/notification_env @@ -0,0 +1,17 @@ +API_DOC_URL=/api-doc +APPLICATION_BASE_URL=/notification/ +APPLICATION_ENV=development +APPLICATION_PORT=3002 +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/notification +DISABLE_LOG=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj +KAFKA_GROUP_ID=notification +KAFKA_HOST=localhost:9092 +KAFKA_TOPIC=develop.notifications +SENDGRID_API_KEY=SG.asd9f87a9s8d7f. +SENDGRID_FROM_MAIL=no-reply@some.org +ZEST_ENV=ZEST_ENV +EMAIL_SERVICE=email +FROM_EMAIL=email diff --git a/documentation/3.4.0/native/envs/with-survey/observation_portal_env b/documentation/3.4.0/native/envs/with-survey/observation_portal_env new file mode 100644 index 00000000..50d7ba42 --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/observation_portal_env @@ -0,0 +1,4 @@ +window["env"] = { + production: true, + surveyBaseURL:"https://qa.elevate-apis.shikshalokam.org" +} \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/with-survey/observation_survey_projects_pwa_env b/documentation/3.4.0/native/envs/with-survey/observation_survey_projects_pwa_env new file mode 100644 index 00000000..156e3796 --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/observation_survey_projects_pwa_env @@ -0,0 +1,18 @@ +window["env"] = { + production: true, + baseURL: 'https://qa.elevate-apis.shikshalokam.org', + // baseURL: 'https://saas-qa.tekdinext.com', + capabilities: 'all', + restrictedPages: ['DOWNLOADS','AUTH_PAGES'], + unauthorizedRedirectUrl: "/", + isAuthBypassed: true, + profileRedirectPath: "/profile-edit", + showHeader: true, + config:{ + logoPath:'assets/images/logo.png', + faviconPath:'assets/icons/elevate-logo.png', + title:"Elevate", + redirectUrl:"/home" + }, + hostPath:'/ml/' +}; \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/with-survey/project_env b/documentation/3.4.0/native/envs/with-survey/project_env new file mode 100644 index 00000000..59ef2b74 --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/project_env @@ -0,0 +1,47 @@ +APPLICATION_PORT = 6000 +APPLICATION_ENV = development +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj +INTERNAL_ACCESS_TOKEN =xahusub12yexlashsbxAXADHBlaj +MONGODB_URL = mongodb://localhost:27017/elevate-project +KEYCLOAK_PUBLIC_KEY_PATH = keycloak-public-keys +KAFKA_COMMUNICATIONS_ON_OFF = ON +KAFKA_URL=localhost:9092 +KAFKA_GROUP_ID = projects +KAFKA_HEALTH_CHECK_TOPIC = project-health-check-topic-check +PROJECT_SUBMISSION_TOPIC=sl-improvement-project-submission-dev +SUBMISSION_TOPIC = Projectsubmissions +PROJECT_CERTIFICATE_TOPIC = generateProjectCertificate +ELEVATE_PROJECT_SERVICE_URL= 'http://localhost:6000' +SERVICE_NAME = project +USER_DELETE_TOPIC = deleteuser +TELEMETRY_TOPIC=telemetry.raw +ID = projectservice +TELEMETRY_ON_OFF=ON +USER_DELETE_ON_OFF=OFF +CLOUD_STORAGE=ON +TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC = +05:30 +VALIDATE_ENTITIES = ON +APP_PORTAL_BASE_URL = "http://localhost:7007" +NO_OF_MINUTES = 30 +NO_OF_EXPIRY_TIME = 60 +DEFAULT_ORGANISATION_CODE = 1 +GOTENBERG_URL=http://localhost:3000 +API_DOC_URL="http://http://localhost:3569/project/api-doc" +INTERFACE_SERVICE_URL=http://localhost:3569 +USER_SERVICE_BASE_URL = "/user" +ENTITY_MANAGEMENT_SERVICE_BASE_URL = "/entity-management" +SURVEY_SERVICE_URL = http://localhost:4301/survey +CLOUD_STORAGE_PROVIDER=gcloud +CLOUD_STORAGE_ACCOUNTNAME=CLOUD_STORAGE_ACCOUNTNAME +CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\n" +CLOUD_STORAGE_PROJECT =sl-dev-project +CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private +CLOUD_STORAGE_BUCKET_TYPE=private +ADMIN_ACCESS_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_AUTH_TOKEN = N0DM5NAwwCN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_TOKEN_HEADER_NAME = 'admin-auth-token' +IS_AUTH_TOKEN_BEARER = false +AUTH_METHOD = native +REDIS_HOST=redis://127.0.0.1:6379 +USER_SERVICE_URL = http://localhost:3569 +RESOURCE_DELETION_TOPIC=RESOURCE_DELETION_TOPIC diff --git a/documentation/3.4.0/native/envs/with-survey/samiksha_env b/documentation/3.4.0/native/envs/with-survey/samiksha_env new file mode 100644 index 00000000..f4300d5c --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/samiksha_env @@ -0,0 +1,66 @@ +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj +ADMIN_ACCESS_TOKEN=CN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_AUTH_TOKEN=CN5KNXKJwlwu6c0nQQt6Rcl +ADMIN_TOKEN_HEADER_NAME=admin-auth-token +API_DOC_URL=/survey/api-doc +APPLICATION_BASE_URL=/survey/ +APP_PORTAL_BASE_URL=http://localhost:7007 +APP_PORTAL_DIRECTORY=/observations/ +AUTH_CONFIG_FILE_PATH=config.json +AUTH_METHOD=native +CLOUD_STORAGE=GCP +CLOUD_STORAGE_ACCOUNTNAME=CLOUD_STORAGE_ACCOUNTNAME +CLOUD_STORAGE_BUCKETNAME=mentoring-dev-storage-private +CLOUD_STORAGE_BUCKET_TYPE=private +CLOUD_STORAGE_PROJECT=sl-dev-project +CLOUD_STORAGE_PROVIDER=gcloud +CLOUD_STORAGE_SECRET=----BEGIN PRIVATE KEY----- +COMPLETED_OBSERVATION_SUBMISSION_TOPIC=elevate_observations_dev +COMPLETED_SUBMISSION_TOPIC=elevate_submissions_dev +COMPLETED_SURVEY_SUBMISSION_TOPIC=elevate_surveys_raw_dev +CSV_REPORTS_PATH=reports +DB=elevate-samiksha +DEFAULT_ORGANISATION_CODE=default_code +ELEVATE_SURVEY_SERVICE_URL=http://localhost:7007 +ENTITY_BASE_URL=http://localhost:3569 +ENTITY_MANAGEMENT_SERVICE_URL=http://localhost:3569/entity-management +GOTENBERG_URL=http://gotenberg:3000 +HOST=localhost +IMPROVEMENT_PROJECT_BASE_URL=http://localhost:3569 +IMPROVEMENT_PROJECT_SUBMISSION_TOPIC=elevate_project_task_submissions_dev +INCOMPLETE_OBSERVATION_SUBMISSION_TOPIC=elevate_observations_dev +INCOMPLETE_SUBMISSION_TOPIC=elevate_submissions_dev +INCOMPLETE_SURVEY_SUBMISSION_TOPIC=elevate_surveys_raw_dev +INTERFACE_SERVICE_URL=http://localhost:3569 +INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj +IS_AUTH_TOKEN_BEARER=false +Instance=ELEVATE +KAFKA_COMMUNICATIONS_ON_OFF=ON +KAFKA_GROUP_ID=dev.survey +KAFKA_HEALTH_CHECK_TOPIC=survey-health-check-topic-check +KAFKA_URL=kafka:9092 +LOG=debug +MOBILE_APPLICATION_APP_TYPE=assessment +MONGODB_URL=mongodb://localhost:27017 +NODE_ENV=development +NOTIFICATIONS_TOPIC=elevate_notifications_dev +ORG_UPDATES_TOPIC=dev.organizationEvent +PORT=4301 +PROGRAM_USER_MAPPING_TOPIC=dev.program +PROJECT_SERVICE_NAME=/project +PUBLIC_FOLDER_PATH=public +REQUEST_TIMEOUT_FOR_REPORTS=600000 +SERVICE_NAME=survey +SERVICE_NAME_HEALTH_CHECK=SamikshaService +SUBMISSION_RATING_QUEUE_TOPIC=elevate_submissions_rating_dev +SUBMISSION_UPDATE_KAFKA_PUSH_ON_OFF=ON +TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC=+05:30 +TOP_LEVEL_ENTITY_TYPE=state +USER_ACCOUNT_EVENT_TOPIC=dev.userCreate +USER_COURSES_SUBMISSION_TOPIC=elevate_user_courses_dev +USER_COURSES_TOPIC=elevate_user_courses_raw +USER_DELETE_ON_OFF=ON +USER_DELETE_TOPIC=dev.userCreate +USER_SERVICE_URL=http://localhost:3569/user +VALIDATE_ENTITIES=ON +VALIDATE_ROLE=ON diff --git a/documentation/3.4.0/native/envs/with-survey/scheduler_env b/documentation/3.4.0/native/envs/with-survey/scheduler_env new file mode 100644 index 00000000..fa7dbfa1 --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/scheduler_env @@ -0,0 +1,13 @@ +API_DOC_URL=/api-doc +APPLICATION_BASE_URL=/scheduler/ +APPLICATION_ENV=development +APPLICATION_PORT=4000 +DEFAULT_QUEUE=email +DISABLE_LOG=false +ENABLE_LOG=true +ERROR_LOG_LEVEL=silly +KAFKA_URL=localhost:9092 +NOTIFICATION_KAFKA_TOPIC=develop.notifications +REDIS_HOST=localhost +REDIS_PORT=6379 +MONGODB_URL="mongodb://localhost:27017/tl-cron-rest" diff --git a/documentation/3.4.0/native/envs/with-survey/user_env b/documentation/3.4.0/native/envs/with-survey/user_env new file mode 100644 index 00000000..193d7859 --- /dev/null +++ b/documentation/3.4.0/native/envs/with-survey/user_env @@ -0,0 +1,82 @@ +ACCESS_TOKEN_EXPIRY='30m' +ACCESS_TOKEN_SECRET=bsj82AHBxahusub12yexlashsbxAXADHBlaj +API_DOC_URL=/user/api-doc +APP_NAME=MentorED +APPLICATION_ENV=development +APPLICATION_PORT=3001 +CLOUD_STORAGE_PROVIDER = aws +CLOUD_STORAGE_BUCKETNAME =mentoring-prod-storage-private +CLOUD_STORAGE_SECRET= CLOUD_STORAGE_SECRET +CLOUD_STORAGE_REGION =ap-south-1 +CLOUD_ENDPOINT =CLOUD_ENDPOINT +CLOUD_STORAGE_ACCOUNTNAME =CLOUD_STORAGE_ACCOUNTNAME +CLOUD_STORAGE_BUCKET_TYPE = private +PUBLIC_ASSET_BUCKETNAME=mentoring-prod-storage-private +AZURE_ACCOUNT_KEY='AZURE_ACCOUNT_KEY' +AZURE_ACCOUNT_NAME=elevatementoringaccount +CLEAR_INTERNAL_CACHE=userinternal +CLOUD_STORAGE=GCP +DEFAULT_AZURE_CONTAINER_NAME=mentoring-azure-private +DEFAULT_GCP_BUCKET_NAME=DEFAULT_GCP_BUCKET_NAME +ENABLE_EMAIL_OTP_VERIFICATION=false +ENABLE_LOG=true +GCP_PATH=gcp.json +GCP_PROJECT_ID=sl-project +INTERNAL_ACCESS_TOKEN=xahusub12yexlashsbxAXADHBlaj +INTERNAL_CACHE_EXP_TIME=86400 +IV=LHYOA5YnTonqcgrm15k3/Q== +KAFKA_GROUP_ID=mentoring +KAFKA_TOPIC= +KAFKA_URL= localhost:9092 +KEY=E/m3RD/aM3Ed3lLfYVcKizakG9R+bFybAPZSLjIP2hY= +MENTOR_SECRET_CODE=4567 +MONGODB_URL=mongodb://localhost:27017/elevate-users +NOTIFICATION_KAFKA_TOPIC=notifications +OTP_EMAIL_TEMPLATE_CODE=emailotp +OTP_EXP_TIME=86400 +RATING_KAFKA_TOPIC=mentor_rating +REDIS_HOST=redis://localhost:6379 +REFRESH_TOKEN_EXPIRY=183 +REFRESH_TOKEN_SECRET=371hkjkjady2y3ihdkajshdkiq23iuekw71yekhaskdvkvegavy23t78veqwexqvxveit6ttxyeeytt62tx236vv +REGISTRATION_EMAIL_TEMPLATE_CODE=registration +REGISTRATION_OTP_EMAIL_TEMPLATE_CODE=registrationotp +SALT_ROUNDS=10 +MENTORING_SERVICE_URL='localhost' +DEFAULT_OCI_BUCKET_NAME=mentoring-oci-private +OCI_ACCESS_KEY_ID= 81a4c2553026982360af6b24497c489b0fea9436 +OCI_BUCKET_ENDPOINT=https://axgqmpkrpmt5.compat.objectstorage.ap-hyderabad-1.oraclecloud.com +OCI_BUCKET_REGION= ap-hyderabad-1 +OCI_SECRET_ACCESS_KEY='+U4O+CjiC6M/mOcGjYh7K/9XjfSdJ79OoLuQrABPOJ8=' +ERROR_LOG_LEVEL= silly +DISABLE_LOG= false +DEFAULT_ORGANISATION_CODE=default_code +DEV_DATABASE_URL=postgres://postgres:postgres@localhost:5432/users +ADMIN_SECRET_CODE=W5bF7gesuS0xsNWmpsKy +INVITEE_EMAIL_TEMPLATE_CODE="emailcode" +ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE="coeadmin" +DEFAULT_QUEUE="defaultque" +MENTOR_INVITATION_EMAIL_TEMPLATE_CODE="mentorinvitationTemplateCode" +MENTEE_INVITATION_EMAIL_TEMPLATE_CODE="mentee invitationTemplateCode" +DEFAULT_ROLE="mentee" +SAMPLE_CSV_FILE_PATH="sample path" +ORG_ADMIN_INVITATION_EMAIL_TEMPLATE_CODE = "code5" +DEFAULT_ORG_ID = 1 +IS_AUTH_TOKEN_BEARER=false +PORTAL_URL = "portaladdress" +SCHEDULER_SERVICE_HOST = "host" +SCHEDULER_SERVICE_BASE_URL = "/scheduler/" +REFRESH_VIEW_INTERVAL = 100000 +EMAIL_ID_ENCRYPTION_IV = 'a390328e496f025249a88384f318a536' +EMAIL_ID_ENCRYPTION_KEY = '9bbf4698e081176b4e38c3f04f9c0cff6ae80b1960e5ac868cc234ac8537aa66' +EMAIL_ID_ENCRYPTION_ALGORITHM = 'aes-256-cbc' +GENERIC_INVITATION_EMAIL_TEMPLATE_CODE = 'check_code' +EVENT_ORG_LISTENER_URLS = "sample url" +EVENT_ENABLE_ORG_EVENTS = false +DOWNLOAD_URL_EXPIRATION_DURATION = 300 +APPLICATION_HOST= "localhost" +CHANGE_PASSWORD_TEMPLATE_CODE = "change_password" +CAPTCHA_ENABLE = false +RECAPTCHA_SECRET_KEY= "6LfWEKYpAAAAAJS0eukS2Su_5vwlXRs5vPbC34W0" +ALLOWED_IDLE_TIME=1200000 +APPLICATION_BASE_URL="/user" +ENTITY_MANAGEMENT_SERVICE_BASE_URL="http://localhost:3569/entity-management/" \ No newline at end of file diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/common.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/common.js deleted file mode 100644 index 0e70fb2e..00000000 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/common.js +++ /dev/null @@ -1,39 +0,0 @@ -function getEndDate(date) { - let endDate = date.split(' ') - if (endDate[1] === '' || endDate[1] === undefined) { - date = endDate[0] + ' 23:59:59' - } - date = new Date(date) - date = addOffsetToDateTime(date, '+05:30') - console.log(date, 'this is date') - return date -} - -function addOffsetToDateTime(time, timeZoneDifference) { - //get the offset time from env with respect UTC - let localTimeZone = timeZoneDifference - //convert offset time to minutes - let localTime = localTimeZone.split(':') - let localHourDifference = Number(localTime[0]) - let getTimeDiffInMinutes = - localHourDifference * 60 + (localHourDifference / Math.abs(localHourDifference)) * Number(localTime[1]) - //get server offset time w.r.t. UTC time - let timeDifference = new Date().getTimezoneOffset() - //get actual time difference in minutes - let differenceWithLocal = timeDifference + getTimeDiffInMinutes - // if its 0 then return same time - if (differenceWithLocal === 0) { - return time - } else { - // set time difference - let getMinutes = differenceWithLocal % 60 - let getHours = (differenceWithLocal - getMinutes) / 60 - time.setHours(time.getHours() - getHours) - time.setMinutes(time.getMinutes() - getMinutes) - return time - } -} - -module.exports = { - getEndDate, -} diff --git a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/import_forms.js b/documentation/3.4.0/native/scripts/stand-alone/ubuntu/import_forms.js deleted file mode 100644 index 96ed977b..00000000 --- a/documentation/3.4.0/native/scripts/stand-alone/ubuntu/import_forms.js +++ /dev/null @@ -1,51 +0,0 @@ -const mongoose = require('mongoose') -const axios = require('axios') - -// MongoDB URL and Collection -const mongoURL = 'mongodb://localhost:27017/elevate-samiksha' -const collectionName = 'forms' - -// Connect to MongoDB -mongoose - .connect(mongoURL, { - useNewUrlParser: true, - useUnifiedTopology: true, - }) - .then(() => { - console.log('Connected to MongoDB') - }) - .catch((err) => { - console.error('Failed to connect to MongoDB', err) - }) - -// Define schema for forms collection (adjust fields based on JSON structure) -const formSchema = new mongoose.Schema({}, { strict: false }) -const Form = mongoose.model(collectionName, formSchema) - -// Fetch JSON data from URL and insert into MongoDB -async function fetchAndInsertData() { - try { - const response = await axios.get( - 'https://raw.githubusercontent.com/ELEVATE-Project/observation-survey-projects-pwa/refs/heads/release-2.0.0/forms.json' - ) - const data = response.data - - const modifiedData = data.map((form) => ({ - ...form, - organizationId: 1, - deleted: false, - version: 0, - })) - - // Insert modified data into the forms collection - await Form.insertMany(modifiedData) - console.log('Data inserted successfully') - } catch (error) { - console.error('Error fetching or inserting data:', error) - } finally { - mongoose.connection.close() - } -} - -// Execute the function -fetchAndInsertData() diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/check-dependencies.sh b/documentation/3.4.0/native/scripts/with-survey/ubuntu/check-dependencies.sh new file mode 100644 index 00000000..98ff5e8b --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/check-dependencies.sh @@ -0,0 +1,139 @@ +#!/bin/bash + +# Define ANSI color codes for output formatting +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +# Function to check Node.js installation +check_nodejs() { + if command -v node > /dev/null 2>&1; then + echo -e "${GREEN}Node.js is installed. Version: $(node --version)${NC}" + else + echo -e "${RED}Node.js is not installed.${NC}" + fi +} + +# Function to check Apache Kafka and Zookeeper installation +check_kafka() { + if [ -d "/opt/kafka" ]; then + echo -e "${GREEN}Kafka directory exists.${NC}" + else + echo -e "${RED}Kafka directory does not exist.${NC}" + fi + + if systemctl is-active --quiet zookeeper; then + echo -e "${GREEN}Zookeeper service is running.${NC}" + else + echo -e "${RED}Zookeeper service is not running.${NC}" + fi + + if systemctl is-active --quiet kafka; then + echo -e "${GREEN}Kafka service is running.${NC}" + else + echo -e "${RED}Kafka service is not running.${NC}" + fi +} + +# Function to check Redis installation and service status +check_redis() { + if command -v redis-server > /dev/null 2>&1; then + echo -e "${GREEN}Redis server is installed. Version: $(redis-server --version)${NC}" + else + echo -e "${RED}Redis server is not installed.${NC}" + return + fi + + if systemctl status redis-server.service &> /dev/null; then + echo -e "${GREEN}Redis service is running.${NC}" + else + echo -e "${RED}Redis service is not running or inactive.${NC}" + fi +} + +# Function to check Citus installation +check_citus() { + if sudo su - postgres -c "psql -p 9700 -c 'SELECT citus_version();'" &> /dev/null; then + echo -e "${GREEN}Citus is running on port 9700.${NC}" + else + echo -e "${RED}Citus is not running or not installed.${NC}" + fi +} + +# Function to check PM2 installation +check_pm2() { + if command -v pm2 > /dev/null 2>&1; then + echo -e "${GREEN}PM2 is installed. Version: $(pm2 -v)${NC}" + else + echo -e "${RED}PM2 is not installed.${NC}" + fi +} + +# Function to check PostgreSQL installation and service +check_postgres() { + if command -v psql > /dev/null 2>&1; then + echo -e "${GREEN}PostgreSQL is installed. Version: $(psql --version)${NC}" + else + echo -e "${RED}PostgreSQL is not installed.${NC}" + fi + + if systemctl is-active --quiet postgresql; then + echo -e "${GREEN}PostgreSQL service is running.${NC}" + else + echo -e "${RED}PostgreSQL service is not running.${NC}" + fi +} + +# Function to check MongoDB installation and service +check_mongo() { + if command -v mongod > /dev/null 2>&1; then + echo -e "${GREEN}MongoDB is installed. Version: $(mongod --version | head -n 1)${NC}" + else + echo -e "${RED}MongoDB is not installed.${NC}" + return + fi + + if systemctl is-active --quiet mongod; then + echo -e "${GREEN}MongoDB service is running.${NC}" + else + echo -e "${RED}MongoDB service is not running.${NC}" + fi +} + +# Function to check if Redis BullMQ is installed (in Node.js context) +check_bullmq() { + if npm list -g | grep -q bullmq; then + echo -e "${GREEN}Redis BullMQ is installed globally.${NC}" + else + echo -e "${RED}Redis BullMQ is not installed globally.${NC}" + fi +} + +# Function to check Gotenberg installation and service status +check_gotenberg() { + if command -v docker > /dev/null 2>&1; then + echo -e "${GREEN}Docker is installed. Version: $(docker --version)${NC}" + else + echo -e "${RED}Docker is not installed.${NC}" + return + fi + + if docker ps | grep -q gotenberg; then + echo -e "${GREEN}Gotenberg Docker container is running.${NC}" + else + echo -e "${RED}Gotenberg Docker container is not running.${NC}" + fi +} + +# Main execution flow of the script +echo "ELEVATE-Project Dependencies Status" + +check_nodejs +check_kafka +check_redis +check_pm2 +check_postgres +check_citus +check_mongo +# check_bullmq +check_gotenberg diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/citus_setup.sh b/documentation/3.4.0/native/scripts/with-survey/ubuntu/citus_setup.sh new file mode 100644 index 00000000..3e9996ac --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/citus_setup.sh @@ -0,0 +1,133 @@ +#!/bin/bash + +# Exit immediately if a command exits with a non-zero status. +set -e + +# --- 1. ARGUMENT VALIDATION --- +if [ $# -lt 2 ]; then + echo "Error: Folder name and database URL not provided." >&2 + echo "Usage: $0 " >&2 + exit 1 +fi + +FOLDER_NAME="$1" +DEV_DATABASE_URL="$2" + +# Check if folder exists +if [ ! -d "$FOLDER_NAME" ]; then + echo "Error: Folder '$FOLDER_NAME' not found." >&2 + exit 1 +fi + +# --- 2. HIGHLY RELIABLE DATABASE URL PARSING --- +echo "Parsing database URL..." + +# Remove protocol (postgres://) +DB_CLEAN_URL=$(echo "$DEV_DATABASE_URL" | sed 's/.*:\/\///') + +# Extract DB_NAME +DB_NAME=$(echo "$DB_CLEAN_URL" | awk -F '/' '{print $NF}') + +# Remove DB_NAME from path +HOST_PORT_PATH=$(echo "$DB_CLEAN_URL" | sed "s/\/$DB_NAME//") + +# Extract components +DB_USER=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $1}') +DB_PASSWORD=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $2}') +DB_HOST=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $3}') +DB_PORT=$(echo "$HOST_PORT_PATH" | awk -F '[:@]' '{print $4}') + +# Log extracted values (excluding password) +echo "Extracted Database Variables:" +echo "DB_USER: $DB_USER" +echo "DB_HOST: $DB_HOST" +echo "DB_PORT: $DB_PORT" +echo "DB_NAME: $DB_NAME" +echo "" + +if [[ -z "$DB_PORT" ]]; then + echo "Error: Could not extract database port. Check URL format." >&2 + exit 1 +fi + +# --- 3. WAIT FOR LOCAL POSTGRESQL --- + +echo "Waiting for PostgreSQL on $DB_HOST:$DB_PORT to accept connections..." +until pg_isready -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" > /dev/null 2>&1; do + echo -n "." + sleep 1 +done +echo -e "\nPostgreSQL is ready." + +# Wait until database exists +echo "Checking existence of database '$DB_NAME'..." +until PGPASSWORD="$DB_PASSWORD" psql \ + -h "$DB_HOST" \ + -U "$DB_USER" \ + -p "$DB_PORT" \ + -d postgres \ + -lqt | awk '{print $1}' | grep -qw "$DB_NAME"; do + echo -n "." + sleep 5 +done +echo -e "\nDatabase '$DB_NAME' exists." + +# --- 4. CITUS EXTENSION SETUP --- + +DISTRIBUTION_COLUMNS_FILE="$FOLDER_NAME/distributionColumns.sql" +if [ ! -f "$DISTRIBUTION_COLUMNS_FILE" ]; then + echo "Error: distributionColumns.sql not found in folder '$FOLDER_NAME'." >&2 + exit 1 +fi + +echo "Creating Citus extension (if not exists)..." +PGPASSWORD="$DB_PASSWORD" psql \ + -h "$DB_HOST" \ + -U "$DB_USER" \ + -d "$DB_NAME" \ + -p "$DB_PORT" \ + --set ON_ERROR_STOP=1 \ + -c "CREATE EXTENSION IF NOT EXISTS citus;" + +# --- 5. EXECUTE SQL FILE WITH ROBUST TABLE CHECK --- + +check_table() { + local table_name=$1 + PGPASSWORD="$DB_PASSWORD" psql \ + -h "$DB_HOST" \ + -U "$DB_USER" \ + -d "$DB_NAME" \ + -p "$DB_PORT" \ + -q -t \ + --set ON_ERROR_STOP=1 \ + -c "SELECT 1 FROM $table_name LIMIT 1;" \ + > /dev/null 2>&1 +} + +echo "Starting creation of distributed tables..." + +while IFS= read -r line; do + trimmed_line=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + + if [[ "$trimmed_line" =~ ^create_distributed_table\(\'([^\']+)\', ]]; then + table="${BASH_REMATCH[1]}" + echo "Processing table: '$table'" + + # Wait until table exists + until check_table "$table"; do + echo "Table '$table' does not exist yet (waiting for migration)..." + sleep 1 + done + + echo "Table '$table' exists. Applying Citus distribution..." + PGPASSWORD="$DB_PASSWORD" psql \ + -h "$DB_HOST" \ + -U "$DB_USER" \ + -d "$DB_NAME" \ + -p "$DB_PORT" \ + --set ON_ERROR_STOP=1 \ + -c "$trimmed_line" + fi +done < "$DISTRIBUTION_COLUMNS_FILE" + +echo "āœ… Local PostgreSQL Citus setup and table distribution completed successfully!" diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/configFile.json b/documentation/3.4.0/native/scripts/with-survey/ubuntu/configFile.json new file mode 100644 index 00000000..b3d32b2f --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/configFile.json @@ -0,0 +1,11 @@ +{ + "authTokenUserInformation": { + "userId": "data.id", + "userName": "data.name", + "firstName": "data.name", + "organization_id": "data.organization_codes[0]", + "roles": "data.organizations[?code={{organization_id}}].roles", + "organizations": "data.organizations", + "tenant_id": "data.tenant_code" + } +} diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/create-databases.sh b/documentation/3.4.0/native/scripts/with-survey/ubuntu/create-databases.sh new file mode 100644 index 00000000..2ce07163 --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/create-databases.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Run commands as the postgres user +sudo -u postgres psql -p 5432 -c "CREATE USER postgres WITH ENCRYPTED PASSWORD 'postgres';" + +# Create the user database and assign privileges +sudo -u postgres psql -p 5432 -c "CREATE DATABASE users;" +sudo -u postgres psql -p 5432 -d users -c "GRANT ALL PRIVILEGES ON DATABASE users TO postgres;" +sudo -u postgres psql -p 5432 -d users -c "GRANT ALL ON SCHEMA public TO postgres;" + +# Create the notification database and assign privileges +sudo -u postgres psql -p 5432 -c "CREATE DATABASE notification;" +sudo -u postgres psql -p 5432 -d notification -c "GRANT ALL PRIVILEGES ON DATABASE notification TO postgres;" +sudo -u postgres psql -p 5432 -d notification -c "GRANT ALL ON SCHEMA public TO postgres;" + +echo "Database setup complete." diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js new file mode 100644 index 00000000..8f17d82b --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js @@ -0,0 +1,290 @@ +const { ObjectId } = require("mongodb"); + +let entityType = [ + { + _id: new ObjectId("6825914b97b5680013e6a140"), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ["district"], + createdBy: "49", + updatedBy: "49", + deleted: false, + isDeleted: false, + name: "state", + toBeMappedToParentEntities: true, + tenantId: "default", + updatedAt: new Date("2025-05-15T07:01:31.680Z"), + createdAt: new Date("2025-05-15T07:01:31.680Z"), + __v: 0, + orgId: "default_code", + }, + { + _id: new ObjectId("6825915197b5680013e6a142"), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ["district"], + createdBy: "49", + updatedBy: "49", + deleted: false, + isDeleted: false, + name: "district", + toBeMappedToParentEntities: true, + tenantId: "default", + updatedAt: new Date("2025-05-15T07:01:37.892Z"), + createdAt: new Date("2025-05-15T07:01:37.892Z"), + __v: 0, + orgId: "default_code", + }, + { + _id: new ObjectId("682591cc97b5680013e6a15c"), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ["district"], + createdBy: "49", + updatedBy: "49", + deleted: false, + isDeleted: false, + name: "professional_role", + toBeMappedToParentEntities: true, + tenantId: "default", + updatedAt: new Date("2025-05-15T07:03:40.376Z"), + createdAt: new Date("2025-05-15T07:03:40.376Z"), + __v: 0, + orgId: "default_code", + }, + { + _id: new ObjectId("682591d397b5680013e6a15e"), + profileForm: [], + profileFields: [], + types: [], + callResponseTypes: [], + isObservable: true, + immediateChildrenEntityType: ["district"], + createdBy: "49", + updatedBy: "49", + deleted: false, + isDeleted: false, + name: "professional_subroles", + toBeMappedToParentEntities: true, + tenantId: "default", + updatedAt: new Date("2025-05-15T07:03:47.062Z"), + createdAt: new Date("2025-05-15T07:03:47.062Z"), + __v: 0, + orgId: "default_code", + }, +]; + +let entities = [ + { + _id: new ObjectId("6852c86c7248c20014b38a4d"), + metaInformation: { + targetedEntityTypes: [], + externalId: "16", + name: "Tripura", + }, + childHierarchyPath: ["district", "block", "cluster", "school"], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825914b97b5680013e6a140"), + entityType: "state", + registryDetails: { + code: "16", + locationId: "16", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:29:00.266Z"), + createdAt: new Date("2025-06-18T14:08:44.438Z"), + __v: 0, + groups: { + district: [new ObjectId("6852c8ae7248c20014b38a57")], + block: [new ObjectId("6852c8de7248c20014b38a9d")], + cluster: [new ObjectId("6852c9027248c20014b38c34")], + school: [new ObjectId("6852c9237248c20014b39fa0")], + }, + }, + { + _id: new ObjectId("6852c8ae7248c20014b38a57"), + metaInformation: { + targetedEntityTypes: [], + externalId: "westTripura", + name: "West Tripura", + }, + childHierarchyPath: ["block", "cluster", "school"], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825915197b5680013e6a142"), + entityType: "district", + registryDetails: { + code: "westTripura", + locationId: "westTripura", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:27:43.218Z"), + createdAt: new Date("2025-06-18T14:09:50.337Z"), + __v: 0, + groups: { + block: [new ObjectId("6852c8de7248c20014b38a9d")], + cluster: [new ObjectId("6852c9027248c20014b38c34")], + school: [new ObjectId("6852c9237248c20014b39fa0")], + }, + }, + { + _id: new ObjectId("6852c8de7248c20014b38a9d"), + metaInformation: { + targetedEntityTypes: [], + externalId: "160101", + name: "AGARTALA MUNICIPAL COORPORATION", + }, + childHierarchyPath: ["cluster", "school"], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825915597b5680013e6a144"), + entityType: "block", + registryDetails: { + code: "160101", + locationId: "160101", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:24:30.469Z"), + createdAt: new Date("2025-06-18T14:10:38.736Z"), + __v: 0, + groups: { + cluster: [new ObjectId("6852c9027248c20014b38c34")], + school: [new ObjectId("6852c9237248c20014b39fa0")], + }, + }, + { + _id: new ObjectId("6852c9027248c20014b38c34"), + metaInformation: { + targetedEntityTypes: [], + externalId: "1601010004", + name: "ACHARYA PRAFULLA CHANDRA H/S SCHOOL", + }, + childHierarchyPath: ["school"], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825915897b5680013e6a146"), + entityType: "cluster", + registryDetails: { + code: "1601010004", + locationId: "1601010004", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:22:16.044Z"), + createdAt: new Date("2025-06-18T14:11:14.746Z"), + __v: 0, + groups: { + school: [new ObjectId("6852c9237248c20014b39fa0")], + }, + }, + { + _id: new ObjectId("6852c9237248c20014b39fa0"), + metaInformation: { + targetedEntityTypes: [], + externalId: "16010100422", + name: "ABINASH GOPE SMRITI (SAROJANI) JB SCHOOL", + }, + childHierarchyPath: [], + createdBy: "20", + updatedBy: "20", + deleted: false, + entityTypeId: new ObjectId("6825915c97b5680013e6a148"), + entityType: "school", + registryDetails: { + code: "16010100422", + locationId: "16010100422", + }, + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-06-18T14:11:49.194Z"), + createdAt: new Date("2025-06-18T14:11:49.194Z"), + __v: 0, + }, + { + _id: new ObjectId("68876746b19aea00144c2af9"), + metaInformation: { + targetedEntityTypes: [ + { + entityTypeId: "6825915197b5680013e6a142", + entityType: "district", + }, + ], + externalId: "Facilitator", + name: "Facilitator", + }, + childHierarchyPath: ["professional_role", "professional_subroles"], + createdBy: "1", + updatedBy: "1", + deleted: false, + entityTypeId: new ObjectId("682591cc97b5680013e6a15c"), + entityType: "professional_role", + registryDetails: { + locationId: "Facilitator", + code: "Facilitator", + }, + userId: "1", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-07-28T12:08:56.065Z"), + createdAt: new Date("2025-07-28T12:04:22.011Z"), + __v: 0, + groups: { + professional_subroles: [new ObjectId("688767deb19aea00144c2b08")], + }, + }, + { + _id: new ObjectId("688767deb19aea00144c2b08"), + metaInformation: { + targetedEntityTypes: [ + { + entityType: "Handbook1_Activity", + entityTypeId: "688762feb19aea00144c2a81", + }, + { + entityType: "Handbook2_Activity", + entityTypeId: "68887766b19aea00144c3631", + }, + ], + externalId: "facilitator", + name: "Facilitator", + }, + childHierarchyPath: ["professional_subroles"], + createdBy: "1", + updatedBy: "1", + deleted: false, + entityTypeId: new ObjectId("682591d397b5680013e6a15e"), + entityType: "professional_subroles", + registryDetails: { + locationId: "facilitator", + code: "facilitator", + }, + userId: "1", + tenantId: "default", + orgId: "default_code", + updatedAt: new Date("2025-07-29T07:28:05.355Z"), + createdAt: new Date("2025-07-28T12:06:54.072Z"), + __v: 0, + }, +]; + +module.exports = { + entities, + entityType, +}; diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_data.sh b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_data.sh new file mode 100644 index 00000000..fabcff4d --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_data.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# --- 0. PRE-REQUISITE: INSERT MISSING ROLES (for foreign key resolution) --- +# NOTE: Role IDs 1 and 8 are required for subsequent inserts. +# You should verify the tenant_code column and other required fields for user_roles table. +# Assuming the necessary role records (1 and 8) are missing and need to be created first. + +# --- 1. INSERT INTO public.users --- +# These inserts appear correct and should result in 'INSERT 0 1' output. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (1, 'Rahul R B', 'a0db5e0a39ee13db7fc5d1309e637f2c', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (2, 'Prajwal C S', 'c4113be1bc2cef51981a6ec687302e42fc4f87f4dfac4276584844d9e3e0f5ae', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (3, 'Vishnu V P', '1092be87fd483fce1deba56c8cdefa79bed4f70a4b110fc4e7947c57aacff219', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.users (id, name, email, email_verified, roles, status, password, has_accepted_terms_and_conditions, about, location, languages, preferred_language, share_link, image, custom_entity_text, meta, created_at, updated_at, deleted_at, tenant_code, phone, phone_code, configs) VALUES (4, 'Mallanagouda R B', 'e5fc674d4b1a54c6cf772485e3bca6f7ae14b60de32b9f0cd9f955ee469345bc', false, '{8,2}', 'ACTIVE', '\$2a\$10\$NTzc2CjEbwB4DavjEKU11eqJXJLrODnvAwvXWor9Dz/gXr55Pvyj.', true, NULL, NULL, NULL, 'en', NULL, NULL, NULL, NULL, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.426+00', NULL, 'default',NULL,NULL, NULL);" + +# --- 2. INSERT INTO public.user_organizations --- +# These inserts should be fine. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (1, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (2, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (3, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organizations (user_id,organization_code, tenant_code, created_at, updated_at, deleted_at) VALUES (4, 'default_code', 'default', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + +# --- 3. UPDATE public.tenants --- +# FIX: Changed -d user to -d users +sudo -u postgres psql -p 5432 -d users -c " +UPDATE public.tenants +SET meta = '{ + \"factors\": [\"professional_role\", \"professional_subroles\"], + \"observableEntityKeys\": [\"professional_subroles\"], + \"optional_factors\": [\"state\", \"district\", \"block\", \"cluster\", \"school\"], + \"validationExcludedScopeKeys\": [\"language\", \"gender\"], + \"portalSignInUrl\": \"https://shikshagrah-qa.tekdinext.com/register\" +}' +WHERE code = 'default'; +" + +# --- 4. INSERT INTO public.user_organization_roles --- +# These inserts now occur AFTER the required user_roles (ID 1 and 8) have been added. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 1, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 3, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 2, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.user_organization_roles (tenant_code, user_id, organization_code,role_id, created_at, updated_at, deleted_at) VALUES ('default', 4, 'default_code', 3, '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL);" + + +# --- 5. INSERT INTO public.entity_types --- +# FIX: Added 'tenant_code' to the columns list and provided the value 'default'. +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (5, 'state', 'State', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (6, 'block', 'Block', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (7, 'school', 'School', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (8, 'district', 'District', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (9, 'cluster', 'Cluster', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_code');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (10, 'professional_role','Professional Role','ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_cod');" +sudo -u postgres psql -p 5432 -d users -c "INSERT INTO public.entity_types (id, value, label, status, created_by, updated_by, allow_filtering, data_type, organization_id, parent_id, has_entities, allow_custom_entities, model_names, created_at, updated_at, deleted_at, meta, external_entity_type, required, regex, tenant_code,organization_code) VALUES (11, 'professional_subroles','Professional Subroles', 'ACTIVE', 0, 0, true, 'STRING', 1, NULL, true, true, '{User}', '2024-04-18 08:12:19.394+00', '2024-04-18 08:12:19.394+00', NULL, '{\"service\": \"entity-management-service\",\"endPoint\": \"v1/entities/find\"}', true, false, NULL,'default', 'default_cod');" + +# --- 6. Final Commands --- +sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_id_seq'::regclass) FROM public.users;" +sudo -u postgres psql -p 5432 -d users -c "SELECT nextval('users_credentials_id_seq'::regclass) FROM public.users_credentials;" +sudo -u postgres psql -p 5432 -d users -c "UPDATE role_permission_mapping SET role_title = 'state_education_officer' WHERE role_title = 'mentor';" +sudo -u postgres psql -p 5432 -d users -c "SELECT NULL;" \ No newline at end of file diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js new file mode 100644 index 00000000..15a9d6c0 --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js @@ -0,0 +1,188 @@ +const { MongoClient } = require('mongodb') + +const url = 'mongodb://localhost:27017/' // MongoDB URL +const dbName = 'elevate-project' +const dbName2 = 'elevate-entity' +const dbName3 = "elevate-samiksha"; +const entityData = require('./entity_sampleData.js') +const projectData = require('./project_sampleData.js') +const surveyData = require("./survey_sampleData.js"); + +// MongoDB Error Code for Duplicate Key +const DUPLICATE_KEY_ERROR_CODE = 11000 + +// --- UTILITY FUNCTIONS --- + +/** + * Drops the specified collection, effectively deleting all data. + * @param {string} collectionName The name of the collection to drop. + * @param {string} currentDB The name of the database. + */ +async function cleanData(collectionName, currentDB) { + const client = new MongoClient(url) + try { + await client.connect() + const db = client.db(currentDB) + const collection = db.collection(collectionName) + + const exists = await collection.findOne({}) + if (exists) { + await collection.drop() + console.log(`šŸ—‘ļø Successfully dropped collection: ${currentDB}.${collectionName}`) + } else { + // Use .listCollections for a more definitive check if needed, but drop() is usually safe. + console.log(`ā„¹ļø Collection ${collectionName} in ${currentDB} does not exist or is empty. Skipping drop.`) + } + } catch (error) { + // This catches general connection or other drop errors + console.error(`āŒ Error dropping collection ${collectionName} in ${currentDB}: ${error.message}`) + } finally { + await client.close() + } +} + +/** + * Inserts data into the specified collection and provides detailed status messages. + * (This function is kept the same as your previous version for insertion logic) + * @param {string} collectionName The name of the collection. + * @param {Array} dataFile The array of documents to insert. + * @param {string} currentDB The name of the database. + */ +async function insertData(collectionName, dataFile, currentDB = dbName) { + const client = new MongoClient(url) + + try { + await client.connect() + const db = client.db(currentDB) + const collection = db.collection(collectionName) + + const data = dataFile + + if (!data || data.length === 0) { + return + } + + console.log(`\n--- Attempting insertion into: ${currentDB}.${collectionName} ---`) + + const results = [] + await Promise.all( + data.map(async (doc, index) => { + const tempId = doc._id || `(Document Index: ${index})` + + try { + const result = await collection.insertOne(doc) + const finalId = result.insertedId || doc._id + + results.push({ + id: finalId, + status: 'SUCCESS', + message: `Document successfully created with _id: ${finalId}`, + }) + } catch (error) { + if (error.code === DUPLICATE_KEY_ERROR_CODE) { + results.push({ + id: tempId, + status: 'DUPLICATE', + message: `The data with identifier ${tempId} is already present in the DB. Please ensure unique identifiers are provided or clean the existing data.`, + }) + } else { + // Catch other errors (e.g., validation failure, connection issues) + results.push({ + id: tempId, + status: 'FAILURE', + message: `Error inserting document ${tempId}: ${error.message}`, + }) + } + } + }) + ) + + // Print the detailed results + results.forEach((res) => { + let message = '' + if (res.status === 'SUCCESS') { + message = `āœ… SUCCESS: ${res.message}` + } else if (res.status === 'DUPLICATE') { + message = `āš ļø DUPLICATE: ${res.message}` + } else { + message = `āŒ FAILURE: ${res.message}` + } + console.log(message) + }) + } catch (globalError) { + console.error(`\nFatal error connecting to or operating on the database: ${globalError.message}`) + } finally { + await client.close() + } +} + + +async function main({ dataToBeInserted }) { + const collectionsToInsert = [ + { name: 'entities', data: dataToBeInserted.entities, db: dbName2 }, + { name: 'entityTypes', data: dataToBeInserted.entityType, db: dbName2 }, + { name: 'programs', data: dataToBeInserted.programData, db: dbName }, + { name: 'solutions', data: dataToBeInserted.solutionData, db: dbName }, + { name: 'projectTemplates', data: dataToBeInserted.projectTemplatesData, db: dbName }, + { name: 'projectTemplateTasks', data: dataToBeInserted.projectTemplateTasksData, db: dbName }, + { name: 'certificateTemplates', data: dataToBeInserted.certificateTemplatesData, db: dbName }, + { name: 'certificateBaseTemplates', data: dataToBeInserted.certificateBaseTemplatesData, db: dbName }, + { name: 'projectCategories', data: dataToBeInserted.projectCategoriesData, db: dbName }, + { name: 'configurations', data: dataToBeInserted.configurationData, db: dbName }, + { name: "solutions", data: dataToBeInserted.solutionData, dbName3}, + { name: "criteria", data:dataToBeInserted.criteriaData, dbName3}, + { name: "criteriaQuestions", data: dataToBeInserted.criteriaQuestionsData,dbName3}, + { name: "frameworks", data: dataToBeInserted.frameworkData,dbName3}, + { name: "questions", data: dataToBeInserted.questionsData,dbName3}, + + ] + + console.log(`\n=================================================`) + console.log( + `šŸ—‘ļø Starting CLEANUP for ${dataToBeInserted === entityData ? 'Entity Data' : 'Project Data & Survey Data' } Collections...` + ) + console.log(`=================================================`) + + for (const item of collectionsToInsert) { + if (item.data) { + await cleanData(item.name, item.db) + } + } + + console.log(`\n=================================================`) + console.log( + `āž• Starting INSERTION for ${dataToBeInserted === entityData ? 'Entity Data' : 'Project Data & Survey Data '} Collections...` + ) + console.log(`=================================================`) + + for (const item of collectionsToInsert) { + if (item.data) { + await insertData(item.name, item.data, item.db) + } + } +} + +main({ dataToBeInserted: entityData }) + .then(() => { + console.log('\n=======================================') + console.log('āœ… Entity data population process finished.') + console.log('=======================================') + }) + .catch(console.error) + +main({ dataToBeInserted: projectData }) + .then(() => { + console.log('\n=======================================') + console.log('āœ… Project data population process finished.') + console.log('=======================================') + }) + .catch(console.error) + + +main({ dataToBeInserted: surveyData }) +.then(() => { + console.log('\n=======================================') + console.log('āœ… survey data population process finished.') + console.log('=======================================') +}) +.catch(console.error) diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/install-dependencies.sh b/documentation/3.4.0/native/scripts/with-survey/ubuntu/install-dependencies.sh new file mode 100644 index 00000000..f6cf5dd9 --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/install-dependencies.sh @@ -0,0 +1,206 @@ +#!/bin/bash + +echo "Starting the installation script..." + +# Function to install Node.js LTS +install_nodejs() { + echo "Installing Node.js version 20..." + curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential +} + + +# Function to install Kafka +install_kafka() { + echo "Installing Kafka..." + sudo DEBIAN_FRONTEND=noninteractive apt install -y openjdk-11-jdk + sudo wget https://archive.apache.org/dist/kafka/3.5.0/kafka_2.12-3.5.0.tgz -O kafka.tgz + sudo tar xzf kafka.tgz -C /opt + sudo mv /opt/kafka_2.12-3.5.0 /opt/kafka + + echo "Creating Zookeeper service..." + sudo bash -c 'cat > /etc/systemd/system/zookeeper.service << EOF +[Unit] +Description=Apache Zookeeper service +Documentation=http://zookeeper.apache.org +Requires=network.target remote-fs.target +After=network.target remote-fs.target + +[Service] +Type=simple +ExecStart=/opt/kafka/bin/zookeeper-server-start.sh /opt/kafka/config/zookeeper.properties +ExecStop=/opt/kafka/bin/zookeeper-server-stop.sh +Restart=on-abnormal + +[Install] +WantedBy=multi-user.target +EOF' + + echo "Creating Kafka service..." + sudo bash -c 'cat > /etc/systemd/system/kafka.service << EOF +[Unit] +Description=Apache Kafka Service +Documentation=http://kafka.apache.org/documentation.html +Requires=zookeeper.service + +[Service] +Type=simple +Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" +ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties +ExecStop=/opt/kafka/bin/kafka-server-stop.sh + +[Install] +WantedBy=multi-user.target +EOF' + + sudo systemctl daemon-reload + sudo systemctl start zookeeper + sudo systemctl start kafka +} + +# Function to install Redis +install_redis() { + echo "Installing Redis..." + sudo apt update + sudo DEBIAN_FRONTEND=noninteractive apt install -y redis-server + sudo sed -i 's/^# *supervised .*/supervised systemd/' /etc/redis/redis.conf + sudo systemctl restart redis.service +} + +# Function to install Redis BullMQ (as a global Node.js package) +install_bullmq() { + echo "Installing Redis BullMQ..." + sudo npm install -g bullmq + echo "Redis BullMQ has been installed globally." +} + +# Function to install Citus +install_citus() { + echo "Installing Citus..." + + # Ensure the 'postgres' user exists + if ! id "postgres" &>/dev/null; then + echo "Creating postgres user..." + sudo useradd -m -s /bin/bash postgres + echo "postgres user created." + else + echo "postgres user already exists." + fi + + # Download and install the Citus repository setup script + curl https://install.citusdata.com/community/deb.sh | sudo bash + + # Install Citus along with PostgreSQL + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql-16-citus-12.1 + + # Switch to the postgres user + sudo su - postgres <> ~/citus/postgresql.conf + + # Start the Citus server + pg_ctl -D ~/citus -o "-p 9700" -l ~/citus_logfile start + + # Create the Citus extension + psql -p 9700 -c "CREATE EXTENSION citus;" + + # Check the Citus version + PSQL_OUTPUT=\$(psql -p 9700 -c "select citus_version();") + echo "\$PSQL_OUTPUT" + +EOF +} + +# Function to install PM2 +install_pm2() { + echo "Installing PM2..." + sudo npm install pm2@latest -g +} + +# Function to install MongoDB +install_mongo() { + echo "Installing MongoDB 4.4.14..." + + # Import MongoDB public GPG key + wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - + + # Create the MongoDB source list for Ubuntu (MongoDB 4.4) + echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list + + # Update apt and install MongoDB version 4.4.14 + sudo apt update + sudo DEBIAN_FRONTEND=noninteractive apt install -y mongodb-org=4.4.14 mongodb-org-server=4.4.14 mongodb-org-shell=4.4.14 mongodb-org-mongos=4.4.14 mongodb-org-tools=4.4.14 + + # Start and enable MongoDB service + sudo systemctl start mongod + sudo systemctl enable mongod + echo "MongoDB 4.4.14 has been installed and started." +} + + +# Function to install Gotenberg (via Docker) +install_gotenberg() { + echo "Installing Docker (required for Gotenberg)..." + + # Install Docker + sudo apt update + sudo DEBIAN_FRONTEND=noninteractive apt install -y docker.io + + # Start and enable Docker service + sudo systemctl start docker + sudo systemctl enable docker + + echo "Docker installed. Pulling Gotenberg Docker image..." + + # Pull and run Gotenberg Docker container + sudo docker pull gotenberg/gotenberg:7 + sudo docker run -d --name gotenberg -p 3000:3000 gotenberg/gotenberg:7 + + echo "Gotenberg has been installed and started on port 3000." +} + +# Function to display options +display_menu() { + echo "Please select an installation option:" + options=("Install Node.js" "Install Kafka" "Install Redis" "Install Citus" "Install PM2" "Install MongoDB" "Install Gotenberg" "Exit") + for i in ${!options[@]}; do + echo "$((i+1)). ${options[i]}" + done +} + +# Main menu +display_menu + +while true; do + read -p "Enter your choice (1-${#options[@]}): " choice + if (( choice > 0 && choice <= ${#options[@]} )); then + case $choice in + 1) install_nodejs ;; + 2) install_kafka ;; + 3) install_redis ;; + 4) install_citus ;; + 5) install_pm2 ;; + 6) install_mongo ;; + 7) install_gotenberg ;; + 8) echo "Exiting the installation script."; break ;; + *) echo "Invalid option. Please try again." ;; + esac + echo "Operation completed. Here are the next options:" + display_menu + else + echo "Invalid option. Please try again." + fi +done + +echo "Installation script completed." diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_entity_sample_data.sh b/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_entity_sample_data.sh new file mode 100644 index 00000000..50f3b113 --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_entity_sample_data.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# ---------------------------------------------------------------------- +# ELEVATE Project Data Setup Script +# +# This script performs the following actions: +# 1. Downloads sample data files from the ELEVATE-Project GitHub repository. +# 2. Installs the 'mongoose' package (required to run the sample scripts). +# 3. Executes the sample data insertion script using Node.js. +# ---------------------------------------------------------------------- + +# Exit immediately if a command exits with a non-zero status (ensures script stops on download failure) +set -e + +echo "Starting data setup script..." + +# --- 1. Define URL and Files --- +BASE_URL="https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/scripts/with-survey/ubuntu" + +ENTITY_FILE="entity_sampleData.js" +PROJECT_FILE="project_sampleData.js" +SURVEY_FILE="survey_sampleData.js" +INSERT_SCRIPT="insert_sample_solutions.js" + +# --- 2. Download Files --- +echo "1. Downloading sample data files..." + +# Download entity_sampleData.js +curl -L "${BASE_URL}/${ENTITY_FILE}" -o "${ENTITY_FILE}" +echo "Downloaded ${ENTITY_FILE}" + +# Download project_sampleData.js +curl -L "${BASE_URL}/${PROJECT_FILE}" -o "${PROJECT_FILE}" +echo "Downloaded ${PROJECT_FILE}" + +# Download survey_sampleData.js +curl -L "${BASE_URL}/${SURVEY_FILE}" -o "${SURVEY_FILE}" +echo "Downloaded ${SURVEY_FILE}" + +# Download insert_sample_solutions.js (saved correctly to be run by node) +curl -L "${BASE_URL}/${INSERT_SCRIPT}" -o "${INSERT_SCRIPT}" +echo "Downloaded ${INSERT_SCRIPT}" + +# NOTE on Original Request: If you need to populate 'user/src/.env' with a specific file, +# you would add another 'curl' command here, but the file you linked was a JS script. + +echo "" +echo "2. Installing required Node packages (mongoose, mongodb)..." + +# Initialize a package.json file if one doesn't exist to prevent climbing up the directory tree +if [ ! -f "package.json" ]; then + npm init -y > /dev/null +fi +npm install mongoose +npm install mongodb + +# --- 4. Run Insertion Script --- +echo "" +echo "3. Running the sample data insertion script..." +node "${INSERT_SCRIPT}" + +echo "" +echo "--- Data setup complete! ---" \ No newline at end of file diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js new file mode 100644 index 00000000..54dbfcc5 --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js @@ -0,0 +1,1912 @@ +const { ObjectId } = require('mongodb') + +let solutionData = [ + { + _id: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + entityType: 'school', + externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', + name: 'pro with obsasatask oct 8 facilitator only 2nd', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-09-09T00:00:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), + programName: 'custom observation as a task check on oct 14th facilitator', + programDescription: 'custom observation as a task check on oct 14th facilitator', + status: 'active', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-14T13:11:17.993Z'), + createdAt: new Date('2025-10-14T13:10:11.897Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + updatedBy: '1', + author: '1', + creator: 'Mallanagouda', + certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), + link: 'f8a8e9ba397a29cf75ad5057db6cb7f9', + }, + { + _id: new ObjectId('68e8c635201642091e014914'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + entityType: 'school', + externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION', + name: 'Testing Project For LED IMP facilitator only', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-09-09T00:00:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68e8c284201642091e0148c1'), + programName: 'custom observation as a task check on oct 10th facilitator', + programDescription: 'custom observation as a task check on oct 10th facilitator', + status: 'active', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-10T08:40:22.617Z'), + createdAt: new Date('2025-10-10T08:39:17.519Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + updatedBy: '1', + author: '1', + creator: 'Mallanagouda', + certificateTemplateId: new ObjectId('68e8c676201642091e014943'), + link: '178ac1fdff5b367ef3335ce0e1665a6c', + }, + { + _id: new ObjectId('68c98d9538aee0086ee61096'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'ProgramTestKey1', + entityType: 'school', + externalId: 'ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION', + name: 'Project name sep 16 9 30', + description: + 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', + isReusable: false, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2026-01-30T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68c98d8f38aee0086ee61070'), + programName: 'Program name is sep 16 9 30', + programDescription: 'Description of the Program', + status: 'active', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-16T16:17:25.599Z'), + createdAt: new Date('2025-09-16T16:17:25.472Z'), + __v: 0, + scope: { + professional_role: ['ALL'], + professional_subroles: ['ALL'], + organizations: ['default_code'], + state: ['ALL'], + district: ['ALL'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + }, + { + _id: new ObjectId('68d3b9a72ba17cc3cb238821'), + resourceType: ['Improvement Project Solution'], + language: ['English'], + keywords: ['Improvement Project'], + concepts: [], + themes: [], + flattenedThemes: [], + entities: [], + registry: [], + isRubricDriven: false, + enableQuestionReadOut: false, + captureGpsLocationAtQuestionLevel: false, + isAPrivateProgram: false, + allowMultipleAssessemts: false, + isDeleted: false, + pageHeading: 'Domains', + minNoOfSubmissionsRequired: 1, + rootOrganisations: [], + createdFor: [], + submissionLevel: 'USER', + availableForPrivateConsumption: true, + parentEntityKey: null, + deleted: false, + programExternalId: 'SUP_as_a_task_test_sept_24_1500', + entityType: 'school', + externalId: 'DPDTSCH012025-1758706081315-PROJECT-SOLUTION', + name: 'project sup test with obs or sur tasks sep 23 1520', + description: 'To construct a wired car using a DPDT switch.', + isReusable: false, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2025-12-30T18:29:59.000Z'), + subType: 'improvementProject', + type: 'improvementProject', + programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), + programName: 'SUP_as_a_task_test_sept_24_1500', + programDescription: 'This is the description of the program.', + status: 'active', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-24T09:28:19.783Z'), + createdAt: new Date('2025-09-24T09:28:07.900Z'), + __v: 0, + scope: { + professional_role: ['ALL'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['ALL'], + district: ['ALL', '6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + updatedBy: '1', + author: '1', + creator: 'Mallanagouda', + link: 'a0acc357edbcf3287e9767d20a7d9f12', + }, +] + +let programData = [ + { + _id: new ObjectId('68ee4b79fb9bee08b93b6d34'), + resourceType: ['program'], + language: ['English'], + keywords: ['CBSE', 'SQAA'], + concepts: [], + components: [ + { + _id: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + name: 'custom observation as a task check on oct 14th facilitator', + description: 'custom observation as a task check on oct 14th facilitator', + startDate: new Date('2025-09-08T18:30:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ['Tripura'], + recommendedFor: ['Facilitator'], + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-14T13:18:46.936Z'), + createdAt: new Date('2025-10-14T13:09:13.649Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: new ObjectId('68e8c284201642091e0148c1'), + resourceType: ['program'], + language: ['English'], + keywords: ['CBSE', 'SQAA'], + concepts: [], + components: [ + { + _id: new ObjectId('68e8c635201642091e014914'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + name: 'custom observation as a task check on oct 10th facilitator', + description: 'custom observation as a task check on oct 10th facilitator', + startDate: new Date('2025-09-08T18:30:00.000Z'), + endDate: new Date('2026-09-09T18:29:59.000Z'), + imageCompression: { + quality: 10, + }, + metaInformation: { + state: ['Tripura'], + recommendedFor: ['Facilitator'], + }, + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-10T08:44:35.535Z'), + createdAt: new Date('2025-10-10T08:23:32.295Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: new ObjectId('68c98d8f38aee0086ee61070'), + resourceType: ['program'], + language: ['English'], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId('68c98d9538aee0086ee61096'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'ProgramTestKey1', + name: 'Program name is sep 16 9 30', + description: 'Description of the Program', + metaInformation: { + state: ['Tripura'], + recommendedFor: ['functionaries-officials', 'teacher-educators-coordinators'], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2026-01-30T18:29:59.000Z'), + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-16T17:06:14.752Z'), + createdAt: new Date('2025-09-16T16:17:19.239Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + }, + { + _id: new ObjectId('68d3b9681e09f9b5b1e0693d'), + resourceType: ['program'], + language: ['English'], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId('68d3b9a72ba17cc3cb238821'), + order: 1, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: 'active', + owner: '1', + createdBy: '1', + updatedBy: '1', + externalId: 'SUP_as_a_task_test_sept_24_1500', + name: 'SUP_as_a_task_test_sept_24_1500 oct 3', + description: 'This is the description of the program.', + metaInformation: { + state: ['Tripura'], + recommendedFor: ['functionaries-officials'], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date('2025-07-29T18:30:00.000Z'), + endDate: new Date('2025-12-30T18:29:59.000Z'), + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-03T09:20:39.907Z'), + createdAt: new Date('2025-09-24T09:27:04.322Z'), + __v: 0, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, + },, + { + _id: new ObjectId("691c1b06e71d83091cf9c336"), + resourceType: ["program"], + language: ["English"], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId("691c1b10e71d83091cf9c35d"), + order: 1, + }, + { + _id: new ObjectId("691c1b17266ef5649ce4104c"), + order: 2, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c474"), + order: 3, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c495"), + order: 4, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c4b6"), + order: 5, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c4da"), + order: 6, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c4fb"), + order: 7, + }, + { + _id: new ObjectId("691c1f96e71d83091cf9c51c"), + order: 8, + }, + { + _id: new ObjectId("691c1f96266ef5649ce41171"), + order: 9, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: "active", + owner: "1", + createdBy: "1", + updatedBy: "1", + externalId: "Testing_for_creation_sup_18_11", + name: "Testing for creation sup 18-11", + description: "This is the description of the program.", + metaInformation: { + state: ["Tripura"], + recommendedFor: ["student"], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date("2025-11-16T18:30:00.000Z"), + endDate: new Date("2025-11-28T18:29:59.000Z"), + tenantId: "shikshagrahanew", + orgId: "tripura", + updatedAt: new Date("2025-11-18T07:26:14.940Z"), + createdAt: new Date("2025-11-18T07:06:46.613Z"), + __v: 0, + scope: { + professional_role: ["6867a3c10d8d24001465c2d1"], + professional_subroles: ["6867a1420d8d24001465c28f"], + state: ["6863a9941d52e30014093ad9"], + district: ["6863aa5f1d52e30014093b41"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + }, + { + _id: new ObjectId("691b10a0dbb768073d67328c"), + resourceType: ["program"], + language: ["English"], + keywords: [], + concepts: [], + components: [ + { + _id: new ObjectId("691b141a1ce3f5956e9f30e8"), + order: 1, + }, + { + _id: new ObjectId("691b1783dbb768073d67330d"), + order: 2, + }, + { + _id: new ObjectId("691b1790dbb768073d673366"), + order: 3, + }, + { + _id: new ObjectId("691b179e7b8c31191b8facee"), + order: 4, + }, + { + _id: new ObjectId("691b17ae1ce3f5956e9f319d"), + order: 5, + }, + { + _id: new ObjectId("691b192a1ce3f5956e9f320e"), + order: 6, + }, + ], + isAPrivateProgram: false, + isDeleted: false, + requestForPIIConsent: true, + rootOrganisations: [], + createdFor: [], + deleted: false, + status: "active", + owner: "1", + createdBy: "1", + updatedBy: "1", + externalId: "Testing_for_creation_sup_17_11", + name: "Testing for creation sup 17-11", + description: "This is the description of the program.", + metaInformation: { + state: ["Tripura"], + recommendedFor: ["student"], + }, + imageCompression: { + quality: 10, + }, + startDate: new Date("2025-11-16T18:30:00.000Z"), + endDate: new Date("2025-11-28T18:29:59.000Z"), + tenantId: "shikshagrahanew", + orgId: "tripura", + updatedAt: new Date("2025-11-17T12:46:34.713Z"), + createdAt: new Date("2025-11-17T12:10:08.914Z"), + __v: 0, + scope: { + professional_role: ["6867a3c10d8d24001465c2d1"], + professional_subroles: ["6867a1420d8d24001465c28f"], + state: ["6863a9941d52e30014093ad9"], + district: ["6863aa5f1d52e30014093b41"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, + }, +]; + +let projectTemplatesData = [ + { + _id: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + new ObjectId('68ee4bb4fb9bee08b93b6d7a'), + new ObjectId('68ee4bb4fb9bee08b93b6d7e'), + new ObjectId('68ee4bb4fb9bee08b93b6d82'), + new ObjectId('68ee4bb4fb9bee08b93b6d86'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: 'CURRENT', + visibleToOrganizations: ['default_code'], + deleted: false, + title: 'pro with obsasatask oct 8 facilitator only 2nd', + externalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-14T13:11:17.899Z'), + createdAt: new Date('2025-10-14T13:10:11.630Z'), + __v: 0, + solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + solutionExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369-PROJECT-SOLUTION', + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF12SDFGHJ345CVBNMDRGYY', + parentTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d4c'), + certificateTemplateId: new ObjectId('68ee4bf5fb9bee08b93b6d97'), + }, + { + _id: new ObjectId('68e8c635201642091e01491c'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + new ObjectId('68e8c635201642091e014926'), + new ObjectId('68e8c635201642091e01492a'), + new ObjectId('68e8c635201642091e01492e'), + new ObjectId('68e8c635201642091e014932'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', + 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', + 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', + 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + visibility: 'CURRENT', + visibleToOrganizations: ['default_code'], + deleted: false, + title: 'Testing Project For LED IMP facilitator only', + externalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-10T08:40:22.544Z'), + createdAt: new Date('2025-10-10T08:39:17.260Z'), + __v: 0, + solutionId: new ObjectId('68e8c635201642091e014914'), + solutionExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008-PROJECT-SOLUTION', + programId: new ObjectId('68e8c284201642091e0148c1'), + programExternalId: 'Testing_for_prTGCEBGFFRYVBDFGJ7DGDGF123456', + parentTemplateId: new ObjectId('68e8c635201642091e0148f8'), + certificateTemplateId: new ObjectId('68e8c676201642091e014943'), + }, + { + _id: new ObjectId('68c98d9538aee0086ee6109e'), + description: + 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: [''], + tasks: [ + new ObjectId('68c98d9538aee0086ee610a2'), + new ObjectId('68c98d9538aee0086ee610a6'), + new ObjectId('68c98d9538aee0086ee610aa'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'Task1-1758039445176-1758039445561', + 'Task2-1758039445176-1758039445567', + 'Task3-1758039445176-1758039445575', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: 'Project name sep 16 9 30', + externalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-16T16:17:25.596Z'), + createdAt: new Date('2025-09-16T16:17:25.301Z'), + __v: 0, + solutionId: new ObjectId('68c98d9538aee0086ee61096'), + solutionExternalId: 'ProjectIdtestKey1-1758039445176-PROJECT-SOLUTION', + programId: new ObjectId('68c98d8f38aee0086ee61070'), + programExternalId: 'ProgramTestKey1', + parentTemplateId: new ObjectId('68c98d9538aee0086ee6107a'), + }, + { + _id: new ObjectId('68d3b9a92ba17cc3cb238829'), + description: 'To construct a wired car using a DPDT switch.', + concepts: [''], + keywords: ['Science, Activity Based Learning, STEM Education, STEM Lab, DPDT Switch Car'], + isDeleted: false, + recommendedFor: ['Learner'], + tasks: [ + new ObjectId('68d3b9ad2ba17cc3cb238837'), + new ObjectId('68d3b9ad2ba17cc3cb23883b'), + new ObjectId('68d3b9ae2ba17cc3cb23883f'), + ], + createdBy: '1', + updatedBy: '1', + learningResources: [], + isReusable: false, + taskSequence: [ + 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', + 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', + 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', + ], + averageRating: 0, + noOfRatings: 0, + ratings: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + }, + importCount: 0, + evidences: [], + isPrivate: false, + hasSpotlight: false, + hasStory: false, + text: [], + deleted: false, + title: 'project sup test with obs or sur tasks sep 23 1520', + externalId: 'DPDTSCH012025-1758706081315_IMPORTED', + categories: [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + externalId: 'teachers', + name: 'teachers', + }, + ], + entityType: '', + taskCreationForm: '', + durationInDays: 365, + metaInformation: { + testimonials: [], + goal: 'TEMP', + rationale: '', + primaryAudience: '', + duration: '1 year', + successIndicators: '', + risks: '', + approaches: '', + }, + status: 'published', + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-09-24T09:28:14.561Z'), + createdAt: new Date('2025-09-24T09:28:03.404Z'), + __v: 0, + solutionId: new ObjectId('68d3b9a72ba17cc3cb238821'), + solutionExternalId: 'DPDTSCH012025-1758706081315-PROJECT-SOLUTION', + programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), + programExternalId: 'SUP_as_a_task_test_sept_24_1500', + parentTemplateId: new ObjectId('68d3b9a32ba17cc3cb238805'), + }, +] + +let projectTemplateTasksData = [ + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7a'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'DPDTSC-HandBook-1-2025-Task2-1760447411369-1760447412188', + description: '', + sequenceNumber: '2', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.192Z'), + createdAt: new Date('2025-10-14T13:10:11.805Z'), + __v: 0, + }, + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d7e'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197', + description: '', + sequenceNumber: '3', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.202Z'), + createdAt: new Date('2025-10-14T13:10:11.813Z'), + __v: 0, + }, + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d82'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'learn', + link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + app: 'projectService', + id: 'view?usp=drive_link', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206', + description: '', + sequenceNumber: '4', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.210Z'), + createdAt: new Date('2025-10-14T13:10:11.825Z'), + __v: 0, + }, + { + _id: new ObjectId('68ee4bb4fb9bee08b93b6d86'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'walking', + link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', + app: 'projectService', + id: 'view?usp=sharing', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68ee4bb3fb9bee08b93b6d70'), + projectTemplateExternalId: 'PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1-2025-Task5-1760447411369-1760447412214', + description: '', + sequenceNumber: '5', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2025', + endDate: '31/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-14T13:10:12.218Z'), + createdAt: new Date('2025-10-14T13:10:11.833Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e014926'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'DPDTSC-HandBook-1-2025-Task2-1760085557008-1760085557809', + description: '', + sequenceNumber: '2', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2026', + endDate: '31/12/2026', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.813Z'), + createdAt: new Date('2025-10-10T08:39:17.430Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e01492a'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1-2025-Task3-1760085557008-1760085557818', + description: '', + sequenceNumber: '3', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2027', + endDate: '31/12/2027', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.822Z'), + createdAt: new Date('2025-10-10T08:39:17.439Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e01492e'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'learn', + link: 'https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link', + app: 'projectService', + id: 'view?usp=drive_link', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1-2025-Task4-1760085557008-1760085557827', + description: '', + sequenceNumber: '4', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2028', + endDate: '31/12/2028', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.831Z'), + createdAt: new Date('2025-10-10T08:39:17.449Z'), + __v: 0, + }, + { + _id: new ObjectId('68e8c635201642091e014932'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'walking', + link: 'https://drive.google.com/file/d/1eGLKxFb9BaeroTeIOlXoO8XCxyah7fM9/view?usp=sharing', + app: 'projectService', + id: 'view?usp=sharing', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68e8c635201642091e01491c'), + projectTemplateExternalId: 'PROJ190909764HJHF123FGHHcvvbgd-1760085557008_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1-2025-Task5-1760085557008-1760085557835', + description: '', + sequenceNumber: '5', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '01/08/2029', + endDate: '31/12/2029', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-10-10T08:39:17.840Z'), + createdAt: new Date('2025-10-10T08:39:17.458Z'), + __v: 0, + }, + { + _id: new ObjectId('68c98d9538aee0086ee610a2'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Manual (PDF)', + link: 'https://docs.google.com/document/d/1NCUdj9nPAz82sPV5q2BJ8At31sFJdSDwocrDCh_g7W0/edit?tab=t.0', + app: 'projectService', + id: 'edit?tab=t.0', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Review the Activity Manual', + externalId: 'Task1-1758039445176-1758039445561', + description: '', + sequenceNumber: '1', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '28/07/2025', + endDate: '30/01/2026', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.564Z'), + createdAt: new Date('2025-09-16T16:17:25.375Z'), + __v: 0, + }, + { + _id: new ObjectId('68c98d9538aee0086ee610a6'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Steps (Video)', + link: 'https://youtu.be/MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + app: 'projectService', + id: 'MNvM_H9zD3Y?si=BdfslSzCkmDCggih', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Watch the Activity Video', + externalId: 'Task2-1758039445176-1758039445567', + description: '', + sequenceNumber: '2', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '29/07/2025', + endDate: '30/01/2027', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.571Z'), + createdAt: new Date('2025-09-16T16:17:25.386Z'), + __v: 0, + }, + { + _id: new ObjectId('68c98d9538aee0086ee610aa'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68c98d9538aee0086ee6109e'), + projectTemplateExternalId: 'ProjectIdtestKey1-1758039445176_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'Task3-1758039445176-1758039445575', + description: '', + sequenceNumber: '3', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/01/2028', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-16T16:17:25.579Z'), + createdAt: new Date('2025-09-16T16:17:25.396Z'), + __v: 0, + }, + { + _id: new ObjectId('68d3b9ad2ba17cc3cb238837'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: 'Conduct the Activity with students', + externalId: 'DPDTSC-HandBook-1/2025-Task3-1758706081315-1758706093343', + description: '', + sequenceNumber: '3', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:13.534Z'), + createdAt: new Date('2025-09-24T09:28:06.227Z'), + __v: 0, + }, + { + _id: new ObjectId('68d3b9ad2ba17cc3cb23883b'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: 'Activity Assessment (PDF)', + link: 'https://sunbirdsaaspublic.blob.core.windows.net/content/content/assets/do_2143687931908833281255/dpdt-switch-car.pdf', + app: 'projectService', + id: 'dpdt-switch-car.pdf', + }, + { + name: 'Activity OMR Sheet (PDF)', + link: 'https://drive.google.com/file/d/1-f7Tg8bmZd-xlcxlhfOcf2ZO6vpc6qkH/view', + app: 'projectService', + id: 'view', + }, + ], + deleted: false, + type: 'content', + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: 'Conduct the Activity Assessment', + externalId: 'DPDTSC-HandBook-1/2025-Task4-1758706081315-1758706093849', + description: '', + sequenceNumber: '4', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:13.967Z'), + createdAt: new Date('2025-09-24T09:28:06.583Z'), + __v: 0, + }, + { + _id: new ObjectId('68d3b9ae2ba17cc3cb23883f'), + createdBy: '1', + updatedBy: '1', + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: 'simple', + projectTemplateId: new ObjectId('68d3b9a92ba17cc3cb238829'), + projectTemplateExternalId: 'DPDTSCH012025-1758706081315_IMPORTED', + name: "Log into the scanner app and scan the OMR sheets (check that the students' names are appearing on scanning the OMR)", + externalId: 'DPDTSC-HandBook-1/2025-Task5-1758706081315-1758706094241', + description: '', + sequenceNumber: '5', + tenantId: 'default', + orgId: 'default_code', + metaInformation: { + hasAParentTask: 'NO', + parentTaskOperator: '', + parentTaskValue: '', + parentTaskId: '', + startDate: '30/07/2025', + endDate: '30/12/2025', + isAnExternalTask: '', + minNoOfSubmissionsRequired: '', + redirectLink: '', + buttonLabel: '', + }, + updatedAt: new Date('2025-09-24T09:28:14.374Z'), + createdAt: new Date('2025-09-24T09:28:07.083Z'), + __v: 0, + },, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d75"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: "observation", + solutionDetails: { + type: "observation", + subType: "Social Studies", + _id: "68ee4bb440fd155dceef08a9", + externalId: + "fb34d196-a8fe-11f0-9793-553f35f97dd1-OBSERVATION-TEMPLATE-1760447411986", + name: "obsasatask oct 8 facilitator only 2nd", + isReusable: false, + minNoOfSubmissionsRequired: "2.0", + }, + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Review the Activity Manual", + externalId: "DPDTSC-HandBook-1-2025-Task1-1760447411369-1760447411984", + description: "", + sequenceNumber: "1", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "True", + minNoOfSubmissionsRequired: "2.0", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.146Z"), + createdAt: new Date("2025-10-14T13:10:11.744Z"), + __v: 0, + }, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d7e"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [], + deleted: false, + type: "simple", + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Conduct the Activity with students", + externalId: "DPDTSC-HandBook-1-2025-Task3-1760447411369-1760447412197", + description: "", + sequenceNumber: "3", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.202Z"), + createdAt: new Date("2025-10-14T13:10:11.813Z"), + __v: 0, + }, + { + _id: new ObjectId("68ee4bb4fb9bee08b93b6d82"), + createdBy: "1", + updatedBy: "1", + isDeleted: false, + isDeletable: false, + taskSequence: [], + children: [], + visibleIf: [], + hasSubTasks: false, + learningResources: [ + { + name: "learn", + link: "https://drive.google.com/file/d/1HOaFxlahxEzc5HOeFqVTw3V_yszmHFbZ/view?usp=drive_link", + app: "projectService", + id: "view?usp=drive_link", + }, + ], + deleted: false, + type: "content", + projectTemplateId: new ObjectId("68ee4bb3fb9bee08b93b6d70"), + projectTemplateExternalId: + "PROJ19099023DGHG789SDASDFGHR4567-1760447411369_IMPORTED", + name: "Conduct the Activity Assessment", + externalId: "DPDTSC-HandBook-1-2025-Task4-1760447411369-1760447412206", + description: "", + sequenceNumber: "4", + tenantId: "default", + orgId: "default_code", + metaInformation: { + hasAParentTask: "NO", + parentTaskOperator: "", + parentTaskValue: "", + parentTaskId: "", + startDate: "01/08/2025", + endDate: "31/12/2025", + isAnExternalTask: "", + minNoOfSubmissionsRequired: "", + redirectLink: "", + buttonLabel: "", + }, + updatedAt: new Date("2025-10-14T13:10:12.210Z"), + createdAt: new Date("2025-10-14T13:10:11.825Z"), + __v: 0, + }, +]; + +let certificateTemplatesData = [ + { + _id: new ObjectId('68ee4bf5fb9bee08b93b6d97'), + status: 'active', + deleted: false, + criteria: { + validationText: 'Complete validation message', + expression: 'C1&&(C3||C4||C5||C6)', + conditions: { + C1: { + validationText: 'Submit your project.', + expression: 'C1', + conditions: { + C1: { + scope: 'project', + key: 'status', + operator: '==', + value: 'submitted', + }, + }, + }, + C3: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d53'], + }, + }, + validationText: 'Add 2 evidence for any task', + }, + C4: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d57'], + }, + }, + }, + C5: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d5b'], + }, + }, + }, + C6: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68ee4bb3fb9bee08b93b6d63'], + }, + }, + }, + }, + }, + issuer: { + name: 'default_code', + }, + solutionId: new ObjectId('68ee4bb3fb9bee08b93b6d68'), + programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), + baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-14T13:11:17.793Z'), + createdAt: new Date('2025-10-14T13:11:17.628Z'), + __v: 0, + templateUrl: + 'certificate/aa8529e3-6754-4432-a669-72b73d358e2f/1/7042c718-a1bf-43e3-b296-586de247a440/68ee4bf5fb9bee08b93b6d97/14-9-2025-1760447477692_Dowloaded.svg', + }, + { + _id: new ObjectId('68e8c676201642091e014943'), + status: 'active', + deleted: false, + criteria: { + validationText: 'Complete validation message', + expression: 'C1&&(C3||C4||C5||C6||C7)', + conditions: { + C1: { + validationText: 'Submit your project.', + expression: 'C1', + conditions: { + C1: { + scope: 'project', + key: 'status', + operator: '==', + value: 'submitted', + }, + }, + }, + C3: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e0148ff'], + }, + }, + validationText: 'Add 2 evidence for any task', + }, + C4: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e014903'], + }, + }, + }, + C5: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e014907'], + }, + }, + }, + C6: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e01490b'], + }, + }, + }, + C7: { + expression: 'C1', + conditions: { + C1: { + scope: 'task', + key: 'attachments', + function: 'count', + filter: { + key: 'type', + value: 'all', + }, + operator: '>=', + value: 2, + taskDetails: ['68e8c635201642091e01490f'], + }, + }, + }, + }, + }, + issuer: { + name: 'default_code', + }, + solutionId: new ObjectId('68e8c635201642091e014914'), + programId: new ObjectId('68e8c284201642091e0148c1'), + baseTemplateId: new ObjectId('68c008dfd113c30c11f1aca2'), + tenantId: 'default', + orgId: 'default_code', + updatedAt: new Date('2025-10-10T08:40:22.454Z'), + createdAt: new Date('2025-10-10T08:40:22.298Z'), + __v: 0, + templateUrl: + 'certificate/0bcc856d-0145-448c-8188-300ca3f3250e/1/58cfdf3c-f1a2-4a94-bbb5-21dcd7286913/68e8c676201642091e014943/10-9-2025-1760085622353_Dowloaded.svg', + }, +] + +let certificateBaseTemplatesData = [ + { + _id: new ObjectId('68c008dfd113c30c11f1aca2'), + deleted: false, + code: 'onelogo_onesign', + name: 'onelogo_onesign', + url: 'certificate/ef2058a1-92e0-4a63-af5f-b712f992bf90/1/81fc35ad-9519-4ec4-87bb-6cef64b940f0/9-8-2025-1757415647754_sl_s1l1.svg', + tenantId: 'default', + orgId: 'slorg', + updatedAt: new Date('2025-09-09T11:00:47.878Z'), + createdAt: new Date('2025-09-09T11:00:47.878Z'), + __v: 0, + }, +] + +let projectCategoriesData = [ + { + _id: new ObjectId('685ae6a0cb7c7200145dadae'), + createdBy: 'SYSTEM', + updatedBy: 'SYSTEM', + isDeleted: false, + isVisible: true, + status: 'active', + icon: '', + noOfProjects: 361, + evidences: [], + deleted: false, + name: 'teachers', + externalId: 'teachers', + tenantId: 'default', + orgId: 'slorg', + updatedAt: new Date('2025-06-24T17:55:44.720Z'), + createdAt: new Date('2025-06-24T17:55:44.720Z'), + __v: 0, + }, +] + +let configurationData = [ + { + _id: new ObjectId('6825a1982d46aa6df0cc36a8'), + code: 'keysAllowedForTargeting', + __v: 0, + createdAt: new Date('2025-05-15T08:11:04.674Z'), + meta: { + profileKeys: [ + 'state', + 'district', + 'block', + 'cluster', + 'school', + 'professional_role', + 'professional_subroles', + 'roles', + 'subject', + 'organizations', + ], + }, + updatedAt: new Date('2025-05-26T10:56:17.021Z'), + }, +] +module.exports = { + solutionData, + programData, + projectTemplatesData, + projectTemplateTasksData, + certificateTemplatesData, + certificateBaseTemplatesData, + projectCategoriesData, + configurationData, +} diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js new file mode 100644 index 00000000..60f0b90c --- /dev/null +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js @@ -0,0 +1,4860 @@ +const { ObjectId } = require("mongodb"); + +let solutionData = [ + { + _id: new ObjectId("691c1b17266ef5649ce4104c"), + externalId: "691c1b15266ef5649ce4100d_CHILD", + isReusable: false, + name: "Observation led imp fro sanity 18-11", + description: "Classrom Observation for Selection of Sectors", + author: "2", + parentSolutionId: new ObjectId("691c1b15266ef5649ce4100d"), + resourceType: ["Observations Framework"], + language: ["English"], + keywords: ["Framework", "Observation", "English"], + concepts: [], + scoringSystem: "pointsBasedScoring", + levelToScoreMapping: { + L1: { + points: 10, + label: "Level 1", + }, + L2: { + points: 20, + label: "Level 2", + }, + L3: { + points: 30, + label: "Level 3", + }, + }, + themes: [ + { + name: "Domain 1", + type: "theme", + label: "theme", + externalId: "D1", + weightage: 1, + criteria: [ + { + criteriaId: new ObjectId("691c1b17266ef5649ce41042"), + weightage: 1, + }, + ], + rubric: { + expressionVariables: { + SCORE: "D1.sumOfPointsOfAllChildren()", + }, + levels: { + L1: { + expression: "(20<=SCORE<=35)", + }, + L2: { + expression: "(35 + +# Projects Service + + + + + +![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/ELEVATE-Project/mentoring?filename=src%2Fpackage.json) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) + + + + +
+The Project building block facilitates the creation and engagement with micro-improvement projects. + + +
+ +# Native Setup Project Service - With Survey + +## PM2 Managed Services & Natively Installed Dependencies + +### System Requirements + +- **Node.jsĀ®:** v20 +- **PostgreSQL:** 16 +- **Apache KafkaĀ®:** 3.5.0 +- **MongoDB:** 4.4.14 +- **Gotenberg:** 8.5.0 + +Expectation: Upon following the prescribed steps, you will achieve a fully operational ELEVATE-Project application setup. Both the portal and backend services are managed using PM2, with all dependencies installed natively on the host system. + +## Prerequisites + +Before setting up the following ELEVATE-Project application, dependencies given below should be installed and verified to be running. Refer to the steps given below to install them and verify. + +1. Download dependency management scripts: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/check-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/install-dependencies.sh && \ + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/uninstall-dependencies.sh && \ + chmod +x check-dependencies.sh && \ + chmod +x install-dependencies.sh && \ + chmod +x uninstall-dependencies.sh + ``` + +2. Verify installed dependencies by running `check-dependencies.sh`: + + ``` + ./check-dependencies.sh + ``` + + > Note: Keep note of any missing dependencies. + +3. Install dependencies by running `install-dependencies.sh`: + ``` + ./install-dependencies.sh + ``` + > Note: Install all missing dependencies and use check-dependencies script to ensure everything is installed and running. +4. Uninstall dependencies by running `uninstall-dependencies.sh`: + + ``` + ./uninstall-dependencies.sh + ``` + + > Warning: Due to the destructive nature of the script (without further warnings), it should only be used during the initial setup of the dependencies. For example, Uninstalling PostgreSQL/Citus using script will lead to data loss. USE EXTREME CAUTION. + + > Warning: This script should only be used to uninstall dependencies that were installed via installation script in step 3. If same dependencies were installed using other methods, refrain from using this script. This script is provided in-order to reverse installation in-case issues arise from a bad install. + +## Installation + +1. **Create ELEVATE-Project Directory:** Create a directory named **ELEVATE-Project**. + + > Example Command: `mkdir ELEVATE-Project && cd ELEVATE-Project/` + +2. **Git Clone Services And Portal Repositories** + +``` +git clone -b develop https://github.com/ELEVATE-Project/project-service.git && \ +git clone -b develop https://github.com/ELEVATE-Project/entity-management.git && \ +git clone -b develop https://github.com/ELEVATE-Project/user.git && \ +git clone -b main https://github.com/ELEVATE-Project/interface-service.git && \ +git clone -b develop https://github.com/ELEVATE-Project/samiksha-service && \ +git clone -b master https://github.com/ELEVATE-Project/scheduler.git +``` + +3. **Install NPM Packages** + +``` +cd project-service && npm install && cd ../ && \ +cd samiksha-service && npm install && cd ../ && \ +cd entity-management/src && npm install && cd ../.. && \ +cd user/src && npm install && cd ../.. && \ +cd interface-service/src && npm install && cd ../.. && \ +cd scheduler/src && npm install && cd ../.. +``` + +4. **Download Environment Files** + +``` +curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/project_env && \ +curl -L -o samiksha-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/samiksha_env && \ +curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/entity_management_env && \ +curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/user_env && \ +curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/interface_env && \ +curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/scheduler_env +``` + +> **Note:** Modify the environment files as necessary for your deployment using any text editor, ensuring that the values are appropriate for your environment. The default values provided in the current files are functional and serve as a good starting point. Refer to the sample env files provided at the [Project](https://github.com/ELEVATE-Project/project-service/blob/main/.env.sample), [User](https://github.com/ELEVATE-Project/user/blob/master/src/.env.sample), [Notification](https://github.com/ELEVATE-Project/notification/blob/master/src/.env.sample), [Scheduler](https://github.com/ELEVATE-Project/scheduler/blob/master/src/.env.sample), [Interface](https://github.com/ELEVATE-Project/interface-service/blob/main/src/.env.sample) and [Entity-Management](https://github.com/ELEVATE-Project/entity-management/blob/main/src/.env.sample) repositories for reference. + +> **Caution:** While the default values in the downloaded environment files enable the ELEVATE-Project Application to operate, certain features may not function correctly or could be impaired unless the adopter-specific environment variables are properly configured. + +> **Important:** As mentioned in the above linked document, the **User SignUp** functionality may be compromised if key environment variables are not set correctly during deployment. If you opt to skip this setup, consider using the sample user account generator detailed in the `Sample User Accounts Generation` section of this document. + +5. **Attaching Config File** + + ``` + curl -L -o project-service/config.json https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/configFile.json && \ + curl -L -o samiksha-service/config.json https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/configFile.json && \ + curl -L -o entity-management/src/config.json https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/configFile.json + ``` + +6. **Create Databases** + + 1. Download `create-databases.sh` Script File: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/create-databases.sh + ``` + + 2. Make the executable by running the following command: + + ``` + chmod +x create-databases.sh + ``` + + 3. Run the script file: + + ``` + ./create-databases.sh + ``` + +7. **Run Migrations and Seed To Create Tables** + + 1. run migrations + + ``` + cd user/src && npx sequelize-cli db:migrate && cd ../.. + ``` + + 2. run Seed + ``` + cd user/src && npx sequelize-cli db:seed:all && cd ../../ + ``` + +8. **Enabling Citus And Setting Distribution Columns (Optional)** + + To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. + + > NOTE: Currently only available for Linux based operation systems. + + 1. Download user `distributionColumns.sql` file. + + ``` + curl -o ./user/distributionColumns.sql -JL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/distribution-columns/user/distributionColumns.sql + + ``` + + 2. Set up the `citus_setup` file by following the steps given below. + + 1. Download the `citus_setup.sh` file: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh + ``` + + 2. Make the setup file executable by running the following command: + + ``` + chmod +x citus_setup.sh + ``` + + 3. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. + ``` + ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users + ``` + +9. **Update Cloud Credentials for Project Service** + + To enable full functionality, including certificate generation and report storage, you must configure cloud credentials in the Project Service environment file. + + Path: ./ELEVATE-Project/project-service/.env + + Add or update the following variables in the .env file, substituting the example values with your actual cloud credentials: + + CLOUD_STORAGE_PROVIDER=gcloud + CLOUD_STORAGE_ACCOUNTNAME=your_account_name + CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\n..." + CLOUD_STORAGE_PROJECT=your_cloud_project_id + CLOUD_STORAGE_BUCKETNAME=your_bucket_name + CLOUD_STORAGE_BUCKET_TYPE=private + + > NOTE : This service is designed to support multiple cloud storage providers and offers flexible cloud integration capabilities. Based on your selected cloud provider, the service can be configured accordingly to enable seamless storage, certificate generation, and report handling. + + For detailed configuration options, supported cloud providers, and integration guidelines, please refer to the official documentation available in this [ReadMe](https://www.npmjs.com/package/client-cloud-services?activeTab=readme) + +10. **Insert Initial Data** + + 1. Download `entity-project-sample-data.sh` Script File: + + ``` + curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh && \ + chmod +x project_entity_sample_data.sh && \ + ./project_entity_sample_data.sh + ``` + +11. **Start The Services** + + Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. + + ``` + (cd project-service && pm2 start app.js --name project-service && cd -) && \ + (cd samiksha-service && pm2 start app.js --name samiksha-service && cd -) && \ + (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ + (cd user/src && pm2 start app.js --name user && cd -) && \ + (cd interface-service/src && pm2 start app.js --name interface && cd -) && \ + (cd scheduler/src && pm2 start app.js --name scheduler && cd -) + ``` + +## 🌐 Micro-Frontend (FE) Setup + +The ELEVATE application uses a micro-frontend architecture. After setting up the backend services, you must configure and run the frontend repositories to access the application via the portal. + +Follow the setup guides for the frontend repositories: + +- **Login Portal:** [elevate-portal](https://github.com/ELEVATE-Project/elevate-portal/tree/releaase-1.1.0) +- **Projects Program Module (PWA):** [observation-survey-projects-pwa](https://github.com/ELEVATE-Project/observation-survey-projects-pwa/tree/release-3.4.0) + +## Sample User Accounts Generation + +During the initial setup of ELEVATE-Project services with the default configuration, you may encounter issues creating new accounts through the regular SignUp flow on the ELEVATE-Project portal. This typically occurs because the default SignUp process includes OTP verification to prevent abuse. Until the notification service is configured correctly to send actual emails, you will not be able to create new accounts. + +In such cases, you can generate sample user accounts using the steps below. This allows you to explore the ELEVATE-Project services and portal immediately after setup. + +> **Warning:** Use this generator only immediately after the initial system setup and before any normal user accounts are created through the portal. It should not be used under any circumstances thereafter. + +``` +curl -o insert_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/insert_sample_data.sh && \ +chmod +x insert_sample_data.sh && \ +./insert_sample_data.sh +``` + +After successfully running the script mentioned above, the following user accounts will be created and available for login: + +| Email ID | Password | Role | +| ---------------------- | ---------- | ----------------------- | +| mallanagouda@gmail.com | Password1@ | State Education Officer | +| prajwal@gmail.com | Password1@ | State Education Officer | +| vishnu@gmail.com | Password1@ | State Education Officer | + +## Postman Collections + +- [Projects Service](https://github.com/ELEVATE-Project/project-service/tree/main/api-doc) + +## Adding New Projects to the System + +With implementation scripts, you can seamlessly add new projects to the system. Once a project is successfully added, it becomes visible on the portal, ready for use and interaction. For a comprehensive guide on setting up and using the implementation script, please refer to the [documentation here](https://github.com/ELEVATE-Project/project-service/tree/main/Project-Service-implementation-Script). + +# Team + + + + + +# Open Source Dependencies + +Several open source dependencies that have aided Projects's development: + +![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) +![Apache Kafka](https://img.shields.io/badge/Apache%20Kafka-000?style=for-the-badge&logo=apachekafka) +![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white) +![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white) +![Git](https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge&logo=git&logoColor=white) From 762fe5d34b7fa98a1451613605ec65d04ca90fe9 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 13:30:52 +0530 Subject: [PATCH 049/119] added-survey-native --- documentation/3.4.0/setup/native/with-survey/ubuntu/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md index 0beb7560..d0fcee9e 100644 --- a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md @@ -106,7 +106,7 @@ cd scheduler/src && npm install && cd ../.. ``` curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/project_env && \ -curl -L -o samiksha-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/samiksha_env && \ +curl -L -o samiksha-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/envs/with-survey/samiksha_env && \ curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/entity_management_env && \ curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/user_env && \ curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/interface_env && \ From 16001af9da3d3ab3626b8e751e1c02505c323c9b Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 14:09:00 +0530 Subject: [PATCH 050/119] added-survey-native --- .../3.4.0/native/envs/with-survey/interface_env | 4 ++-- .../with-survey/ubuntu/insert_sample_solutions.js | 10 +++++----- .../setup/native/with-survey/ubuntu/README.md | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/documentation/3.4.0/native/envs/with-survey/interface_env b/documentation/3.4.0/native/envs/with-survey/interface_env index 62f2bbf6..ca72d195 100644 --- a/documentation/3.4.0/native/envs/with-survey/interface_env +++ b/documentation/3.4.0/native/envs/with-survey/interface_env @@ -17,8 +17,8 @@ REQUIRED_PACKAGES=elevate-mentoring@1.2.90 elevate-survey-observation@1.0.22 ele ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw -SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 +SAMIKSHA_SERVICE_BASE_URL=http://localhost:4301 SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE -SURVEY_SERVICE_BASE_URL=http://localhost:5007 +SURVEY_SERVICE_BASE_URL=http://localhost:4301 USER_SERVICE_BASE_URL=http://localhost:3001 \ No newline at end of file diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js index 15a9d6c0..684607d0 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js @@ -129,11 +129,11 @@ async function main({ dataToBeInserted }) { { name: 'certificateBaseTemplates', data: dataToBeInserted.certificateBaseTemplatesData, db: dbName }, { name: 'projectCategories', data: dataToBeInserted.projectCategoriesData, db: dbName }, { name: 'configurations', data: dataToBeInserted.configurationData, db: dbName }, - { name: "solutions", data: dataToBeInserted.solutionData, dbName3}, - { name: "criteria", data:dataToBeInserted.criteriaData, dbName3}, - { name: "criteriaQuestions", data: dataToBeInserted.criteriaQuestionsData,dbName3}, - { name: "frameworks", data: dataToBeInserted.frameworkData,dbName3}, - { name: "questions", data: dataToBeInserted.questionsData,dbName3}, + { name: "solutions", data: dataToBeInserted.solutionData, db:dbName3}, + { name: "criteria", data:dataToBeInserted.criteriaData, db : dbName3}, + { name: "criteriaQuestions", data: dataToBeInserted.criteriaQuestionsData, db : dbName3}, + { name: "frameworks", data: dataToBeInserted.frameworkData, db : dbName3}, + { name: "questions", data: dataToBeInserted.questionsData, db : dbName3}, ] diff --git a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md index d0fcee9e..d33cf20a 100644 --- a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md @@ -200,12 +200,12 @@ curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/ Add or update the following variables in the .env file, substituting the example values with your actual cloud credentials: - CLOUD_STORAGE_PROVIDER=gcloud - CLOUD_STORAGE_ACCOUNTNAME=your_account_name - CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\n..." - CLOUD_STORAGE_PROJECT=your_cloud_project_id - CLOUD_STORAGE_BUCKETNAME=your_bucket_name - CLOUD_STORAGE_BUCKET_TYPE=private + CLOUD_STORAGE_PROVIDER=gcloud + CLOUD_STORAGE_ACCOUNTNAME=your_account_name + CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\n..." + CLOUD_STORAGE_PROJECT=your_cloud_project_id + CLOUD_STORAGE_BUCKETNAME=your_bucket_name + CLOUD_STORAGE_BUCKET_TYPE=private > NOTE : This service is designed to support multiple cloud storage providers and offers flexible cloud integration capabilities. Based on your selected cloud provider, the service can be configured accordingly to enable seamless storage, certificate generation, and report handling. @@ -216,7 +216,7 @@ curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/ 1. Download `entity-project-sample-data.sh` Script File: ``` - curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/scripts/stand-alone/ubuntu/project_entity_sample_data.sh && \ + curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_entity_sample_data.sh && \ chmod +x project_entity_sample_data.sh && \ ./project_entity_sample_data.sh ``` From e192d60748542217b043d0263dc635901cf70e04 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 14:14:46 +0530 Subject: [PATCH 051/119] added-survey-native --- .../with-survey/ubuntu/survey_sampleData.js | 78 +++++++++++-------- 1 file changed, 46 insertions(+), 32 deletions(-) diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js index 60f0b90c..1a2205c5 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js @@ -234,14 +234,15 @@ let solutionData = [ __v: 0, link: "100b50989feb61c96c9991ff61132924", scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["6863aa5f1d52e30014093b41"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, startDate: new Date("2025-11-17T00:00:00.000Z"), endDate: new Date("2025-11-28T18:29:59.000Z"), }, @@ -345,14 +346,15 @@ let solutionData = [ __v: 0, link: "553a46800983f4d3b138ecf0619108a7", scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["6863aa5f1d52e30014093b41"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, startDate: new Date("2025-11-17T00:00:00.000Z"), endDate: new Date("2025-11-28T18:29:59.000Z"), }, @@ -436,14 +438,15 @@ let solutionData = [ __v: 0, link: "c96046bd3b8b3115d140081d89a9062f", scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["6863aa5f1d52e30014093b41"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, startDate: new Date("2025-11-17T00:00:00.000Z"), endDate: new Date("2025-11-28T18:29:59.000Z"), }, @@ -527,14 +530,15 @@ let solutionData = [ __v: 0, link: "85059222768a4bda20d218731668cdaa", scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["ALL"], - block: ["ALL"], - cluster: ["ALL"], - school: ["ALL"], - }, + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, startDate: new Date("2025-11-03T00:00:00.000Z"), endDate: new Date("2026-05-04T18:29:59.000Z"), }, @@ -769,6 +773,16 @@ let solutionData = [ orgId: "default_code", tenantId: "default", isExternalProgram: true, + scope: { + professional_role: ['68876746b19aea00144c2af9'], + professional_subroles: ['688767deb19aea00144c2b08'], + organizations: ['default_code'], + state: ['6852c86c7248c20014b38a4d'], + district: ['6852c8ae7248c20014b38a57'], + block: ['ALL'], + cluster: ['ALL'], + school: ['ALL'], + }, parentEntityKey: null, visibleToOrganizations: [], visibility: "CURRENT", From 3a2085c1c05f1b41e28ec66a3d7d82e3c24e33e3 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 14:20:14 +0530 Subject: [PATCH 052/119] added-survey-native --- .../with-survey/ubuntu/project_sampleData.js | 20 +++++++++---------- .../with-survey/ubuntu/survey_sampleData.js | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js index 54dbfcc5..97552f9a 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js @@ -32,7 +32,7 @@ let solutionData = [ description: 'To construct a wired car using a DPDT switch.', isReusable: false, startDate: new Date('2025-09-09T00:00:00.000Z'), - endDate: new Date('2026-09-09T18:29:59.000Z'), + endDate: new Date('2030-09-09T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), @@ -92,7 +92,7 @@ let solutionData = [ description: 'To construct a wired car using a DPDT switch.', isReusable: false, startDate: new Date('2025-09-09T00:00:00.000Z'), - endDate: new Date('2026-09-09T18:29:59.000Z'), + endDate: new Date('2030-09-09T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', programId: new ObjectId('68e8c284201642091e0148c1'), @@ -153,7 +153,7 @@ let solutionData = [ 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', isReusable: false, startDate: new Date('2025-07-29T18:30:00.000Z'), - endDate: new Date('2026-01-30T18:29:59.000Z'), + endDate: new Date('2030-01-30T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', programId: new ObjectId('68c98d8f38aee0086ee61070'), @@ -208,7 +208,7 @@ let solutionData = [ description: 'To construct a wired car using a DPDT switch.', isReusable: false, startDate: new Date('2025-07-29T18:30:00.000Z'), - endDate: new Date('2025-12-30T18:29:59.000Z'), + endDate: new Date('2030-12-30T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), @@ -265,7 +265,7 @@ let programData = [ name: 'custom observation as a task check on oct 14th facilitator', description: 'custom observation as a task check on oct 14th facilitator', startDate: new Date('2025-09-08T18:30:00.000Z'), - endDate: new Date('2026-09-09T18:29:59.000Z'), + endDate: new Date('2030-09-09T18:29:59.000Z'), imageCompression: { quality: 10, }, @@ -315,7 +315,7 @@ let programData = [ name: 'custom observation as a task check on oct 10th facilitator', description: 'custom observation as a task check on oct 10th facilitator', startDate: new Date('2025-09-08T18:30:00.000Z'), - endDate: new Date('2026-09-09T18:29:59.000Z'), + endDate: new Date('2030-09-09T18:29:59.000Z'), imageCompression: { quality: 10, }, @@ -372,7 +372,7 @@ let programData = [ quality: 10, }, startDate: new Date('2025-07-29T18:30:00.000Z'), - endDate: new Date('2026-01-30T18:29:59.000Z'), + endDate: new Date('2030-01-30T18:29:59.000Z'), tenantId: 'default', orgId: 'default_code', updatedAt: new Date('2025-09-16T17:06:14.752Z'), @@ -422,7 +422,7 @@ let programData = [ quality: 10, }, startDate: new Date('2025-07-29T18:30:00.000Z'), - endDate: new Date('2025-12-30T18:29:59.000Z'), + endDate: new Date('2030-12-30T18:29:59.000Z'), tenantId: 'default', orgId: 'default_code', updatedAt: new Date('2025-10-03T09:20:39.907Z'), @@ -504,7 +504,7 @@ let programData = [ quality: 10, }, startDate: new Date("2025-11-16T18:30:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), + endDate: new Date("2030-11-28T18:29:59.000Z"), tenantId: "shikshagrahanew", orgId: "tripura", updatedAt: new Date("2025-11-18T07:26:14.940Z"), @@ -573,7 +573,7 @@ let programData = [ quality: 10, }, startDate: new Date("2025-11-16T18:30:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), + endDate: new Date("2030-11-28T18:29:59.000Z"), tenantId: "shikshagrahanew", orgId: "tripura", updatedAt: new Date("2025-11-17T12:46:34.713Z"), diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js index 1a2205c5..6f97f823 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js @@ -244,7 +244,7 @@ let solutionData = [ school: ['ALL'], }, startDate: new Date("2025-11-17T00:00:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), + endDate: new Date("2030-11-28T18:29:59.000Z"), }, { _id: new ObjectId("691b17ae1ce3f5956e9f319d"), @@ -356,7 +356,7 @@ let solutionData = [ school: ['ALL'], }, startDate: new Date("2025-11-17T00:00:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), + endDate: new Date("2030-11-28T18:29:59.000Z"), }, { _id: new ObjectId("691b179e7b8c31191b8facee"), @@ -448,7 +448,7 @@ let solutionData = [ school: ['ALL'], }, startDate: new Date("2025-11-17T00:00:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), + endDate: new Date("2030-11-28T18:29:59.000Z"), }, { _id: new ObjectId("691ac8ae1ce3f5956e9f220a"), @@ -540,7 +540,7 @@ let solutionData = [ school: ['ALL'], }, startDate: new Date("2025-11-03T00:00:00.000Z"), - endDate: new Date("2026-05-04T18:29:59.000Z"), + endDate: new Date("2030-05-04T18:29:59.000Z"), }, { _id: new ObjectId("68ee4bb440fd155dceef08a9"), From 2c5c67786df2c157e9c64155aa2f6b6c147e7dda Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 15:55:49 +0530 Subject: [PATCH 053/119] added-survey-native --- .../ubuntu/insert_sample_solutions.js | 2 + .../with-survey/ubuntu/survey_sampleData.js | 521 ++++++++++++++++-- 2 files changed, 477 insertions(+), 46 deletions(-) diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js index 684607d0..52162a4f 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js @@ -134,6 +134,8 @@ async function main({ dataToBeInserted }) { { name: "criteriaQuestions", data: dataToBeInserted.criteriaQuestionsData, db : dbName3}, { name: "frameworks", data: dataToBeInserted.frameworkData, db : dbName3}, { name: "questions", data: dataToBeInserted.questionsData, db : dbName3}, + { name: "observation", data: dataToBeInserted.observation, db : dbName3}, + { name: "survey", data: dataToBeInserted.survey, db : dbName3}, ] diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js index 6f97f823..8f162927 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js @@ -234,15 +234,15 @@ let solutionData = [ __v: 0, link: "100b50989feb61c96c9991ff61132924", scope: { - professional_role: ['68876746b19aea00144c2af9'], - professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['default_code'], - state: ['6852c86c7248c20014b38a4d'], - district: ['6852c8ae7248c20014b38a57'], - block: ['ALL'], - cluster: ['ALL'], - school: ['ALL'], - }, + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, startDate: new Date("2025-11-17T00:00:00.000Z"), endDate: new Date("2030-11-28T18:29:59.000Z"), }, @@ -346,15 +346,15 @@ let solutionData = [ __v: 0, link: "553a46800983f4d3b138ecf0619108a7", scope: { - professional_role: ['68876746b19aea00144c2af9'], - professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['default_code'], - state: ['6852c86c7248c20014b38a4d'], - district: ['6852c8ae7248c20014b38a57'], - block: ['ALL'], - cluster: ['ALL'], - school: ['ALL'], - }, + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, startDate: new Date("2025-11-17T00:00:00.000Z"), endDate: new Date("2030-11-28T18:29:59.000Z"), }, @@ -438,15 +438,15 @@ let solutionData = [ __v: 0, link: "c96046bd3b8b3115d140081d89a9062f", scope: { - professional_role: ['68876746b19aea00144c2af9'], - professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['default_code'], - state: ['6852c86c7248c20014b38a4d'], - district: ['6852c8ae7248c20014b38a57'], - block: ['ALL'], - cluster: ['ALL'], - school: ['ALL'], - }, + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, startDate: new Date("2025-11-17T00:00:00.000Z"), endDate: new Date("2030-11-28T18:29:59.000Z"), }, @@ -530,15 +530,15 @@ let solutionData = [ __v: 0, link: "85059222768a4bda20d218731668cdaa", scope: { - professional_role: ['68876746b19aea00144c2af9'], - professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['default_code'], - state: ['6852c86c7248c20014b38a4d'], - district: ['6852c8ae7248c20014b38a57'], - block: ['ALL'], - cluster: ['ALL'], - school: ['ALL'], - }, + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, startDate: new Date("2025-11-03T00:00:00.000Z"), endDate: new Date("2030-05-04T18:29:59.000Z"), }, @@ -774,15 +774,15 @@ let solutionData = [ tenantId: "default", isExternalProgram: true, scope: { - professional_role: ['68876746b19aea00144c2af9'], - professional_subroles: ['688767deb19aea00144c2b08'], - organizations: ['default_code'], - state: ['6852c86c7248c20014b38a4d'], - district: ['6852c8ae7248c20014b38a57'], - block: ['ALL'], - cluster: ['ALL'], - school: ['ALL'], - }, + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, parentEntityKey: null, visibleToOrganizations: [], visibility: "CURRENT", @@ -4865,10 +4865,439 @@ let frameworkData = [ }, ]; +let observatioData = [ + { + _id: new Object("68259459cfa7cfe32cd8341b"), + name: "DEV OBS - 1 may 14 2250", + description: "Observation Without Rubric", + createdBy: "18", + frameworkId: new Object("691c1b15266ef5649ce41004"), + frameworkExternalId: "2dd7053d-c44d-11f0-b1c9-4cd717431bdb", + solutionId: new Object("691c1b17266ef5649ce4104c"), + programId: new Object("691c1b06e71d83091cf9c336"), + programExternalId: "Survey_Program_newmay_14_2245", + solutionExternalId: "691c1b15266ef5649ce4100d_CHILD", + startDate: new Date("2025-05-15T07:14:32.871Z"), + endDate: new Date("2026-05-15T07:14:32.871Z"), + status: "published", + entityType: "state", + entities: [], + createdFor: ["18"], + rootOrganisations: [], + isAPrivateProgram: false, + link: "2022f5c51e2b815cff535f9a2516bf7d", + userProfile: { + status: 400, + success: false, + }, + orgId: "blr", + tenantId: "shikshagraha", + updatedAt: new Date("2025-05-15T07:14:33.051Z"), + createdAt: new Date("2025-05-15T07:11:32.830Z"), + deleted: false, + __v: 0, + }, + { + _id: new Object("6825958bcfa7cfe32cd834dd"), + name: "DEV OBS - 1 may 14 2250", + description: "Observation Without Rubric", + createdBy: "18", + frameworkId: new Object("691b17a67b8c31191b8facf6"), + frameworkExternalId: "8bb9c6e2-c3b2-11f0-a72f-4cd717431bdb", + solutionId: new Object("691b17ae1ce3f5956e9f319d"), + programId: new Object("691b10a0dbb768073d67328c"), + programExternalId: "Survey_Program_newmay_14_2245", + solutionExternalId: "691b17a71ce3f5956e9f313b_CHILD", + startDate: new Date("2025-05-15T07:19:39.047Z"), + endDate: new Date("2026-05-15T07:19:39.047Z"), + status: "published", + entityType: "district", + entities: ["67c82d37bad58c889bc5a5f0"], + createdFor: ["18"], + rootOrganisations: [], + isAPrivateProgram: false, + link: "d8e9a25464029cfd9f0f83507aad36f9", + userProfile: { + id: "18", + email_verified: "false", + name: "ORG admin BLR", + username: "orgadminbl_lotf-bq50kceag", + phone_code: null, + about: null, + share_link: null, + status: "ACTIVE", + image: null, + has_accepted_terms_and_conditions: false, + languages: null, + preferred_language: "en", + tenant_code: "shikshagraha", + meta: null, + created_at: "2025-05-13T17:46:39.156Z", + updated_at: "2025-05-13T17:46:39.156Z", + deleted_at: null, + organizations: [ + { + id: "8", + name: "Bengaluru", + code: "blr", + description: + "Bengaluru is the capital of Indias southern Karnataka state.", + status: "ACTIVE", + related_orgs: null, + tenant_code: "shikshagraha", + meta: { + terms: [ + { + identifier: "migration-framework_board_cbse", + node_id: "migration-framework_board_cbse", + }, + { + identifier: "migration-framework_medium_english", + node_id: "migration-framework_medium_english", + }, + { + identifier: "migration-framework_gradelevel_grade10", + node_id: "migration-framework_gradelevel_grade10", + }, + { + identifier: "migration-framework_subject_hindi", + node_id: "migration-framework_subject_hindi", + }, + { + identifier: "migration-framework_subject_english", + node_id: "migration-framework_subject_english", + }, + { + identifier: "migration-framework_subject_maths", + node_id: "migration-framework_subject_maths", + }, + ], + framework: { + node_id: "migration-framework", + versionKey: "1742885767841", + }, + }, + created_by: 1, + updated_by: null, + roles: [ + { + id: "15", + title: "mentee", + label: null, + user_type: 0, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + { + id: "17", + title: "org_admin", + label: null, + user_type: 1, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + { + id: "33", + title: "learner", + label: "Learner", + user_type: 0, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + ], + }, + ], + permissions: [ + { + module: "user", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "form", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "cloud-services", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "organization", + request_type: ["POST", "GET"], + service: "user", + }, + { + module: "entity-type", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "entity", + request_type: ["POST", "DELETE", "PUT", "PATCH", "GET"], + service: "user", + }, + { + module: "org-admin", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "notification", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "account", + request_type: ["GET", "POST"], + service: "user", + }, + { + module: "user-role", + request_type: ["GET", "POST", "DELETE", "PUT", "PATCH"], + service: "user", + }, + ], + image_cloud_path: null, + }, + orgId: "blr", + tenantId: "shikshagraha", + updatedAt: new Date("2025-05-15T07:19:39.245Z"), + createdAt: new Date("2025-05-15T07:19:19.737Z"), + deleted: false, + __v: 0, + }, + { + _id: new Object("68259642cfa7cfe32cd834fd"), + name: "DEV OBS - 1 may 14 2250", + description: "Observation Without Rubric", + createdBy: "35", + frameworkId: new Object("68ee4b7940fd155dceef086a"), + frameworkExternalId: "fb34d196-a8fe-11f0-9793-553f35f97dd1", + solutionId: new Object("68ee4bb440fd155dceef08a9"), + programId: new Object("68ee4b79fb9bee08b93b6d34"), + programExternalId: "Survey_Program_newmay_14_2245", + solutionExternalId: + "fb34d196-a8fe-11f0-9793-553f35f97dd1-OBSERVATION-TEMPLATE-1760447411986", + startDate: new Date("2025-05-15T07:22:41.996Z"), + endDate: new Date("2026-05-15T07:22:41.996Z"), + status: "published", + entityType: "state", + entities: ["67c82d0c538125889163f197"], + createdFor: ["35"], + rootOrganisations: [], + isAPrivateProgram: false, + link: "2022f5c51e2b815cff535f9a2516bf7d", + userProfile: { + id: "35", + email_verified: "false", + name: "ramkumar", + username: "ramkumar_3o3npqqyqtx1im", + phone_code: null, + about: null, + share_link: null, + status: "ACTIVE", + image: null, + has_accepted_terms_and_conditions: false, + languages: null, + preferred_language: "en", + tenant_code: "shikshagraha", + created_at: "2025-05-14T16:11:29.204Z", + updated_at: "2025-05-14T16:11:29.204Z", + deleted_at: null, + organizations: [ + { + id: "8", + name: "Bengaluru", + code: "blr", + description: + "Bengaluru is the capital of Indias southern Karnataka state.", + status: "ACTIVE", + related_orgs: null, + tenant_code: "shikshagraha", + meta: { + terms: [ + { + identifier: "migration-framework_board_cbse", + node_id: "migration-framework_board_cbse", + }, + { + identifier: "migration-framework_medium_english", + node_id: "migration-framework_medium_english", + }, + { + identifier: "migration-framework_gradelevel_grade10", + node_id: "migration-framework_gradelevel_grade10", + }, + { + identifier: "migration-framework_subject_hindi", + node_id: "migration-framework_subject_hindi", + }, + { + identifier: "migration-framework_subject_english", + node_id: "migration-framework_subject_english", + }, + { + identifier: "migration-framework_subject_maths", + node_id: "migration-framework_subject_maths", + }, + ], + framework: { + node_id: "migration-framework", + versionKey: "1742885767841", + }, + }, + created_by: 1, + updated_by: null, + roles: [ + { + id: "15", + title: "mentee", + label: null, + user_type: 0, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + { + id: "33", + title: "learner", + label: "Learner", + user_type: 0, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + ], + }, + ], + permissions: [ + { + module: "user", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "form", + request_type: ["POST"], + service: "user", + }, + { + module: "cloud-services", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "organization", + request_type: ["POST", "GET"], + service: "user", + }, + { + module: "entity-type", + request_type: ["POST"], + service: "user", + }, + { + module: "entity", + request_type: ["GET"], + service: "user", + }, + { + module: "account", + request_type: ["GET", "POST"], + service: "user", + }, + { + module: "user-role", + request_type: ["GET"], + service: "user", + }, + ], + professional_subroles: [ + { + value: "682301604e2812081f342674", + label: "Physical Education Teacher", + externalId: "physical-education-teacher", + }, + { + value: "682301424e2812081f342670", + label: "Special Educators", + externalId: "special-educators", + }, + ], + image_cloud_path: null, + }, + orgId: "blr", + tenantId: "shikshagraha", + updatedAt: new Date("2025-05-15T07:22:42.963Z"), + createdAt: new Date("2025-05-15T07:11:32.830Z"), + deleted: false, + __v: 0, + }, +]; + +let surveyObservationData = [ + { + _id: new Object("6825966dcfa7cfe32cd8353d"), + name: "survey-May14", + description: "This is a survey for school performance", + createdBy: "35", + solutionId: new Object("691ac8ae1ce3f5956e9f220a"), + programId: new Object("691ac38fdbb768073d672c7f"), + programExternalId: "idddoohjhjsss", + solutionExternalId: "797d3540-c383-11f0-829d-c906cd7c8b97-1763362990221", + startDate: new Date("2025-05-15T07:23:25.039Z"), + endDate: new Date("2026-10-25T23:59:59.000Z"), + status: "published", + createdFor: [], + rootOrganisations: [], + isDeleted: false, + isAPrivateProgram: false, + orgId: "blr", + tenantId: "shikshagraha", + deleted: false, + updatedAt: new Date("2025-05-15T07:23:25.044Z"), + createdAt: new Date("2025-05-15T07:23:25.044Z"), + __v: 0, + }, + { + _id: new Object("6825f6c67ede10836e7e118c"), + name: "survey-May14", + description: "This is a survey for school performance", + createdBy: "35", + solutionId: new Object("691b179e7b8c31191b8facee"), + programId: new Object("691b10a0dbb768073d67328c"), + programExternalId: "Testing_for_creation_sup_17_11", + solutionExternalId: "85ee00e1-c3b2-11f0-b41e-4cd717431bdb-1763383198090", + startDate: new Date("2025-05-15T14:14:30.698Z"), + endDate: new Date("2026-10-25T23:59:59.000Z"), + status: "published", + createdFor: [], + rootOrganisations: [], + isDeleted: false, + isAPrivateProgram: false, + orgId: "blr", + tenantId: "shikshagraha", + deleted: false, + updatedAt: new Date("2025-05-15T14:14:30.704Z"), + createdAt: new Date("2025-05-15T14:14:30.704Z"), + __v: 0, + }, +]; + module.exports = { solutionData, criteriaData, criteriaQuestionsData, questionsData, - frameworkData + frameworkData, }; From 7d042f808f54d8e5902d73ecadfb233970189edb Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 15:56:47 +0530 Subject: [PATCH 054/119] added-survey-native --- .../scripts/with-survey/ubuntu/insert_sample_solutions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js index 52162a4f..9d765305 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js @@ -134,8 +134,8 @@ async function main({ dataToBeInserted }) { { name: "criteriaQuestions", data: dataToBeInserted.criteriaQuestionsData, db : dbName3}, { name: "frameworks", data: dataToBeInserted.frameworkData, db : dbName3}, { name: "questions", data: dataToBeInserted.questionsData, db : dbName3}, - { name: "observation", data: dataToBeInserted.observation, db : dbName3}, - { name: "survey", data: dataToBeInserted.survey, db : dbName3}, + { name: "observations", data: dataToBeInserted.observation, db : dbName3}, + { name: "surveys", data: dataToBeInserted.survey, db : dbName3}, ] From dab33c5333f649df0bb659f973ac898d662ffa48 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 15:59:38 +0530 Subject: [PATCH 055/119] added-survey-native --- .../native/scripts/with-survey/ubuntu/survey_sampleData.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js index 8f162927..32d9c1d3 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js @@ -5245,7 +5245,7 @@ let observatioData = [ }, ]; -let surveyObservationData = [ +let surveyData = [ { _id: new Object("6825966dcfa7cfe32cd8353d"), name: "survey-May14", @@ -5300,4 +5300,6 @@ module.exports = { criteriaQuestionsData, questionsData, frameworkData, + surveyData, + observatioData }; From 3131880ad397d239540e1ba180125d8de38e29d3 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Mon, 15 Dec 2025 17:02:34 +0530 Subject: [PATCH 056/119] added-survey-native --- .../ubuntu/insert_sample_solutions.js | 4 +- .../with-survey/ubuntu/project_sampleData.js | 8 +-- .../with-survey/ubuntu/survey_sampleData.js | 50 +++++++++---------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js index 9d765305..e9e6aa0a 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js @@ -134,8 +134,8 @@ async function main({ dataToBeInserted }) { { name: "criteriaQuestions", data: dataToBeInserted.criteriaQuestionsData, db : dbName3}, { name: "frameworks", data: dataToBeInserted.frameworkData, db : dbName3}, { name: "questions", data: dataToBeInserted.questionsData, db : dbName3}, - { name: "observations", data: dataToBeInserted.observation, db : dbName3}, - { name: "surveys", data: dataToBeInserted.survey, db : dbName3}, + { name: "observations", data: dataToBeInserted.observationData, db : dbName3}, + { name: "surveys", data: dataToBeInserted.surveyData, db : dbName3}, ] diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js index 97552f9a..3f6a90e6 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js @@ -505,8 +505,8 @@ let programData = [ }, startDate: new Date("2025-11-16T18:30:00.000Z"), endDate: new Date("2030-11-28T18:29:59.000Z"), - tenantId: "shikshagrahanew", - orgId: "tripura", + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date("2025-11-18T07:26:14.940Z"), createdAt: new Date("2025-11-18T07:06:46.613Z"), __v: 0, @@ -574,8 +574,8 @@ let programData = [ }, startDate: new Date("2025-11-16T18:30:00.000Z"), endDate: new Date("2030-11-28T18:29:59.000Z"), - tenantId: "shikshagrahanew", - orgId: "tripura", + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date("2025-11-17T12:46:34.713Z"), createdAt: new Date("2025-11-17T12:10:08.914Z"), __v: 0, diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js index 32d9c1d3..322e945e 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js @@ -4865,16 +4865,16 @@ let frameworkData = [ }, ]; -let observatioData = [ +let observationData = [ { - _id: new Object("68259459cfa7cfe32cd8341b"), + _id: new ObjectId("68259459cfa7cfe32cd8341b"), name: "DEV OBS - 1 may 14 2250", description: "Observation Without Rubric", - createdBy: "18", - frameworkId: new Object("691c1b15266ef5649ce41004"), + createdBy: "3", + frameworkId: new ObjectId("691c1b15266ef5649ce41004"), frameworkExternalId: "2dd7053d-c44d-11f0-b1c9-4cd717431bdb", - solutionId: new Object("691c1b17266ef5649ce4104c"), - programId: new Object("691c1b06e71d83091cf9c336"), + solutionId: new ObjectId("691c1b17266ef5649ce4104c"), + programId: new ObjectId("691c1b06e71d83091cf9c336"), programExternalId: "Survey_Program_newmay_14_2245", solutionExternalId: "691c1b15266ef5649ce4100d_CHILD", startDate: new Date("2025-05-15T07:14:32.871Z"), @@ -4898,14 +4898,14 @@ let observatioData = [ __v: 0, }, { - _id: new Object("6825958bcfa7cfe32cd834dd"), + _id: new ObjectId("6825958bcfa7cfe32cd834dd"), name: "DEV OBS - 1 may 14 2250", description: "Observation Without Rubric", - createdBy: "18", - frameworkId: new Object("691b17a67b8c31191b8facf6"), + createdBy: "2", + frameworkId: new ObjectId("691b17a67b8c31191b8facf6"), frameworkExternalId: "8bb9c6e2-c3b2-11f0-a72f-4cd717431bdb", - solutionId: new Object("691b17ae1ce3f5956e9f319d"), - programId: new Object("691b10a0dbb768073d67328c"), + solutionId: new ObjectId("691b17ae1ce3f5956e9f319d"), + programId: new ObjectId("691b10a0dbb768073d67328c"), programExternalId: "Survey_Program_newmay_14_2245", solutionExternalId: "691b17a71ce3f5956e9f313b_CHILD", startDate: new Date("2025-05-15T07:19:39.047Z"), @@ -5075,14 +5075,14 @@ let observatioData = [ __v: 0, }, { - _id: new Object("68259642cfa7cfe32cd834fd"), + _id: new ObjectId("68259642cfa7cfe32cd834fd"), name: "DEV OBS - 1 may 14 2250", description: "Observation Without Rubric", - createdBy: "35", - frameworkId: new Object("68ee4b7940fd155dceef086a"), + createdBy: "1", + frameworkId: new ObjectId("68ee4b7940fd155dceef086a"), frameworkExternalId: "fb34d196-a8fe-11f0-9793-553f35f97dd1", - solutionId: new Object("68ee4bb440fd155dceef08a9"), - programId: new Object("68ee4b79fb9bee08b93b6d34"), + solutionId: new ObjectId("68ee4bb440fd155dceef08a9"), + programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), programExternalId: "Survey_Program_newmay_14_2245", solutionExternalId: "fb34d196-a8fe-11f0-9793-553f35f97dd1-OBSERVATION-TEMPLATE-1760447411986", @@ -5247,12 +5247,12 @@ let observatioData = [ let surveyData = [ { - _id: new Object("6825966dcfa7cfe32cd8353d"), + _id: new ObjectId("6825966dcfa7cfe32cd8353d"), name: "survey-May14", description: "This is a survey for school performance", - createdBy: "35", - solutionId: new Object("691ac8ae1ce3f5956e9f220a"), - programId: new Object("691ac38fdbb768073d672c7f"), + createdBy: "3", + solutionId: new ObjectId("691ac8ae1ce3f5956e9f220a"), + programId: new ObjectId("691ac38fdbb768073d672c7f"), programExternalId: "idddoohjhjsss", solutionExternalId: "797d3540-c383-11f0-829d-c906cd7c8b97-1763362990221", startDate: new Date("2025-05-15T07:23:25.039Z"), @@ -5270,12 +5270,12 @@ let surveyData = [ __v: 0, }, { - _id: new Object("6825f6c67ede10836e7e118c"), + _id: new ObjectId("6825f6c67ede10836e7e118c"), name: "survey-May14", description: "This is a survey for school performance", - createdBy: "35", - solutionId: new Object("691b179e7b8c31191b8facee"), - programId: new Object("691b10a0dbb768073d67328c"), + createdBy: "2", + solutionId: new ObjectId("691b179e7b8c31191b8facee"), + programId: new ObjectId("691b10a0dbb768073d67328c"), programExternalId: "Testing_for_creation_sup_17_11", solutionExternalId: "85ee00e1-c3b2-11f0-b41e-4cd717431bdb-1763383198090", startDate: new Date("2025-05-15T14:14:30.698Z"), @@ -5301,5 +5301,5 @@ module.exports = { questionsData, frameworkData, surveyData, - observatioData + observationData }; From df5fa9192d6e2f87b2b3445279c72df3a14afd10 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 17 Dec 2025 16:09:23 +0530 Subject: [PATCH 057/119] added-survey-native --- .../with-survey/ubuntu/project_sampleData.js | 28 +- .../with-survey/ubuntu/survey_sampleData.js | 493 +++++++++++++++++- .../with-survey/ubuntu/survey_sampleData.js | 6 +- .../setup/docker/with-survey/ubuntu/README.md | 40 +- .../setup/native/with-survey/ubuntu/README.md | 1 + 5 files changed, 515 insertions(+), 53 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js index 54dbfcc5..3f6a90e6 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js @@ -32,7 +32,7 @@ let solutionData = [ description: 'To construct a wired car using a DPDT switch.', isReusable: false, startDate: new Date('2025-09-09T00:00:00.000Z'), - endDate: new Date('2026-09-09T18:29:59.000Z'), + endDate: new Date('2030-09-09T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', programId: new ObjectId('68ee4b79fb9bee08b93b6d34'), @@ -92,7 +92,7 @@ let solutionData = [ description: 'To construct a wired car using a DPDT switch.', isReusable: false, startDate: new Date('2025-09-09T00:00:00.000Z'), - endDate: new Date('2026-09-09T18:29:59.000Z'), + endDate: new Date('2030-09-09T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', programId: new ObjectId('68e8c284201642091e0148c1'), @@ -153,7 +153,7 @@ let solutionData = [ 'Gathers insights from teachers regarding available resources, training needs, and challenges faced in classrooms.', isReusable: false, startDate: new Date('2025-07-29T18:30:00.000Z'), - endDate: new Date('2026-01-30T18:29:59.000Z'), + endDate: new Date('2030-01-30T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', programId: new ObjectId('68c98d8f38aee0086ee61070'), @@ -208,7 +208,7 @@ let solutionData = [ description: 'To construct a wired car using a DPDT switch.', isReusable: false, startDate: new Date('2025-07-29T18:30:00.000Z'), - endDate: new Date('2025-12-30T18:29:59.000Z'), + endDate: new Date('2030-12-30T18:29:59.000Z'), subType: 'improvementProject', type: 'improvementProject', programId: new ObjectId('68d3b9681e09f9b5b1e0693d'), @@ -265,7 +265,7 @@ let programData = [ name: 'custom observation as a task check on oct 14th facilitator', description: 'custom observation as a task check on oct 14th facilitator', startDate: new Date('2025-09-08T18:30:00.000Z'), - endDate: new Date('2026-09-09T18:29:59.000Z'), + endDate: new Date('2030-09-09T18:29:59.000Z'), imageCompression: { quality: 10, }, @@ -315,7 +315,7 @@ let programData = [ name: 'custom observation as a task check on oct 10th facilitator', description: 'custom observation as a task check on oct 10th facilitator', startDate: new Date('2025-09-08T18:30:00.000Z'), - endDate: new Date('2026-09-09T18:29:59.000Z'), + endDate: new Date('2030-09-09T18:29:59.000Z'), imageCompression: { quality: 10, }, @@ -372,7 +372,7 @@ let programData = [ quality: 10, }, startDate: new Date('2025-07-29T18:30:00.000Z'), - endDate: new Date('2026-01-30T18:29:59.000Z'), + endDate: new Date('2030-01-30T18:29:59.000Z'), tenantId: 'default', orgId: 'default_code', updatedAt: new Date('2025-09-16T17:06:14.752Z'), @@ -422,7 +422,7 @@ let programData = [ quality: 10, }, startDate: new Date('2025-07-29T18:30:00.000Z'), - endDate: new Date('2025-12-30T18:29:59.000Z'), + endDate: new Date('2030-12-30T18:29:59.000Z'), tenantId: 'default', orgId: 'default_code', updatedAt: new Date('2025-10-03T09:20:39.907Z'), @@ -504,9 +504,9 @@ let programData = [ quality: 10, }, startDate: new Date("2025-11-16T18:30:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), - tenantId: "shikshagrahanew", - orgId: "tripura", + endDate: new Date("2030-11-28T18:29:59.000Z"), + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date("2025-11-18T07:26:14.940Z"), createdAt: new Date("2025-11-18T07:06:46.613Z"), __v: 0, @@ -573,9 +573,9 @@ let programData = [ quality: 10, }, startDate: new Date("2025-11-16T18:30:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), - tenantId: "shikshagrahanew", - orgId: "tripura", + endDate: new Date("2030-11-28T18:29:59.000Z"), + tenantId: 'default', + orgId: 'default_code', updatedAt: new Date("2025-11-17T12:46:34.713Z"), createdAt: new Date("2025-11-17T12:10:08.914Z"), __v: 0, diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js index 60f0b90c..831b5455 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js @@ -164,7 +164,7 @@ let solutionData = [ ], }, }, - entityType: "school", + entityType: "state", type: "observation", subType: "", entities: [], @@ -234,16 +234,17 @@ let solutionData = [ __v: 0, link: "100b50989feb61c96c9991ff61132924", scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["6863aa5f1d52e30014093b41"], + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], block: ["ALL"], cluster: ["ALL"], school: ["ALL"], }, startDate: new Date("2025-11-17T00:00:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), + endDate: new Date("2030-11-28T18:29:59.000Z"), }, { _id: new ObjectId("691b17ae1ce3f5956e9f319d"), @@ -291,7 +292,7 @@ let solutionData = [ ], }, }, - entityType: "school", + entityType: "state", type: "observation", subType: "", entities: [], @@ -345,16 +346,17 @@ let solutionData = [ __v: 0, link: "553a46800983f4d3b138ecf0619108a7", scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["6863aa5f1d52e30014093b41"], + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], block: ["ALL"], cluster: ["ALL"], school: ["ALL"], }, startDate: new Date("2025-11-17T00:00:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), + endDate: new Date("2030-11-28T18:29:59.000Z"), }, { _id: new ObjectId("691b179e7b8c31191b8facee"), @@ -436,16 +438,17 @@ let solutionData = [ __v: 0, link: "c96046bd3b8b3115d140081d89a9062f", scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["6863aa5f1d52e30014093b41"], + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], block: ["ALL"], cluster: ["ALL"], school: ["ALL"], }, startDate: new Date("2025-11-17T00:00:00.000Z"), - endDate: new Date("2025-11-28T18:29:59.000Z"), + endDate: new Date("2030-11-28T18:29:59.000Z"), }, { _id: new ObjectId("691ac8ae1ce3f5956e9f220a"), @@ -527,16 +530,17 @@ let solutionData = [ __v: 0, link: "85059222768a4bda20d218731668cdaa", scope: { - professional_role: ["6867a3c10d8d24001465c2d1"], - professional_subroles: ["6867a1420d8d24001465c28f"], - state: ["6863a9941d52e30014093ad9"], - district: ["ALL"], + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], block: ["ALL"], cluster: ["ALL"], school: ["ALL"], }, startDate: new Date("2025-11-03T00:00:00.000Z"), - endDate: new Date("2026-05-04T18:29:59.000Z"), + endDate: new Date("2030-05-04T18:29:59.000Z"), }, { _id: new ObjectId("68ee4bb440fd155dceef08a9"), @@ -702,7 +706,7 @@ let solutionData = [ ], }, }, - entityType: "Social Studies", + entityType: "state", type: "observation", subType: "", entities: [], @@ -769,6 +773,16 @@ let solutionData = [ orgId: "default_code", tenantId: "default", isExternalProgram: true, + scope: { + professional_role: ["68876746b19aea00144c2af9"], + professional_subroles: ["688767deb19aea00144c2b08"], + organizations: ["default_code"], + state: ["6852c86c7248c20014b38a4d"], + district: ["6852c8ae7248c20014b38a57"], + block: ["ALL"], + cluster: ["ALL"], + school: ["ALL"], + }, parentEntityKey: null, visibleToOrganizations: [], visibility: "CURRENT", @@ -4851,10 +4865,441 @@ let frameworkData = [ }, ]; +let observationData = [ + { + _id: new ObjectId("68259459cfa7cfe32cd8341b"), + name: "DEV OBS - 1 may 14 2250", + description: "Observation Without Rubric", + createdBy: "3", + frameworkId: new ObjectId("691c1b15266ef5649ce41004"), + frameworkExternalId: "2dd7053d-c44d-11f0-b1c9-4cd717431bdb", + solutionId: new ObjectId("691c1b17266ef5649ce4104c"), + programId: new ObjectId("691c1b06e71d83091cf9c336"), + programExternalId: "Survey_Program_newmay_14_2245", + solutionExternalId: "691c1b15266ef5649ce4100d_CHILD", + startDate: new Date("2025-05-15T07:14:32.871Z"), + endDate: new Date("2026-05-15T07:14:32.871Z"), + status: "published", + entityType: "state", + entities: [], + createdFor: ["18"], + rootOrganisations: [], + isAPrivateProgram: false, + link: "2022f5c51e2b815cff535f9a2516bf7d", + userProfile: { + status: 400, + success: false, + }, + orgId: "blr", + tenantId: "shikshagraha", + updatedAt: new Date("2025-05-15T07:14:33.051Z"), + createdAt: new Date("2025-05-15T07:11:32.830Z"), + deleted: false, + __v: 0, + }, + { + _id: new ObjectId("6825958bcfa7cfe32cd834dd"), + name: "DEV OBS - 1 may 14 2250", + description: "Observation Without Rubric", + createdBy: "2", + frameworkId: new ObjectId("691b17a67b8c31191b8facf6"), + frameworkExternalId: "8bb9c6e2-c3b2-11f0-a72f-4cd717431bdb", + solutionId: new ObjectId("691b17ae1ce3f5956e9f319d"), + programId: new ObjectId("691b10a0dbb768073d67328c"), + programExternalId: "Survey_Program_newmay_14_2245", + solutionExternalId: "691b17a71ce3f5956e9f313b_CHILD", + startDate: new Date("2025-05-15T07:19:39.047Z"), + endDate: new Date("2026-05-15T07:19:39.047Z"), + status: "published", + entityType: "district", + entities: ["67c82d37bad58c889bc5a5f0"], + createdFor: ["18"], + rootOrganisations: [], + isAPrivateProgram: false, + link: "d8e9a25464029cfd9f0f83507aad36f9", + userProfile: { + id: "18", + email_verified: "false", + name: "ORG admin BLR", + username: "orgadminbl_lotf-bq50kceag", + phone_code: null, + about: null, + share_link: null, + status: "ACTIVE", + image: null, + has_accepted_terms_and_conditions: false, + languages: null, + preferred_language: "en", + tenant_code: "shikshagraha", + meta: null, + created_at: "2025-05-13T17:46:39.156Z", + updated_at: "2025-05-13T17:46:39.156Z", + deleted_at: null, + organizations: [ + { + id: "8", + name: "Bengaluru", + code: "blr", + description: + "Bengaluru is the capital of Indias southern Karnataka state.", + status: "ACTIVE", + related_orgs: null, + tenant_code: "shikshagraha", + meta: { + terms: [ + { + identifier: "migration-framework_board_cbse", + node_id: "migration-framework_board_cbse", + }, + { + identifier: "migration-framework_medium_english", + node_id: "migration-framework_medium_english", + }, + { + identifier: "migration-framework_gradelevel_grade10", + node_id: "migration-framework_gradelevel_grade10", + }, + { + identifier: "migration-framework_subject_hindi", + node_id: "migration-framework_subject_hindi", + }, + { + identifier: "migration-framework_subject_english", + node_id: "migration-framework_subject_english", + }, + { + identifier: "migration-framework_subject_maths", + node_id: "migration-framework_subject_maths", + }, + ], + framework: { + node_id: "migration-framework", + versionKey: "1742885767841", + }, + }, + created_by: 1, + updated_by: null, + roles: [ + { + id: "15", + title: "mentee", + label: null, + user_type: 0, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + { + id: "17", + title: "org_admin", + label: null, + user_type: 1, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + { + id: "33", + title: "learner", + label: "Learner", + user_type: 0, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + ], + }, + ], + permissions: [ + { + module: "user", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "form", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "cloud-services", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "organization", + request_type: ["POST", "GET"], + service: "user", + }, + { + module: "entity-type", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "entity", + request_type: ["POST", "DELETE", "PUT", "PATCH", "GET"], + service: "user", + }, + { + module: "org-admin", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "notification", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "account", + request_type: ["GET", "POST"], + service: "user", + }, + { + module: "user-role", + request_type: ["GET", "POST", "DELETE", "PUT", "PATCH"], + service: "user", + }, + ], + image_cloud_path: null, + }, + orgId: "blr", + tenantId: "shikshagraha", + updatedAt: new Date("2025-05-15T07:19:39.245Z"), + createdAt: new Date("2025-05-15T07:19:19.737Z"), + deleted: false, + __v: 0, + }, + { + _id: new ObjectId("68259642cfa7cfe32cd834fd"), + name: "DEV OBS - 1 may 14 2250", + description: "Observation Without Rubric", + createdBy: "1", + frameworkId: new ObjectId("68ee4b7940fd155dceef086a"), + frameworkExternalId: "fb34d196-a8fe-11f0-9793-553f35f97dd1", + solutionId: new ObjectId("68ee4bb440fd155dceef08a9"), + programId: new ObjectId("68ee4b79fb9bee08b93b6d34"), + programExternalId: "Survey_Program_newmay_14_2245", + solutionExternalId: + "fb34d196-a8fe-11f0-9793-553f35f97dd1-OBSERVATION-TEMPLATE-1760447411986", + startDate: new Date("2025-05-15T07:22:41.996Z"), + endDate: new Date("2026-05-15T07:22:41.996Z"), + status: "published", + entityType: "state", + entities: ["67c82d0c538125889163f197"], + createdFor: ["35"], + rootOrganisations: [], + isAPrivateProgram: false, + link: "2022f5c51e2b815cff535f9a2516bf7d", + userProfile: { + id: "35", + email_verified: "false", + name: "ramkumar", + username: "ramkumar_3o3npqqyqtx1im", + phone_code: null, + about: null, + share_link: null, + status: "ACTIVE", + image: null, + has_accepted_terms_and_conditions: false, + languages: null, + preferred_language: "en", + tenant_code: "shikshagraha", + created_at: "2025-05-14T16:11:29.204Z", + updated_at: "2025-05-14T16:11:29.204Z", + deleted_at: null, + organizations: [ + { + id: "8", + name: "Bengaluru", + code: "blr", + description: + "Bengaluru is the capital of Indias southern Karnataka state.", + status: "ACTIVE", + related_orgs: null, + tenant_code: "shikshagraha", + meta: { + terms: [ + { + identifier: "migration-framework_board_cbse", + node_id: "migration-framework_board_cbse", + }, + { + identifier: "migration-framework_medium_english", + node_id: "migration-framework_medium_english", + }, + { + identifier: "migration-framework_gradelevel_grade10", + node_id: "migration-framework_gradelevel_grade10", + }, + { + identifier: "migration-framework_subject_hindi", + node_id: "migration-framework_subject_hindi", + }, + { + identifier: "migration-framework_subject_english", + node_id: "migration-framework_subject_english", + }, + { + identifier: "migration-framework_subject_maths", + node_id: "migration-framework_subject_maths", + }, + ], + framework: { + node_id: "migration-framework", + versionKey: "1742885767841", + }, + }, + created_by: 1, + updated_by: null, + roles: [ + { + id: "15", + title: "mentee", + label: null, + user_type: 0, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + { + id: "33", + title: "learner", + label: "Learner", + user_type: 0, + status: "ACTIVE", + organization_id: "7", + visibility: "PUBLIC", + tenant_code: "shikshagraha", + }, + ], + }, + ], + permissions: [ + { + module: "user", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "form", + request_type: ["POST"], + service: "user", + }, + { + module: "cloud-services", + request_type: ["POST", "DELETE", "GET", "PUT", "PATCH"], + service: "user", + }, + { + module: "organization", + request_type: ["POST", "GET"], + service: "user", + }, + { + module: "entity-type", + request_type: ["POST"], + service: "user", + }, + { + module: "entity", + request_type: ["GET"], + service: "user", + }, + { + module: "account", + request_type: ["GET", "POST"], + service: "user", + }, + { + module: "user-role", + request_type: ["GET"], + service: "user", + }, + ], + professional_subroles: [ + { + value: "682301604e2812081f342674", + label: "Physical Education Teacher", + externalId: "physical-education-teacher", + }, + { + value: "682301424e2812081f342670", + label: "Special Educators", + externalId: "special-educators", + }, + ], + image_cloud_path: null, + }, + orgId: "blr", + tenantId: "shikshagraha", + updatedAt: new Date("2025-05-15T07:22:42.963Z"), + createdAt: new Date("2025-05-15T07:11:32.830Z"), + deleted: false, + __v: 0, + }, +]; + +let surveyData = [ + { + _id: new ObjectId("6825966dcfa7cfe32cd8353d"), + name: "survey-May14", + description: "This is a survey for school performance", + createdBy: "3", + solutionId: new ObjectId("691ac8ae1ce3f5956e9f220a"), + programId: new ObjectId("691ac38fdbb768073d672c7f"), + programExternalId: "idddoohjhjsss", + solutionExternalId: "797d3540-c383-11f0-829d-c906cd7c8b97-1763362990221", + startDate: new Date("2025-05-15T07:23:25.039Z"), + endDate: new Date("2026-10-25T23:59:59.000Z"), + status: "published", + createdFor: [], + rootOrganisations: [], + isDeleted: false, + isAPrivateProgram: false, + orgId: "blr", + tenantId: "shikshagraha", + deleted: false, + updatedAt: new Date("2025-05-15T07:23:25.044Z"), + createdAt: new Date("2025-05-15T07:23:25.044Z"), + __v: 0, + }, + { + _id: new ObjectId("6825f6c67ede10836e7e118c"), + name: "survey-May14", + description: "This is a survey for school performance", + createdBy: "2", + solutionId: new ObjectId("691b179e7b8c31191b8facee"), + programId: new ObjectId("691b10a0dbb768073d67328c"), + programExternalId: "Testing_for_creation_sup_17_11", + solutionExternalId: "85ee00e1-c3b2-11f0-b41e-4cd717431bdb-1763383198090", + startDate: new Date("2025-05-15T14:14:30.698Z"), + endDate: new Date("2026-10-25T23:59:59.000Z"), + status: "published", + createdFor: [], + rootOrganisations: [], + isDeleted: false, + isAPrivateProgram: false, + orgId: "blr", + tenantId: "shikshagraha", + deleted: false, + updatedAt: new Date("2025-05-15T14:14:30.704Z"), + createdAt: new Date("2025-05-15T14:14:30.704Z"), + __v: 0, + }, +]; + module.exports = { solutionData, criteriaData, criteriaQuestionsData, questionsData, - frameworkData + frameworkData, + surveyData, + observationData }; diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js index 322e945e..831b5455 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js @@ -164,7 +164,7 @@ let solutionData = [ ], }, }, - entityType: "school", + entityType: "state", type: "observation", subType: "", entities: [], @@ -292,7 +292,7 @@ let solutionData = [ ], }, }, - entityType: "school", + entityType: "state", type: "observation", subType: "", entities: [], @@ -706,7 +706,7 @@ let solutionData = [ ], }, }, - entityType: "Social Studies", + entityType: "state", type: "observation", subType: "", entities: [], diff --git a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md index 0e4fe420..125692d8 100644 --- a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md @@ -43,7 +43,7 @@ To set up the Project application, ensure you have Docker and Docker Compose ins > **Caution:** Before proceeding, please ensure that the ports given here are available and open. It is essential to verify their availability prior to moving forward. You can run below command in your terminal to check this ``` -for port in 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569; do +for port in 3001 3002 6000 5001 4000 9092 5432 7007 2181 27017 3569 4301; do if sudo lsof -iTCP:$port -sTCP:LISTEN &>/dev/null; then echo "Port $port is IN USE" else @@ -100,6 +100,26 @@ To enable the Citus extension for user services, follow these steps. sudo ./citus_setup.sh user postgres://postgres:postgres@citus_master:5432/user ``` + +## Update Cloud Credentials for Project Service + +To enable full functionality, including certificate generation and report storage, you must configure cloud credentials in the Project Service environment file. + + Path: project_env + +Add or update the following variables in the .env file, substituting the example values with your actual cloud credentials: + + CLOUD_STORAGE_PROVIDER=gcloud + CLOUD_STORAGE_ACCOUNTNAME=your_account_name + CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\n..." + CLOUD_STORAGE_PROJECT=your_cloud_project_id + CLOUD_STORAGE_BUCKETNAME=your_bucket_name + CLOUD_STORAGE_BUCKET_TYPE=private + +> NOTE : This service is designed to support multiple cloud storage providers and offers flexible cloud integration capabilities. Based on your selected cloud provider, the service can be configured accordingly to enable seamless storage, certificate generation, and report handling. + +For detailed configuration options, supported cloud providers, and integration guidelines, please refer to the official documentation available in this [ReadMe](https://www.npmjs.com/package/client-cloud-services?activeTab=readme) + ## Persistence Of Database Data In Docker Container (Optional) To ensure the persistence of database data when running `docker compose down`, it is necessary to modify the `docker-compose-project.yml` file according to the steps given below: @@ -166,7 +186,7 @@ After successfully running the script mentioned above, the following user accoun | prajwal@gmail.com | Password1@ | State Education Officer | | vishnu@gmail.com | Password1@ | State Education Officer | -## Sample Data Creation For Projects +## Sample Data Creation For Projects and Survey This step will guide us in implementing a sample project solution following the initial setup of the project service. @@ -176,19 +196,15 @@ This step will guide us in implementing a sample project solution following the node insert_sample_solutions.js ``` -## Default Forms Creation for Portal Configuration - -This step inserts configuration forms into MongoDB, enabling or disabling features and fields on portal pages. +## 🌐 Micro-Frontend (FE) Setup -#### Insert Forms Data into Database - -``` -curl -OJL https://github.com/ELEVATE-Project/project-service/raw/main/documentation/1.0.0/dockerized/scripts/mac-linux/import_forms_mongo.sh && chmod +x import_forms_mongo.sh && sudo ./import_forms_mongo.sh mongodb://mongo:27017/elevate-project -``` +The ELEVATE application uses a micro-frontend architecture. After setting up the backend services, you must configure and run the frontend repositories to access the application via the portal. -## Explore the Portal +Follow the setup guides for the frontend repositories: -Once the services are up and the front-end app bundle is built successfully, navigate to **[localhost:7007](http://localhost:7007/)** to access the Project app. +- **Login Portal:** [elevate-portal](https://github.com/ELEVATE-Project/elevate-portal/tree/releaase-1.1.0) +- **Projects Program Module (PWA):** [observation-survey-projects-pwa](https://github.com/ELEVATE-Project/observation-survey-projects-pwa/tree/release-3.4.0) +- **Observtaion/Survey Portal:** [observation-survey-projects-pwa](https://github.com/ELEVATE-Project/observation-portal/tree/release-3.4.0) > **Warning:** In this setup, features such as **Sign-Up, Project Certificate, Project Sharing, and Project PDF Report** will not be available because cloud storage credentials have been masked in the environment files for security reasons. diff --git a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md index d33cf20a..b4bdf2fd 100644 --- a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md @@ -242,6 +242,7 @@ Follow the setup guides for the frontend repositories: - **Login Portal:** [elevate-portal](https://github.com/ELEVATE-Project/elevate-portal/tree/releaase-1.1.0) - **Projects Program Module (PWA):** [observation-survey-projects-pwa](https://github.com/ELEVATE-Project/observation-survey-projects-pwa/tree/release-3.4.0) +- **Observtaion/Survey Portal:** [observation-survey-projects-pwa](https://github.com/ELEVATE-Project/observation-portal/tree/release-3.4.0) ## Sample User Accounts Generation From b84532d79468ec9884b61ce75c4ae54c643c0bcb Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 17 Dec 2025 16:15:23 +0530 Subject: [PATCH 058/119] added-cloud-FE-in-ReadMe --- documentation/3.4.0/dockerized/envs/interface_env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/3.4.0/dockerized/envs/interface_env b/documentation/3.4.0/dockerized/envs/interface_env index 9fd89127..e0119e8d 100644 --- a/documentation/3.4.0/dockerized/envs/interface_env +++ b/documentation/3.4.0/dockerized/envs/interface_env @@ -17,8 +17,8 @@ REQUIRED_PACKAGES=elevate-mentoring@1.2.90 elevate-survey-observation@1.0.22 ele ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw -SAMIKSHA_SERVICE_BASE_URL=http://localhost:5007 +SAMIKSHA_SERVICE_BASE_URL=http://localhost:4301 SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE -SURVEY_SERVICE_BASE_URL=http://localhost:5007 +SURVEY_SERVICE_BASE_URL=http://samiksha:4301 USER_SERVICE_BASE_URL=http://user:3001 \ No newline at end of file From e388ba04f4dda7b8ce2ba0929f876692ed1f3dc6 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 18 Dec 2025 09:41:09 +0530 Subject: [PATCH 059/119] added-survey-native --- .../with-survey/ubuntu/insert_sample_solutions.js | 12 +++++++----- .../scripts/with-survey/ubuntu/survey_sampleData.js | 6 +++--- .../scripts/with-survey/ubuntu/survey_sampleData.js | 6 +++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js index 381ae252..e9e6aa0a 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js @@ -129,11 +129,13 @@ async function main({ dataToBeInserted }) { { name: 'certificateBaseTemplates', data: dataToBeInserted.certificateBaseTemplatesData, db: dbName }, { name: 'projectCategories', data: dataToBeInserted.projectCategoriesData, db: dbName }, { name: 'configurations', data: dataToBeInserted.configurationData, db: dbName }, - { name: "solutions", data: dataToBeInserted.solutionData, dbName3}, - { name: "criteria", data:dataToBeInserted.criteriaData, dbName3}, - { name: "criteriaQuestions", data: dataToBeInserted.criteriaQuestionsData,dbName3}, - { name: "frameworks", data: dataToBeInserted.frameworkData,dbName3}, - { name: "questions", data: dataToBeInserted.questionsData,dbName3}, + { name: "solutions", data: dataToBeInserted.solutionData, db:dbName3}, + { name: "criteria", data:dataToBeInserted.criteriaData, db : dbName3}, + { name: "criteriaQuestions", data: dataToBeInserted.criteriaQuestionsData, db : dbName3}, + { name: "frameworks", data: dataToBeInserted.frameworkData, db : dbName3}, + { name: "questions", data: dataToBeInserted.questionsData, db : dbName3}, + { name: "observations", data: dataToBeInserted.observationData, db : dbName3}, + { name: "surveys", data: dataToBeInserted.surveyData, db : dbName3}, ] diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js index 831b5455..322e945e 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js @@ -164,7 +164,7 @@ let solutionData = [ ], }, }, - entityType: "state", + entityType: "school", type: "observation", subType: "", entities: [], @@ -292,7 +292,7 @@ let solutionData = [ ], }, }, - entityType: "state", + entityType: "school", type: "observation", subType: "", entities: [], @@ -706,7 +706,7 @@ let solutionData = [ ], }, }, - entityType: "state", + entityType: "Social Studies", type: "observation", subType: "", entities: [], diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js index 831b5455..322e945e 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js @@ -164,7 +164,7 @@ let solutionData = [ ], }, }, - entityType: "state", + entityType: "school", type: "observation", subType: "", entities: [], @@ -292,7 +292,7 @@ let solutionData = [ ], }, }, - entityType: "state", + entityType: "school", type: "observation", subType: "", entities: [], @@ -706,7 +706,7 @@ let solutionData = [ ], }, }, - entityType: "state", + entityType: "Social Studies", type: "observation", subType: "", entities: [], From e5c742606311904d643968187bbde4e1e8a1dc3a Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 18 Dec 2025 21:47:18 +0530 Subject: [PATCH 060/119] added-survey-native --- .../with-survey/ubuntu/entity_sampleData.js | 18 +++++++++++------- .../with-survey/ubuntu/entity_sampleData.js | 18 +++++++++++------- .../setup/native/with-survey/ubuntu/README.md | 2 +- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js index 8f17d82b..16a33a33 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js @@ -254,13 +254,17 @@ let entities = [ metaInformation: { targetedEntityTypes: [ { - entityType: "Handbook1_Activity", - entityTypeId: "688762feb19aea00144c2a81", - }, - { - entityType: "Handbook2_Activity", - entityTypeId: "68887766b19aea00144c3631", - }, + "entityType" : "state", + "entityTypeId" : "6852c86c7248c20014b38a4d" + }, + { + "entityType" : "district", + "entityTypeId" : "6852c8ae7248c20014b38a57" + }, + { + "entityType" : "school", + "entityTypeId" : "6852c9237248c20014b39fa0" + } ], externalId: "facilitator", name: "Facilitator", diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js b/documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js index 8f17d82b..16a33a33 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js +++ b/documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js @@ -254,13 +254,17 @@ let entities = [ metaInformation: { targetedEntityTypes: [ { - entityType: "Handbook1_Activity", - entityTypeId: "688762feb19aea00144c2a81", - }, - { - entityType: "Handbook2_Activity", - entityTypeId: "68887766b19aea00144c3631", - }, + "entityType" : "state", + "entityTypeId" : "6852c86c7248c20014b38a4d" + }, + { + "entityType" : "district", + "entityTypeId" : "6852c8ae7248c20014b38a57" + }, + { + "entityType" : "school", + "entityTypeId" : "6852c9237248c20014b39fa0" + } ], externalId: "facilitator", name: "Facilitator", diff --git a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md index b4bdf2fd..4c63abb2 100644 --- a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md @@ -109,7 +109,7 @@ curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Projec curl -L -o samiksha-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/envs/with-survey/samiksha_env && \ curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/entity_management_env && \ curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/user_env && \ -curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/interface_env && \ +curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/envs/with-survey/interface_env && \ curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/scheduler_env ``` From b317c86010e7368fdb710e54d4bc130072929a04 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 31 Dec 2025 19:56:08 +0530 Subject: [PATCH 061/119] changes-for-survey --- .../docker-compose-project.yml | 0 .../3.4.0/dockerized/envs/interface_env | 2 +- .../ubuntu/citus_setup.sh | 0 .../ubuntu/configFile.json | 0 .../ubuntu/docker-compose-down.sh | 0 .../ubuntu/docker-compose-up.sh | 0 .../ubuntu/entity_sampleData.js | 0 .../ubuntu/insert_sample_data.sh | 0 .../ubuntu/insert_sample_solutions.js | 0 .../ubuntu/project_sampleData.js | 0 .../ubuntu/replace_volume_path.sh | 0 .../ubuntu/setup_project.sh | 18 +-- .../ubuntu/survey_sampleData.js | 0 .../entity_management_env | 0 .../interface_env | 0 .../notification_env | 0 .../project_env | 0 .../samiksha_env | 0 .../scheduler_env | 0 .../user_env | 0 .../envs/stand-alone/elevate_portal_env | 48 -------- .../envs/stand-alone/observation_portal_env | 4 - .../observation_survey_projects_pwa_env | 18 --- .../envs/with-survey/elevate_portal_env | 48 -------- .../envs/with-survey/observation_portal_env | 4 - .../observation_survey_projects_pwa_env | 18 --- .../ubuntu/check-dependencies.sh | 0 .../ubuntu/citus_setup.sh | 0 .../ubuntu/configFile.json | 0 .../ubuntu/create-databases.sh | 0 .../ubuntu/entity_sampleData.js | 0 .../ubuntu/insert_sample_data.sh | 0 .../ubuntu/insert_sample_solutions.js | 0 .../ubuntu/install-dependencies.sh | 0 .../ubuntu/project_entity_sample_data.sh | 2 +- .../ubuntu/project_sampleData.js | 0 .../ubuntu/survey_sampleData.js | 0 .../ubuntu/uninstall-dependencies.sh | 0 .../ubuntu/README.md | 15 ++- .../ubuntu/README.md | 114 ++++++++++++++++-- 40 files changed, 126 insertions(+), 165 deletions(-) rename documentation/3.4.0/dockerized/dockerFiles/{with-survey => project-with-survey}/docker-compose-project.yml (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/citus_setup.sh (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/configFile.json (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/docker-compose-down.sh (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/docker-compose-up.sh (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/entity_sampleData.js (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/insert_sample_data.sh (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/insert_sample_solutions.js (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/project_sampleData.js (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/replace_volume_path.sh (100%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/setup_project.sh (88%) rename documentation/3.4.0/dockerized/scripts/{with-survey => project-with-survey}/ubuntu/survey_sampleData.js (100%) rename documentation/3.4.0/native/envs/{with-survey => project-with-survey}/entity_management_env (100%) rename documentation/3.4.0/native/envs/{with-survey => project-with-survey}/interface_env (100%) rename documentation/3.4.0/native/envs/{with-survey => project-with-survey}/notification_env (100%) rename documentation/3.4.0/native/envs/{with-survey => project-with-survey}/project_env (100%) rename documentation/3.4.0/native/envs/{with-survey => project-with-survey}/samiksha_env (100%) rename documentation/3.4.0/native/envs/{with-survey => project-with-survey}/scheduler_env (100%) rename documentation/3.4.0/native/envs/{with-survey => project-with-survey}/user_env (100%) delete mode 100644 documentation/3.4.0/native/envs/stand-alone/elevate_portal_env delete mode 100644 documentation/3.4.0/native/envs/stand-alone/observation_portal_env delete mode 100644 documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env delete mode 100644 documentation/3.4.0/native/envs/with-survey/elevate_portal_env delete mode 100644 documentation/3.4.0/native/envs/with-survey/observation_portal_env delete mode 100644 documentation/3.4.0/native/envs/with-survey/observation_survey_projects_pwa_env rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/check-dependencies.sh (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/citus_setup.sh (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/configFile.json (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/create-databases.sh (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/entity_sampleData.js (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/insert_sample_data.sh (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/insert_sample_solutions.js (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/install-dependencies.sh (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/project_entity_sample_data.sh (98%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/project_sampleData.js (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/survey_sampleData.js (100%) rename documentation/3.4.0/native/scripts/{with-survey => project-with-survey}/ubuntu/uninstall-dependencies.sh (100%) rename documentation/3.4.0/setup/docker/{with-survey => project-with-survey}/ubuntu/README.md (93%) rename documentation/3.4.0/setup/native/{with-survey => project-with-survey}/ubuntu/README.md (74%) diff --git a/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml b/documentation/3.4.0/dockerized/dockerFiles/project-with-survey/docker-compose-project.yml similarity index 100% rename from documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml rename to documentation/3.4.0/dockerized/dockerFiles/project-with-survey/docker-compose-project.yml diff --git a/documentation/3.4.0/dockerized/envs/interface_env b/documentation/3.4.0/dockerized/envs/interface_env index e0119e8d..9014bc02 100644 --- a/documentation/3.4.0/dockerized/envs/interface_env +++ b/documentation/3.4.0/dockerized/envs/interface_env @@ -17,7 +17,7 @@ REQUIRED_PACKAGES=elevate-mentoring@1.2.90 elevate-survey-observation@1.0.22 ele ROUTE_CONFIG_JSON_URLS_PATHS=https://raw.githubusercontent.com/ELEVATE-Project/utils/refs/heads/develop/interface-routes/elevate-routes.json SAAS_NOTIFICATION_BASE_URL=interface/v1/notification/send-raw SAAS_NOTIFICATION_SEND_EMAIL_ROUTE=interface/v1/notification/send-raw -SAMIKSHA_SERVICE_BASE_URL=http://localhost:4301 +SAMIKSHA_SERVICE_BASE_URL=http://samiksha:4301 SCHEDULER_SERVICE_BASE_URL=http://localhost:7401 SUPPORTED_HTTP_TYPES=GET POST PUT PATCH DELETE SURVEY_SERVICE_BASE_URL=http://samiksha:4301 diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/citus_setup.sh b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/citus_setup.sh similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/citus_setup.sh rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/citus_setup.sh diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/configFile.json b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/configFile.json similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/configFile.json rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/configFile.json diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/docker-compose-down.sh similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/docker-compose-down.sh diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/docker-compose-up.sh similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/docker-compose-up.sh diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/entity_sampleData.js similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/entity_sampleData.js diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/insert_sample_data.sh similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/insert_sample_data.sh diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/insert_sample_solutions.js similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/insert_sample_solutions.js diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/project_sampleData.js similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/project_sampleData.js diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/replace_volume_path.sh b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/replace_volume_path.sh similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/replace_volume_path.sh rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/replace_volume_path.sh diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/setup_project.sh similarity index 88% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/setup_project.sh index 0f0064aa..b733aac0 100644 --- a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh +++ b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/setup_project.sh @@ -7,7 +7,7 @@ log() { # Step 1: Download Docker Compose file log "Downloading Docker Compose file..." -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/dockerFiles/with-survey/docker-compose-project.yml +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/dockerFiles/project-with-survey/docker-compose-project.yml log "Docker Compose file downloaded." # Step 2: Download environment files @@ -40,8 +40,8 @@ log "replace_volume_path.sh script executed." # Step 6: Download additional scripts log "Downloading docker-compose scripts..." -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-up.sh -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/docker-compose-down.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/docker-compose-up.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/docker-compose-down.sh log "docker-compose scripts downloaded." # Step 7: Make the scripts executable @@ -68,16 +68,16 @@ npm install mongoose # Step 11: Download additional scripts to add data log "Downloading sample data scripts..." -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/entity_sampleData.js -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/project_sampleData.js -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_solutions.js -curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/insert_sample_data.sh +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/survey_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/entity_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/project_sampleData.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/insert_sample_solutions.js +curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/insert_sample_data.sh log "sample data scripts downloaded." log "Downloading config.json file..." -curl -L https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/configFile.json -o config.json +curl -L https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/configFile.json -o config.json log "config.json file is downloaded." # Step 13: Run docker-compose-up.sh script diff --git a/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/survey_sampleData.js similarity index 100% rename from documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/survey_sampleData.js rename to documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/survey_sampleData.js diff --git a/documentation/3.4.0/native/envs/with-survey/entity_management_env b/documentation/3.4.0/native/envs/project-with-survey/entity_management_env similarity index 100% rename from documentation/3.4.0/native/envs/with-survey/entity_management_env rename to documentation/3.4.0/native/envs/project-with-survey/entity_management_env diff --git a/documentation/3.4.0/native/envs/with-survey/interface_env b/documentation/3.4.0/native/envs/project-with-survey/interface_env similarity index 100% rename from documentation/3.4.0/native/envs/with-survey/interface_env rename to documentation/3.4.0/native/envs/project-with-survey/interface_env diff --git a/documentation/3.4.0/native/envs/with-survey/notification_env b/documentation/3.4.0/native/envs/project-with-survey/notification_env similarity index 100% rename from documentation/3.4.0/native/envs/with-survey/notification_env rename to documentation/3.4.0/native/envs/project-with-survey/notification_env diff --git a/documentation/3.4.0/native/envs/with-survey/project_env b/documentation/3.4.0/native/envs/project-with-survey/project_env similarity index 100% rename from documentation/3.4.0/native/envs/with-survey/project_env rename to documentation/3.4.0/native/envs/project-with-survey/project_env diff --git a/documentation/3.4.0/native/envs/with-survey/samiksha_env b/documentation/3.4.0/native/envs/project-with-survey/samiksha_env similarity index 100% rename from documentation/3.4.0/native/envs/with-survey/samiksha_env rename to documentation/3.4.0/native/envs/project-with-survey/samiksha_env diff --git a/documentation/3.4.0/native/envs/with-survey/scheduler_env b/documentation/3.4.0/native/envs/project-with-survey/scheduler_env similarity index 100% rename from documentation/3.4.0/native/envs/with-survey/scheduler_env rename to documentation/3.4.0/native/envs/project-with-survey/scheduler_env diff --git a/documentation/3.4.0/native/envs/with-survey/user_env b/documentation/3.4.0/native/envs/project-with-survey/user_env similarity index 100% rename from documentation/3.4.0/native/envs/with-survey/user_env rename to documentation/3.4.0/native/envs/project-with-survey/user_env diff --git a/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env b/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env deleted file mode 100644 index 14b3959f..00000000 --- a/documentation/3.4.0/native/envs/stand-alone/elevate_portal_env +++ /dev/null @@ -1,48 +0,0 @@ -AUTH_API_TOKEN= "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJPc3NtSUhXaW1NMDN2MUxsVnFvNHBqaS0ydEMwTGhLY0o5dmtwQTlJZV9zIn0.eyJleHAiOjE3MzI4NjE5ODcsImlhdCI6MTczMjc3NTU4NywianRpIjoiOTM5NWM4N2QtOTliYy00YTRkLWIyNTUtNDQ4NjFhYTBjYWE2IiwiaXNzIjoiaHR0cHM6Ly9xYS5wcmF0aGFtdGVhY2hlcmFwcC50ZWtkaW5leHQuY29tL2F1dGgvcmVhbG1zL3ByYXRoYW0iLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiY2IwN2RlNjItZWM0Yy00YmRlLWI5YjYtOWIwZjM3OWMwMTExIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoicHJhdGhhbSIsInNlc3Npb25fc3RhdGUiOiI2MzQ0ZWZjNS05NmUwLTQyNzYtYjViYi1hNTcyMGI0YzVmYjkiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIi8qIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiZGVmYXVsdC1yb2xlcy1wcmF0aGFtIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwic2lkIjoiNjM0NGVmYzUtOTZlMC00Mjc2LWI1YmItYTU3MjBiNGM1ZmI5IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiUmFqbmlzaCIsInByZWZlcnJlZF91c2VybmFtZSI6InJham5pc2g5ODc2MSIsImdpdmVuX25hbWUiOiJSYWpuaXNoIiwiZmFtaWx5X25hbWUiOiIifQ.OpTwdzG8sWhVK_VY6iAYy1klR2cfSLn2gYCqgnu9FJi4zTjPY-B0d8F--cEPVGZ4HdJiSZnGvfOgalICPKxthG-HfYR-cwznGWJVfte4HsvL5UbteOq5KDT3lsyzUkScgQ0bTKztSsePdhU2ctAGXv52DtPK8u7xWkKD6GYDeQCIHJlFS2JgR9v50d6Mva-stvtDRS7LEFgoes1hKQ0_k_C-5g1w7Rh084XJQC7tPmczap_Q-RqI-jkJZvUl_cAJK6NppZArSFA0AePkY-0_pZKBx82nBJbho2IETMIa7KzvnhdRCtjP0ynoTY-YJ4eL3jYhmIJ5DzWj3FpOZkrpSw" -AWS_ACCESS_KEY_ID= "AWS_ACCESS_KEY_ID" -AWS_ACCESS_SECRET_KEY= "AWS_ACCESS_SECRET_KEY" -AWS_BUCKET_NAME= "qa-knowlg-inquiry" -AWS_REGION= "ap-south-1" -BASE_URL= "https://qa-middleware.tekdinext.com" -NEXT_API_BASE_URL= "https://middleware.prathamdigital.org" -NEXT_PRIVATE_LOCAL_WEBPACK= "true" -NEXT_PUBLIC_AUTH= "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5dndaeklzS3U0ZzRjSWxoZnE1MWQ2SlR1d0w4dktlZCJ9.4jPaZhi9dHMzqqoZAZvfD5t5QPAVAuWOr9SDf1apZb8" -NEXT_PUBLIC_BASE_URL= "https://dev.elevate-apis.shikshalokam.org" -NEXT_PUBLIC_BASE_URL_ENTITY= "https://shiksha-dev-interface.tekdinext.com/entity-management" -NEXT_PUBLIC_BASE_URL_READ= "https://saas-dev-interface.tekdinext.com" -NEXT_PUBLIC_BASE_URL_SCHEMA= "https://qa-interface.prathamdigital.org" -NEXT_PUBLIC_CHANNEL_ID= "scp-channel" -NEXT_PUBLIC_CLIENT_ID= "implementation" -NEXT_PUBLIC_CLIENT_SECRET= "3e92df83-a773-4e3e-89c6-3a9afe81211a" -NEXT_PUBLIC_CLOUD_STORAGE_URL= "https://qa-knowlg-inquiry.s3-ap-south-1.amazonaws.com/" -NEXT_PUBLIC_CONTENT= "http://localhost:8000/shikshalokam/content" -NEXT_PUBLIC_CONTENT_FRAMEWORK_ID= "level1arning-framework" -NEXT_PUBLIC_DELETE_USER= "/api/user/v1/block" -NEXT_PUBLIC_FORGOT_PASSWORD= "https://dev.sunbirdsaas.com/recover/identify/account" -NEXT_PUBLIC_FRAMEWORK_ID= "shiksha-fw" -NEXT_PUBLIC_GENRATE_OTP= "/api/otp/v2/generate" -NEXT_PUBLIC_GRANT_TYPE= "password" -NEXT_PUBLIC_LOCATION_SEARCH= "/api/data/v1/location/search" -NEXT_PUBLIC_LOGINPAGE= "https://dev.elevate-apis.shikshalokam.org/" -NEXT_PUBLIC_LOGIN_PATH= "/auth/realms/sunbird/protocol/openid-connect/token" -NEXT_PUBLIC_NEW_REGISTRATION= "/interface/v1/account/create" -NEXT_PUBLIC_ORGID= "1" -NEXT_PUBLIC_PROGRAM_BASE_URL= "https://dev.elevate-sandbox.shikshalokam.org" -NEXT_PUBLIC_PWA= "http://localhost:8000/shikshalokam/pwa" -NEXT_PUBLIC_READ_USER= "/api/user/v1/search" -NEXT_PUBLIC_REGISTRATION= "http://localhost:8000/shikshalokam/registration/newUser" -NEXT_PUBLIC_SEARCH_LOCATION= "/interface/v1/user/locations/search" -NEXT_PUBLIC_SEND_OTP= "/api/otp/v1/generate" -NEXT_PUBLIC_SHIKSHAGRAHA_BASEPATH= "/shikshalokam" -NEXT_PUBLIC_SSUNBIRD_BASE_URL= "https://saas-qa.tekdinext.com/interface/v1" -NEXT_PUBLIC_SSUNBIRD_HIERARCHY_PATH= "/api/course/v1/" -NEXT_PUBLIC_TELEMETRY_URL= "https://qa.prathamteacherapp.tekdinext.com/telemetry" -NEXT_PUBLIC_TENANT_ID= "ef99949b-7f3a-4a5f-806a-e67e683e38f3" -NEXT_PUBLIC_TRACKING_BASE_URL= "https://shiksha2-dev.tekdinext.com/tracking" -NEXT_PUBLIC_UPDATE_USER= "/api/framework/v1/update" -NEXT_PUBLIC_VERIFT_OTP= "/api/otp/v2/verify" -NEXT_PUBLIC_VERIFY_OTP= "/api/otp/v1/verify" -created_time= "2025-06-18T08:50:04.71092372Z" -custom_metadata= "null" -destroyed= "false" -version= "5" \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/observation_portal_env b/documentation/3.4.0/native/envs/stand-alone/observation_portal_env deleted file mode 100644 index 50d7ba42..00000000 --- a/documentation/3.4.0/native/envs/stand-alone/observation_portal_env +++ /dev/null @@ -1,4 +0,0 @@ -window["env"] = { - production: true, - surveyBaseURL:"https://qa.elevate-apis.shikshalokam.org" -} \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env b/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env deleted file mode 100644 index 156e3796..00000000 --- a/documentation/3.4.0/native/envs/stand-alone/observation_survey_projects_pwa_env +++ /dev/null @@ -1,18 +0,0 @@ -window["env"] = { - production: true, - baseURL: 'https://qa.elevate-apis.shikshalokam.org', - // baseURL: 'https://saas-qa.tekdinext.com', - capabilities: 'all', - restrictedPages: ['DOWNLOADS','AUTH_PAGES'], - unauthorizedRedirectUrl: "/", - isAuthBypassed: true, - profileRedirectPath: "/profile-edit", - showHeader: true, - config:{ - logoPath:'assets/images/logo.png', - faviconPath:'assets/icons/elevate-logo.png', - title:"Elevate", - redirectUrl:"/home" - }, - hostPath:'/ml/' -}; \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/with-survey/elevate_portal_env b/documentation/3.4.0/native/envs/with-survey/elevate_portal_env deleted file mode 100644 index 14b3959f..00000000 --- a/documentation/3.4.0/native/envs/with-survey/elevate_portal_env +++ /dev/null @@ -1,48 +0,0 @@ -AUTH_API_TOKEN= "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJPc3NtSUhXaW1NMDN2MUxsVnFvNHBqaS0ydEMwTGhLY0o5dmtwQTlJZV9zIn0.eyJleHAiOjE3MzI4NjE5ODcsImlhdCI6MTczMjc3NTU4NywianRpIjoiOTM5NWM4N2QtOTliYy00YTRkLWIyNTUtNDQ4NjFhYTBjYWE2IiwiaXNzIjoiaHR0cHM6Ly9xYS5wcmF0aGFtdGVhY2hlcmFwcC50ZWtkaW5leHQuY29tL2F1dGgvcmVhbG1zL3ByYXRoYW0iLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiY2IwN2RlNjItZWM0Yy00YmRlLWI5YjYtOWIwZjM3OWMwMTExIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoicHJhdGhhbSIsInNlc3Npb25fc3RhdGUiOiI2MzQ0ZWZjNS05NmUwLTQyNzYtYjViYi1hNTcyMGI0YzVmYjkiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIi8qIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiZGVmYXVsdC1yb2xlcy1wcmF0aGFtIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwic2lkIjoiNjM0NGVmYzUtOTZlMC00Mjc2LWI1YmItYTU3MjBiNGM1ZmI5IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiUmFqbmlzaCIsInByZWZlcnJlZF91c2VybmFtZSI6InJham5pc2g5ODc2MSIsImdpdmVuX25hbWUiOiJSYWpuaXNoIiwiZmFtaWx5X25hbWUiOiIifQ.OpTwdzG8sWhVK_VY6iAYy1klR2cfSLn2gYCqgnu9FJi4zTjPY-B0d8F--cEPVGZ4HdJiSZnGvfOgalICPKxthG-HfYR-cwznGWJVfte4HsvL5UbteOq5KDT3lsyzUkScgQ0bTKztSsePdhU2ctAGXv52DtPK8u7xWkKD6GYDeQCIHJlFS2JgR9v50d6Mva-stvtDRS7LEFgoes1hKQ0_k_C-5g1w7Rh084XJQC7tPmczap_Q-RqI-jkJZvUl_cAJK6NppZArSFA0AePkY-0_pZKBx82nBJbho2IETMIa7KzvnhdRCtjP0ynoTY-YJ4eL3jYhmIJ5DzWj3FpOZkrpSw" -AWS_ACCESS_KEY_ID= "AWS_ACCESS_KEY_ID" -AWS_ACCESS_SECRET_KEY= "AWS_ACCESS_SECRET_KEY" -AWS_BUCKET_NAME= "qa-knowlg-inquiry" -AWS_REGION= "ap-south-1" -BASE_URL= "https://qa-middleware.tekdinext.com" -NEXT_API_BASE_URL= "https://middleware.prathamdigital.org" -NEXT_PRIVATE_LOCAL_WEBPACK= "true" -NEXT_PUBLIC_AUTH= "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5dndaeklzS3U0ZzRjSWxoZnE1MWQ2SlR1d0w4dktlZCJ9.4jPaZhi9dHMzqqoZAZvfD5t5QPAVAuWOr9SDf1apZb8" -NEXT_PUBLIC_BASE_URL= "https://dev.elevate-apis.shikshalokam.org" -NEXT_PUBLIC_BASE_URL_ENTITY= "https://shiksha-dev-interface.tekdinext.com/entity-management" -NEXT_PUBLIC_BASE_URL_READ= "https://saas-dev-interface.tekdinext.com" -NEXT_PUBLIC_BASE_URL_SCHEMA= "https://qa-interface.prathamdigital.org" -NEXT_PUBLIC_CHANNEL_ID= "scp-channel" -NEXT_PUBLIC_CLIENT_ID= "implementation" -NEXT_PUBLIC_CLIENT_SECRET= "3e92df83-a773-4e3e-89c6-3a9afe81211a" -NEXT_PUBLIC_CLOUD_STORAGE_URL= "https://qa-knowlg-inquiry.s3-ap-south-1.amazonaws.com/" -NEXT_PUBLIC_CONTENT= "http://localhost:8000/shikshalokam/content" -NEXT_PUBLIC_CONTENT_FRAMEWORK_ID= "level1arning-framework" -NEXT_PUBLIC_DELETE_USER= "/api/user/v1/block" -NEXT_PUBLIC_FORGOT_PASSWORD= "https://dev.sunbirdsaas.com/recover/identify/account" -NEXT_PUBLIC_FRAMEWORK_ID= "shiksha-fw" -NEXT_PUBLIC_GENRATE_OTP= "/api/otp/v2/generate" -NEXT_PUBLIC_GRANT_TYPE= "password" -NEXT_PUBLIC_LOCATION_SEARCH= "/api/data/v1/location/search" -NEXT_PUBLIC_LOGINPAGE= "https://dev.elevate-apis.shikshalokam.org/" -NEXT_PUBLIC_LOGIN_PATH= "/auth/realms/sunbird/protocol/openid-connect/token" -NEXT_PUBLIC_NEW_REGISTRATION= "/interface/v1/account/create" -NEXT_PUBLIC_ORGID= "1" -NEXT_PUBLIC_PROGRAM_BASE_URL= "https://dev.elevate-sandbox.shikshalokam.org" -NEXT_PUBLIC_PWA= "http://localhost:8000/shikshalokam/pwa" -NEXT_PUBLIC_READ_USER= "/api/user/v1/search" -NEXT_PUBLIC_REGISTRATION= "http://localhost:8000/shikshalokam/registration/newUser" -NEXT_PUBLIC_SEARCH_LOCATION= "/interface/v1/user/locations/search" -NEXT_PUBLIC_SEND_OTP= "/api/otp/v1/generate" -NEXT_PUBLIC_SHIKSHAGRAHA_BASEPATH= "/shikshalokam" -NEXT_PUBLIC_SSUNBIRD_BASE_URL= "https://saas-qa.tekdinext.com/interface/v1" -NEXT_PUBLIC_SSUNBIRD_HIERARCHY_PATH= "/api/course/v1/" -NEXT_PUBLIC_TELEMETRY_URL= "https://qa.prathamteacherapp.tekdinext.com/telemetry" -NEXT_PUBLIC_TENANT_ID= "ef99949b-7f3a-4a5f-806a-e67e683e38f3" -NEXT_PUBLIC_TRACKING_BASE_URL= "https://shiksha2-dev.tekdinext.com/tracking" -NEXT_PUBLIC_UPDATE_USER= "/api/framework/v1/update" -NEXT_PUBLIC_VERIFT_OTP= "/api/otp/v2/verify" -NEXT_PUBLIC_VERIFY_OTP= "/api/otp/v1/verify" -created_time= "2025-06-18T08:50:04.71092372Z" -custom_metadata= "null" -destroyed= "false" -version= "5" \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/with-survey/observation_portal_env b/documentation/3.4.0/native/envs/with-survey/observation_portal_env deleted file mode 100644 index 50d7ba42..00000000 --- a/documentation/3.4.0/native/envs/with-survey/observation_portal_env +++ /dev/null @@ -1,4 +0,0 @@ -window["env"] = { - production: true, - surveyBaseURL:"https://qa.elevate-apis.shikshalokam.org" -} \ No newline at end of file diff --git a/documentation/3.4.0/native/envs/with-survey/observation_survey_projects_pwa_env b/documentation/3.4.0/native/envs/with-survey/observation_survey_projects_pwa_env deleted file mode 100644 index 156e3796..00000000 --- a/documentation/3.4.0/native/envs/with-survey/observation_survey_projects_pwa_env +++ /dev/null @@ -1,18 +0,0 @@ -window["env"] = { - production: true, - baseURL: 'https://qa.elevate-apis.shikshalokam.org', - // baseURL: 'https://saas-qa.tekdinext.com', - capabilities: 'all', - restrictedPages: ['DOWNLOADS','AUTH_PAGES'], - unauthorizedRedirectUrl: "/", - isAuthBypassed: true, - profileRedirectPath: "/profile-edit", - showHeader: true, - config:{ - logoPath:'assets/images/logo.png', - faviconPath:'assets/icons/elevate-logo.png', - title:"Elevate", - redirectUrl:"/home" - }, - hostPath:'/ml/' -}; \ No newline at end of file diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/check-dependencies.sh b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/check-dependencies.sh similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/check-dependencies.sh rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/check-dependencies.sh diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/citus_setup.sh b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/citus_setup.sh similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/citus_setup.sh rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/citus_setup.sh diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/configFile.json b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/configFile.json similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/configFile.json rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/configFile.json diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/create-databases.sh b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/create-databases.sh similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/create-databases.sh rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/create-databases.sh diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/entity_sampleData.js similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/entity_sampleData.js rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/entity_sampleData.js diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_data.sh b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/insert_sample_data.sh similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_data.sh rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/insert_sample_data.sh diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/insert_sample_solutions.js similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/insert_sample_solutions.js rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/insert_sample_solutions.js diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/install-dependencies.sh b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/install-dependencies.sh similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/install-dependencies.sh rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/install-dependencies.sh diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_entity_sample_data.sh b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/project_entity_sample_data.sh similarity index 98% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/project_entity_sample_data.sh rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/project_entity_sample_data.sh index 50f3b113..4ce5b739 100644 --- a/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_entity_sample_data.sh +++ b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/project_entity_sample_data.sh @@ -14,7 +14,7 @@ set -e echo "Starting data setup script..." # --- 1. Define URL and Files --- -BASE_URL="https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/scripts/with-survey/ubuntu" +BASE_URL="https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/scripts/project-with-survey/ubuntu" ENTITY_FILE="entity_sampleData.js" PROJECT_FILE="project_sampleData.js" diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/project_sampleData.js similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/project_sampleData.js rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/project_sampleData.js diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/survey_sampleData.js similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/survey_sampleData.js rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/survey_sampleData.js diff --git a/documentation/3.4.0/native/scripts/with-survey/ubuntu/uninstall-dependencies.sh b/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/uninstall-dependencies.sh similarity index 100% rename from documentation/3.4.0/native/scripts/with-survey/ubuntu/uninstall-dependencies.sh rename to documentation/3.4.0/native/scripts/project-with-survey/ubuntu/uninstall-dependencies.sh diff --git a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/docker/project-with-survey/ubuntu/README.md similarity index 93% rename from documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md rename to documentation/3.4.0/setup/docker/project-with-survey/ubuntu/README.md index 125692d8..6d62aab5 100644 --- a/documentation/3.4.0/setup/docker/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/docker/project-with-survey/ubuntu/README.md @@ -24,7 +24,7 @@ The Project building block facilitates the creation and engagement with micro-im # Docker Setup Project Service - With Survey -Expectation: By diligently following the outlined steps, you will successfully establish a fully operational Project application setup, including both the portal and backend services. +Expectation: By following these steps, you will establish a unified environment for the Project Service, integrated with the Survey and Observation modules. This setup focuses purely on the backend API infrastructure required to manage data collection and reporting. ## Prerequisites @@ -54,7 +54,7 @@ done 1. **Download and execute main setup script:** Execute the following command in your terminal from the project directory. ``` - curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/with-survey/ubuntu/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/dockerized/scripts/project-with-survey/ubuntu/setup_project.sh && chmod +x setup_project.sh && sudo ./setup_project.sh ``` > Note : The script will download all the essential files and launch the services in Docker. Once all services are successfully up and running, you can proceed to the next steps. @@ -103,9 +103,15 @@ To enable the Citus extension for user services, follow these steps. ## Update Cloud Credentials for Project Service -To enable full functionality, including certificate generation and report storage, you must configure cloud credentials in the Project Service environment file. +To enable full functionality—including certificate generation, attachment uploads, and report storage—you must configure cloud credentials in the environment files for both services. - Path: project_env +A. Project Service Configuration Path: + ```./ELEVATE-Project/project-service/.env + ``` + +B. Samiksha (Survey & Observation) Service Configuration Path: + ```./ELEVATE-Project/samiksha-service/.env + ``` Add or update the following variables in the .env file, substituting the example values with your actual cloud credentials: @@ -120,6 +126,7 @@ Add or update the following variables in the .env file, substituting the example For detailed configuration options, supported cloud providers, and integration guidelines, please refer to the official documentation available in this [ReadMe](https://www.npmjs.com/package/client-cloud-services?activeTab=readme) + ## Persistence Of Database Data In Docker Container (Optional) To ensure the persistence of database data when running `docker compose down`, it is necessary to modify the `docker-compose-project.yml` file according to the steps given below: diff --git a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md b/documentation/3.4.0/setup/native/project-with-survey/ubuntu/README.md similarity index 74% rename from documentation/3.4.0/setup/native/with-survey/ubuntu/README.md rename to documentation/3.4.0/setup/native/project-with-survey/ubuntu/README.md index 4c63abb2..647f41be 100644 --- a/documentation/3.4.0/setup/native/with-survey/ubuntu/README.md +++ b/documentation/3.4.0/setup/native/project-with-survey/ubuntu/README.md @@ -34,9 +34,95 @@ The Project building block facilitates the creation and engagement with micro-im - **MongoDB:** 4.4.14 - **Gotenberg:** 8.5.0 -Expectation: Upon following the prescribed steps, you will achieve a fully operational ELEVATE-Project application setup. Both the portal and backend services are managed using PM2, with all dependencies installed natively on the host system. +Expectation: By following these steps, you will establish a unified environment for the Project Service, integrated with the Survey and Observation modules. This setup focuses purely on the backend API infrastructure required to manage data collection and reporting. + +## Prerequisites
+ cd user/src && npx sequelize-cli db:migrate && cd ../.. + ``` + + 2. run Seed + ``` + cd user/src && npx sequelize-cli db:seed:all && cd ../../ + ``` + +8. **Enabling Citus And Setting Distribution Columns (Optional)** + + To boost performance and scalability, users can opt to enable the Citus extension. This transforms PostgreSQL into a distributed database, spreading data across multiple nodes to handle large datasets more efficiently as demand grows. + + > NOTE: Currently only available for Linux based operation systems. + + 1. Download user `distributionColumns.sql` file. + + ``` + curl -o ./user/distributionColumns.sql -JL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/distribution-columns/user/distributionColumns.sql + + ``` + + 2. Set up the `citus_setup` file by following the steps given below. + + 1. Download the `citus_setup.sh` file: + + ``` + curl -OJL https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/main/documentation/1.0.0/native/scripts/linux/citus_setup.sh + ``` + + 2. Make the setup file executable by running the following command: + + ``` + chmod +x citus_setup.sh + ``` + + 3. Enable Citus and set distribution columns for `user` database by running the `citus_setup.sh`with the following arguments. + ``` + ./citus_setup.sh user postgres://postgres:postgres@localhost:9700/users + ``` + +9. **Update Cloud Credentials for Project Service** + + To enable full functionality—including certificate generation, attachment uploads, and report storage—you must configure cloud credentials in the environment files for both services. + + A. Project Service Configuration Path: + ```./ELEVATE-Project/project-service/.env + ``` + + B. Samiksha (Survey & Observation) Service Configuration Path: + ```./ELEVATE-Project/samiksha-service/.env + ``` + + + + Add or update the following variables in the .env file, substituting the example values with your actual cloud credentials: + + CLOUD_STORAGE_PROVIDER=gcloud + CLOUD_STORAGE_ACCOUNTNAME=your_account_name + CLOUD_STORAGE_SECRET="-----BEGIN PRIVATE KEY-----\n..." + CLOUD_STORAGE_PROJECT=your_cloud_project_id + CLOUD_STORAGE_BUCKETNAME=your_bucket_name + CLOUD_STORAGE_BUCKET_TYPE=private + + > NOTE : This service is designed to support multiple cloud storage providers and offers flexible cloud integration capabilities. Based on your selected cloud provider, the service can be configured accordingly to enable seamless storage, certificate generation, and report handling. + + For detailed configuration options, supported cloud providers, and integration guidelines, please refer to the official documentation available in this [ReadMe](https://www.npmjs.com/package/client-cloud-services?activeTab=readme) + +11. **Insert Initial Data** + + 1. Download `entity-project-sample-data.sh` Script File: + + ``` + curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/project_entity_sample_data.sh && \ + chmod +x project_entity_sample_data.sh && \ + ./project_entity_sample_data.sh + ``` + +12. **Start The Services** + + Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. + + ``` + (cd project-service && pm2 start app.js --name project-service && cd -) && \ + (cd samiksha-service && pm2 start app.js --name samiksha-service && cd -) && \ + (cd entity-management/src && pm2 start app.js --name entity-management && cd -) && \ -## Prerequisites Before setting up the following ELEVATE-Project application, dependencies given below should be installed and verified to be running. Refer to the steps given below to install them and verify. @@ -106,10 +192,10 @@ cd scheduler/src && npm install && cd ../.. ``` curl -L -o project-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/project_env && \ -curl -L -o samiksha-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/envs/with-survey/samiksha_env && \ +curl -L -o samiksha-service/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/envs/project-with-survey/samiksha_env && \ curl -L -o entity-management/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/entity_management_env && \ curl -L -o user/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/user_env && \ -curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/envs/with-survey/interface_env && \ +curl -L -o interface-service/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/envs/project-with-survey/interface_env && \ curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuide-3.4/documentation/3.4.0/native/envs/stand-alone/scheduler_env ``` @@ -194,11 +280,19 @@ curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/ 9. **Update Cloud Credentials for Project Service** - To enable full functionality, including certificate generation and report storage, you must configure cloud credentials in the Project Service environment file. + To enable full functionality—including certificate generation, attachment uploads, and report storage—you must configure cloud credentials in the environment files for both services. + + A. Project Service Configuration Path: + ```./ELEVATE-Project/project-service/.env + ``` + + B. Samiksha (Survey & Observation) Service Configuration Path: + ```./ELEVATE-Project/samiksha-service/.env + ``` + - Path: ./ELEVATE-Project/project-service/.env - Add or update the following variables in the .env file, substituting the example values with your actual cloud credentials: + Add or update the following variables in the .env file, substituting the example values with your actual cloud credentials: CLOUD_STORAGE_PROVIDER=gcloud CLOUD_STORAGE_ACCOUNTNAME=your_account_name @@ -211,17 +305,17 @@ curl -L -o scheduler/src/.env https://raw.githubusercontent.com/ELEVATE-Project/ For detailed configuration options, supported cloud providers, and integration guidelines, please refer to the official documentation available in this [ReadMe](https://www.npmjs.com/package/client-cloud-services?activeTab=readme) -10. **Insert Initial Data** +11. **Insert Initial Data** 1. Download `entity-project-sample-data.sh` Script File: ``` - curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/scripts/with-survey/ubuntu/project_entity_sample_data.sh && \ + curl -o project_entity_sample_data.sh https://raw.githubusercontent.com/ELEVATE-Project/project-service/refs/heads/setupGuideWithSurvey/documentation/3.4.0/native/scripts/project-with-survey/ubuntu/project_entity_sample_data.sh && \ chmod +x project_entity_sample_data.sh && \ ./project_entity_sample_data.sh ``` -11. **Start The Services** +12. **Start The Services** Following the steps given below, 2 instances of each ELEVATE-Project backend service will be deployed and be managed by PM2 process manager. From 911ac540d208290d5fc8e0523fb55cc18c3c34d7 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 31 Dec 2025 19:59:14 +0530 Subject: [PATCH 062/119] changes-for-survey --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a757287e..189aa277 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ This setup integrates the Projects Service with the **Samiksha Service**, provid
1. Ubuntu Setup
-Go to the detailed Ubuntu Docker setup guide: **SETUP_SAMIKSHA_DOCKER_UBUNTU.md** +Go to the detailed Ubuntu Docker setup guide: **SETUP_SAMIKSHA_DOCKER_UBUNTU.md**
From 229104ebb49e385a0dfd31f8982c3a49786262c1 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 31 Dec 2025 19:59:45 +0530 Subject: [PATCH 063/119] changes-for-survey --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 189aa277..5d34d44b 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Go to the detailed Windows Docker setup guide: **SETUP_SAMIKSHA_NATIVE_UBUNTU.md** +Go to the detailed Ubuntu Native setup guide: **SETUP_SAMIKSHA_NATIVE_UBUNTU.md**
From a0ad22125edfb4e53cfe2e7063f870b4a8fc6a83 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Wed, 31 Dec 2025 20:29:55 +0530 Subject: [PATCH 064/119] main-readMe --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a757287e..5d34d44b 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ This setup integrates the Projects Service with the **Samiksha Service**, provid
1. Ubuntu Setup
-Go to the detailed Ubuntu Docker setup guide: **SETUP_SAMIKSHA_DOCKER_UBUNTU.md** +Go to the detailed Ubuntu Docker setup guide: **SETUP_SAMIKSHA_DOCKER_UBUNTU.md**
@@ -121,7 +121,7 @@ Go to the detailed Windows Docker setup guide: **SETUP_SAMIKSHA_NATIVE_UBUNTU.md** +Go to the detailed Ubuntu Native setup guide: **SETUP_SAMIKSHA_NATIVE_UBUNTU.md**
From d248d76cd713ad556b7d96a7cbd8a1b842261ceb Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 1 Jan 2026 10:39:16 +0530 Subject: [PATCH 065/119] main-readMe --- README.md | 2 ++ .../EMS-Project-Service.drawio.png | Bin 0 -> 2555641 bytes 2 files changed, 2 insertions(+) create mode 100644 documentation/3.4.0/database-diagram/EMS-Project-Service.drawio.png diff --git a/README.md b/README.md index 5d34d44b..4958ff14 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,8 @@ With implementation scripts, you can seamlessly add new projects to the system. --- +![Architecture Diagram](documentation/3.4.0/database-diagram/EMS-Project-Service.drawio.png) + ## šŸ¤ Team diff --git a/documentation/3.4.0/database-diagram/EMS-Project-Service.drawio.png b/documentation/3.4.0/database-diagram/EMS-Project-Service.drawio.png new file mode 100644 index 0000000000000000000000000000000000000000..08d4ed08900255a896d31c3d1bc72ba421885eb8 GIT binary patch literal 2555641 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