simbajirira/admin-dashboard

An admin dashboard package for Laravel

v0.0.1 2023-10-23 00:49 UTC

This package is auto-updated.

Last update: 2024-10-23 02:59:52 UTC


README

This is a feature-rich analytics dashboard powered by Laravel 10, Livewire 3, and TailwindCSS. The dashboard provides real-time analytics, error logging, and uptime monitoring of multiple websites. It also incorporates a roles and permissions system for enhanced security and user management.

Table of Contents

  1. Features
  2. Tech Stack
  3. Prerequisites
  4. Installation
  5. Configuration
  6. Database Setup
  7. Real-Time Analytics
  8. Error Logging
  9. Uptime Monitoring
  10. Roles and Permissions
  11. API Integration
  12. Testing
  13. Deployment
  14. License

Features

  • Real-Time Analytics: Track user behavior, page views, and other key metrics.
  • Error Logging: Monitor and log errors as they occur in real-time.
  • Uptime Monitoring: Monitor the availability of multiple websites and their pages.
  • Roles and Permissions: Built-in system for user roles and permissions.

Tech Stack

  • Backend: Laravel 10
  • Frontend: Livewire 3 + TailwindCSS
  • Real-time: Laravel Websockets
  • Database: MySQL
  • Testing: PHPUnit

Prerequisites

  • PHP >= 7.4
  • Composer
  • Node.js and NPM
  • MySQL

Installation

# Clone the repository
git clone https://github.com/simba-jirira/AdminDashboard.git

# Navigate to project directory
cd AdminDashboard

# Install PHP dependencies
composer install

# Install JavaScript dependencies
npm install

# Build assets
npm run dev

Configuration

# Copy environment file
cp .env.example .env

# Generate application key
php artisan key:generate

Database Setup

Configure your database credentials in .env. Then, run the following commands:

# Run migrations
php artisan migrate

# Seed database with roles and permissions
php artisan db:seed --class=UserRolePermissionSeeder

Real-Time Analytics

This feature utilizes Laravel Websockets. To start the Websockets server:

php artisan websockets:serve

Error Logging

Errors are captured and displayed in real-time on the dashboard. You can set the level of errors to log in the .env file.

Uptime Monitoring

The system performs regular checks to monitor the uptime of websites. You can configure the check intervals and alert mechanisms.

Roles and Permissions

Role Definitions

  • Admin: Full access to the dashboard, including analytics, error logs, and uptime monitoring.
  • Editor: Can view analytics and error logs but can't manage users or uptime settings.
  • Viewer: Read-only access to analytics.

Usage

Use the UserRolePermissionSeeder to seed the roles and permissions into the database.

php artisan db:seed --class=UserRolePermissionSeeder

API Integration

You can also access analytics and logs via RESTful APIs. API documentation is available at /api/docs.

Testing

We use PHPUnit for testing.

# Run tests
php artisan test

Deployment

Instructions for deploying to various environments can be found in the DEPLOYMENT.md file.

License

This project is licensed under the MIT License.