Skip to content

Repository files navigation

EduBlog - Educational Blogging Platform

Laravel PHP Tailwind CSS Docker License

EduBlog is an interactive, educational blogging platform built with Laravel 12 and Tailwind CSS. Designed specifically for students, educators, and lifelong learners, EduBlog provides an engaging space to discover, publish, and explore educational content across diverse academic subjects.


🌟 Key Features

  • 📚 Category-Based Learning: Curated academic topics including Mathematics, Science, Programming, History, Literature, Art & Design, Languages, and Study Tips with customizable icons and color palettes.
  • 🎯 Difficulty Levels: Articles organized by skill level (Beginner, Intermediate, Advanced) allowing learners to study at their own pace.
  • ⏱️ Automatic Reading Time: Dynamic calculation of estimated reading time for every article.
  • ❤️ Interactive Engagement: Real-time asynchronous post liking and view count tracking.
  • 🔍 Instant Search & Discovery: Fast keyword search across article titles, excerpts, and full text.
  • 📖 Related Content Recommendations: Context-aware related articles to keep readers engaged within the topic.
  • 👥 Role-Based Authors: Support for multiple user roles (Teachers, Students, Administrators) with dedicated author biographies and school affiliations.
  • 🎨 Modern Responsive UI: Clean, mobile-friendly interface designed with Tailwind CSS and Font Awesome icons.
  • 🐳 Dockerized Deployment: Production-ready multi-stage Docker build and Docker Compose configuration.

🛠️ Tech Stack


🚀 Getting Started

Prerequisites

Ensure the following dependencies are installed on your machine:

  • PHP >= 8.2 (with pdo, sqlite3/pdo_mysql, mbstring, xml, bcmath, curl)
  • Composer >= 2.x
  • Node.js >= 18.x & npm
  • MySQL (optional if using SQLite) or Docker

Local Installation

  1. Clone the Repository

    git clone git@github.com:swadhin-sikder/edublog.git
    cd edublog
  2. Install PHP Dependencies

    composer install
  3. Install & Build Frontend Assets

    npm install
    npm run build
  4. Environment Setup

    cp .env.example .env
    php artisan key:generate
  5. Database Configuration & Migration By default, you can use SQLite for local development:

    touch database/database.sqlite

    Or configure MySQL in .env:

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=edublog
    DB_USERNAME=root
    DB_PASSWORD=

    Run migrations and seed the database with sample categories, teachers, students, and posts:

    php artisan migrate --seed
  6. Run the Development Server

    php artisan serve

    Access the application at http://localhost:8000.

    Alternatively, run all dev processes concurrently (server, queue, logs, vite):

    composer run dev

🐳 Running with Docker

You can run the entire application stack using Docker Compose:

  1. Build and start the containers

    docker-compose up -d --build
  2. Access the application

    • Web App: http://localhost:8000
    • MySQL: localhost:3307 (database: edublog, user: edublog, password: edublog)
  3. Stop containers

    docker-compose down

🧪 Testing

The project includes unit and feature test suites with PHPUnit.

To execute tests:

php artisan test

Or via PHPUnit directly:

./vendor/bin/phpunit

📁 Project Structure

├── app/
│   ├── Http/Controllers/
│   │   ├── Admin/           # Category & Post admin controllers
│   │   └── BlogController.php # Public blog routing and search logic
│   └── Models/              # Eloquent models (Post, Category, User)
├── database/
│   ├── factories/           # Model factories
│   ├── migrations/          # Schema migrations for posts, categories, users
│   └── seeders/             # Initial sample dataset seeders
├── resources/
│   ├── css/                 # Tailwind CSS entrypoint
│   ├── js/                  # JavaScript entrypoint
│   └── views/
│       ├── blog/            # Blog views (index, show, category, difficulty, search)
│       └── layouts/         # Base application layout
├── routes/
│   ├── web.php              # Public & admin web routes
│   └── console.php          # Artisan console commands
├── tests/
│   ├── Feature/             # Feature & endpoint tests
│   └── Unit/                # Unit tests
├── docker-compose.yml       # Docker Compose service definition
└── Dockerfile               # Multi-stage production Docker build

📄 License

This project is open-source software licensed under the MIT License.

About

An interactive educational blogging platform built with Laravel 12 and Tailwind CSS for students and educators.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages