This repository contains the entire system for the StakeholderComputer
project, which uses blockchain and IPFS for data storage and verification.
To give a visual representation of the data flow in the StakeholderComputer project, refer to the following diagrams:
.
├── config.js
├── config.json
├── Dockerfile
├── logfiles
│ ├── combined.log
│ └── error.log
├── package.json
├── README.md
└── src
├── server.js
├── smartcontract
│ ├── builds
│ │ └── compiledContract.json
│ ├── contractInteract
│ │ └── contractInteract.js
│ ├── contracts
│ │ └── BlockOasisAggregator.sol
│ ├── README.md
│ ├── scripts
│ │ └── compile.js
│ └── utils
│ └── utils.js
└── utils
├── blockchainListener.js
├── dataVerification.js
├── downloads
│ └── QmS4WX3S6D7HePgUtF9uPBQoCoAyyErkddT5PVDYD4U7MC
│ └── chunk-1693175358377.csv
├── file-retrieval
│ ├── binaries
│ │ ├── car
│ │ └── lassie
│ ├── err
│ │ └── stderr.log
│ ├── extracted
│ ├── file-retrieval.js
│ ├── package.json
│ └── README.md
├── logger.js
└── queryIPFS.js
-
config.js
andconfig.json
: Configuration files, possibly storing settings, keys, or other information required by the project. -
Dockerfile
: Contains the setup instructions to Dockerize the project. -
logfiles
: Directory containing logs. These logs (combined.log
anderror.log
) provide details on system operations and errors. -
src
: Source code directory.-
server.js
: The main entry point of the application. -
smartcontract
: Directory containing everything related to the smart contract. This includes the solidity contract itself, utilities for interacting with the contract, and a compilation script.For more details, refer to its internal README.
-
utils
: Contains utility scripts and files essential for the system's functioning:blockchainListener.js
: Listens to blockchain events and retrieves data.dataVerification.js
: Verifies the data coming from the blockchain.file-retrieval
: Contains scripts and binaries related to file retrieval from IPFS.- For more details, refer to its internal README.
logger.js
: Logging utility for the project.queryIPFS.js
: Contains utilities for querying IPFS.
For more details, refer to its internal README.
-
-
package.json
andpackage-lock.json
: Standard Node.js files containing metadata about the project, its dependencies, and other configurations.
To run the StakeholderComputer project:
-
Ensure you have Node.js and npm installed.
-
Navigate to the root directory of the project.
-
Install dependencies:
npm install
-
Start the server:
npm start
-
For more specific functionalities, such as testing or interacting with specific parts of the system, refer to the appropriate README files within subdirectories (e.g.,
smartcontract/README.md
for details on the smart contract).
If you'd like to run the StakeholderComputer
project inside a Docker container, follow these steps:
-
Ensure you have Docker installed on your machine.
-
Navigate to the root directory of the project and build the Docker image:
docker build -t stakeholdercomputer .
-
Run the Docker container:
docker run -p 3000:3000 stakeholdercomputer
Note: Adjust the port numbers if your application uses a different port.
The project relies on several Node.js libraries, including axios
, ethers
, fs
, path
, rxjs
, solc
, and winston
. The specific versions of these dependencies are detailed in package.json
.
Please ensure you have the necessary environment and tools installed and correctly configured. Always remember to handle sensitive information, such as private keys, securely. Avoid pushing sensitive data to public repositories.