bitcoin-sv / bsv-faucet

https://bsv-faucet.vercel.app
MIT License
1 stars 8 forks source link

#02 All: Dashboard, Fund request from Faucet #10

Open mo-jaber opened 3 days ago

mo-jaber commented 3 days ago

Description: Create a dashboard for all users on login will see, that can allow them to request BSV tokens from the faucet and have a summary view:

Business Rules:

  1. Users can request funds by entering their Bitcoin SV address (ensure it is a valid testnet BSV address format)
  2. Include a captcha to prevent spamming.
  3. Maximum amount per request is 100,000,000 Satoshis (1 BSV)
  4. Requests are allowed every 24 hours
  5. Display the amount requested and the faucet balance

Acceptance Criteria:

  1. Ensure the database schema structure is created and migration scripts run.
  2. I can request testnet tokens from the faucet after logging into my account.
  3. The system checks my total daily requests to ensure that I have not exceeded the 1 BSV per day / 100,000,000 Satoshis per 24 hour period.
  4. If my request combined with previous requests for the day exceeds 1 BSV per day / 100,000,000 Satoshis per 24 hour period. the system displays an error message indicating I have reached the daily limit.
  5. If my request is within the allowed daily limit, the system processes the transaction and sends the requested amount to my testnet wallet address or paymail address provided in the text field.
  6. The system shows a confirmation message with transaction details, including transaction ID (with the [[test.whatsonchain.com] and all relevant details in the /requests history page.
  7. I can view the remaining balance of my daily limit on the faucet interface, updated in real-time after each request.
  8. The daily limit resets every 24 hours, before allowing me to make new requests the next day.
  9. The system logs each transaction attempt and tracks my daily request history
Benjtalkshow commented 3 days ago

Hello @mo-jaber I would like to work on this task but these issues seem not to be available on onlydust. Can I apply here?

Jemiiah commented 3 days ago

Hello @mo-jaber I would like to work on this task but these issues seem not to be available on onlydust. Can I apply here?

@Benjtalkshow There's till a certain time before we can start applying via OnlyDust

Jemiiah commented 3 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello @mo-jaber I'm a front-end web 3 developer I have always been contributing to previous OD Hack project and my first time on this repository here is my github profile : https://github.com/Jemiiah and over 55 + contribution on onlydust here is my onlydust profile : https://app.onlydust.com/u/Jemiiah

How I plan on tackling this issue

  1. Design the Dashboard Layout I will start by designing a clean and user-friendly dashboard that displays key data like:

    i. Faucet balance ii. User's total requests to date iii. Time remaining before the next request iv. Recent requests (up to the last 5)

Keep it simple, but intuitive. I’ll focus on a layout with a prominent "Request Funds" button that leads the user through the process of entering their Bitcoin SV address or Paymail.

  1. User Request Form Create a request form where users can input their Bitcoin SV address or Paymail. Next to it, I’ll add a simple but effective CAPTCHA (e.g., reCAPTCHA) to prevent spam and automated requests.

    Validation rules:

The system will validate the entered BSV or Paymail address format before submission. Ensure the amount requested does not exceed 100,000,000 Satoshis (1 BSV).

  1. Backend Interaction for Requests For each request, on submission:

I'll integrate with the faucet’s backend (probably using some sort of API call or smart contract interaction) to send the BSV tokens to the user’s address. Set up logic to check if the user has already reached the daily limit (e.g., storing request timestamps and amounts in a database). If they have, prevent further requests until the 24-hour period resets.

  1. Handle the Request Logic Using JavaScript or a Web3 library, I’ll write the logic that:

Submits the transaction to the Bitcoin SV faucet backend Displays real-time feedback (e.g., showing a loading spinner until the request is confirmed) Fetches the remaining balance of the user's daily limit from the faucet and shows it on the UI in real-time

Transaction Confirmation After a successful transaction, display a confirmation message that includes:

  1. Transaction details (e.g., amount sent, transaction ID) A link to the transaction on an explorer like test.whatsonchain.com If the request fails (e.g., they've exceeded the daily limit), show an error message indicating the issue. This should be specific enough to inform the user why the request failed.

  2. Real-time Balance & Request History Once the transaction goes through, update the user’s view to show:

Remaining balance from their daily limit (e.g., 0.5 BSV left after requesting 0.5 BSV) Countdown timer for the next allowed request (i.e., 24 hours from the last request) The top 5 most recent requests (date, amount, and transaction ID) in a user-friendly format

  1. Rate Limiting Include a backend check to ensure no user exceeds the request limit of 1 BSV per day. Each time a user requests tokens, the backend will compare the total amount they’ve requested within the past 24 hours and reject the request if it would exceed the limit.

  2. Test Everything Thoroughly Once the frontend is implemented, I’ll make sure to test the request process thoroughly:

Test both Bitcoin SV and Paymail inputs Ensure the daily limit logic works by trying to submit multiple requests in 24 hours Validate the CAPTCHA and other input fields Confirm transaction details are correctly displayed post-request with an ETA : 72 hours(3 day)

josephchimebuka commented 3 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am Joseph I am a frontend developer and blockchain developer and I am also an active contributor here on only dust here is my profile https://app.onlydust.com/u/josephchimebuka. This is my first time to contribute to this repo ill appreciate the opportunity to contribute. this is a couple of frontend and blockchain projects i have built https://metacrypt.vercel.app/ https://mattedsgn.com/

How I plan on tackling this issue

I will create a dashboard for all users on login and ensure it meets the criteria for acceptance in 4-5 days

Ugo-X commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a Full Stack Blockchain Developer with demonstrable expertise across modern web and blockchain technologies. My tech stack centers on Next.js, TypeScript, React, and Node.js for web development, complemented by Three.js for 3D experiences, and Solidity/Rust for blockchain solutions.

What sets me apart is my proven track record on OnlyDust, where I've made 83 significant contributions across 15 different projects since Edition 1. This extensive involvement reflects my ability to deliver quality solutions under tight deadlines while adapting to diverse project requirements.

With my deep experience in hackathon environments, I bring both technical excellence and practical development skills to the table. I'm confident I can contribute meaningfully to pushing the boundaries of what's possible in blockchain development while maintaining a focus on user-centric solutions.

My profile (https://app.onlydust.com/u/Ugo-X) showcases my consistent ability to deliver results across various blockchain challenges. I'm excited to bring this experience and drive for innovation to your team.

How I plan on tackling this issue

Implementation Plan:

Database Setup:

Frontend Implementation:

Backend Development:

Main Considerations:

ShantelPeters commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have a solid background in full-stack web development, particularly in implementing user management systems and role-based access controls. My experience includes developing responsive user interfaces and integrating backend functionality with front-end frameworks. This background equips me to create an intuitive and efficient dashboard that meets the specified requirements, ensuring a seamless user experience while managing BSV token requests.

How I plan on tackling this issue

To implement the dashboard, I will first design a user-friendly interface that includes the necessary fields for requesting BSV tokens, displaying request limits, and showing recent history. I will set up the backend to handle user requests, ensuring it checks against daily limits and validates addresses. Incorporating a CAPTCHA will help mitigate spam requests. I'll implement real-time updates for users to view their request status and balance. Additionally, I'll ensure proper logging of transactions and provide a robust testing strategy to verify functionality meets all acceptance criteria.

aniruddhaaps commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a python dev . A new-comer here, willing and ready to contribute to solve the issue.

mimisavage commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi, I’m Mimi Sav, a frontend and blockchain developer. This is my first time contributing to this repository, and I'm excited about the opportunity to collaborate. My core skills include Next.js, TypeScript, React, and Node.js for dynamic web applications, alongside Three.js for stunning 3D visuals.

How I plan on tackling this issue

Database Architecture: I will establish a database framework that includes a user table to monitor request limits and a transaction history table to record all requests. User Interface Development: I will design a user-friendly request form featuring address input and CAPTCHA verification to prevent spam. Additionally, I will create a dashboard that showcases usage statistics and recent request history. Server-Side Logic: I will implement a backend system that handles BSV token transfers using the appropriate SDK. This will include setting up daily limit checks, automating limit resets, and logging all transactions for accountability. Key Considerations Configuring the faucet wallet to ensure secure transactions. Validating BSV transfers to maintain integrity. Implementing rate limiting to prevent abuse and ensure fair access for all users.

Ugo-X commented 1 day ago

Thanks chief, will get to it