Skip to content

πŸš€ A modern news portal built with Laravel, designed to make it easy for users to read and share news and for admins to manage content efficiently. It includes advanced features like real-time notifications, fast performance and secure user management.

Notifications You must be signed in to change notification settings

Mahmoud-Hagrass/News-Portal-And-Magazine-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ News Portal Documentation

A modern news portal built with Laravel , designed to make it easy for users to read and share news and for admins to manage content efficiently. It includes cool features like real-time notifications, fast performance, and secure user management.

πŸŽ₯ Video Tutorials

πŸ”Ή Linkedin Post For That Tutorial: Live Demo

πŸ”Ή Complete Tutorial Series: Watch Now

🌟 Features

πŸ”ΉUser Features

πŸš€ 1. Authentication

βœ… Login, Register, Reset Password, and Email Verification , Logout.

βœ… OTP verification for password reset.

βœ… Social login using OAuth [Google , Facebook] With SOLID design prencipals best practices[single responsability , open-closed , dependancy inversion].

βœ… Profile management: Users can view and edit their profile details (name, username, email, password,image etc.).

βœ… Password change feature using the same profile page.

πŸš€ 2. Post Management

βœ… Users can create, edit, delete and view posts.

βœ… Real-time increment of post view counts.

βœ… Preview post images using file-input package and can delete the previewed images without reloading the page using jQuery and Ajax .

βœ… Preview post long description using summerenote package .

βœ… Enable comments on posts or not [can not add comments if that disabled] .

βœ… Specify which category that post related to ! .

βœ… Make a validation on uploded number of posts in frontend using file-input package and also in backend using custom form validation classes. [separte that logic to add clearity in post controller class]

βœ… Display number of views for each post.

πŸš€ 3. Comments

βœ… Users can add comments on active posts using jQuery and Ajax [adding in realtime without reload the page].

βœ… Notify post author when someone add a new comment on his/her post and display these notifications in top-navbar [realtime and database notifications using pusher websocket server and Laravel Echo to listen to realtime events].

βœ… Hide/show comments based on post settings[active or inactive when creating or updating it using jQuery and Ajax].

πŸš€ 4. Notifications

βœ… Real-time notifications for comments and other activities [using Pusher , Laravel Echo , jQuery and Ajax].

βœ… Display unread notifications count in top-navbar.

βœ… Display limited number of unread notifications in top-navbar.

βœ… Display all of unread notifications in user dashboard notification page and can select any one and mark it as read or mark all as read [that handled by using middleware]..

βœ… Can delete any of displayed unread notifications or delete all from databae .

βœ… SweetAlert2 is used for confirmation on logouts.

βœ… Database notifications for to store user notifications [it uses UUID not incremental id for no notification redundancy].

πŸš€ 5. Social Authentication

βœ… Users can login via Facebook and Google [by using SOLID prencipals to make that clean single responsability , dependancy inversion , open-closed].

πŸš€ 6. Phone Validation

βœ… Validate users phone numbers using the Laravel-Phone package on the Contact Us page and user.

πŸš€ 7. Advanced Filters

βœ… Users can filter posts by category, search by title [realtime search using jQuery and Ajax].

πŸš€ 8. Techical Support

βœ… Users can contact the website support team via the Whatsapp .

βœ… OR Users can contact the website support team but via Contact-Us page and admins will be notifyed with message in admin dashboard [realtime notification in admin dashboard and this notification stored in database].

πŸš€ 8. Website Social Contacts

βœ… Users can go to social link for website like [Google , Facebook , Twitter , Instagram , Youtube , email , phone] in navbar and use service provides to handle that logic as a globla site settings .

πŸš€ 9. Search Engine Optimization (SEO)

βœ… In show post page make a meta discription with long description of post so when some when search can get result on Google as first search result.

βœ… Used for each element in html body for all project blade views title to enhance SEO .

βœ… Used canonical links with pagination to enhance SEO .

βœ… Adding headig in each page like H1 or H2 to rank the page in Google Search and that also enhance SEO .#

βœ… Using post slug instead of id for better SEO.

πŸš€ 10. Home Page

βœ… Display top 5 most viewed posts in home page.

βœ… Display top 5 latest posts in home page.

βœ… Display top 5 popular posts in home page.

βœ… Display top 5 oldest posts in home page.

βœ… Display top 3 latest posts from cache in slider.

βœ… Display Read More posts from cache as a top latest 10 posts.

πŸš€ 11. Footer Site Setting

βœ… Display website social contacts in footer.

βœ… Display Useful Links.

βœ… User can send newsletter email.

