Skip to content

Latest commit

ย 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Stellar Tip Jar ๐Ÿ’ซ

A feature-rich, interactive Stellar tipping application designed for content creators. Built with React and Stellar SDK, seamlessly bridging the gap between creators and their supporters.


๐ŸŸก Yellow Belt

Ye section Yellow Belt Level 2 ke liye newly added code/features ka summary hai.

โœ… New Features Added

  • Multi-wallet integration: Freighter, Albedo, xBull support via StellarWalletsKit.
  • Contract integration: Frontend se Soroban smart contract invocation (record_tip) add kiya gaya.
  • On-chain contract read: Contract total tips read/sync support.
  • Real-time event sync: Contract events poll/stream karke analytics me live dikhaya ja raha hai.
  • Transaction lifecycle tracking: pending -> success/failed status flow implement.
  • Status visibility in UI: Transaction history badges + progress message panel.
  • Improved receipt details: Receipt me payment hash, contract hash, wallet name, error details.
  • 3 required error types handled:
    • Wallet not found
    • Wallet rejected
    • Insufficient balance

๐Ÿ” Updated Send Tip Flow

  1. User wallet select/connect karta hai.
  2. Payment transaction build + sign + submit hota hai.
  3. Contract transaction build + sign + submit hota hai.
  4. Transaction status pending se success/failed me update hota hai.
  5. Contract event stream analytics data refresh karta hai.

๐Ÿ“ฆ New/Updated Files for Yellow Belt

  • src/utils/wallet.js: Multi-wallet abstraction + error normalization.
  • src/utils/contract.js: Soroban read/write + event stream utilities.
  • src/utils/storage.js: In-place transaction update helper (updateTransaction).
  • src/utils/stellar.js: Insufficient balance specific handling.
  • src/App.jsx: End-to-end orchestration for wallet + payment + contract + status + events.
  • src/components/WalletConnect.jsx: Wallet selector based connect UX.
  • src/components/TransactionHistory.jsx: Pending/success/failed transaction visualization.
  • src/components/Receipt.jsx: Contract hash/wallet/error details.
  • contracts/tipjar/src/lib.rs: Soroban contract source.
  • contracts/tipjar/README.md: Contract build/deploy instructions.
  • .env.example: Contract config template.
  • WALLETCONNECT_USAGE.md: Multi-wallet usage notes.

โš™๏ธ Env Setup for Contract

Create .env and configure:

VITE_TIP_CONTRACT_ID=YOUR_TESTNET_CONTRACT_ID
VITE_TIP_CONTRACT_READ_METHOD=get_total_tips
VITE_TIP_CONTRACT_WRITE_METHOD=record_tip
VITE_TIP_READER_PUBLIC_KEY=YOUR_TESTNET_PUBLIC_KEY

๐Ÿงช Yellow Belt Requirement Mapping

Requirement Implemented
3 error types handled Yes
Contract deployed on testnet Contract source + deploy guide added
Contract called from frontend Yes
Transaction status visible Yes
Multi-wallet support Yes
Real-time event sync Yes

๐Ÿ“ Submission Notes

Final submission se pehle ye values fill/attach karo:

  • Deployed contract ID
  • Verified contract-call transaction hash
  • Wallet options screenshot

Build check:

npm run build

โœจ Key Features

๐Ÿ’ธ Core Tipping

  • Seamless Wallet Connection: Supports Freighter wallet integration.
  • Instant Tips: Quick tip amounts (1, 5, 10 XLM) or custom values.
  • Real-time Price: Updates USD/XLM conversion rates automatically.

๐ŸŽฎ Gamification & Engagement

  • ๐Ÿ”ฅ Tip Streaks: Track daily support streaks with tiered badges (Bronze, Silver, Gold, Platinum).
  • ๐Ÿ† Milestones: Unlock achievements for total tips sent (10, 25, 50, 100, 500+).
  • ๐Ÿ“Š Leaderboard: Visualize top supporters and contribution rankings.
  • โœจ Interactive Feedback: Confetti explosions and custom sound effects on successful tips.

