A comprehensive blog script application built with Laravel, featuring admin dashboard, user management, and dynamic content management for music, artists, videos, and news.
- 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
- 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 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
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
- PHP 8.1+
- Composer
- MySQL/PostgreSQL database
- Node.js & NPM (for frontend assets)
-
Clone the repository
git clone https://github.com/jaykingwebsolution/blogscript.git cd blogscript -
Install PHP dependencies
composer install
-
Install Node dependencies
npm install
-
Environment setup
cp .env.example .env php artisan key:generate
-
Database configuration Edit
.envfile 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
-
Run database migrations
php artisan migrate
-
Seed sample data
php artisan db:seed
-
Build frontend assets
npm run build
-
Start the development server
php artisan serve
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)
- 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 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
- 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
- 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
- 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
- Set
APP_ENV=productionandAPP_DEBUG=falsein.env - Configure production database credentials
- Set up proper file permissions for storage directories
- Configure web server (Apache/Nginx) to point to
public/directory
- Ensure
.envfile is not accessible via web - Enable HTTPS with SSL certificates
- Configure proper database user permissions
- Set up regular database backups
- Monitor application logs for security issues
- Access admin dashboard at
/admin/dashboard - Add content through the respective management sections
- Approve new user registrations in User Management
- Feature content for homepage display
- Monitor site statistics and recent activity
- Log in and access admin dashboard (limited permissions)
- Create and manage content in assigned categories
- Submit content for admin approval if required
- Register for an account (requires admin approval)
- Browse content on the homepage
- Wait for admin approval to access restricted features
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/
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.