This project is a full-stack implementation of a proposed protocol enabling decentralized lending based on zero-knowledge proof-based credit fostering more efficient virtual asset liquidity.
-
in partial fulfillment of the requirements for COMP 4981 in the Department of Computer Science and Engineering, The Hong Kong University of Science and Technology;
-
and in partial fulfillment of the requirements for CPEG 4901 in the Computer Engineering Program Office, The Hong Kong University of Science and Technology.
The project principally follows a MERN-stack structure:
- Vite (frontend build tool for HMR support and faster builds)
- React Typescript
- Express Typescript
- Node.js
- The backend express app uses nodemon for HMR support.
- MongoDB (currently hosted via Mongo Atlas for dev)
- The backend uses the mongoose Object Data Modeling (ODM) library
- Python Executable
The frontend react app is separate from the backend express app, each having their own node package management.
./utils
currently contains utility functions for formatting
./public
should contain all the static files, like stylesheets, images etc. (e.g../public/images
)
The codebase uses a .env.local file for abstracting sensitive information from the source code that is published to Github.
The codebase uses .dotenv (/.env
) files for abstracting sensitive information from the source code that is published to GitHub.
The Python Local Script is compiled and packaged as an executable for accessibility and convenience.
This directory contains the source code of our deployed Smart Contract on-chain.
cd
into and runnpm install
in both the./backend
and./frontend
directories- Backend: create an
.env
file under./backend
first before runningnpm run dev
to start the backend server
MONGO_URI = <YourBackendEndpointAPI>
PORT = <SpecifiedBackendPort>
- Frontend: create an
.env.local
file under./frontend
first before runningnpm run dev
to start the frontend server
VITE_SEPOLIA_CONTRACT_ADDRESS = '0xe789df42675449166f8fcf0a0239b05973c6b9a7' (This is public address of our deployed Smart Contract)
VITE_LOCAL_SCRIPT_HOST = <SpecifiedLocalScriptHost: Expected 5000>
VITE_BACKEND_HOST = <SpecifiedBackendHost: Must be same as in ./backend/.env>