Loading repository dataβ¦
Loading repository dataβ¦
chayan-1906 / repository
π Production-ready AI news aggregation API with 11 intelligent features β¨ | Multi-source aggregation (70+ sources) | Gemini AI enhancement | Personalized recommendations | Built with Node.js + TypeScript + MongoDB π
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
AI-Powered News Aggregation Platform with 11 Intelligent Features
PulsePress is a production-ready backend API that aggregates news from 70+ sources (NewsAPI, The Guardian, NY Times, and 130+ RSS feeds) and enhances articles with AI-powered features including summarization, sentiment analysis, tag generation, and personalized recommendations.
AI-generated concise summaries using Google Gemini 2.5 models with intelligent content truncation and context preservation.
Real-time sentiment detection with confidence scores, emotional indicators, and color-coded visualization.
Automatic extraction of 3-5 crucial points from articles for quick comprehension.
AI-powered complexity assessment analyzing vocabulary, sentence structure, and technical terminology.
Intelligent categorization with contextual tags for improved discoverability and navigation.
Location extraction and mapping for geographical context awareness.
AI-generated platform-specific captions optimized for Twitter, LinkedIn, and Facebook engagement.
Intelligent question generation for deeper engagement and context-aware question answering using article content.
Advanced contextual analysis, including stakeholder impact, timeline connections, and theme identification.
Google Translate integration supporting 100+ languages for global accessibility.
Non-news content detection with an intelligent strike system for quality control.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT APPLICATIONS β
β (Web, Mobile, Desktop, etc.) β
βββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β HTTP/REST
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXPRESS API SERVER (PORT 4000) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β’ CORS & Security Middleware β
β β’ JWT Authentication β
β β’ Rate Limiting β
β β’ Request Logging β
βββββββββββββ¬βββββββββββββ¬βββββββββββββ¬ββββββββββββββββ
β β β
βββββββΌβββββ ββββββΌβββββ ββββββΌββββββ
β News β β AI β β Auth β
β Services β βServices β β Services β
βββββββ¬βββββ ββββββ¬βββββ ββββββ¬ββββββ
β β β
βββββββΌββββββββββββΌββββββββββββΌββββββ
β EXTERNAL SERVICES β
β β’ NewsAPI, Guardian, NYTimes β
β β’ 130+ RSS Feeds β
β β’ Google Gemini AI (3 models) β
β β’ Google Translate API β
ββββββββββββββββββ¬ββββββββββββββββββββ
β
βββββββΌββββββ
β MongoDB β
β Database β
βββββββββββββ
git clone https://github.com/chayan-1906/PulsePress-Node.js.git
cd PulsePress-Node.js
npm install
cp .env.example .env
Edit .env with your credentials (see Environment Variables)
# Development mode with hot reload
npm run dev
# Production mode
npm run build
npm start
Server runs at http://localhost:4000
Create a .env file in the root directory with the following variables:
# Server
PORT=4000
NODE_ENV=development
# Database
MONGO_URI=mongodb://localhost:27017/pulsepress
# Or MongoDB Atlas: mongodb+srv://<username>:<password>@cluster.mongodb.net/pulsepress
# JWT Secrets (generate with: openssl rand -base64 32)
JWT_SECRET=your_jwt_secret_here
JWT_REFRESH_SECRET=your_refresh_secret_here
JWT_EXPIRES_IN=15m
JWT_REFRESH_EXPIRES_IN=7d
# Google OAuth 2.0
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI=http://localhost:4000/api/v1/auth/google/callback
# NewsAPI.org (https://newsapi.org)
NEWS_API_KEY=your_newsapi_key
# The Guardian (https://open-platform.theguardian.com)
THE_GUARDIAN_API_KEY=your_guardian_key
# NY Times (https://developer.nytimes.com)
NY_TIMES_API_KEY=your_nytimes_key
# Google Gemini AI (https://ai.google.dev)
GEMINI_API_KEY=your_gemini_api_key
# Google Cloud Translate (https://cloud.google.com/translate)
GOOGLE_TRANSLATE_API_KEY=your_translate_key
# HuggingFace (Optional - https://huggingface.co)
HUGGINGFACE_API_KEY=your_huggingface_key
# SMTP Configuration (e.g., Gmail)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your_email@gmail.com
EMAIL_PASSWORD=your_app_password
EMAIL_FROM=noreply@pulsepress.com
# AI Features
AI_WINDOW_MS=300000 # 5 minutes
AI_MAX_REQUESTS=30
# News Scraping
NEWS_SCRAPING_WINDOW_MS=900000 # 15 minutes
NEWS_SCRAPING_MAX_REQUESTS=50
Note: See
.env.examplefor complete configuration options
Complete API documentation with all 75 endpoints is available in API_DOCUMENTATION.md
| Category | Endpoints | Description |
|---|---|---|
| Authentication | 10 | Register, login, OAuth, magic links, token refresh |
| News | 15 | Multi-source fetch, search, enhanced articles |
| AI Features | 11 | Summarization, sentiment, tags, insights, Q&A |
| Personalization | 8 | Preferences, recommendations, reading history |
| Bookmarks | 5 | Save, organize, and manage articles |
| Analytics | 6 | User metrics, source performance, engagement |
| Health | 21 | System monitoring and diagnostics |
Request:
GET /api/v1/news/multisource/enhanced?q=technology&pageSize=10
Authorization: Bearer <your_jwt_token>
Response:
{
"success": true,
"message": "Articles fetched and enhancement started",
"data": {
"articles": [
{
"articleId": "abc123...",
"title": "AI Breakthrough in Healthcare",
"url": "https://...",
"source": "TechCrunch",
"publishedAt": "2025-01-20T10:30:00Z",
"enhancements": {
"processingStatus": "completed",
"summary": "...",
"sentiment": {
"type": "positive",
"confidence": 0.89,
"emoji": "π"
},
"tags": ["AI", "Healthcare", "Innovation"],
"readingTime": "5 minutes"
}
}
],
"totalResults": 150,
"page": 1,
"pageSize": 10
}
}
pulsepress/
βββ src/
β βββ server.ts # Application entry point
β βββ config/ # Configuration files
β β βββ config.ts # Environment variables
β β βββ connectDB.ts # MongoDB connection
β βββ controllers/ # Request handlers (10 controllers)
β β βββ NewsController.ts
β β βββ AIController.ts
β β βββ AuthController.ts
β β βββ ...
β βββ services/ # Business logic (25 services)
β β βββ NewsService.ts
β β βββ ArticleEnhancementService.ts
β β βββ ContentRecommendationService.ts
β β βββ ...
β βββ models/ # MongoDB schemas (10 models)
β β βββ UserSchema.ts
β β βββ ArticleEnhancementSchema.ts
β β βββ BookmarkSchema.ts
β β βββ ...
β βββ routes/ # API routes
β βββ middlewares/ # Auth, rate limiting
β βββ types/ # TypeScript interfaces
β βββ utils/ # Helper functions
βββ .env.example # Environment template
βββ package.json # Dependencies
βββ tsconfig.json # TypeScript config
βββ README.md # This file
# Development