🎓 Collaboration: This backend is developed in conjunction with the MedLedger XRPL project under the guidance of professors from the University of Leeds, United Kingdom.
Welcome to the MedLedger Backend, the server-side component of the MedLedger XRPL project. This backend is designed to handle authentication, QR code generation, and UUID verification for the MedLedger XRPL front-end. It serves as the bridge between the frontend and the XRPL, ensuring secure and efficient operations.
- Secure Authentication: Utilizing QR codes and UUIDs for a two-factor authentication process.
- XRPL Integration: Direct interactions with the XRP Ledger for blockchain-specific operations.
- Scalability: Designed to handle a large number of requests efficiently.
- Modular Design: Clear separation of concerns with modular routes and controllers.
Follow these steps to set up the MedLedger Backend on your local machine:
-
Clone the Repository:
git clone https://github.com/Masters-Project-University-of-Leeds/medledger-backend.git
-
Navigate to the Project Directory:
cd medledger-backend
-
Install Dependencies: If you're using npm:
npm install
If you're using yarn:
yarn install
-
Set Up Environment Variables: Copy the
.env.example
file and rename it to.env
. Fill in the required environment variables. -
Start the Server: If you're using npm:
npm start
If you're using yarn:
yarn start
The server should now be running on the specified port (default is 3000). You can access it at http://localhost:3000
.
Description:
Handles the generation of QR codes for authentication.
Request Body:
{
"userAddress": "string"
}
Success Response:
{
"uuid": "string",
"qr_png": "string (URL to the generated QR code)"
}
Error Response:
{
"error": "Description of the error"
}
Description:
Manages user sign-in operations. Validates user credentials and, upon successful validation, returns a JWT token.
Request Body:
{
"userAddress": "string"
}
Success Response:
{
"token": "string (JWT token)",
"type": "string (User type: Admin/User)"
}
Error Response:
{
"error": "Description of the error"
}
Description:
Verifies the UUID provided during the authentication process. Validates the user's unique identifier with the Xumm app.
Request Parameters:
{
"uuid": "string"
}
Success Response:
{
"payload_uuidv4": "string",
"exists": "boolean",
"is_xapp": "boolean",
"user_token": "boolean",
"multisign": "boolean",
"submit": "boolean",
"destination": "string",
"resolved_at": "string",
"txid": "string",
"txblob": "string",
"payload": {
"application_uuidv4": "string",
"response": {
"account": "string",
"txjson": {
"TransactionType": "string",
"Account": "string",
...
}
},
"custom_meta": {
"identifier": "string",
"blob": "string",
"instruction": "string"
}
}
}
Error Response:
{
"error": "Description of the error"
}
This project is licensed under the MIT License. The license provides all the details regarding permissions, conditions, and disclaimers.
For collaborations, contributions, queries, or suggestions, feel free to reach out via email.