Skip to content

codedbydollys10/NewsQuest

Repository files navigation

NewsQuest Logo

๐Ÿš€ NewsQuest โ€” Play the News. Predict the Future.

๐Ÿง  Overview

NewsQuest is a full-stack, AI-powered, gamified news platform that transforms passive news consumption into an interactive learning experience for the users.

Instead of endlessly scrolling headlines, users can:

๐ŸŽฎ Play through news like a game ๐Ÿงช Solve quizzes generated from real articles ๐Ÿ”ฎ Predict future outcomes of world events โš”๏ธ Battle other users in real-time quiz challenges ๐Ÿ“ˆ Earn XP, maintain streaks, and climb leaderboards

Built with modern web technologies and AI-powered content generation

NewsQuest combines education, engagement, prediction intelligence, and competitive gameplay into one immersive platform.

=======

๐ŸŽฅ Demo

Watch the project demo and screenshots here:


๐Ÿง  Overview

NewsQuest is a gamified news intelligence platform that turns everyday news into a story-driven learning game.

It blends:

  • real news articles
  • AI-generated quizzes
  • predictive gameplay
  • social competition
  • progress tracking

This makes current events engaging, memorable, and fun.


๐ŸŒ Problem Statement

Traditional news platforms are often:

โŒ Passive and boring โŒ Difficult to retain and understand โŒ Overwhelming with endless information โŒ Lacking interaction and personalization โŒ Not designed for younger digital audiences

This results in low engagement, poor knowledge retention, and reduced critical thinking around current events.

======= Most news apps are:

  • โŒ passive and text-heavy
  • โŒ hard to retain
  • โŒ low on engagement
  • โŒ missing meaningful feedback loops

NewsQuest changes that by making news:

  • โœ… interactive
  • โœ… game-like
  • โœ… reward-driven
  • โœ… knowledge-centered

๐Ÿ’ก Solution

NewsQuest solves this by combining:

๐Ÿ“ฐ Interactive news consumption ๐Ÿงช AI-generated quizzes ๐Ÿ”ฎ Real-world prediction systems โš”๏ธ Competitive battle modes ๐Ÿ† XP, streaks, and gamification ๐Ÿค– AI-powered content generation ๐Ÿ“ก Real-time backend systems

The platform transforms news into a daily learning game that rewards curiosity, consistency, and critical thinking.


๐Ÿ—๏ธ Platform Architecture

๐Ÿ”ท High-Level Flow

News APIs โ†’ Backend Processing โ†’ AI Content Generation โ†’ Quiz & Prediction Engine โ†’ Supabase Database โ†’ React Frontend โ†’ User Gameplay โ†’ XP / Leaderboards / Streak Tracking


๐Ÿค– AI-Powered Intelligence System

NewsQuest uses AI to intelligently enhance news content and gameplay.

๐Ÿง  AI Quiz Generation

Role: Automatically generate MCQs from live news articles.

Powered By:

  • Qwen API
  • NewIO API

Features:

  • Context-aware questions
  • Instant explanations
  • Difficulty balancing
  • Fast response generation

Output:

  • Multiple-choice questions
  • Correct answers
  • Explanations
  • XP rewards

๐Ÿ”ฎ AI Prediction Engine (USP ๐Ÿš€)

Role: Turn real-world events into prediction challenges.

Examples:

  • โ€œWill inflation rise next month?โ€
  • โ€œWill this bill pass parliament?โ€
  • โ€œWill Team X win the finals?โ€

Features:

  • Confidence-based answering
  • Prediction history tracking
  • Accuracy analytics
  • Long-term performance scoring

Output:

  • User prediction score
  • Accuracy percentage
  • Prediction leaderboard ranking =======
  • Structured stories for fast reading
  • Topic categories like Polity, Economy, Tech, and Health
  • Featured headlines and personalized summaries

๐Ÿงช 2. AI Quiz System

  • 4 quiz questions per article
  • Instant feedback and scoring
  • Quiz content generated from article metadata
  • Built to reinforce reading and retention

