Skip to content

Latest commit

 

History

History
211 lines (157 loc) · 6.13 KB

File metadata and controls

211 lines (157 loc) · 6.13 KB

Welcome to the File Sharing Application 👋

A cross-platform intranet-based file sharing application built with Flutter, GoLang, and MinIO.

Status: Deployed Development: Ongoing License: MIT

Pull Requests Merged Open Issues Contributors


Repository Links ↥ Back to top


Table of Contents

  1. About the Project
  2. Docker Setup
  3. Getting Started
  4. Usage
  5. Contributing
  6. Maintainers
  7. License

About the Project ↥ Back to top

🤔 Problem

We often need to transfer files between mobile and desktop devices. Typically, this is done using WhatsApp, Telegram, or other internet-based apps, which is inefficient for local transfers.
This project enables direct file sharing over an intranet without requiring internet connectivity.

✨ Features

  • Cross-platform intranet file sharing between multiple devices.
  • Powered by MinIO (object storage server) for efficient file handling.
  • Tech Stack:
    • Frontend: Flutter
    • Backend: GoLang
    • File Storage: MinIO

Docker Setup ↥ Back to top

This project includes Docker support to easily run the entire stack with a single command.

Prerequisites

  • Docker and Docker Compose installed

Quick Start

  1. Clone the repository:

    git clone https://github.com/OpenLake/File-Sharing-App.git
    cd File-Sharing-App
  2. Start all services:

    docker-compose up
  3. Access the application:

Environment Variables

The setup uses these default environment variables:

  • ACCESS_KEY=minioadmin
  • SECRET_KEY=minioadmin
  • LOCAL_IP=minio:9000

Getting Started ↥ Back to top

For local development without Docker, you'll need to set up each service manually. You can follow the commands here.

Prerequisites

Make sure you have the following installed:


📄 Running MinIO Server

  1. Create a directory for MinIO: mkdir ~/minio

  2. Run the server on port 9090: minio server ~/minio --console-address :9090


📄 Running Backend (Go)

  1. Navigate to the Go backend folder: cd Go

  2. Create a .env file with: LOCAL_IP="" # Your local IP connected with minio (port 9000) ACCESS_KEY="" # MinIO access key SECRET_KEY="" # MinIO secret key

  3. Install MinIO Go SDK if missing: go get github.com/minio/minio-go/v7

  4. Start backend: go run file-uploader.go


📄 Running Frontend (Flutter)

  1. Open the Flutter project in Android Studio.
  2. Update the upload/download endpoint IPs in the code with your local IP (port 8000).
  3. Run the application: flutter run

Once the setup is complete:

  • Upload files from one device via the Flutter app.
  • Files are stored securely in MinIO over your intranet.
  • Download files seamlessly on other connected devices.
  • Files are automatically decrypted client-side after download with integrity verification.

🐳 Using Docker Setup

  1. Start the application stack:

    docker-compose up -d
  2. Open your web browser and navigate to http://localhost:3000

  3. Upload and share files across your network!

🛠️ Using Manual Setup

Example (start backend in one terminal):

cd Go
go run file-uploader.go

And then run the frontend Flutter app:

cd filesharing
flutter run -d web-server --web-port 3000

Troubleshooting ↥ Back to top

Docker Issues

  • Port conflicts: If ports 3000, 8000, 9000, or 9001 are in use, modify the port mappings in docker-compose.yml
  • Build failures: Ensure Docker has enough memory allocated (recommended: 4GB+)
  • Permission issues: On Linux, you may need to run Docker commands with sudo

Common Issues

  • Frontend can't connect to backend: Verify the API_BASE_URL is correctly set
  • MinIO connection fails: Check if MinIO service is running and accessible
  • File upload fails: Ensure proper CORS headers and file size limits

Logs and Debugging

# View all service logs
docker-compose logs

# View specific service logs
docker-compose logs backend
docker-compose logs frontend
docker-compose logs minio

# Follow logs in real-time
docker-compose logs -f

Contributing ↥ Back to top

We welcome contributions from the community! 🎉
Please read CONTRIBUTING.md for guidelines before submitting a pull request.


Maintainers ↥ Back to top

See MAINTAINERS.md for the full list.


Distributed under the MIT License.
See LICENSE for details.