Skip to content

ashrithb/DemocracyNewsApp

Repository files navigation

🗞️ Democracy News Lens - Blockchain Edition

Democracy News Lens is a modern, interactive web application designed to gamify balanced news consumption and tie user engagement to core democratic health indicators. Leveraging blockchain technology, we've created a platform that ensures content integrity, rewards engagement with NFTs, and stores media in a decentralized manner—making the experience of reading diverse and credible news sources fun, rewarding, and verifiably trustworthy.

Democracy News Lens

🚀 Core Features

📊 Main Dashboard

🕸️ Radar/Spider Chart

  • Tracks user engagement across five democratic dimensions:
    • Media Freedom
    • Electoral Process
    • Civil Liberties
    • Rule of Law
    • Deliberation
  • Interactive visuals with tooltips and clear explanations.

🎯 Today's Challenges

  • Daily reading missions like:
    • Explore opposing viewpoints
    • Discover new sources
  • Instant points and badge rewards upon completion.

🔥 Story Streaks

  • Visualize consecutive days of balanced or diverse news consumption.
  • Engaging animations and incremental rewards to motivate users.

📊 Interactive Polls & Predictions

  • Participate in community polls predicting outcomes of news-related events.
  • Real-time leaderboards tracking prediction accuracy and rankings.

📰 News Feed Experience

📚 Interactive News Articles

  • Curated articles from diverse political spectrums.
  • AI-powered summaries and interactive quizzes based on content.
  • Blockchain-verified content integrity.

🧭 Political Spectrum Slider

  • Adjust and filter articles by political leaning.
  • View source reliability ratings quickly.

⚖️ Balanced Reading Recommendations

  • Smart prompts and challenges to encourage reading across perspectives.
  • AI-driven personalization powered by Google's Gemini API.

🔐 Blockchain Features

🔄 Content Verification System

Our platform ensures news integrity through blockchain verification:

  • Content Hashing: Articles are hashed using SHA-256
  • IPFS Verification: Hashes are compared with IPFS records
  • Verification Statuses: Unverified, Pending, Verified, or Tampered
  • Visual Indicators: Badges show verification status on articles

Implementation details:

  • Content hashing for immutable records
  • Real-time verification checks
  • Transparent verification history

🏆 NFT Achievement System

Gamifying democratic engagement through blockchain:

  • Achievement Types: Various achievements for different contributions
  • Tiered Rewards: Bronze, Silver, Gold, and Platinum tiers
  • IPFS Metadata: Achievement metadata stored on IPFS
  • NFT Minting: Earn NFTs for completing challenges and engaging with diverse content

📦 Pinata & IPFS Integration

Democracy News Lens leverages Pinata for decentralized storage on IPFS:

  • Decentralized Storage: Content is stored across a distributed network
  • Content Addressing: Files are referenced by their content hash, not location
  • Immutability: Once stored, content cannot be altered
  • Persistence: Content remains available even if the original source is offline

We use Pinata for:

  • Profile pictures
  • Article images and content
  • NFT achievement metadata
  • Content verification records

🤖 AI Integration

🧠 Gemini API for Rating Systems

We utilize Google's Gemini API to:

  • Analyze article content for bias and sentiment
  • Generate balanced reading recommendations
  • Create personalized news experiences
  • Rate content credibility and factual accuracy

🎨 Visual Design

  • Color Scheme:

    • Blues and purples for democratic health indicators
    • Neutral backgrounds for clarity and readability
    • Visual cues for blockchain verification status
  • Design Philosophy:

    • Clean, professional, and modern
    • Responsive and accessible across all devices

💻 Technical Implementation

Blockchain Content Verification Flow

graph TD
    A[Article Content] --> B[Generate SHA-256 Hash]
    B --> C[Compare with IPFS Record]
    C --> D{Verified?}
    D -->|Yes| E[Display Verified Badge]
    D -->|No| F[Flag as Potentially Modified]
Loading

NFT Achievement Flow

graph TD
    A[User Completes Achievement] --> B[Generate Achievement Metadata]
    B --> C[Store Metadata on IPFS via Pinata]
    C --> D[Mint NFT Achievement]
    D --> E[Display in User Gallery]
Loading

🛠️ Getting Started

Prerequisites

  • Node.js 16.8 or later
  • PNPM package manager

Installation

# Clone the repository
git clone https://github.com/yourusername/democracy-news-lens.git

# Navigate to the project directory
cd democracy-news-lens

# Install dependencies
pnpm install

# Set up environment variables
cp .env.example .env.local

# Start the development server
pnpm dev

🙏 Acknowledgments

  • Pinata for IPFS storage solutions
  • Google Gemini for AI-powered content analysis
  • IPFS for decentralized storage infrastructure
  • NewsFeed API for diverse news content

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages