This system is a blockchain e-form system based on Vue+Express+FiscoBocs.
-
Upload and save the registered logistics data;
-
Upload and save commodity information data;
-
tracking logistics intermediate data, the transshipment transportation data in the middle of logistics will be tracked and traced, and listed in the form of a table;
-
Basic user management;
-
Basic management of commodity data and logistics form data, including creation, update, termination, and status management.
Theoretically, Linux can be deployed throughout the whole process, but in the end, for the convenience of demonstration and the use of ubuntu server to deploy the blockchain, we finally chose Windows + Linux hybrid.
Software | Version |
---|---|
NodeJS | 18+ |
NPM | 9.6+ |
Packages needed to run the base of the front and back end:
Package Name | Version |
---|---|
express | 4.18.2+ |
vite | 4.2.2+ |
All other packages are managed through NPM
The front-end executes in turn.
cd client
npm install
Wait for the installation to complete and the server will start on localhost:8000, make sure this port is not occupied.
npm run dev
Go to the server directory and modify db.js under /config to change the database connection to your configuration.
module.exports={
HOST: “localhost”, # your connection address
user: “root”, # the user to use
PASSWORD: “123321”, #Password
DB: “deliveryDB”, #database name
dialect: “mysql”, #type of database to connect to
}
The sql file is given
Go to webase.js under the same file and change a few variables in the header
const account = “”; #webase user
const accountPwd = “”; #Pwd of the password, which can be retrieved in F12 of the browser by performing a login in webase.
const groupId = ''; #The cluster of the operation
const contractAddr = “”; #Address of the contract
const xpxxy = “”; #User calling the contract
Enable terminal execution in the server directory:
npm install
Wait for the installation to complete and then execute:
node app.js
Need to make sure that port 3000 is not occupied, if it is occupied modify the port of app.js.
Refer to webase's official documentation for the complete deployment chapter WeBaseDoc Two files need to be modified after deployment is complete: application.yml under conf of webase-node-mgr.
....
Spring.
....
url:.... # Add &useSSL=false at the end
....
enableVerficationCode: false
The same goes for the fields under spring in the file with the same name under webase-sign's conf.
If it is a virtual machine, please open the virtual machine port 5000-5004.
If it is a remote server, please modify the connection address of each interface in webase.js.
The deployment of the contract can be done directly in the webase browser.
1.CommodityInfo.sol
2.LogisticsInfo.sol
3.LogisticsForm.sol
Translated with DeepL.com (free version)