πŸš€ 12. Posts Caching

βœ… Posts are cached using Redis for improved performance.

βœ… When adding a new post , edit or also delete it will forget all redis caching keys to update latest details .

βœ… Main 3 latest posts in slider are cached using redis and predis package to give a high performance [so not required all times request a server with database query] .

βœ… Read More posts section also cached using redis and predis package to enhance performance and give a better user experience.

πŸ”ΉAdmin Features

πŸš€ 1. Admin Dashboard

βœ… Admin can log in, reset password, and manage their profile.

βœ… Admin receives notifications for reset requests, and OTP verification is used for password reset.

βœ… Admin can reset password and it will send an email notification via email with otp token [i used laravel-Otp package to send otp and can make otp valid with specific time , number of characters and whose will be notified with that]

πŸš€ 2. User Management

βœ… Authorized admin can view, blocked/unblocked users.

βœ… Authorized admin can delete blocked/unblocked users.

βœ… Authorized admin can block user and then when this use try to login it will check it's status and will display for it a waiting list page.

βœ… Authorized admin cab search users by different filters: sort by, limit by, order by and status.

βœ… Authorized admin can manage user status (active/inactive).

βœ… Authorized admin can view user information by using a Bootstrap-Modula and laravel-components.

πŸš€ 3. Posts Management

βœ… Authorized admin can add, update, delete, and search posts and categories.

βœ… Authorized admin can manage the CRUD operations for posts.

βœ… Authorized admin can show posts details like number-of-views , user who creates that post , status , comment abiliy.

βœ… Authorized admin can also make the post active or inactive depending on status if it becomes inactive it will not appear in the frontend user home page .

βœ… Authorized admin can show all comments for any post and also show how writes these comments .

βœ… If Authorized admin create a new post , edit or also delete it will clear or forget all cache keys to get the latest updated posts with new details in frontend user home page.

πŸš€ 4. Authorization [Roles And Permessions]

βœ… Manage multiple admins with full CRUD (create, read, update, delete).

βœ… Super admins can assign roles and permissions to other admins, controlling access to various features.

βœ… Super admin can add , show , edit , delete role .

βœ… Super admin can add , show , edit , delete permessions for any role.

βœ… Super admin can assign a role to specific admin and can make all permessions of that role.

βœ… Authorized admin can show modules that is allowed for him to access based on his permessions [use middleware can and @can blade directive to check if the auth user if authorized for that action or not and if not , it will restrict his actions].

πŸš€ 5. Admin Notifications

βœ… Authorized admin receives notifications about various user activities and can mark them as read.

βœ… Authorized admin for notification page can access the all unread notifications and can mark them all as read or delete all or delete specific or also mark one as read.

βœ… Authorized admin for notifications can show all count number of notifications .

βœ… For show realtime notifications in admin i used pusher websocket server with laravel Echo to listen for for pusher notification events and jQuery and Ajax for realtime update content without refreshing the the page and also after that store the notification in database to make a CRUD operations on it later.

πŸš€ 6. Advanced Filters

βœ… Admin can filter data by status, limit, order, and sort across various modules.

βœ… General search functionality across all authorized admin pages.

πŸš€ 7. Advanced Filters

βœ… Authorized admin can filter posts by category, search by title, and sort by date [realtime search using jQuery and Ajax].

βœ… Authorized admin can search posts by title, category, and author.

βœ… Authorized admin can filter posts by category and search by title.

βœ… Authorized admin can sort posts by date, title, and category.

βœ… Authorized admin can filter posts by category and search by title.

πŸš€ 8. Category Managements

βœ… Authorized admin for categories managements can access all categories data like name , status , created_date , number of posts in that category.

βœ… Authorized admin for categories managements can show , edit , delete , update category.

βœ… Authorized admin for categories managements can active or inactive categories and if the category becomes inactive it will not be appearing in the frontend user home page .

βœ… Authorized admin for categories managements can search for categories with name , status , create_date and also sortby:id,name,created_at and can limited the results with specifc limited number.

βœ… Authorized admin for categories managements can add new categories with bootstrap-modula .

πŸš€ 9. Conatcts Management

βœ… Authorized admin for contacts managements can access all Conatcts data like name ,email , subject , phone , status , created_date.

βœ… Authorized admin for contacts managements can show , edit , delete , update conatcts.

βœ… Authorized admin for contacts managements can active or inactive contact and if the contact.

βœ… Authorized admin for contacts managements can make a contact status as read when click on show page of that contact or when click on notification of that contact in admin dashboard navbar it will make that notification as read and it redirect the admin to show page for contact and also can make it's status as read.

