A modern, full-stack intelligent content aggregation platform that brings together news, academic papers, and books with AI-powered summaries and personalized recommendations. Built with Next.js + TypeScript on the frontend and Node.js on the backend.
- π° News Aggregation - Real-time news from multiple reliable sources
- π Academic Papers - Thousands of research papers and journals at your fingertips
- π Book Discovery - Explore millions of books across all genres
- π Global Search - Powerful search functionality across all content types
- π€ AI Summaries - Instant AI-generated summaries powered by Google Gemini
- π― Smart Recommendations - Personalized content suggestions based on your reading history
- π Daily Briefing - Tailored daily briefing with trending topics in your interests
- π‘ Intelligent Insights - Context-aware information extraction
- πΎ Save & Organize - Save content and organize into custom collections
- π¬ Community Engagement - Comment on content and discuss with other readers
- π€ User Profiles - Customize preferences, reading habits, and notification settings
- π Reading Analytics - Track your reading progress and statistics
- π Admin Dashboard - Comprehensive analytics and platform statistics
- π₯ User Management - Monitor users and manage platform health
- π Performance Metrics - Real-time performance monitoring
- Next.js 14 - Modern React framework with App Router and Server Components
- React 18 - Declarative UI library
- TypeScript 5.0 - Static type safety and enhanced developer experience
- Tailwind CSS - Utility-first CSS framework for responsive design
- Framer Motion - Smooth, performant animations and transitions
- Glassmorphism UI - Modern frosted glass design patterns
- ESLint - Code quality and consistency
- Node.js 18+ - JavaScript runtime
- Express.js - Lightweight and flexible web framework
- MongoDB Atlas - Scalable NoSQL cloud database
- Mongoose - Elegant MongoDB object modeling
- JWT (JSON Web Tokens) - Secure authentication mechanism
- Google Gemini AI - Advanced AI capabilities for content summarization 6
- Node.js 18+ and npm/yarn package manager
- MongoDB Atlas account (free tier available at mongodb.com/cloud)
- Google AI Studio API key (free at aistudio.google.com)
- Git installed on your machine
git clone https://github.com/vedant21-ctr/readLife.git
cd readLifecd readstream-backend
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Edit .env with your credentials (MongoDB URI, API keys, etc.)
nano .envcd ../readstream-frontend
# Install dependencies
npm install
# Create environment file
cp .env.example .env.local
# Update API endpoint if needed
nano .env.localTerminal 1 - Backend Server:
cd readstream-backend
npm run dev
# Server runs on http://localhost:5001Terminal 2 - Frontend Server (TypeScript + Next.js):
cd readstream-frontend
npm run dev
# Frontend runs on http://localhost:3000Open your browser and navigate to:
http://localhost:3000
# Server Configuration
PORT=5001
# Database
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/readlife?retryWrites=true
# Authentication
JWT_SECRET=your-super-secret-jwt-key-here
JWT_EXPIRE=7d
# AI Service
GOOGLE_AI_API_KEY=your-google-gemini-api-key
# CORS & Frontend
FRONTEND_URL=http://localhost:3000
NODE_ENV=development# API Endpoint
NEXT_PUBLIC_API_URL=http://localhost:5001/api
# Optional: Analytics, third-party services can be added hereNote: Never commit .env files to version control. They should be in .gitignore.
readLife/
βββ readstream-backend/ # Express.js backend API
β βββ config/ # Database configuration
β βββ controllers/ # Request handlers & business logic
β βββ middleware/ # Custom middleware (auth, error handling)
β βββ models/ # Mongoose schemas & models
β βββ routes/ # API endpoint definitions
β βββ services/ # Core business logic & utilities
β βββ utils/ # Helper functions
β βββ server.js # Express server entry point
β βββ package.json # Dependencies
β βββ nodemon.json # Development configuration
β
βββ readstream-frontend/ # Next.js + TypeScript frontend
β βββ app/ # Next.js App Router directory
β β βββ layout.tsx # Root layout component
β β βββ page.tsx # Home page
β β βββ login/ # Authentication pages
β β βββ signup/ # User registration
β β βββ news/ # News feed
β β βββ trending/ # Trending content
β β βββ dashboard/ # User dashboard
β β βββ payment/ # Payment & subscription
β β βββ subscription/ # Subscription management
β βββ components/ # Reusable React components (TypeScript)
β β βββ Navbar.tsx # Navigation component
β β βββ NewsCard.tsx # News article card
β β βββ HotNewsSlider.tsx # Carousel component
β β βββ SmoothScroll.tsx # Scroll utilities
β β βββ ui/ # UI components
β βββ contexts/ # React Context (TypeScript)
β β βββ AuthContext.tsx # Authentication state
β β βββ LanguageContext.tsx # Localization state
β βββ lib/ # Utilities & helpers (TypeScript)
β β βββ api.ts # API client
β β βββ auth.ts # Authentication utilities
β β βββ utils.ts # General utilities
β βββ providers/ # Context providers
β βββ public/ # Static assets
β βββ globals.css # Global styles
β βββ tsconfig.json # TypeScript configuration
β βββ tailwind.config.ts # Tailwind CSS configuration
β βββ next.config.ts # Next.js configuration
β βββ eslint.config.mjs # ESLint rules
β βββ package.json # Dependencies
β
βββ README.md # This file
POST /auth/signup - Register a new user account
POST /auth/login - Login and receive JWT token
GET /auth/me - Get current authenticated user
GET /news - Fetch news articles with pagination
GET /news/:id - Get detailed news article
GET /news/search - Search news by keywords
GET /saved - Retrieve all saved items
POST /saved - Save a new item
DELETE /saved/:id - Remove a saved item
GET /collections - Get user's collections
POST /collections - Create a new collection
PUT /collections/:id - Update collection
DELETE /collections/:id - Delete collection
POST /ai/summarize - Generate AI summary for content
GET /ai/recommendations - Get personalized recommendations
GET /ai/daily-brief - Get daily AI briefing
GET /admin/users - Get all users (admin only)
GET /admin/analytics - Get platform analytics (admin only)
GET /admin/stats - Get system statistics (admin only)
- Utilizes Google Gemini AI to generate concise, accurate summaries
- Produces 3-4 sentence abstracts capturing key information
- Handles multiple content formats: articles, papers, and book descriptions
- Instant processing with caching to optimize API usage
- AI-generated daily digest tailored to user preferences
- Aggregates trending topics from reading history
- Summarizes multiple content pieces into cohesive briefing
- Delivered at user-configured time
- ML-powered suggestion engine analyzing user behavior
- Considers saved items, reading patterns, and engagement metrics
- Adapts to evolving user interests over time
- Surfaces high-quality, relevant content
# Start dev server with hot reload
cd readstream-frontend
npm run dev
# Type checking
npm run type-check
# Linting
npm run lint
# Build for production
npm run build
# Preview production build
npm run start# Start with auto-reload (nodemon)
cd readstream-backend
npm run dev
# Run tests
npm test
# Build for production
npm run build- Strict mode enabled for type safety
- ESLint configured for consistent code style
- Source maps for easier debugging
- Path aliases configured for clean imports
- Glassmorphism - Modern frosted glass effect for contemporary UI
- Color Palette - Clean neutrals (white, gray, soft black) with indigo accents
- Accent Color - Indigo (#6366f1) for interactive elements and CTAs
- Typography - Inter font family for optimal readability
- Spacing - Consistent 8px grid system for harmonious layouts
- Responsive Design - Mobile-first approach with Tailwind CSS breakpoints
- Smooth Animations - Framer Motion for polished interactions
- Skeleton Loading - UI placeholders for better perceived performance
- Accessibility - WCAG compliance for inclusive user experience
| Component | Tech Stack | Notes |
|---|---|---|
| Navigation | React + TypeScript | Persistent header with mobile menu |
| News Cards | React + Tailwind | Hover effects with Framer Motion |
| Carousels | Framer Motion | Smooth transitions between slides |
| Modals | React + TypeScript | Accessible dialog components |
| Comments | React + TypeScript | Real-time feedback interface |
- π JWT Tokens - Industry-standard JSON Web Token authentication
- π Password Security - Bcrypt hashing with salt rounds for secure password storage
- π‘οΈ Protected Routes - Middleware-based route protection both frontend and backend
- π€ Role-Based Access Control - Admin-only endpoints with permission verification
- π« CORS Configuration - Restricted cross-origin requests for API security
- β Input Validation - Comprehensive validation on all user inputs
- π‘οΈ MongoDB Injection Prevention - Sanitized queries and parameterized statements
- π Environment Secrets - Sensitive keys never exposed in codebase
- Rate limiting on sensitive endpoints (planned)
- HTTPS enforcement in production deployments
- Regular security audits and dependency updates
- Error handling without revealing sensitive information
- Push to GitHub - Ensure code is committed and pushed
- Import in Vercel - Go to vercel.com, import repository
- Configure Environment
NEXT_PUBLIC_API_URL=https://your-backend.render.com/api - Deploy - Vercel automatically deploys on each push
- Push to GitHub - Ensure code is committed and pushed
- Create Web Service - Create new service on Render/Railway
- Configure Environment - Add all variables from
.env - Deploy - Choose branch and deploy
- Verify - Test API endpoints from deployed URL
- Update API URLs in environment variables
- Enable HTTPS/SSL
- Configure database backups
- Set up monitoring and logging
- Review security settings
- Test all features in production
- Set up CI/CD pipeline
| Metric | Target | Status |
|---|---|---|
| Backend Response Time | < 100ms | β |
| AI Summary Generation | 2-3 seconds | β |
| Page Load Time | < 1 second | β |
| TypeScript Build Time | < 30s | β |
| Database Query Time | < 50ms | β |
- Next.js Server Components for reduced client JS
- API response caching strategies
- Database indexing on frequently queried fields
- Image optimization via Next.js Image component
- Code splitting and lazy loading
Port Already in Use
# Find process using port
lsof -i :5001 # backend
lsof -i :3000 # frontend
# Kill process
kill -9 <PID>MongoDB Connection Failed
- Verify MongoDB URI in
.env - Check IP whitelist in MongoDB Atlas
- Ensure cluster is active
TypeScript Errors
cd readstream-frontend
npm run type-checkAPI Not Responding
- Verify backend is running:
curl http://localhost:5001/api - Check CORS settings in backend
- Review browser console for errors
Build Failures
- Clear node modules:
rm -rf node_modules && npm install - Check Node.js version:
node --version(should be 18+) - Review build logs for specific errors
We welcome contributions! Whether it's bug fixes, features, or documentation improvements, your help is appreciated.
- Fork the repository - Click the fork button on GitHub
- Create a branch -
git checkout -b feature/amazing-feature - Make your changes - Edit files and commit with clear messages
- Push to branch -
git push origin feature/amazing-feature - Open Pull Request - Describe your changes and link related issues
- Follow existing code style and patterns
- Use TypeScript for all frontend components
- Write meaningful commit messages
- Add comments for complex logic
- Test changes before submitting PR
- Update documentation as needed
Please open an issue on GitHub including:
- Problem description and steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Node version, etc.)
- Screenshots or error messages if applicable
This project is licensed under the MIT License.
| Name | Enrollment No. | Contribution |
|---|---|---|
| Vedant Satbhai | 2401010500 | Backend Core (Auth, DB, Models, Middleware) Β· UML Diagrams |
| Augustya Purohit | 2401010114 | Backend Core (Auth, DB, Models, Middleware) |
| Prajjwal Tripathi | 2401010331 | Frontend (Pages, Components, UI/UX) |
| Mukund Mangla | 2401010286 | Frontend (Pages, Components, UI/UX) |
| Ram Bharadwaj | β | Technical Report Β· Diagrams |
Vedant Satbhai & Augustya Purohit β Backend Core
- Express server setup, middleware pipeline
- All 5 Mongoose models (User, Content, SavedItem, Collection, Comment)
- JWT authentication, bcrypt password hashing
- Auth middleware (
protect,admin) - Database configuration and connection
Prajjwal Tripathi & Mukund Mangla β Frontend
- All Next.js pages (Home, News, Dashboard, Login, Signup, Subscription, Payment)
- React components (Navbar, NewsCard, HotNewsSlider, SkeletonCard)
- AuthContext, LanguageContext, ThemeProvider
- Framer Motion animations, Tailwind CSS styling
Ram Bharadwaj β Report & Diagrams
- Full Technical Project Report
- ER Diagram, Sequence Diagram, Use Case Diagram, Class Diagram
Vedant Satbhai β Additional
- UML & Architecture Diagrams
- Next.js Documentation - Frontend framework
- TypeScript Handbook - Type-safe JavaScript
- Express.js API - Backend framework
- MongoDB Docs - Database documentation
- Google Gemini API - AI features
- Postman - API testing
- MongoDB Compass - Database GUI
- VS Code - Code editor
- Git - Version control