GO-Blog is a Laravel-based project aimed at creating a powerful and user-friendly blogging platform. It provides a robust backend powered by PHP and the Laravel Framework, along with a modern front-end interface using Livewire.
This project leverages the following technologies:
- PHP (
^8.1
) - The programming language powering the backend of the application. - Laravel Framework (
^10.10
) - A powerful PHP framework for web application development. - Laravel Jetstream (
^3.2
) - A beautifully designed application scaffolding for Laravel. - Livewire (
^2.12
) - A full-stack framework for building dynamic user interfaces in Laravel. - Tailwind CSS (
^2.2
) - A utility-first CSS framework for rapidly building custom user interfaces. - DaisyUI (
^2.5
) - A component library for Tailwind CSS. - TinyMCE - Empowering content creation with a user-friendly rich text editor, making sharing your knowledge a breeze.
Before you begin, make sure you have the following prerequisites installed on your system:
- PHP - PHP 8.1 or a compatible version.
- Composer - A PHP package manager.
- Node.js - A JavaScript runtime.
- Laravel CLI - Laravel command-line tool.
- TinyMCE - Rich text editor.
Follow these steps to set up your Laravel 10 project with Jetstream and Vite:
- Clone the Repository
git clone <repository-url> cd <project-folder>
- Install Composer Dependencies
composer install
- IInstall NPM Dependencies
npm instal
- Copy the Environment File
Create a copy of the .env.example file and name it .env.
cp .env.example .env
- Generate an Application Key
php artisan key:generate
- Configure the Database
Update the .env file with your database connection details:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database_name DB_USERNAME=your_database_username DB_PASSWORD=your_database_password
- Run Migrations and Seed the Database
php artisan migrate --seed
- Set TinyMCE
TINYMCE_CDN_URL="https://cdn.tiny.cloud/1/YOUR_TINY_MCE_API_KEY/tinymce/5/tinymce.min.js" // register and replace YOUR_TINY_MCE_API_KEY from https://www.tiny.cloud/my-account/dashboard -> Yout Tiny API Key
- Install and Build Vite Assets
npm run dev # OR for production build npm run prod
- Start the Laravel Development Server
php artisan serve
- Access Your Application Open your web browser and visit http:https://localhost:8000 to access your Laravel 10 project.
This roadmap outlines the progression of the Laravel blog project, highlighting the key phases and tasks involved.
- Post Index - Post Heigh unstable.
- Post Index - Post image size unstable.
- Post Create - Slug.
- Post Image - Validate Image Required withoud refresh page.
- TinyMCE - put credential on env.
- Weather API - Integration with api.open-meteo.com
-
Set up Laravel project with Jetstream and Livewire.
- Install Laravel using the Laravel installer or Composer.
- Create a new Laravel project with the desired name.
- Install Jetstream and choose the Livewire stack during installation.
- Configure the database settings in the
.env
file. - Generate the application key using
php artisan key:generate
. - Run the migration and seed the database with dummy data using
php artisan migrate --seed
. - Test the basic setup by accessing the application in the browser.
- Configure logging daily (7).
- Configure logging query, bindings, time.
-
Configure authentication and user management.
- Generate authentication scaffolding using Jetstream:
php artisan jetstream:install livewire
. - Customize the authentication views and routes as needed.
- Test the authentication functionality by registering, logging in, and logging out.
- Generate authentication scaffolding using Jetstream:
-
Create blog model and migration.
- Generate a migration for the blog posts table:
php artisan make:migration create_blog_posts_table
. - Define the structure of the blog posts table in the migration file.
- Run the migration:
php artisan migrate
.
- Generate a migration for the blog posts table:
-
Implement CRUD operations for blog posts.
- Create PostController and routes
php artisan make:controller PostController --resource
. - Create Post Model
php artisan make:model Post
. - Create a Livewire component for managing blog posts, such as
PostIndex
,PostCreate
,PostEdit
, andPostShow
. - Define the necessary properties and methods in each Livewire component.
- Implement the logic for creating, editing, and deleting blog posts using Laravel's Eloquent ORM.
- Render the appropriate views and wire up the Livewire components with the necessary routes.
- Create PostController and routes
-
Design views for creating, editing, and displaying blog posts.
- Use Blade templates to design the views for creating, editing, and displaying blog posts.
- Style the views using Tailwind CSS classes and components.
- Leverage Livewire's data binding and wire directives to create dynamic and interactive UI elements.
-
Implement authorization for managing blog posts.
- Define authorization policies or gates for managing blog posts.
- Restrict access to create, edit, and delete operations based on user roles and permissions.
- Add appropriate authorization checks in the Livewire components and views.
-
Integrate a rich text editor for content creation.
- Choose a rich text editor library such as TinyMCE or CKEditor.
- Install the library using a package manager or include it directly in your project.
- Integrate the rich text editor into the create and edit views.
- Implement the necessary JavaScript code to handle content formatting and interactions.
-
Add image upload functionality for blog posts.
- Implement file upload handling using Laravel's file system features.
- Update the create and edit views to include an image upload field.
- Store the uploaded images in a designated folder and associate them with the corresponding blog posts.
-
Implement pagination for the blog listing page.
- Use Laravel's pagination features to paginate the list of blog posts.
- Update the blog listing view to display paginated results.
- Implement navigation links to switch between different pages.
-
Integrate a commenting system for blog posts.
- Create a Comment model and migration for storing comments.
- Establish a relationship between the Comment and Post models.
- Design and implement a Livewire component for adding and displaying comments.
- Update the PostShow view to render the comments component and allow users to leave comments.
- Implement live updates using Livewire.
-
Implement categories and tags for organizing blog posts.
- Create models and migrations for categories and tags.
- Define relationships between the Category, Tag, and Post models.
- Update the database schema and seed the categories and tags data.
- Modify the views and components to display and filter blog posts by categories and tags.
-
Enable social sharing of blog posts.
- Integrate social sharing buttons for popular platforms like Facebook, Twitter, and LinkedIn.
- Generate appropriate share links with the post's URL and title.
- Add the social sharing buttons to the PostShow view.
-
Test the blog thoroughly for functionality and user experience.
- Conduct comprehensive testing of all features, including creating, editing, and deleting blog posts, authentication, and user management.
- Test the blog across multiple devices and browsers to ensure responsiveness and compatibility.
- Verify that the SEO enhancements are correctly implemented and functioning as expected.
-
Gather feedback and make necessary refinements.
- Solicit feedback from users or colleagues to identify any usability or functionality issues.
- Address any reported bugs or usability concerns promptly.
- Make necessary adjustments to improve the user experience and overall quality of the blog.
-
Optimize performance and security.
- Analyze and optimize the performance of your application, including database queries, code efficiency, and caching.
- Implement security measures, such as input validation, CSRF protection, and user authorization checks, to ensure the safety of your blog.
- Enhance SEO by generating search-friendly URLs and adding meta tags.
- Customize the routes to generate SEO-friendly URLs for blog posts.
- Update the views and Livewire components to include appropriate meta tags, such as title, description, and keywords.
- Implement a sitemap.xml file to help search engines index your blog posts.
- Consider implementing canonical URLs, structured data, and other SEO best practices to improve search engine visibility.
- Write Unit Test.
- Post - Public Index.
- Post - Public View.
- Dashboard.
- Post - Index.
- Post - Create.
- Post - View.
- Post - Edit.
- Comment - Create.
-
Refractor Controller to Service Layer.
- PostController.
- CommentController.
-
Refractor reusable VIew Component.
- Post.
- Comment.
-
Post - Like and Count.
- Create Like Model and Migration.
- Create Like Controller.
- Create Like Component.
- Create Like Unit Test.
-
Comment - Reply.
- Able to reply to comment.
-
Dashboard Notification.
- Post - Like.
- Post - Comment.
- Comment - Reply.
-
Search Feature using Laravel Scout.
- Able to search post by title.
- Able to search post by Category and Tags.
-
Image functionality for blog posts.
- compress image as thumbnail.
- list - image thumbnail.
- show - image original size.