๐Ÿ“ˆ Analytics & Reporting

  • In-Depth Dashboard: Filter transaction history by 7 days, 30 days, or All Time.
  • Export Options: Download transaction history as CSV or styled PDF reports.
  • Visual Charts: Track tip volume trends over time using Chart.js.

๐Ÿ›  Tools for Creators

  • ๐Ÿ“ฑ QR Code Generator: Real, scannable QR codes (Powered by qrcode.react) with instant download and copy options.
  • ๐Ÿ”— Embed Widget: Generate an iframe widget to accept tips on personal websites/blogs.
  • ๐Ÿงพ Shareable Receipts: Generate receipt links or share directly to Twitter/X.

๐ŸŽจ UI/UX

  • Dark Mode: Fully supported dark/light themes with persistence.
  • Responsive Design: Mobile-friendly layout optimized for all devices.
  • Standardized Icons: Clean SVG icons for a polished, consistent look.

๐Ÿ“ธ UI Showcase

Feature Preview
Home Dashboard
Instant tipping & Wallet status
![Home UI](image
)
Analytics Pivot
Charts & Leaderboards
![Analytics](image
	|
	| ![Chart]<img width="1919" height="910" alt="image" src="https://github.com/user-attachments/assets/9a6b7eef-5db7-4d76-bd73-9c24db8803d6" />


	|

| Interactive Elements
QR Code & Confetti | ![Interactive](image

) |


๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18+)
  • Stellar Freighter Wallet (Optional for Demo Mode)

Installation

  1. Clone the repository (or download source)

    cd stellar-tip-jar
  2. Install Dependencies

    npm install
  3. Run Development Server

    npm run dev
  4. Open Browser Visit http://localhost:5173


๐Ÿ”ง Configuration Modes

The app supports two modes via src/utils/wallet.js:

Testnet Mode

For transactions on the Stellar Testnet.

  • Wallet: Connects to your real Freighter Wallet extension.
  • Transactions: Submits real XDR to Stellar Testnet Horizon.
  • Network Badge: Displays "๐ŸŸข TESTNET" in the header.
  • Setup:.
    1. Ensure your Freighter wallet is installed and set to Testnet.
    2. Ensure your Creator Address in App.jsx is active/funded on Testnet.

๏ฟฝ Project Architecture

stellar-tip-jar/
โ”œโ”€โ”€ public/              # Static assets (Favicons, Screenshots)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/      # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ Analytics.jsx    # Charts & Data visualization
โ”‚   โ”‚   โ”œโ”€โ”€ QRCode.jsx       # Real QR generation
โ”‚   โ”‚   โ”œโ”€โ”€ StreakBadge.jsx  # Gamification logic
โ”‚   โ”‚   โ”œโ”€โ”€ Icons.jsx        # SVG Icon system
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ utils/          # Helper functions
โ”‚   โ”‚   โ”œโ”€โ”€ wallet.js    # Freighter integration & Mode logic
โ”‚   โ”‚   โ”œโ”€โ”€ stellar.js   # Stellar SDK interactions
โ”‚   โ”‚   โ””โ”€โ”€ storage.js   # LocalStorage persistence
โ”‚   โ”œโ”€โ”€ App.jsx         # Main application controller
โ”‚   โ”œโ”€โ”€ App.css         # Global design system & variables
โ”‚   โ””โ”€โ”€ main.jsx        # Entry point
โ””โ”€โ”€ README.md           # Documentation

๏ฟฝ๐Ÿ“ฆ Tech Stack

  • Frontend: React, Vite
  • Blockchain: Stellar SDK
  • Styling: Vanilla CSS (Handcrafted variables & themes)
  • Utilities:
    • chart.js (Analytics)
    • jspdf (PDF Reporting)
    • qrcode.react (QR Generation)
    • canvas-confetti (Visual Effects)

๐Ÿค Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

Distributed under the MIT License. Built with โค๏ธ for the Stellar ecosystem.


About

A gamified Web3 tipping platform on Stellar that enables creators to receive instant payments with analytics, leaderboards, and interactive rewards.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages