It's final project for 1112 NCNU CSIE "Principles and Practice of Blockchains"
We have implemented a Crypto Credit Card System, and this repository focuses on the web interface part.
However, many functions have not been fully implemented, and there are still numerous security issues that need to be addressed.
Additionally, You can find smart contract here
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
See Vite Configuration Reference.
-
Deploy the contracts in the smart contract repo
-
clone this repo
git clone $THIS_REPO_LINK
-
Install the project dependencies
cd Credit-Card-System-web npm install
-
Copy
.env.example
to.env
, and edit your configurations.cp .env.example .env vim .env
VITE_CHAIN_ID = the ID of the blockchain which you deployed, like 0x539(5173) is for Ganache VITE_SBT_ADDR = SBT contract's address VITE_BANK_ADDR = Bank contract's address VITE_BACKEND_PREFIX = Your backend server's prefix url: like http://192.168.0.102:5000 VITE_FRONTEND_PREFIX = You frontend's prefix: like http://192.168.0.112:5173
-
Compile and Hot-Reload for Development
npm run dev
or you can Minify for Production
npm run build
- Run backend api server
cd Credit-Card-System-web/backend python main.py
After setting up the frontend and backend servers, you can open your browser and access the frontend page.
Once the page is loaded, you can connect your MetaMask wallet and proceed to register and log in to the application.