The D-REC Initative has designed and created its own open-source automated monitoring, reporting and verification (MRV) platform. The platform will allow distributed renewable energy (DRE) assets to automativally submit meter generation data via an API, which will then be aggregated together and issued as a verified and tradeable D-REC.
Repository for Origin DREC project
Install wsl
,ubuntu-20.04
in command prompt running as administrator:
wsl --install
wsl --install --distribution Ubuntu-20.04
Install Influx-Client
:
sudo apt install influx client
sudo apt update
Restart the Ubuntu terminal once, after installation done.
Clone and Install nvm
:
sudo wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm install 20.14.0
Install rush
, pnpm
if you don't have it:
npm i -g @microsoft/rush
npm i -g pnpm
Create and change directory:
mkdir drec
cd drec
Clone repository: It should be cloned in both local and Ubuntu environment.
git clone https://github.com/drec/drec-origin.git
chmod -R 777 drec-origin/
Copy .env.example
to .env
and adjust .env
with your environment specific parameters.
cp .env.example .env
Start Postgres, Redis, InfluxDB instance
Please create and start your Postgres, Redis and InfluxDB by running below command in our root directory, after that anytime you can manage this images through your docker desktop installed on your system.
docker-compose up --build
Create Postgres DB table
psql -h localhost -p 5432 -U postgres -c "CREATE DATABASE origin"
Create Default Admin:
Please update below environment variables under defauld admin credential with the values that you wanted to create as default admin user.
ADMIN_EMAIL
ADMIN_PASSWORD
Install dependencies, Run db migrations:
rush install
rush build
Run API project
rush start:dev
You may also want to drop local databases with
rush drop
Go inside integrators-scripts folder Create a .env, copy everything from .env.example and change the necessary variables depending on the environment
npm i
npm run start
DREC_BLOCKCHAIN_ADDRESS
and MNEMONIC
in our .env fileISSUER_PRIVATE_KEY
Before running the script, make sure: