VCoS la he thong quan ly va xac thuc chung chi hoc tap phi tap trung duoc xay dung tren nen tang Sui Blockchain. He thong cho phep cac co so giao duc cap phat chung chi duoi dang NFT Soulbound (khong the chuyen nhuong), dam bao tinh minh bach, bao mat va khong the gia mao.
- Kien truc he thong
- Cong nghe su dung
- Cay thu muc
- Huong dan cai dat
- Cau hinh moi truong
- Chay ung dung
- Tai lieu tham khao
Xem chi tiet tai: docs/architecture.md
| Cong nghe | Phien ban | Muc dich |
|---|---|---|
| Sui Network | Testnet | Nen tang blockchain chinh |
| Move Language | 2024.beta | Ngon ngu viet smart contract |
| Sui Framework | testnet | Thu vien chuan cua Sui |
| Cong nghe | Phien ban | Muc dich |
|---|---|---|
| Next.js | 15.5.4 | React framework |
| React | 18.3.1 | UI library |
| TypeScript | 5.9.2 | Ngon ngu lap trinh |
| TailwindCSS | 3.4.17 | CSS framework |
| @mysten/sui | 1.45.0 | Sui SDK |
| @mysten/dapp-kit | 0.19.9 | Sui dApp toolkit |
| @dynamic-labs/sdk-react-core | 4.39.0 | Wallet authentication |
| @dynamic-labs/sui | 4.39.0 | Sui wallet connector |
| @tanstack/react-query | 5.90.10 | Data fetching |
| Axios | 1.12.2 | HTTP client |
| SWR | 2.3.6 | Data fetching hooks |
| Cong nghe | Phien ban | Muc dich |
|---|---|---|
| Node.js | LTS | Runtime environment |
| Express.js | 4.21.2 | Web framework |
| MSSQL | 12.0.0 | SQL Server driver |
| JWT (jsonwebtoken) | 9.0.2 | Authentication |
| JWKS-RSA | 3.2.0 | JWT key verification |
| Multer | 1.4.5 | File upload |
| CORS | 2.8.5 | Cross-origin resource sharing |
| Express Rate Limit | 8.1.0 | API rate limiting |
| Node-cache | 5.1.2 | In-memory caching |
| Cong nghe | Phien ban | Muc dich |
|---|---|---|
| Microsoft SQL Server | 2019+ | Co so du lieu quan he |
| Pinata IPFS | Cloud | Luu tru phi tap trung |
| IPFS HTTP Client | 60.0.0 | IPFS interaction |
| Module | Chuc nang |
|---|---|
| certificate_request | Quan ly yeu cau chung chi |
| certificate | Mint NFT Soulbound |
suipj/
|
|-- contracts/ # Smart contracts (Move)
| |-- cert/
| | |-- certificate/ # Module mint NFT Soulbound
| | | |-- Move.toml
| | | |-- sources/
| | | | |-- certificate.move
| | | |-- tests/
| | | | |-- certificate_tests.move
| | | |-- build/
| | |
| | |-- certificate_request/ # Module quan ly yeu cau
| | |-- Move.toml
| | |-- sources/
| | | |-- certificate_request.move
| | |-- tests/
| | |-- certificate_request_tests.move
| |
| |-- request/ # Module request (deprecated)
| |-- token/ # Module token (reserved)
|
|-- ui/ # Frontend (Next.js)
| |-- components/
| | |-- account.tsx # Component quan ly tai khoan
| | |-- audit_req.tsx # Component gui audit len Bo
| | |-- create.tsx # Component tao chung chi
| | |-- nft.tsx # Component mint NFT
| | |-- request.tsx # Component yeu cau
| | |-- verify_request.tsx # Component xac minh
| | |-- walletconnect.tsx # Component ket noi vi
| |
| |-- pages/
| | |-- _app.tsx # App configuration
| | |-- index.tsx # Trang chu
| | |-- login.tsx # Trang dang nhap
| | |-- root.tsx # Trang quan tri Bo GD
| | |-- org.tsx # Trang quan tri Truong
| | |-- admin_org.tsx # Trang quan tri Khoa
| | |-- user.tsx # Trang sinh vien
| | |-- verify.tsx # Trang xac minh chung chi
| |
| |-- styles/
| | |-- globals.css # Global styles
| |
| |-- utils/
| | |-- sui.ts # Sui blockchain utilities
| | |-- ipfs.ts # IPFS utilities
| |
| |-- image/ # Static images
| |-- package.json
| |-- tsconfig.json
| |-- next.config.js
| |-- tailwind.config.js
| |-- postcss.config.js
|
|-- src/ # Backend (Express.js)
| |-- app.js # Entry point
| |-- package.json
| |
| |-- config/
| | |-- db.js # Database configuration
| |
| |-- middleware/
| | |-- auth.js # JWT authentication
| |
| |-- routes/
| | |-- auth.js # Authentication routes
| | |-- certificates.js # Certificate routes
| | |-- organizations.js # Organization routes
| | |-- users.js # User routes
| | |-- verify.js # Verification routes
| |
| |-- services/
| | |-- cache.js # Caching service
| | |-- db.js # Database service
| | |-- ipfs.js # IPFS service
| | |-- jwt.js # JWT service
| |
| |-- uploads/ # Temporary uploads
|
|-- databse/ # Database scripts
| |-- db1.sql # Schema definition
| |-- test.sql # Test data
|
|-- docs/ # Documentation
| |-- readme.md # This file
| |-- architecture.md # System architecture
| |-- LICENSE # License file
|
|-- package.json # Root package
|-- tsconfig.json # TypeScript config
|-- .env # Environment variables (backend)
|-- .env.local # Environment variables (frontend)
- Node.js 18.x hoac cao hon
- npm hoac yarn
- Sui CLI
- Microsoft SQL Server 2019+
- Git
Windows (Chocolatey):
choco install suiMacOS (Homebrew):
brew install suiKiem tra:
sui --versiongit clone https://github.com/dui14/dAPP-Sui-storage-doanchuyenganh.git
cd suipj# Root
npm install
# Frontend
cd ui
npm install
# Backend
cd ../src
npm install- Tao database tren SQL Server
- Chay script
databse/db1.sqlde tao cac bang
NEXT_PUBLIC_DYNAMIC_ENV_ID=7e2c57a4-316f-467f-b11a-cafc5df99993
NEXT_PUBLIC_API_URL=http://localhost:5000# Server
PORT=5000
FRONTEND_URL=http://localhost:3000
# Database
DB_USER=your_username
DB_PASSWORD=your_password
DB_SERVER=localhost
DB_NAME=edu
# JWT
JWT_PUBLIC_KEY_URL=https://app.dynamic.xyz/api/v0/sdk/7e2c57a4-316f-467f-b11a-cafc5df99993/.well-known/jwks
# Pinata IPFS
PINATA_API_KEY=your_api_key
PINATA_SECRET_KEY=your_secret_key
PINATA_JWT=your_jwt_tokenDam bao SQL Server dang chay va database da duoc tao.
cd src
node app.jsBackend se chay tai: http://localhost:5000
cd ui
npm run devFrontend se chay tai: http://localhost:3000
| Vai tro | Mo ta | Trang |
|---|---|---|
| admin_root | Bo Giao duc va Dao tao | /root |
| org | Truong Dai hoc | /org |
| admin_org | Khoa/Phong ban | /admin_org |
| user | Sinh vien | /user |
1. Sinh vien gui yeu cau --> Khoa duyet
2. Khoa duyet --> Truong tao chung chi + Upload IPFS
3. Truong ky on-chain (verify_by_university)
4. Bo GD duyet on-chain (approve_by_ministry)
5. Truong mint NFT Soulbound cho sinh vien
- POST /api/auth/login
- POST /api/auth/logout
- GET /api/users/me
- PUT /api/users/wallet
- GET /api/organizations
- POST /api/organizations
- PUT /api/organizations/:id
- DELETE /api/organizations/:id
- GET /api/certificates/requests
- POST /api/certificates/requests
- PUT /api/certificates/requests/:id
- PUT /api/certificates/requests/:id/blockchain
- PUT /api/certificates/requests/:id/nft-minted
create_request()- Tao yeu cau chung chiverify_by_university()- Truong xac nhan va tra phiapprove_by_ministry()- Bo GD phe duyetreject_by_ministry()- Bo GD tu choi
mint_certificate()- Mint NFT Soulboundrevoke_certificate()- Thu hoi chung chi
MIT License - Xem chi tiet tai LICENSE
- Repository: dui14/dAPP-Sui-storage-doanchuyenganh
- Branch: main