💡 전기차 배터리의 생산부터 재활용까지 전 과정을 투명하게 추적하는 블록체인 기반 이력 관리 플랫폼 제안
💡 채널 기반의 데이터 공유로 민감한 정보 보호, 이해관계자 간의 신뢰를 구축하는 안전한 공급망 관리 시스템 구현
팀원 | 역할 소개 |
---|---|
이상명 |
- 블록체인 네트워크 구축 (Hyperledger Fabric) - 채널 설계 (Organization, Channel) - 체인코드 개발 (Chaincode) - Fabric Gateway 구현 |
황인준 |
- Backend 서버 개발 (Spring Boot) - Rest API 설계 및 구축(Spring JPA) 개발 - DataBase 설계 (MySQL) |
김병진 |
- UI 설계 및 디자인 - 웹 퍼블리싱, 기능 구현 (React.js) |
-
채널과 Fabric MSP를 활용한 권한 처리를 통해 조직별 보안 강화
-
블록체인 네트워크를 활용해 배터리 제조 및 재활용 데이터의 무결성 보장
-
배터리 라이프사이클과 데이터 흐름 시각화
-
배터리 제조, 유지보수, 재활용 과정을 정의하고 라이프사이클이 지속적으로 순환하도록 설계
- Spring Boot, Spring Security JWT 활용한 회원가입, 로그인 구현
분야 | 사용 기술 및 도구 |
---|---|
Programming Languages | - Java 21.0.3 - JavaScript 20.9.0 - Go 1.20.4 |
Framework | - React.js 18.3.1 - Node.js 20.9.0 - Spring 1.1.6 - Spring Boot 3.1.2 - Spring Security 6.3.1 - Hyperledger Fabric 2.5.9 |
DataBase | - MariaDB 11.4.2 - H2 2.2.224 |
Containerization Tools | - Docker 24.0.6 - Docker Compose 2.18.1 |
Template Engine | - Thymeleaf 3.3.2 |
Build Tool | - Gradle 8.8 |
이름 | 내용 |
---|---|
메인 페이지 | |
로그인 페이지 | |
회원가입 페이지 | |
원자재 목록 조회 | |
원자재 상세 조회 | < |
배터리 목록 조회 | |
배터리 상세 조회 | |
배터리 일반 정보 조회 | |
배터리 구성 및 원자재 비율 조회 | |
정비 이력 조회 |
본 프로젝트는 다음과 같은 단계에 따라 관련 패키지들의 설치와 빌드를 수행할 수 있습니다.
# Move to the directory where Fabric samples will be installed
mkdir -p $HOME/go/src/github.com/<your_github_userid>
cd $HOME/go/src/github.com/<your_github_userid>
# Download Fabric samples, Docker images, and binaries
curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && chmod +x install-fabric.sh
./install-fabric.sh d s b
# Clone Capstone-2024-team-43 inside of Fabric Sample
cd fabric-samples
git clone https://github.com/pnucse-capstone-2024/Capstone-2024-team-43.git
cd ./Capstone-2024-team-43
# Set Environment Variable
export PATH=${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=$PWD/../config/
# Start the network and deploy
./network.sh up -ca
# Create the material-supply-channel and deploy chaincode
./network.sh createChannel -c material-supply-channel
./network.sh deployCC -ccn material -ccp ./chaincode/material-supply/ -ccl go -c material-supply-channel
# Create the battery-ev-channel and deploy chaincode
./network.sh createChannel -c battery-ev-channel
./network.sh deployCC2 -ccn batteryev -ccp ./chaincode/battery-ev/ -ccl go -c battery-ev-channel
# Create the battery-update-channel and deploy chaincode
./network.sh createChannel -c battery-update-channel
./network.sh deployCC3 -ccn batteryupdate -ccp ./chaincode/battery-update/ -ccl go -c battery-update-channel
# Create the recycled-material-extraction-channel and deploy chaincode
./network.sh createChannel -c recycled-material-extraction-channel
./network.sh deployCC4 -ccn recycledmaterialextraction -ccp ./chaincode/recycled-material-extraction/ -ccl go -c recycled-material-extraction-channel
# Create the recycled-material-supply-channel and deploy chaincode
./network.sh createChannel -c recycled-material-supply-channel
./network.sh deployCC5 -ccn recycledmaterialsupply -ccp ./chaincode/recycled-material-supply/ -ccl go -c recycled-material-supply-channel
# Create the public-channel and deploy chaincode
./network.sh createChannel -c public-channel
./network.sh deployCCPublic -ccn public -ccp ./chaincode/public -ccl go -c public-channel
# Additional PATH configuration
export PATH=$PATH:$HOME/go/src/<your_github_userid>/<your folder>/fabric-samples/bin
#Example Ports: org1 = 7051, org2 = 8051, org3 = 6051, org4 = 5051, org5 = 4051, org6 = 3051, org7 = 2051
# Example: Set environment variables for org1 and register the user
export FABRIC_CA_CLIENT_HOME=${PWD}/organizations/peerOrganizations/org1.example.com/
export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_LOCALMSPID=Org1MSP
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp
export CORE_PEER_ADDRESS=localhost:7051
# Register and issue a certificate for org1 user
fabric-ca-client register --caname ca-org1 --id.name org1User --id.secret org1UserPW --id.type client --tls.certfiles ${PWD}/organizations/fabric-ca/org1/ca-cert.pem
fabric-ca-client enroll -u https://org1User:org1UserPW@localhost:7054 --caname ca-org1 -M ${PWD}/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp --tls.certfiles ${PWD}/organizations/fabric-ca/org1/ca-cert.pem
# Apply the same method for org2 through org7
# Configure and start the API server
cd backend
npm install fabric-network fabric-ca-client express cors
node registerIdentity.js
node app.js
# ! recommended to delete the wallet if necessary
# Install and start the React frontend
cd BEINUS/beinus
npm install
npm run start
# Move to the project directory, build, and run
cd /root/go/src/github.com/<your_github_userid>/<your folder>/fabric-samples/fabric2/login/capstone
chmod +x ./gradlew
./gradlew build --exclude-task test # Skip tests and build
# Install and run H2 database if needed
./gradlew bootRun # Run the server
# Note: If H2 installation is not needed, run `./gradlew bootRun` directly.