๐Ÿ”ฎ 3. Prediction Engine

  • Article-based prediction prompts
  • Confidence-driven answer format
  • Outcome tracking for accuracy over time
  • Designed to make learners think about context and consequences

๐Ÿ“ฐ Smart News Feed

Features

โœ… Bite-sized news format โœ… Fast and clean reading experience โœ… Category-based filtering โœ… Mobile-first UI โœ… Interactive article experience

Categories include:

  • Politics
  • Economy
  • Technology
  • Sports
  • Science
  • Global Affairs

๐Ÿงช Quiz System

Every article includes interactive quizzes.

Features

๐ŸŽฏ 2โ€“3 AI-generated MCQs per article โšก Instant feedback ๐Ÿ“˜ Answer explanations โญ XP rewards for correct answers ๐Ÿ“Š Performance tracking


โš”๏ธ Battle Mode

Real-Time Competitive Gameplay

Users can compete against others in live quiz battles.

Features

โšก Fast-paced question answering ๐Ÿ† Bonus XP rewards ๐Ÿ“ˆ Rank progression ๐ŸŽฎ Competitive learning environment

Battle scoring depends on:

  • Accuracy
  • Speed
  • Consistency

โญ XP & Gamification System

Users earn XP by:

๐Ÿ“ฐ Reading articles ๐Ÿงช Solving quizzes ๐Ÿ”ฎ Making predictions โš”๏ธ Winning battles ๐Ÿ”ฅ Maintaining streaks

Gamification Features

๐Ÿ† Global leaderboards ๐Ÿ“… Daily quests ๐Ÿ”ฅ Daily streak tracking ๐ŸŽ–๏ธ Level progression system


๐Ÿ”ฅ Streak System

Role: Encourage consistent learning habits.

Features:

  • Daily login streaks
  • Reading streaks
  • Quiz streaks
  • XP multipliers for consistency =======
  • Real-time competition with other players
  • Battle sessions, queue joining, and invites
  • Points earned for speed and correctness
  • Competitive gameplay built on news knowledge

โญ 5. XP, Levels & Rewards

  • Gain XP through reading, quizzes, predictions, and battles
  • Level progress shown in dashboard UI
  • Encourage continuous exploration and habit building

๐Ÿ”ฅ 6. Streaks & Daily Goals

  • Daily engagement tracking
  • Reward streaks for consistent users
  • Encourages return visits and sustained learning

๐Ÿง  7. Cause Chain & Critical Thinking

  • Cause-chain exercises for article analysis
  • Break down event logic and consequences
  • Reinforces deeper understanding beyond headlines

๐Ÿค– AI-Powered Content

NewsQuest uses AI to create:

  • quiz questions
  • prediction scenarios
  • article summaries
  • cause-chain prompts

Key AI integrations

๐Ÿ† Leaderboard System

Global rankings based on:

โญ XP earned ๐Ÿงช Quiz performance ๐Ÿ”ฎ Prediction accuracy โš”๏ธ Battle victories

Features:

  • Weekly resets
  • Competitive ranking
  • User progression tracking =======
  • Bytez for article intelligence
  • Supabase for real-time data and user sync

๐Ÿ“… Daily Quest System

Users receive dynamic daily objectives such as:

โœ… Read 5 articles โœ… Complete 3 quizzes โœ… Make 2 predictions โœ… Win 1 battle

Rewards: โญ Bonus XP ๐Ÿ† Progress boosts ๐Ÿ”ฅ Streak protection


โš™๏ธ Backend & Database

๐Ÿ—„๏ธ Supabase Integration

Supabase powers:

  • โœ… Authentication
  • โœ… Database storage
  • โœ… Real-time systems
  • โœ… User progression tracking =======

๐Ÿ”น Backend

  • Node.js + TypeScript
  • Express server with API routing
  • Rate limiting and error handling
  • Caching for news and article content

