Skip to content

vedant21-ctr/ReadStream

Repository files navigation

πŸš€ ReadStream - AI-Powered Knowledge Hub

An intelligent content aggregation platform that brings together news, academic papers, and books with AI-powered summaries and personalized recommendations.

Made with Next.js Made with Node.js MongoDB AI Powered

✨ Features

  • πŸ“° News Aggregation - Stay updated with latest news from multiple sources
  • πŸ“š Academic Papers - Access thousands of research papers and journals
  • πŸ“– Book Discovery - Find and explore books across all genres
  • πŸ€– AI Summaries - Get instant AI-generated summaries using Google Gemini
  • πŸ’Ύ Save & Organize - Save content and organize into collections
  • πŸ“… Daily Briefing - Personalized AI-generated daily content briefing
  • πŸ’¬ Comments - Engage with content through comments
  • πŸ” Search - Global search across all content
  • πŸ‘€ User Profiles - Customize preferences and reading habits
  • πŸ“Š Admin Dashboard - Analytics and user management

πŸ› οΈ Tech Stack

Frontend

  • Next.js 14 - React framework with App Router
  • React 18 - UI library
  • TypeScript - Type safety
  • Framer Motion - Smooth animations
  • Glassmorphism UI - Modern, clean design

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB Atlas - Cloud database
  • Mongoose - ODM for MongoDB
  • JWT - Authentication
  • Google Gemini AI - AI-powered features

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ installed
  • MongoDB Atlas account (free tier)
  • Google AI Studio API key (free)

Installation

  1. Clone the repository
git clone https://github.com/vedant21-ctr/ReadStream.git
cd ReadStream
  1. Setup Backend
cd readstream-backend
npm install

# Create .env file
cp .env.example .env
# Add your MongoDB URI and API keys
  1. Setup Frontend
cd readstream-frontend
npm install
  1. Start Development Servers

Terminal 1 - Backend:

cd readstream-backend
npm run dev

Terminal 2 - Frontend:

cd readstream-frontend
npm run dev
  1. Open your browser
http://localhost:3000

πŸ”‘ Environment Variables

Backend (.env)

PORT=5001
MONGODB_URI=your_mongodb_atlas_uri
JWT_SECRET=your_jwt_secret
JWT_EXPIRE=7d
GOOGLE_AI_API_KEY=your_google_ai_key
FRONTEND_URL=http://localhost:3000

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:5001/api

πŸ“ Project Structure

ReadStream/
β”œβ”€β”€ readstream-backend/          # Express.js backend
β”‚   β”œβ”€β”€ config/                  # Database configuration
β”‚   β”œβ”€β”€ controllers/             # Route controllers
β”‚   β”œβ”€β”€ middleware/              # Custom middleware
β”‚   β”œβ”€β”€ models/                  # Mongoose models
β”‚   β”œβ”€β”€ routes/                  # API routes
β”‚   β”œβ”€β”€ services/                # Business logic
β”‚   └── server.js               # Entry point
β”‚
β”œβ”€β”€ readstream-frontend/         # Next.js frontend
β”‚   β”œβ”€β”€ app/                    # Next.js app directory
β”‚   β”‚   β”œβ”€β”€ login/             # Login page
β”‚   β”‚   β”œβ”€β”€ signup/            # Signup page
β”‚   β”‚   β”œβ”€β”€ news/              # News page
β”‚   β”‚   β”œβ”€β”€ journals/          # Journals page
β”‚   β”‚   β”œβ”€β”€ books/             # Books page
β”‚   β”‚   β”œβ”€β”€ saved/             # Saved items
β”‚   β”‚   β”œβ”€β”€ collections/       # Collections
β”‚   β”‚   β”œβ”€β”€ daily-brief/       # Daily briefing
β”‚   β”‚   β”œβ”€β”€ profile/           # User profile
β”‚   β”‚   β”œβ”€β”€ admin/             # Admin dashboard
β”‚   β”‚   └── content/[id]/      # Content detail
β”‚   β”œβ”€β”€ components/            # Reusable components
β”‚   └── lib/                   # Utilities & API client
β”‚
└── README.md

🎯 API Endpoints

Authentication

  • POST /api/auth/signup - Register new user
  • POST /api/auth/login - Login user
  • GET /api/auth/me - Get current user

Content

  • GET /api/news - Get news articles
  • GET /api/journals - Get academic papers
  • GET /api/books - Search books
  • GET /api/content/:id - Get content details
  • GET /api/content/:id/summary - Get AI summary

User Features

  • GET /api/saved - Get saved items
  • POST /api/saved - Save content
  • GET /api/collections - Get collections
  • POST /api/collections - Create collection
  • GET /api/daily-brief - Get daily briefing
  • GET /api/recommendations - Get AI recommendations

Admin

  • GET /api/admin/users - Get all users
  • GET /api/admin/analytics - Get platform statistics

πŸ€– AI Features

Content Summarization

Uses Google Gemini AI to generate concise 3-4 sentence summaries of any content.

Daily Briefing

AI-generated personalized briefing based on user preferences and reading history.

Recommendations

Intelligent content recommendations based on saved items and user behavior.

🎨 Design System

  • Glassmorphism - Modern frosted glass effect
  • Neutral Colors - Clean white, gray, and soft black
  • Accent Color - Indigo (#6366f1)
  • Typography - Inter font family
  • Animations - Smooth Framer Motion transitions

πŸ“± Features by Page

Page Features
Home Hero section, features showcase, CTA
News Browse news with search & pagination
Journals Academic papers with filters
Books Book search and discovery
Content Detail Full article, AI summary, comments
Saved View saved content with filters
Collections Organize content into collections
Daily Brief AI-generated personalized briefing
Profile User settings & preferences
Admin Analytics & user management

πŸ” Security Features

  • JWT token-based authentication
  • Password hashing with bcrypt
  • Protected API routes
  • CORS configuration
  • Input validation
  • MongoDB injection prevention

πŸš€ Deployment

Frontend (Vercel)

  1. Push code to GitHub
  2. Import project in Vercel
  3. Add environment variables
  4. Deploy!

Backend (Render)

  1. Push code to GitHub
  2. Create new Web Service in Render
  3. Add environment variables
  4. Deploy!

πŸ“Š Performance

  • Backend response time: < 100ms
  • AI summary generation: 2-3 seconds
  • Page load time: < 1 second
  • Optimized database queries with indexes

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License.

πŸ‘¨β€πŸ’» Author

Vedant S

πŸ™ Acknowledgments

  • Google Gemini AI for AI features
  • MongoDB Atlas for database hosting
  • Vercel for frontend hosting
  • Render for backend hosting

Made with ❀️ by Vedant S

⭐ Star this repo if you find it helpful!

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors