Skip to content

A Laravel-based collaborative file management system with group-based organization, user authentication, file upload/download, and activity reporting.

Notifications You must be signed in to change notification settings

khaledsawan/FileManagment

Repository files navigation

File Management System

A comprehensive Laravel-based collaborative file management system that enables users to organize files into groups, manage permissions, and track activities with detailed reporting.

πŸš€ Features

Core Functionality

  • User Authentication & Authorization - Secure login/registration with Laravel Breeze
  • Group-Based Organization - Create and manage file groups with multiple users
  • File Upload & Management - Upload, download, edit, and delete files
  • Permission Control - File-level permissions and ownership management
  • Activity Reporting - Comprehensive audit trail of all file operations
  • File Size Limits - Configurable file size restrictions per group
  • File Count Limits - Set maximum number of files per group

Advanced Features

  • Bulk Operations - Select and update multiple files simultaneously
  • File Status Tracking - Track file processing status (active/completed)
  • User Management - Add/remove users from groups
  • Responsive Design - Modern UI built with Tailwind CSS
  • PDF Generation - Generate reports using Laravel DomPDF

πŸ› οΈ Technology Stack

  • Laravel 10 - PHP web framework
  • PHP 8.1+ - Server-side programming language
  • MySQL - Database management system
  • Tailwind CSS - Utility-first CSS framework
  • Laravel Breeze - Authentication scaffolding
  • Laravel Sanctum - API authentication
  • Laravel DomPDF - PDF generation
  • Vite - Frontend build tool

πŸ“‹ Prerequisites

  • PHP 8.1 or higher
  • Composer
  • Node.js & NPM
  • MySQL Database
  • Web server (Apache/Nginx) or Laravel Valet

πŸš€ Installation

1. Clone the Repository

git clone <repository-url>
cd FileManagment

2. Install Dependencies

# Install PHP dependencies
composer install

# Install Node.js dependencies
npm install

3. Environment Setup

# Copy environment file
cp .env.example .env

# Generate application key
php artisan key:generate

4. Database Configuration

Update your .env file with database credentials:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=file_management
DB_USERNAME=your_username
DB_PASSWORD=your_password

5. Run Migrations

php artisan migrate

6. Build Assets

npm run build

7. Start Development Server

php artisan serve

Visit http://localhost:8000 to access the application.

πŸ“ Project Structure

FileManagment/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Http/Controllers/     # Application controllers
β”‚   β”‚   β”œβ”€β”€ Auth/            # Authentication controllers
β”‚   β”‚   β”œβ”€β”€ FileController.php
β”‚   β”‚   β”œβ”€β”€ GroupController.php
β”‚   β”‚   β”œβ”€β”€ ProfileController.php
β”‚   β”‚   └── ReportController.php
β”‚   β”œβ”€β”€ Models/              # Eloquent models
β”‚   β”‚   β”œβ”€β”€ File.php
β”‚   β”‚   β”œβ”€β”€ Group.php
β”‚   β”‚   β”œβ”€β”€ Report.php
β”‚   β”‚   └── User.php
β”‚   └── Policies/            # Authorization policies
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/          # Database migrations
β”‚   β”œβ”€β”€ factories/          # Model factories
β”‚   └── seeders/            # Database seeders
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ views/              # Blade templates
β”‚   β”‚   β”œβ”€β”€ auth/          # Authentication views
β”‚   β”‚   β”œβ”€β”€ files/         # File management views
β”‚   β”‚   β”œβ”€β”€ groups/        # Group management views
β”‚   β”‚   └── layouts/       # Layout templates
β”‚   β”œβ”€β”€ css/               # Stylesheets
β”‚   └── js/                # JavaScript files
└── public/
    └── uploads/           # File storage directory

πŸ”§ Usage

Creating Groups

  1. Register/Login to your account
  2. Navigate to Groups section
  3. Click "Create Group"
  4. Set group name, file count limit, and file size limit
  5. Add users to the group by email

Managing Files

  1. Select a group from the Groups list
  2. Upload files using the "Add File" button
  3. Edit file details (only files you own)
  4. Mark files as completed when done
  5. Delete files when no longer needed

Viewing Reports

  1. Access the Reports section
  2. View activity logs for each group
  3. Track file operations and user activities

πŸ§ͺ Testing

Run the test suite:

php artisan test

πŸ“Š Database Schema

Users Table

  • id, name, email, email_verified_at, password, remember_token, created_at, updated_at

Groups Table

  • id, name, user_id_creater, files_count, file_size, created_at, updated_at

Files Table

  • id, name, status, path, group_id, created_at, updated_at

Reports Table

  • id, group_id, message, created_at, updated_at

Group-User Pivot Table

  • group_id, user_id

πŸ”’ Security Features

  • CSRF Protection - All forms protected against CSRF attacks
  • File Validation - Uploaded files are validated for type and size
  • Permission Checks - Users can only modify files they own
  • SQL Injection Prevention - Using Eloquent ORM and prepared statements
  • XSS Protection - Output escaping in Blade templates

πŸ“ API Endpoints

The application provides RESTful API endpoints for:

  • Authentication: /api/login, /api/register, /api/logout
  • Groups: /api/groups (GET, POST, PUT, DELETE)
  • Files: /api/files (GET, POST, PUT, DELETE)
  • Reports: /api/reports (GET)

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🎯 Roadmap

  • File versioning system
  • Advanced search functionality
  • File sharing via public links
  • Real-time notifications
  • Mobile application
  • Cloud storage integration
  • Advanced reporting dashboard

About

A Laravel-based collaborative file management system with group-based organization, user authentication, file upload/download, and activity reporting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages