Skip to content

tsi-coop/tsi-ratings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TSI Ratings App

TSI Ratings is an objective diagnostic framework that provides a data-driven roadmap for businesses' digital maturity. More importantly, it bridges the gap between operational health and finance by transforming that digital maturity into verifiable digital collateral.

Note: We developed this as part of a blockchain hackathon. This solution is currently in the POC stage. We will revisit this soon.

Getting Started

Launch Note

Introduction

Functional Demo

Code Walkthrough

Sample Report

Prerequisites

Before you begin, ensure you have the following software installed on your development machine or server:

  • Java Development Kit (JDK) 17 or higher: Required to build and run the Java application.

    • Installation Steps:
      • Linux (Ubuntu/Debian):
        sudo apt update
        sudo apt install openjdk-17-jdk
      • Windows: Download the JDK 17 installer from Oracle (requires account) or Adoptium (Eclipse Temurin, recommended open-source distribution) and follow the installation wizard. Ensure JAVA_HOME environment variable is set and %JAVA_HOME%\bin is in your system's Path.
    • Verification:
      java -version
      javac -version
  • Apache Maven 3.6.0 or higher: Project build automation tool.

    • Installation Steps:
      • Linux (Ubuntu/Debian):
        sudo apt install maven
      • Windows: Download the Maven binary zip from the Apache Maven website, extract it, and add the bin directory to your system's Path environment variable.
    • Verification:
      mvn -v
  • Docker Desktop (or Docker Engine + Docker Compose): Essential for containerizing and running the application and database locally.

    • Installation Steps:
      • Windows: Download and install Docker Desktop from the official Docker website.
      • Linux: Follow the official Docker Engine installation guide for your specific distribution (e.g., Docker Docs). Install Docker Compose separately if using Docker Engine.
    • Configuration & Verification (Windows Specific):
      • Ensure WSL 2 is enabled and configured. Open PowerShell as Administrator and run wsl --install or wsl --update.
      • Verify virtualization (Intel VT-x / AMD-V) is enabled in your computer's BIOS/UEFI settings.
      • Start Docker Desktop and wait for the whale icon in the system tray to turn solid.
    • Verification:
      docker --version
      docker compose version # Or docker-compose --version for older installations
  • Git: For cloning the repository.

    • Installation Steps:
      • Linux (Ubuntu/Debian):
        sudo apt install git
      • Windows: Download the Git for Windows installer from git-scm.com and follow the installation wizard.
    • Verification:
      git --version
  • NodeJS: The JavaScript runtime environment for frontend app.

    • Installation Steps:

      • Navigate to the Node.js Downloads page.
      • Select the installer for your operating system (Windows, macOS, or Linux). Choose the LTS (Long-Term Support) version, as it is the most stable and recommended for most users.
      • Run the installer and follow the on-screen prompts. The installer will automatically set up both Node.js and npm.
    • Verification:

      node -v
  • BSV Blockchain: For anchoring the token.

Installation Steps

These steps describe how to install and run the TSI Ratings solution directly on a Linux/Windows server without using Docker.

  1. Clone the Repository:

    git clone https://github.com/tsi-coop/tsi-ratings.git
    cd tsi-ratings
  2. PostgreSQL Database Setup:

    • Log in as the PostgreSQL superuser (e.g., postgres user on Linux).
    sudo -i -u postgres psql
    • Create the database and user:
    CREATE DATABASE <<your-db-name-here>>;
    CREATE USER <<your-db-user-here>> WITH ENCRYPTED PASSWORD '<<your_db_password_here>>';
    GRANT ALL PRIVILEGES ON DATABASE <<your-db-name-here>> TO <<your-db-user-here>>;
    • Exit the postgres user: exit
    • Initialize Schema: Execute the db/init.sql script to create the necessary tables.
    psql -U <<your-db-user-here>> -d <<your-db-name-here>> -h localhost -f /path/to/tsi-ratings/db/init.sql
  3. Build WAR:

    cd /path/to/tsi-ratings
    mvn clean package

    This will generate target/tsi-ratings.war.

  4. Deploy Solution (linux):

    cd /path/to/tsi-ratings/server
    cp .example .env

    Now, edit the newly created .env file and fill in the placeholder values.

    ./set-base.sh #Sets the jetty base directory
    ./serve.sh # Copies the target/tsi-ratings.war to %JETTY_BASE%/webapps/ROOT.war. Starts the server in 8080
  5. Deploy Solution (windows):

    cd /path/to/tsi-ratings/server
    copy .example .env

    Now, edit the newly created .env file and fill in the placeholder values.

    set-base.bat #Sets the jetty base directory
    serve.bat # Copies the target/tsi_ratings.war to %JETTY_BASE%/webapps/ROOT.wat. Starts the server in 8080
  6. Deploy Web3 Module (windows):

    cd /path/to/tsi-ratings/web3
    copy .example .env

    Now, edit the newly created .env file and fill in the placeholder values.

    npm start
    

License & Contributions

This project is fully open-source and distributed under the Apache 2.0 License. You are completely free to fork, modify, and customize the codebase to fit your specific technical or enterprise needs without any restriction.

Contributing Back to the Main Project

If you have built an optimization, bug fix, or feature extension that you believe would add value to the core platform, we would love to review it. To ensure the main repository remains highly stable and securely managed, direct commits to the main branch are restricted.

If you wish to give back your changes to the project, please follow this process:

  • Email the Repository Owner: Send a brief summary of your modifications and a link to your code branch directly to admin@tsicoop.org.

Every contribution is manually evaluated for architectural alignment, readability, and long-term maintenance impact before integration. Thank you for respecting this workflow and helping us maintain a clean, resilient core!

References

Digital Maturity Assessment - How does it help?

Capability maturity assessment - how does it help?

TSI Digital Maturity Assessment

TSI Capability Maturity Assessment