Skip to content

A modern file management system with secure sharing, built with FastAPI and React. Features include file upload/download, password protection, expiration dates, and real-time updates.

License

Notifications You must be signed in to change notification settings

SimonGino/file-manager

Repository files navigation

File Manager

English | 中文

GitHub Workflow Status GitHub license GitHub stars GitHub issues

A modern file management system built with FastAPI and React, featuring secure file sharing, access control, and real-time updates.

Features

  • 📁 File Management

    • Upload, download, and organize files
    • Support for multiple file types
    • Drag and drop interface
    • File preview
  • 🔒 Secure Sharing

    • Generate shareable links
    • Password protection option
    • Expiration date setting
    • Access control management
  • 👥 User Management

    • User authentication
    • Role-based access control
    • Session management
  • 🚀 Modern Tech Stack

    • Frontend: React + TypeScript + Ant Design
    • Backend: FastAPI + Python
    • Database: PostgreSQL
    • Storage: MinIO
    • Container: Docker

Prerequisites

  • Docker and Docker Compose
  • Node.js 20+ (for local development)
  • Python 3.11+ (for local development)
  • PostgreSQL 15+
  • MinIO

Quick Start

  1. Clone the repository:
git clone https://github.com/your-username/file-manager.git
cd file-manager
  1. Create necessary directories:
mkdir -p ~/middleware/postgres/data
mkdir -p ~/middleware/minio/data
  1. Create .env file in the root directory:
DATABASE_URL=postgresql+asyncpg://root:123456@postgres:5432/doc_management
MINIO_ENDPOINT=minio:9000
MINIO_ACCESS_KEY=your_access_key
MINIO_SECRET_KEY=your_secret_key
MINIO_BUCKET_NAME=documents
JWT_SECRET_KEY=your_jwt_secret
  1. Start the services using Docker Compose:
docker-compose up -d
  1. Access the application:

Development Setup

Backend

  1. Install PDM:
pip install pdm
  1. Install dependencies:
cd backend
pdm install
  1. Run the development server:
pdm run python -m uvicorn src.main:app --reload

Frontend

  1. Install dependencies:
cd frontend
npm install
  1. Start the development server:
npm run dev

API Documentation

Once the backend is running, you can access the API documentation at:

Docker Images

The project uses Docker for containerization:

  • Backend: ghcr.io/your-username/file-manager-backend:main
  • Frontend: ghcr.io/your-username/file-manager-frontend:main

Project Structure

.
├── frontend/                # React frontend application
│   ├── src/
│   │   ├── components/     # Reusable components
│   │   ├── pages/         # Page components
│   │   ├── utils/         # Utility functions
│   │   └── types/         # TypeScript type definitions
│   └── public/            # Static files
│
├── src/                    # FastAPI backend application
│   ├── api/               # API routes
│   ├── core/              # Core functionality
│   ├── db/                # Database models and config
│   ├── schemas/           # Pydantic models
│   └── services/          # Business logic
│
├── docker/                # Docker related files
├── .github/               # GitHub Actions workflows
└── docker-compose.yml     # Docker Compose configuration

Contributing

  1. Fork the repository
  2. Create your 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.

Acknowledgments

file-manager

About

A modern file management system with secure sharing, built with FastAPI and React. Features include file upload/download, password protection, expiration dates, and real-time updates.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages