NewsSage is a crowdsourced news platform that enables local and aspiring publishers to post stories that mainstream media often overlooks. It provides real-time news validation through the Google Fact Check API and ensures secure media uploads via Cloudinary.
- Local News Contribution: Users can submit and share news articles.
- Google Fact Check API Integration: Real-time validation of news credibility.
- Secure Authentication: Role-based access control for users and publishers.
- Media Uploads: Secure handling of images and videos using Cloudinary.
- Real-time Updates: Interactive UI built with React.js and Tailwind CSS.
- Framework: React.js (Vite setup)
- Styling: Tailwind CSS
- State Management: Context API
- Build Tool: Vite
- Framework: Node.js with Express.js
- Database: MongoDB
- Authentication: JWT & role-based access control
- Middleware: Auth & Publisher roles
- Hosting: Vercel
- Database: MongoDB Atlas
- CI/CD: GitHub Actions
prashantsaxe-newzsage/
│── front/ # Frontend source code
│ ├── src/ # React source files
│ ├── components/ # Reusable UI components
│ ├── pages/ # Individual pages
│ ├── hooks/ # Custom React hooks
│ ├── context/ # Authentication and global state
│ ├── public/ # Static assets
│ ├── .env # Environment variables
│── server/ # Backend source code
│ ├── controllers/ # Business logic for API endpoints
│ ├── routes/ # API routes
│ ├── models/ # MongoDB Schemas
│ ├── middlewares/ # Authentication & authorization
│ ├── dist/ # Compiled output
│ ├── .env # Backend environment variables
│ ├── package.json # Backend dependencies
- Node.js v16+
- MongoDB Atlas or local MongoDB
- Cloudinary Account (for media uploads)
-
Clone the repository
git clone https://github.com/anurag2204-k/newzSage.git cd newzsage -
Setup Frontend
cd front npm install npm run dev -
Setup Backend
cd server npm install npm start -
Environment Variables
- Create a
.envfile in bothfront/andserver/. - Fill in the required API keys (MongoDB, Cloudinary, etc.)
- Create a
POST /auth/signup- Register a new userPOST /auth/login- Authenticate user
GET /news/all- Fetch all news articlesGET /news/:id- Get details of a specific news articlePOST /news/submit- Submit a news articleDELETE /news/:id- Delete a news article (Admin only)
POST /news/:id/comment- Add a commentGET /news/:id/comments- Fetch commentsPOST /news/:id/vote- Upvote/downvote a news article
We welcome contributions! To contribute:
- Fork the repository
- Create a new branch (
feature/your-feature) - Commit your changes
- Push and open a pull request
NO License.
For inquiries or collaboration, reach out:
- GitHub: Prashant Kumar Saxena ||
- LinkedIn: Prashant Kumar Saxena ||
- GitHub: Anurag Khobragade ||
- LinkedIn: Anurag Khobragade ||