Skip to content

Avalanche-Team1-DAO-Kenya/Subscription-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔄 Subscription Management System

📝 Description

A decentralized subscription management system built on Avalanche blockchain, enabling automated recurring payments and subscription management for SaaS, newsletters, and streaming platforms.

✨ Features

➡️ Subscription Management

  • Create subscriptions with custom pricing and duration
  • View subscription details and status
  • Process automated payments
  • Automatic renewal tracking
  • Toggle auto-renewal settings

➡️ Wallet Integration

  • Seamless Core Wallet connection
  • Secure payment processing
  • Real-time balance updates
  • Network verification (Fuji C-Chain)
  • Address display toggle

➡️ User Interface

  • Dark/Light mode toggle
  • Responsive design
  • Service-specific subscription plans
  • Interactive subscription cards
  • Real-time countdown timers

➡️ Service Integration

  • Nation Media 📰
    • Daily news access
    • E-paper access
    • Premium content
  • Showmax Kenya 🎬
    • HD streaming
    • Multiple device access
    • Offline viewing
  • DSTV 📺
    • Live TV channels
    • Premium content
    • DVR functionality
  • Mdundo 🎵
    • Music streaming
    • Playlist management
    • Offline downloads
  • Elimu Library 📚
    • Educational resources
    • Research tools
    • Citation management
  • Test Service 🧪
    • Quick test plans
    • 2-minute durations
    • Auto-renewal testing
    • Instant feedback

🛠️ Tech Stack

  • Languages:

  • Framework:

  • Backend:

  • Blockchain:

  • Tools:

🚀 Setup Instructions

  1. 📥 Clone the repository:

    git clone cd

  2. 📦 Install dependencies:

    npm install

  3. 🔗 Deploy the smart contract:

    • Ensure your .env file contains your private key:

      PRIVATE_KEY=your_private_key_here

    • Deploy the contract to the Fuji test network:

      npx hardhat run scripts/deploy.js --network fuji

    • The deployment script will automatically append the contract address to your .env file as REACT_APP_CONTRACT_ADDRESS.

  4. 🔥 Set up Firebase configuration in .env:

    • Add your Firebase configuration details:

      REACT_APP_FIREBASE_API_KEY=your_firebase_api_key REACT_APP_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain REACT_APP_FIREBASE_PROJECT_ID=your_firebase_project_id REACT_APP_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id REACT_APP_FIREBASE_APP_ID=your_firebase_app_id

  5. 🏃‍♂️ Start the development server:

    npm start

  6. 🌐 Access the application in your browser at http://localhost:3000.

⛰️ Avalanche Integration

  • Smart contracts deployed on Avalanche Fuji C-Chain (TestNet)
  • Chain ID: 43113
  • Network verification for secure transactions
  • Utilizing Avalanche's fast finality for instant payment confirmation
  • Low transaction fees for subscription processing

💾 Database Structure

  • Users collection: Stores wallet addresses and connection history
  • Subscription Plans collection: Stores service-specific subscription plans
  • User Subscriptions collection: Tracks active subscriptions and their status

👥 Team

  • Lynn Matini - FullStack Developer
  • Aristo Ayako - FullStack Developer

🔒 Security Features

  • Network verification
  • Secure wallet connections
  • Protected Firebase configuration
  • Smart contract security measures

🛠️ Recent Updates

  • Updated to use Node.js 18 for compatibility with Hardhat.
  • Implemented a new subscription management system with features like auto-renewal toggle and payment processing.
  • Integrated Core Wallet for seamless user experience.
  • Enhanced user interface with dark/light mode toggle and responsive design.
  • Improved network verification to ensure secure transactions on the Avalanche Fuji C-Chain.