๐Ÿ”น Database

  • User profiles
  • XP & levels
  • Quiz history
  • Predictions
  • Streak data
  • Leaderboards

๐Ÿ–ฅ๏ธ Frontend

Tech Stack

  • React.js
  • TypeScript
  • Tailwind CSS
  • Vite

Features

โœจ Modern gaming-inspired UI ๐ŸŒ™ Dark theme with neon accents ๐Ÿ“ฑ Mobile-first responsive design โšก Smooth transitions & animations


โšก Backend

Features

โœ… News aggregation โœ… AI quiz generation โœ… Prediction processing โœ… Real-time gameplay systems โœ… XP & progression handling โœ… Supabase integration


๐Ÿง  Core Gameplay Loop

Read news ๐Ÿ“ฐ Take quiz ๐Ÿงช Make prediction ๐Ÿ”ฎ Battle players โš”๏ธ Earn XP โญ Maintain streak ๐Ÿ”ฅ Climb leaderboard ๐Ÿ† Repeat ๐Ÿ”


๐Ÿš€ Future Scope

Planned Features

๐Ÿค– AI-generated summaries ๐ŸŽค Voice-based news (TTS) ๐Ÿง Avatar progression system โš”๏ธ Multiplayer tournaments ๐Ÿง  Personalized recommendations ๐Ÿ“Š Advanced analytics dashboard ๐Ÿ“ฑ Mobile app version


๐Ÿ” Security & Best Practices

โœ… Environment variables protected using .env โœ… Supabase authentication system โœ… API keys hidden via .gitignore โœ… Modular scalable architecture โœ… Type-safe frontend using TypeScript


๐Ÿงช How to Run Locally

Prerequisites

  • Node.js 18+
  • npm
  • Internet connection for news APIs

1๏ธโƒฃ Backend Setup

cd backend
npm install

Create:

backend/.env.local

Add:

NEWSDATA_API_KEY=your_api_key

Run backend:

npm run start

Default backend URL:

http://127.0.0.1:3001
=======
- Supabase for authentication and storage
- Stores user progress, activity, predictions, and leaderboard stats
- Real-time updates for engaged gameplay

---

## ๐ŸŽฎ Player Experience

1. Read a news article
2. Answer quiz questions
3. Predict the likely outcome
4. Earn XP and rewards
5. Join a leaderboard battle
6. Track streaks and progress

---

## ๐Ÿ“‚ Project Structure

