SabkeNews is a high-performance, responsive news and educational portal built with a clean PSR-4 MVC Framework architecture in PHP. It features a modern front-end user experience, robust multi-tiered caching (Redis & File Fallback), SEO optimization (OpenGraph & Schema.org JSON-LD), and a powerful Admin Control Panel.
- Clean MVC Architecture: Organized separation of concerns (
Core/,Models/,Controllers/,Helpers/,Views/). - Responsive Modern UI: Modern dark/light design system with sleek typography, custom CSS variables, and fluid grids.
- Fast Performance & Caching: File & Redis-backed caching for articles, settings, and navigation queries (
src/Core/Cache.php). - SEO & Social Sharing: Auto-generated meta tags, canonical URLs, OpenGraph social previews, and Schema.org
NewsArticleJSON-LD markup. - Sitemap Generation: Built-in XML (
/sitemap) and HTML (/sitemap_html) sitemaps for search engine indexing.
- Dashboard Overview: Live analytics overview showing active posts, pending drafts, visitor counts, and system environment info.
- Post & Category Management: Create, edit, preview, approve, reject, or delete articles and categories.
- Modular Post Editor (
forms/_post_form.php): Unified 2-column post editor with TinyMCE rich text formatting and instant image upload previews (FileReader). - Unpublished Article Preview: Ability for authorized admins/authors to preview draft (
W) and inactive (N) articles. - System Cache Flush: One-click Cache Flush feature in top navbar and Web Settings to clear Redis & file caches (
App\Core\Cache::flush()). - Visitor Log Analytics: Non-blocking visitor logging with detailed IP, browser, and timestamp tracking.
PHP-SabkeNews/
├── admin/ # Admin Control Panel
│ ├── app/ # Admin backend form processors & app handlers
│ │ ├── app.php # Central POST action processor
│ │ ├── loading-post.php # Modal AJAX post loader
│ │ └── ...
│ ├── dashboard/ # Admin Dashboard views & management pages
│ │ ├── index.php # Main Dashboard Overview
│ │ ├── new-post.php # Add New Post Page
│ │ ├── update-post.php # Update Post Page
│ │ ├── view-post.php # All Posts Listing
│ │ ├── view-single-post.php# Admin Single Post Preview
│ │ ├── manage-website.php # Web Settings & Cache Flush
│ │ └── forms/
│ │ └── _post_form.php # Shared Modular Post Form Component
│ └── index.php # Admin Login Entry
│
├── assets/ # Public static assets (CSS, JS, Images, Uploads)
│ ├── css/ # App stylesheet (app.css)
│ └── postImage/ # Article featured image uploads
│
├── cache/ # File cache storage & visitor_logs.json
├── src/ # PSR-4 MVC Source Code
│ ├── bootstrap.php # Application Bootstrapper & Autoloader
│ ├── Core/ # Framework Engine (Router, View, Database, Cache)
│ ├── Controllers/ # Application Controllers (Home, Post, Page, Sitemap)
│ ├── Helpers/ # Utilities (SEOHelper, UrlHelper)
│ └── Models/ # Data Models (Post, Category, Setting, VisitorLog)
│
├── system/ # Core Database Connection (connection.php)
├── views/ # Front-End Template Views & Layouts
│ ├── layouts/ # Header, Footer, & Base Layouts
│ └── ... # Page templates (home, post_details, post_list, etc.)
│
├── .htaccess # Apache URL Rewrite Rules
├── index.php # Application Front Controller & Entry Point
├── post-details.php # Legacy/Adapter route for article details
├── post.php # Legacy/Adapter route for category listing
├── sitemap.php # XML Sitemap Endpoint
└── README.md # Project Documentation
- PHP:
8.0or higher - Web Server: Apache with
mod_rewriteenabled - Database: MySQL / MariaDB (Database Name:
blog) - PHP Extensions:
pdo_mysql,mysqli,json,mbstring
-
Clone / Download Project: Place the project folder in your local XAMPP/WAMP
htdocsdirectory:C:\xampp\htdocs\PHP-SabkeNews -
Configure Database: Import your
blog.sqlschema into MySQL and verify connection parameters in system/connection.php:$server_name = "localhost"; $username = "root"; $password = ""; $db_name = "blog";
-
Access Public Site & Admin:
- Public Portal:
http://localhost/PHP-SabkeNews/ - Admin Panel:
http://localhost/PHP-SabkeNews/admin/
- Public Portal:
To clear system cache from the Admin Panel:
- Click the "Flush Cache" button in the top navigation header bar, OR
- Go to Manage Website -> Cache Management and click "Flush System Cache Now".
- Developed By: Aman Projects
- Website: amanprojects.com