README.md

# XRMine Platform

XRMine is a groundbreaking project designed to simplify and enhance the user experience with digital assets on the XRP Ledger (XRPL). Our platform integrates seamlessly with the XRPL and Xumm for user authentication and blockchain operations, focusing on creating a safer route into digital assets.

## Table of Contents

- [Features](#features)
- [Tech Stack](#tech-stack)
- [Getting Started](#getting-started)
- [Backend Setup](#backend-setup)
- [Frontend Experience](#frontend-experience)
- [API Endpoints](#api-endpoints)
- [Security Considerations](#security-considerations)
- [Contributing](#contributing)
- [License](#license)

## Features

- **User-Friendly Blockchain Interaction**: Allows users to manage custom tokens on XRPL with ease through a mobile-first approach using Xaman.
- **Engagement Rewards**: Users are rewarded with tokens for engaging with the platform, promoting active participation.
- **Trustline Management**: Automated checking and setting of trustlines for new users, essential for token interaction on XRPL.
- **Mining Interface**: Simulated mining interface for users to earn tokens based on interaction levels.

## Tech Stack

- **Blockchain**: XRP Ledger (XRPL) for token creation, transactions, and trustline management.
- **Mobile Authentication**: Xumm SDK for seamless mobile app-based authentication and interactions.
- **Backend**: 
  - Node.js with Express.js for server-side logic.
  - JSON files for simple data storage (to be replaced with a more robust DB in production).
- **Frontend**: 
  - HTML, CSS for static and responsive design.
  - JavaScript for client-side interactivity, leveraging Xumm and XRPL libraries.

## Getting Started

### Prerequisites

- Node.js and npm installed.
- Basic understanding of blockchain technologies, particularly the XRPL.

### Installation

1. **Clone the Repository:**
   ```bash
   git clone <repository-url>
    ```

    Install Dependencies:
    bash
    ```
npm install
     ```
Configuration:

    Set up environment variables for XRPL seed, Xumm API key, etc., in a .env file.

Start the Server:
bash
    ```
    npm start
    ```

Backend Setup

    Express Server: Handles HTTP requests, manages user data, and interacts with XRPL via the xrpl library.
    APIs: For tracking user engagement, sending tokens, and managing session data.


Frontend Experience

    Responsive Design: Optimized for both desktop and mobile with different layouts.
    User Journey: From login with Xumm, setting trustlines, to mining tokens, all guided through a user-friendly interface.
    Modal Overlays: For QR scanning to set trustlines or make transactions via Xumm.


API Endpoints

    /api/send-tokens: Distributes tokens based on user engagement.
    /api/user: Updates user session with wallet address after login.


Security Considerations

    Sensitive Data: Ensure environment variables are not pushed to version control.
    Rate Limiting: Implement to prevent DDoS attacks or excessive API usage.
    User Authentication: Utilizing Xaman for secure mobile authentication.


Contributing
Contributions are welcome! Please fork the repository, make changes, and submit a pull request.

License
This project is licensed under the MIT License - see the LICENSE.md file

Last updated