PublishHub is a comprehensive full-stack web application designed to empower independent writers and media houses to seamlessly publish and distribute news articles. Readers, in turn, can access a diverse range of content, enhanced by advanced features for a truly engaging and accessible user experience.
- 🌐 Multilingual Support: Integrated with the Google Translate API, allowing users to read articles in over 10 different global and regional languages.
- 🗣️ AI-Powered Functionalities (Hugging Face APIs):
- News Summarization: Get concise summaries of lengthy articles instantly.
- News-to-Audio Conversion: Listen to articles with customizable playback speeds.
- 🔒 Secure Authentication: Implemented with Google OAuth and JWT (JSON Web Tokens) for secure and efficient user session management.
- 🔄 Robust State Management: Utilizes Redux to efficiently handle all CRUD (Create, Read, Update, Delete) operations, image uploads, and dynamic UI updates.
- 🔍 Enhanced User Experience: Includes advanced Search functionality, user-friendly Light/Dark mode, and lazy-loading for improved performance.
- 📊 Advanced User Dashboard: A dedicated dashboard for users to manage their profiles, articles, comments, and view analytics.
- ⚡ Optimized Deployment: Deployed on Render and utilizes Cron jobs to reduce loading times by 95%, overcoming Render's inactivity sleep rule.
Here's a glimpse of PublishHub in action:
Authentication:
Securely sign in with your email and password, or conveniently use Google OAuth for a seamless login experience.

Welcome Page:
Our inviting landing page, guiding users to either publish or read articles, and introducing the platform's core purpose.

User Dashboard & Profile:
A personalized hub where users can manage their profile information, access their articles, view comments, and control account settings.

Article View with AI & Translation:
Experience our innovative features directly on an article page, including AI summarization and instant multi-language translation.

- Frontend:
- React.js with Redux for robust state management.
- JavaScript
- Tailwind CSS for a highly responsive and customizable design.
- Backend:
- Node.js and Express.js for building efficient RESTful APIs.
- Database:
- MongoDB for flexible and scalable data storage.
- Authentication:
- Google OAuth and JWT for secure user authentication.
- Cloud Services:
- Render for application deployment.
- Firebase for hosting certain functionalities (e.g., image storage).
- APIs & Integrations:
- Google Translate API for multilingual support.
- Hugging Face APIs for AI-powered news summarization and audio functionalities.
To provide a clearer understanding of some technologies and methodologies used in PublishHub:
-
Agile Methodology: Agile is a way of managing projects where work is done in small, manageable steps called "sprints." This approach allows for flexibility, quick adjustments, and continuous improvement, ensuring the project adapts to changing requirements effectively.
-
Lazy Loading: Imagine a web page with many images. Instead of loading all images at once when the page loads (which can be slow), lazy loading allows images to load only as the user scrolls to them. This significantly reduces the page's initial loading time, improving user experience and saving bandwidth.
-
Tailwind CSS: Tailwind CSS is a utility-first CSS framework that helps you style your website much faster. Instead of writing custom CSS for every element, you apply pre-defined classes directly in your HTML (e.g.,
bg-blue-500for a blue background,text-whitefor white text). This makes styling quick, consistent, and highly customizable.- Example:
This creates a blue button with white text, padding, rounded corners, which turns darker blue on hover – all directly from simple classes!
<button class="bg-blue-500 text-white p-2 rounded hover:bg-blue-700"> Click Me </button>
- Example:
-
RESTful APIs: RESTful APIs are like a set of rules that allow different applications to communicate with each other over the internet. Think of it like a standardized way for your app to "ask for" or "send" information (like articles or user data) to the server and get a clear response back. They use simple actions like
GET(retrieve),POST(create),PUT(update), andDELETE(remove). -
Cron Jobs: When a web server is deployed on a service like Render, it might "sleep" if unused for a while to save resources. This can cause a delay when a new user visits. A cron job is like setting an alarm for your server to "ping" itself at regular intervals (e.g., every 10 minutes). This keeps the server awake, ensuring your website loads much faster (up to 95% faster in PublishHub's case) when a user accesses it. It prevents those initial "wake-up" delays.
PublishHub was specifically designed to tackle several common challenges in digital content platforms:
- Content Accessibility: By integrating Google Translate and News-to-Audio functionalities, PublishHub ensures content is accessible to a diverse audience, including non-native speakers and those with visual impairments.
- Performance: The strategic use of cron jobs to circumvent Render’s inactivity sleep rule reduces initial load times by 95%, guaranteeing a smoother and more responsive user experience.
- User Engagement: Features like customizable audio playback speed, dynamic light/dark mode, and an insightful user dashboard contribute to a highly engaging and personalized platform.
PublishHub stands as a comprehensive and highly functional platform for digital news distribution, strongly emphasizing user accessibility, security, and performance. The seamless integration of modern technologies such as AI (Hugging Face), cloud services (Render, Firebase), and robust MERN stack development demonstrates a strong capability to build complex, scalable, and user-centric web applications.
To get a local copy up and running, follow these simple steps:
-
Clone the repository:
git clone https://github.com/Garima-Khandelwal-1/PublishHub.git
-
Navigate to the project directory:
cd PublishHub -
Install backend dependencies:
cd backend # or wherever your backend directory is located npm install
-
Install frontend dependencies:
cd ../frontend # or wherever your frontend directory is located npm install
-
Set up environment variables: Create a
.envfile in yourbackenddirectory and add the following (replace with your actual values):MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key GOOGLE_CLIENT_ID=your_google_oauth_client_id GOOGLE_CLIENT_SECRET=your_google_oauth_client_secret FIREBASE_API_KEY=your_firebase_api_key HUGGING_FACE_API_KEY=your_hugging_face_api_key # Add any other environment variables
Similarly, create a
.envfile in yourfrontenddirectory for any client-side environment variables. -
Run the backend server:
cd backend npm start -
Run the frontend application:
cd ../frontend npm start
The application should now be running on http://localhost:3000 (frontend) and http://localhost:5000 (backend) or your configured ports.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. Don't forget to give the project a star! Thanks!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request