Skip to content

File Manager | Rails | ActionCable | Minio | RSwag

Notifications You must be signed in to change notification settings

voidzenn/file_manager

Repository files navigation

File Manager

Overview

A File manager with React Frontend and Rails 7 Backend. Allows users to manage their files and folders seamlessly. The app uses Minio for object storage, ensuring that the structure in the File Manager UI mirrors the structure in Minio, providing a reliable and intuitive user experience. Additionally, the app features real-time updates with ActionCable, allowing users to see changes immediately as they happen.

Features

  • Folder Management:

    • Create Folder
    • Create Nested Folder
    • Rename Folder
    • Remove Folder
    • Get Folder List
  • File Management:

    • Create File
    • Create File inside a Folder
    • Rename File
    • Remove File
    • View File

Technology Stack

  • Rails 7: Web application framework
  • Postgresql: Database
  • Minio: Object storage for files
  • Actionable: For asynchronous jobs
  • Redis: For synchronous updates
  • Rswag: Swagger documentation for API endpoints
  • Docker: Containerization of dependencies

Preview

Demo

Watch Video

Screenshots

Screenshot from 2024-08-05 17-49-49 Screenshot from 2024-08-05 17-50-25 Screenshot from 2024-08-05 17-50-28

API Documentation

Setup

Prerequisites

Dependencies installed on your machine

  • Docker and Docker Compose
  • Ruby and Rails

Installation Steps

  1. Clone the repository:

    git clone https://github.com/voidzenn/file_manager.git
    cd <repository-name>
  2. Rename .env.example to .env:

    mv .env.example .env
  3. Install gem dependencies:

    bundle install
  4. Build and run the Docker containers:

    docker-compose up --build
  5. Access the web application:

    Open your browser and navigate to http://localhost:3000 or http://localhost:3000/api-docs.

Frontend Access

To access the frontend, use the following credentials:

Issue and Solution for MinIO Presigned URLs

Issue: When generating a presigned URL for file viewing in MinIO, the URL was using http://minio:9000, which resulted in a 403 Forbidden error.

Solution: To resolve this issue, a custom Docker network was configured, and MinIO was assigned a specific network address. This approach ensured that MinIO operates with the correct domain and address, allowing presigned URLs to be generated and accessed without authorization issues.