πŸš€ 10. Site Settings Managements

βœ… Authorized admin for Site Setting managaments can update site settings data like site name , phone , email , social links , logo , favicon , locations ... .

πŸš€ 11. Admin Profile Managements

βœ… Authorized admin for edit profile managaments can edit thier profiles , change password , edit basic info , ... .


πŸ’Ό Packages Used

βœ… πŸš€Laravel Eloquent Sluggable: Automatically generates SEO friendly slugs for posts.

βœ… πŸš€Laravel Breeze: Provides basic authentication features like login, registration, and password reset.

βœ… πŸš€Laravel Debugbar: Debugging tools to enhance development.

βœ… πŸš€Laravel Predis: Caching using Redis.

βœ… πŸš€Laravel N+1 Detector: Detects N+1 query issues and optimizes queries.

βœ… πŸš€Eloquent Eager Limit: Optimizes performance by reducing the number of queries (before: 59 queries, after: 12 queries).

βœ… πŸš€PHP Laravel Flasher: Push notifications (toast notifications) to the frontend.

βœ… πŸš€MailTrap: Used for sending test emails via SMTP.

βœ… πŸš€jQuery & Ajax: Used to handle real-time data updates on the frontend without page reload.

βœ… πŸš€Summernote: A text editor for text areas (e.g., post content).

βœ… πŸš€Laravel Phone: Used to validate phone numbers.

βœ… πŸš€Bootstrap FileInput: Allows image preview, drag and drop support for file inputs.

βœ… πŸš€Laravel OTP: Implements OTP (One Time Password) for secure password resets.

βœ… πŸš€Pusher & Laravel Echo: Real-time notifications using WebSockets.

βœ… πŸš€SweetAlert2: Provides beautiful alerts for various actions, like logout confirmation.

How to Run the Project

Prerequisites

Make sure you have the following installed:

βœ… PHP >= 8.1>=

βœ… Composer

βœ… Laravel 10>=

βœ… Node.js & npm (for frontend assets)

πŸ“· Screenshots :

Admin Sceenshots :

screencapture-news-portal-net-admin-dashboard-2025-03-11-00_07_36 screencapture-news-portal-net-admin-roles-create-2025-03-11-00_10_40 screencapture-news-portal-net-admin-roles-2025-03-11-00_10_08 screencapture-news-portal-net-admin-users-2025-03-11-00_11_28 screencapture-news-portal-net-admin-users-create-2025-03-11-00_11_43 screencapture-news-portal-net-admin-notifications-2025-03-11-00_15_43 screencapture-news-portal-net-admin-contacts-1-edit-2025-03-11-00_14_49 screencapture-news-portal-net-admin-contacts-1-2025-03-11-00_14_19 screencapture-news-portal-net-admin-contacts-2025-03-11-00_13_31 screencapture-news-portal-net-admin-posts-create-2025-03-11-00_13_14 screencapture-news-portal-net-admin-posts-2025-03-11-00_13_04 screencapture-news-portal-net-admin-categories-2025-03-11-00_12_54 screencapture-news-portal-net-admin-users-status-in-active-2025-03-11-00_11_57

Installation Steps

1. Clone the repository:

git clone https://github.com/Mahmoud-Hagrass/News-Portal-And-Magazine-Website.git

πŸ”Ή Step 2: Install Composer

First, install PHP dependencies using Composer:

composer install

πŸ”Ή Step 2: Install Node Dependencies

Then, install Node.js dependencies using npm:

npm install

πŸ”Ή Step 3: Environment Setup

cp .env.example .env

πŸ”Ή Step 4: Generate the application key:

php artisan key:generate

πŸ”Ή Step 5: Database Configuration

php artisan migrate --seed

πŸ”Ή Step 6: Setup Storage

php artisan storage:link

πŸ”Ή Step 7: Run the Application

if you use xampp server use that :

php artisan serve

if you use laragon server you just need to click on start button.

πŸ”‘ Admin Login Credentials

πŸ“§ Email: admin@admin.com

πŸ”‘ Password: 123456789

πŸ“© Contact Me

πŸ’Ό Need a PHP Laravel Developer? Let's work together!

πŸ“² WhatsApp: +201206814586


πŸ“œ License

πŸ”Ή This project is MIT Licensed – Feel free to use & modify!


⭐ If you find this project helpful, don't forget to star it! ⭐

About

πŸš€ A modern news portal built with Laravel, designed to make it easy for users to read and share news and for admins to manage content efficiently. It includes advanced features like real-time notifications, fast performance and secure user management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published