News Aggregator Backend API | ASP.NET Core, MySQL, GNews Integration (Free Download)
Robust News Aggregator Backend API built with ASP.NET Core 8.0, MySQL, JWT auth. Features secure user registration, news sync from GNews API, category filtering, search, admin/user roles, Swagger docs, and Excel export for streamlined news management.
The News Aggregator Backend API is a robust, scalable solution built using ASP.NET Core 8.0 and Entity Framework Core with MySQL for database management. It provides secure user authentication via JWT tokens and allows users to register, login, and access personalized news feeds. The API integrates with the GNews external API to fetch and sync news articles in real-time and supports category-based filtering and search functionalities to enhance user experience. Admin users can manage news items, categories, users, and sync external news through the admin panel. Comprehensive role-based authorization safeguards feature access with proper authentication and permission handling.
Key Features:
- Secure JWT authentication for users and admins
- User registration and login endpoints
- Role-based access control with Admin and User roles
- Fetch, search, and filter news articles with pagination
- Sync news articles from GNews API (admin-only)
- Category management and filter support (general, world, business, technology, sports, etc.)
- Swagger/OpenAPI interactive API documentation
- Password hashing with BCrypt for security
- Robust error handling and logging with .NET built-in tools
- Export data via Excel reports (admin functionality)
- CORS enabled for frontend integration
Technologies Used:
- ASP.NET Core 8.0 Web API
- Entity Framework Core with MySQL
- JWT Bearer Token Authentication
- BCrypt Password Hashing
- Swagger/OpenAPI
- GNews API Integration
- MySQL Server 8.0+
Setup Requirements:
- .NET 8.0 SDK installed
- MySQL Server 8.0 or higher
- GNews API Key (obtain from https://gnews.io/)
- Provision database and update connection strings
- Typical development workflow using dotnet CLI commands for restore, migrate, and run
API Endpoints Include:
- Authentication: register, login, token validation, current user info
- News: retrieve news, search, category listing, sync external news
- Admin controls for managing categories, users, and news sync
Security Features:
- Role-based authorization for protected endpoints
- Password and token security with BCrypt and JWT
- Input validation and sanitization to safeguard against injection
Documentation & Testing:
- Use Swagger UI at the root URL for exploration and API testing
Default Credentials (for initial admin access):
- Email: admin@newsaggregator.com
- Password: admin123
Run Application:
- dotnet run command launches the API on localhost
- Accessible on HTTPS port 7000 and HTTP port 5000
This backend API offers a reliable foundation for building powerful news aggregator applications with modern security and extensibility best practices.
Lifetime updates
Access the latest features as they ship.Instant download
Start building within minutes.Team friendly
Share with collaborators and clients.Technologies used
Tags
Customer reviews
1 totalMCQshot
Thankyou for source code !!!!
Keywords: Easy setup, User-friendly interface
Thank you for your kind words and support! Glad to know you found the project helpful and easy to use. Your feedback motivates us to keep improving and sharing more open-source resources for learners and developers.
Share your experience
Your feedback helps other builders decide faster.
You might also like
Browse all products
Online Food Ordering System in PHP with Source Code (Free Download)
A complete food ordering system built using PHP, MySQL, HTML, CSS, JavaScript, and AJAX.
Paying Guest Accommodation System Using PHP and MySQL (Free Download)
PHP MySQL Paying Guest System with Admin, Owner, and User panels for PG searching, booking, listing management, and notifications — secure,…
Online Music System Project in PHP and MySQL (Free Download)
A user-friendly web application that allows users to create and manage their own music libraries, listen to songs, create playlists, and sha…