Code for dotreasury.com
The scan package is responsible for scanning the blockchain and save treasury-related data to the database, the data will be used by the server package.
$ cd packages/scan
$ mv .env.sample .env
$ node src/index.js
The server package implements a set of RESTful APIs to serve data collected by Scan and provide functionalities like users system, comments, admin, etc...
In packages/server/.env file, you should add the following configurations.
JWT_SECRET_KEY=xxxxxxxxxxx
ALI_MAIL_KEY=xxx
ALI_MAIL_SECRET=xxx
ALI_MAIL_FROM=xxx
ADMINS=your_kusama_address1|your_kusama_address2
$ cd packages/server
$ node src/index.js
The site package is a SPA front-end that consumes data from Server APIs.
In packages/site/.env file, point to your server API URL
VITE_APP_SCAN_SERVER=http://localhost:3213/
VITE_APP_SOCKET_IO_URL=http://localhost:3213/
Then, run it.
$ cd package/site
$ yarn start