A modern, full-stack web comic platform built with Laravel (backend) and Nuxt.js (frontend) using Inertia.js for seamless integration.
- Browse Comics: Explore a vast library of comics across multiple categories
- Search & Filter: Find comics by title, description, or category
- Reading Experience: Clean, optimized reading interface
- Comments: Engage with the community through comments
- User Accounts: Register and login to personalize your experience
- Comic Management: Full CRUD operations for comics
- User Management: Manage user accounts and permissions
- Category Management: Organize comics with categories
- Dashboard: Comprehensive admin dashboard with statistics
- Content Moderation: Manage comments and user-generated content
- Modern Stack: Laravel 11 + Nuxt 3 + Inertia.js
- Responsive Design: Mobile-first, responsive layout
- Authentication: Secure login/register system
- Database: MySQL with proper relationships
- File Uploads: Support for comic images
- Search: Fast, database-driven search functionality
Before you begin, ensure you have the following installed:
- PHP 8.1+ with extensions: mbstring, pdo_mysql, tokenizer, xml, ctype, json, bcmath
- Composer (PHP dependency manager)
- Node.js 18+ and npm (JavaScript runtime and package manager)
- MySQL 8.0+ or MariaDB 10.3+
- Web Server (Apache/Nginx) or use built-in PHP server for development
git clone https://github.com/DzCodeProgrammer/Modern-WebComick.git
cd Modern-WebComick
-
Navigate to backend directory:
cd backend
-
Install PHP dependencies:
composer install
-
Set up environment variables:
cp .env.example .env
-
Configure your
.env
file:APP_NAME="Modern WebComick" APP_ENV=local APP_KEY=base64:7YvbUBabuIhU6P9fElRfT5H3N2J6P3fElRfT5H3N2J6= APP_DEBUG=true APP_URL=http://localhost:8000 DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=modern_webcomick DB_USERNAME=root DB_PASSWORD=your_password
-
Generate application key:
php artisan key:generate
-
Create database: Create a MySQL database named
modern_webcomick
-
Run migrations:
php artisan migrate
-
Seed the database (optional):
php artisan db:seed
-
Navigate to frontend directory:
cd ../frontend
-
Install Node.js dependencies:
npm install
-
Configure environment (optional):
cp .env.example .env
-
Start the Laravel backend:
cd backend php artisan serve
Backend will be available at:
http://localhost:8000
-
Start the Nuxt.js frontend (new terminal):
cd frontend npm run dev
Frontend will be available at:
http://localhost:3000
-
Build the frontend:
cd frontend npm run build
-
Optimize Laravel:
cd backend composer install --optimize-autoloader --no-dev php artisan config:cache php artisan route:cache php artisan view:cache
Modern-WebComick/
βββ backend/ # Laravel Backend
β βββ app/
β β βββ Http/
β β β βββ Controllers/ # API Controllers
β β β βββ Middleware/ # Custom Middleware
β β βββ Models/ # Eloquent Models
β βββ database/
β β βββ migrations/ # Database Migrations
β β βββ seeders/ # Database Seeders
β βββ routes/ # API Routes
β βββ config/ # Configuration Files
βββ frontend/ # Nuxt.js Frontend
β βββ pages/ # Vue Pages
β βββ components/ # Vue Components
β βββ layouts/ # Layout Components
β βββ assets/ # Static Assets
β βββ plugins/ # Nuxt Plugins
βββ .env # Environment Variables
βββ .env.example # Environment Template
βββ README.md # This File
- users: User accounts and authentication
- categories: Comic categories and genres
- comics: Comic posts with metadata
- comments: User comments on comics
- Users can have many comments
- Comics belong to a category
- Comics can have many comments
- Comments belong to a user and a comic
Key environment variables to configure:
# Application
APP_NAME="Modern WebComick"
APP_URL=http://localhost:8000
# Database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=modern_webcomick
DB_USERNAME=root
DB_PASSWORD=
# Mail (for notifications)
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your_email@gmail.com
MAIL_PASSWORD=your_app_password
# File Storage
FILESYSTEM_DISK=local
UPLOAD_MAX_SIZE=5120
Create an admin account after installation:
- Register a normal account through the web interface
- Manually update the database to set
is_admin = 1
for your user - Or use database seeder to create default admin account
- Authentication: Laravel Sanctum for API authentication
- Authorization: Role-based access control (Admin/User)
- CSRF Protection: Built-in CSRF protection
- Input Validation: Server-side validation for all forms
- SQL Injection Protection: Eloquent ORM prevents SQL injection
- XSS Protection: Input sanitization and output escaping
cd backend
php artisan test
cd frontend
npm run test
POST /login
- User loginPOST /register
- User registrationPOST /logout
- User logout
GET /comics
- List all comics (with pagination)GET /comics/{slug}
- Get specific comicPOST /comics
- Create new comic (admin only)PUT /comics/{id}
- Update comic (admin only)DELETE /comics/{id}
- Delete comic (admin only)
GET /comics/{id}/comments
- Get comments for a comicPOST /comics/{id}/comments
- Add comment (authenticated users)DELETE /comments/{id}
- Delete comment (owner or admin)
- Create a new server on Laravel Forge
- Deploy the backend to your server
- Build and deploy the frontend
- Configure your web server to serve both applications
- Set up a web server (Apache/Nginx)
- Configure PHP and MySQL
- Deploy the Laravel backend
- Build and deploy the Nuxt.js frontend
- Configure reverse proxy for API requests
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature
- Commit your changes:
git commit -am 'Add new feature'
- Push to the branch:
git push origin feature/new-feature
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
-
Composer install fails
- Ensure PHP version is 8.1+
- Check PHP extensions are installed
- Run with
--ignore-platform-reqs
if needed
-
Database connection errors
- Verify MySQL is running
- Check database credentials in
.env
- Ensure database exists
-
Frontend build errors
- Clear node_modules:
rm -rf node_modules && npm install
- Check Node.js version (18+ required)
- Verify all dependencies are installed
- Clear node_modules:
-
Permission errors
- Set proper permissions on storage directories
- Ensure web server has write access to storage/
- Create an issue on GitHub
- Check the documentation
- Review the error logs in
storage/logs/
If you encounter any issues or have questions:
- Email: support@modernwebcomick.com
- GitHub Issues: Create an issue
- Documentation: Check this README and inline code comments
Modern WebComick - Built with β€οΈ using Laravel, Nuxt.js, and Inertia.js