A modern, multi-source news aggregation platform built with Next.js 16 (App Router), Firebase, and a Black + Gold dark theme. Aggregates headlines from GDELT, RSS feeds, and Hacker News — plus original community stories with admin moderation.
- 📰 Multi-Source News — Aggregated from GDELT, RSS (BBC, NYT, Reuters), and Hacker News with automatic de-duplication
- 🇮🇳 Dedicated India Feed — India-focused RSS feeds (BBC India, Times of India, The Hindu) with GDELT region filtering
- ✍️ Community Posts — Authenticated users submit news posts; admin moderation required for publishing
- 🛡️ Admin Moderation — Posts start as
pending; admin dashboard at/adminfor approve/reject workflow - 🔐 Firebase Auth — Email/password authentication with friendly error messages and Firestore user profiles
- 🖼️ Image Uploads — Firebase Storage with 5 MB limit and image-only validation
- 🔍 Search + Filters — Category tabs (All / World / India / Tech), search bar, and pagination
- 🎨 Black + Gold Theme — Dark background, gold accents, shimmer skeletons, responsive mobile-first design
- 🚀 Vercel Ready — Serverless-compatible with
Cache-Controlheaders (no in-memory cache)
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router, Turbopack) |
| Styling | Tailwind CSS 4, Black + Gold theme |
| Auth | Firebase Auth (email/password) |
| Database | Cloud Firestore |
| Storage | Firebase Storage |
| News Sources | GDELT API v2 · RSS (BBC, NYT, Reuters, TOI, The Hindu) · Hacker News |
| Hosting | Vercel |
git clone https://github.com/yankeeDamn/BinglishNews.git
cd BinglishNews
npm install- Create a Firebase project at console.firebase.google.com
- Enable Authentication → Email/Password
- Create a Firestore database
- Enable Storage
- Copy
.env.exampleto.env.localand fill in your Firebase config:
cp .env.example .env.localThe site loads without Firebase env vars, but auth, posts, and moderation features require them.
Copy the contents of firestore.rules and storage.rules into your Firebase Console.
npm run devOpen http://localhost:3000.
npx vercelAdd the same environment variables from .env.local to your Vercel project settings.
src/
├── app/
│ ├── api/
│ │ ├── gdelt/route.ts # Legacy GDELT endpoint (validated)
│ │ ├── news/route.ts # Unified news endpoint (paginated, multi-source)
│ │ └── posts/[id]/moderate/ # Moderation API
│ ├── admin/page.tsx # Admin moderation dashboard
│ ├── auth/
│ │ ├── signin/page.tsx # Sign-in with friendly error messages
│ │ └── signup/page.tsx # Sign-up with validation
│ ├── posts/
│ │ ├── new/page.tsx # Create post (pending moderation)
│ │ └── [id]/page.tsx # Post detail page
│ ├── globals.css # Black + Gold theme variables
│ ├── layout.tsx # Root layout with SEO metadata
│ └── page.tsx # Home: hero, community posts, world & India news
├── components/
│ ├── Navbar.tsx # Responsive nav with mobile toggle
│ ├── NewsFeed.tsx # Category tabs, search, pagination, skeletons
│ ├── PostCard.tsx # Post preview card
│ └── WorldNewsFeed.tsx # Legacy GDELT-only feed
├── context/
│ └── AuthContext.tsx # Firebase Auth context with error state
├── lib/
│ ├── firebase.ts # Firebase client init (safe lazy loading)
│ ├── firestore.ts # Firestore CRUD operations
│ ├── storage.ts # Firebase Storage uploads
│ └── news/
│ ├── provider.ts # NewsProvider interface
│ ├── gdelt-provider.ts # GDELT provider (48h rolling window)
│ ├── rss-provider.ts # RSS provider (world + India feeds)
│ ├── hackernews-provider.ts # Hacker News provider
│ ├── aggregator.ts # Merge, dedupe, retry, fallback
│ ├── utils.ts # Shared hostname extraction
│ └── index.ts # Barrel exports
└── types/
└── index.ts # Article, NewsResponse, Post, UserProfile
firestore.rules # Firestore security rules
storage.rules # Storage security rules
All providers implement NewsProvider interface with a fetch(options) method:
┌──────────┐ ┌──────────┐ ┌──────────────┐
│ GDELT │ │ RSS │ │ HackerNews │
│ Provider │ │ Provider │ │ Provider │
└────┬─────┘ └────┬─────┘ └──────┬───────┘
│ │ │
└───────────┬───┴─────────────────┘
│
┌──────▼──────┐
│ Aggregator │ ← retry, dedupe, fallback
└──────┬──────┘
│
┌──────▼──────┐
│ /api/news │ ← pagination, Cache-Control
└─────────────┘
To add a new source: implement NewsProvider, add to providers[] in aggregator.ts.
| Endpoint | Description |
|---|---|
GET /api/news |
Aggregated news (all sources, paginated) |
GET /api/news?region=IN |
India-focused news |
GET /api/news?category=tech |
Category filter (world, india, tech) |
GET /api/news?page=2&pageSize=20 |
Pagination |
GET /api/news?q=climate |
Search query |
GET /api/gdelt |
Legacy GDELT-only endpoint |
- User creates a post → saved with
status: "pending" - Admin sees pending posts in
/admindashboard - Admin approves →
status: "published"(appears on home page) - Admin rejects →
status: "rejected"(hidden from public)
After creating a user account, manually set their role to "admin" in Firestore:
- Go to Firebase Console → Firestore
- Find the user document in
users/{uid} - Change
rolefrom"user"to"admin"
MIT