```bash
NewsQuest-main/
โ”œโ”€โ”€ backend/               # Express + TypeScript backend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ routes/        # auth, news, battle, predictions, leaderboard, cause chain
โ”‚   โ”‚   โ”œโ”€โ”€ services/      # news data, battle logic, user activity
โ”‚   โ”‚   โ””โ”€โ”€ lib/           # AI content generation, profile sync
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ tsconfig.json
โ”œโ”€โ”€ frontend/              # React + Vite + Tailwind frontend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ””โ”€โ”€ store/
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ vite.config.ts
โ”œโ”€โ”€ SQL_MIGRATION_EXECUTE_ME.sql
โ””โ”€โ”€ README.md

2๏ธโƒฃ Frontend Setup

cd frontend
npm install
npm run dev

Default frontend URL:

http://127.0.0.1:4000

=======

๐Ÿš€ Tech Stack

  • Frontend: React, Vite, TypeScript, Tailwind CSS, Radix UI, Zustand, React Router
  • Backend: Node.js, Express, TypeScript, Supabase, dotenv, cors
  • Data: Supabase, custom news generation logic, cached article metadata
  • Deployment: npm scripts, build-ready Express server

๐Ÿงฉ API Endpoints

News

  • GET /api/news
  • GET /api/news/search?q=...
  • GET /api/news/category/:type
  • GET /api/news/featured
  • POST /api/news/generate

Activity

  • POST /api/activity/track
  • GET /api/activity/heatmap/:userId

Battle

  • GET /api/battle/session?userId=...
  • POST /api/battle/queue/join
  • POST /api/battle/invite

Predictions

  • POST /api/predictions/resolve

Leaderboard

  • GET /api/leaderboard

Cause Chain

  • GET /api/cause-chain/:articleId
  • POST /api/cause-chain/generate
  • POST /api/cause-chain/submit
  • GET /api/cause-chain/stats/:userId

Users

  • POST /api/users/sync

Health

  • GET /api/health

๐Ÿ”ง Setup

1. Install dependencies

cd backend && npm install
cd ../frontend && npm install

2. Configure environment

Create backend/.env.local with your keys. Example:

NEWSDATA_API_KEY=your_news_api_key
SUPABASE_URL=https://... 
SUPABASE_KEY=...

If the frontend needs a custom backend, create frontend/.env with:

VITE_API_URL=http://localhost:3001

3. Run locally

cd backend && npm run start
cd ../frontend && npm run dev

4. Access the app

  • Backend: http://127.0.0.1:3001
  • Frontend: http://127.0.0.1:4000

๐Ÿ› ๏ธ Useful Scripts

Frontend

  • npm run dev
  • npm run build
  • npm run lint
  • npm run test

Backend

  • npm run start
  • npm run build
  • npm run typecheck

๐ŸŒŸ What Makes NewsQuest Unique

  • News becomes a game, not just a feed
  • AI-generated quizzes and prediction gameplay
  • Real-time battle mode for knowledge competition
  • Supabase-backed progress, streaks, and leaderboard
  • Learning through active news interaction

๐Ÿ“Œ Future Improvements

  • native mobile app or PWA
  • voice-enabled news summaries
  • daily challenge and achievement system
  • richer analytics for students and readers
  • more adaptive AI quiz generation

โš™๏ธ Useful Scripts

Frontend

npm run dev
npm run build
npm run lint
npm run test

Backend

npm run start
npm run build
npm run typecheck

๐Ÿ“ Project Structure

NewsQuest/
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ””โ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”œโ”€โ”€ .env.local
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ public/
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ .gitignore

๐Ÿ† What Makes NewsQuest Unique?

๐Ÿ‘‰ Combines news + gaming + AI + prediction systems ๐Ÿ‘‰ Makes current affairs interactive and addictive ๐Ÿ‘‰ Encourages critical thinking & retention ๐Ÿ‘‰ Turns learning into competition ๐Ÿ‘‰ Creates daily knowledge-building habits


๐ŸŒ SDG Alignment

SDG Goal Implementation
SDG 4 Quality Education Interactive learning through gamified news
SDG 9 Industry, Innovation & Infrastructure AI-powered news intelligence platform
SDG 16 Peace, Justice & Strong Institutions Encourages informed civic awareness

๐Ÿš€ Key Innovations

๐Ÿงช AI-generated quizzes from live news ๐Ÿ”ฎ Real-world prediction gameplay โš”๏ธ Real-time battle system โญ Full XP & progression mechanics ๐Ÿ”ฅ Habit-building streak system ๐Ÿ† Competitive leaderboard ecosystem ๐Ÿง  AI-enhanced educational experience


๐Ÿ’ฌ Final Thought

NewsQuest is not just a news app โ€” itโ€™s a gamified intelligence platform.

โ€œDonโ€™t just read the news. Play it. Predict it. Master it.โ€ ๐Ÿš€ ======= NewsQuest is more than a news reader โ€” it is a gamified learning companion for curious minds.

โ€œRead, answer, predict, and compete with the news.โ€

โญ If You Like This Project

Give it a โญ on GitHub and support interactive learning through AI-powered news gaming!!


About

๐Ÿš€ NewsQuest is a gamified AI-powered news platform where users donโ€™t just read newsโ€”they play it. ๐Ÿ“ฐ๐Ÿง  Solve quizzes, predict real-world outcomes, earn XP, maintain streaks, and compete on leaderboards. Built with React, Node.js & Supabase to make learning news interactive, fun, and addictive. ๐Ÿ”ฎ๐Ÿ†

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors