Skip to content

jaykingwebsolution/blogscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BlogScript - Production-Ready Laravel Blog Application

A comprehensive blog script application built with Laravel, featuring admin dashboard, user management, and dynamic content management for music, artists, videos, and news.

πŸš€ Production Readiness Features

βœ… Complete Backend Infrastructure

  • Laravel Framework: Full MVC architecture with proper separation of concerns
  • Database Models: Music, Artists, Videos, News, and User models with relationships
  • Admin Dashboard: Complete CRUD operations for all content types
  • User Management: Registration, authentication, and approval system
  • Dynamic Content: Database-driven content with fallback to static data
  • Data Validation: Comprehensive input validation and error handling
  • Security: CSRF protection, password hashing, and secure authentication

βœ… Admin Dashboard Capabilities

  • Content Management: Add, edit, delete music, artists, videos, and news
  • User Approval System: Approve/suspend user accounts with admin controls
  • Status Management: Draft, published, and archived content states
  • Featured Content: Mark content as featured for homepage display
  • Statistics Dashboard: Real-time content and user statistics
  • Role-Based Access: Admin and editor roles with appropriate permissions

βœ… User Authentication & Management

  • User Registration: New users require admin approval before login
  • Secure Login: Password-protected authentication with session management
  • Role System: Admin, editor, and regular user roles
  • Account Status: Pending, approved, and suspended user states
  • Profile Management: User account management through admin interface

πŸ“ Project Structure

blogscript/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Http/Controllers/
β”‚   β”‚   β”œβ”€β”€ HomeController.php              # Main homepage controller
β”‚   β”‚   β”œβ”€β”€ Auth/AuthController.php         # Authentication handling
β”‚   β”‚   └── Admin/AdminController.php       # Admin dashboard operations
β”‚   └── Models/
β”‚       β”œβ”€β”€ User.php                        # User model with roles & approval
β”‚       β”œβ”€β”€ Music.php                       # Music content model
β”‚       β”œβ”€β”€ Artist.php                      # Artist model
β”‚       β”œβ”€β”€ Video.php                       # Video content model
β”‚       └── News.php                        # News/blog post model
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/                         # Database schema migrations
β”‚   └── seeders/DatabaseSeeder.php         # Sample data seeding
β”œβ”€β”€ resources/views/
β”‚   β”œβ”€β”€ home.blade.php                     # Dynamic homepage
β”‚   β”œβ”€β”€ admin/                             # Admin dashboard views
β”‚   β”œβ”€β”€ auth/                              # Authentication views
β”‚   β”œβ”€β”€ components/                        # Reusable Blade components
β”‚   └── layouts/                           # Layout templates
└── routes/web.php                         # Application routes

πŸ›  Installation & Setup

Prerequisites

  • PHP 8.1+
  • Composer
  • MySQL/PostgreSQL database
  • Node.js & NPM (for frontend assets)

Installation Steps

  1. Clone the repository

    git clone https://github.com/jaykingwebsolution/blogscript.git
    cd blogscript
  2. Install PHP dependencies

    composer install
  3. Install Node dependencies

    npm install
  4. Environment setup

    cp .env.example .env
    php artisan key:generate
  5. Database configuration Edit .env file with your database credentials:

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=blogscript
    DB_USERNAME=your_username
    DB_PASSWORD=your_password
  6. Run database migrations

    php artisan migrate
  7. Seed sample data

    php artisan db:seed
  8. Build frontend assets

    npm run build
  9. Start the development server

    php artisan serve

πŸ‘€ Default Admin Account

After seeding the database, you can log in with:

  • Email: admin@blogscript.com
  • Password: admin123

Additional test accounts:

  • Editor: editor@blogscript.com / editor123
  • Pending User: john@example.com / password123 (requires approval)

🎯 Admin Dashboard Features

Content Management

  • Music: Add songs with artist info, cover images, and audio files
  • Artists: Manage artist profiles with bios and photos
  • Videos: Upload and manage video content with thumbnails
  • News: Create and publish blog posts and news articles

User Management

  • User Approval: Review and approve new user registrations
  • Role Assignment: Assign admin, editor, or user roles
  • Account Status: Suspend or reactivate user accounts
  • Activity Monitoring: Track user-generated content

Dashboard Analytics

  • Content Statistics: Track total music, artists, videos, and news
  • User Metrics: Monitor pending approvals and total users
  • Featured Content: Manage homepage featured items
  • Recent Activity: View latest content additions

πŸ” Security Features

  • CSRF Protection: All forms protected against cross-site request forgery
  • Password Hashing: Secure bcrypt password hashing
  • Input Validation: Comprehensive server-side validation
  • Role-Based Access: Middleware protection for admin routes
  • Session Management: Secure user session handling
  • User Approval: Admin approval required for new accounts

🎨 Frontend Features

  • Responsive Design: Mobile-first Tailwind CSS styling
  • Dynamic Content: Database-driven homepage content
  • Fallback Support: Graceful degradation to static content
  • Component Architecture: Reusable Blade components
  • SEO Friendly: Proper meta tags and semantic HTML
  • Performance Optimized: Efficient database queries and caching

πŸš€ Production Deployment

Environment Configuration

  1. Set APP_ENV=production and APP_DEBUG=false in .env
  2. Configure production database credentials
  3. Set up proper file permissions for storage directories
  4. Configure web server (Apache/Nginx) to point to public/ directory

Security Considerations

  1. Ensure .env file is not accessible via web
  2. Enable HTTPS with SSL certificates
  3. Configure proper database user permissions
  4. Set up regular database backups
  5. Monitor application logs for security issues

πŸ“ Usage

For Administrators

  1. Access admin dashboard at /admin/dashboard
  2. Add content through the respective management sections
  3. Approve new user registrations in User Management
  4. Feature content for homepage display
  5. Monitor site statistics and recent activity

For Content Editors

  1. Log in and access admin dashboard (limited permissions)
  2. Create and manage content in assigned categories
  3. Submit content for admin approval if required

For Regular Users

  1. Register for an account (requires admin approval)
  2. Browse content on the homepage
  3. Wait for admin approval to access restricted features

πŸ”§ Customization

The application is built with modularity in mind:

  • Models: Extend or modify data structures in app/Models/
  • Views: Customize frontend in resources/views/
  • Styles: Modify Tailwind configuration in tailwind.config.js
  • Routes: Add new routes in routes/web.php
  • Controllers: Extend functionality in app/Http/Controllers/

πŸ“ž Support

For issues, questions, or contributions, please contact the development team or create an issue in the repository.


BlogScript - Built with ❀️ using Laravel, Tailwind CSS, and modern web technologies.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages