An open API service indexing awesome lists of open source software.

https://github.com/simongino/file-manager

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.
https://github.com/simongino/file-manager

document-management fastapi file-management file-sharing react

Last synced: 2 months ago
JSON representation

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.

Awesome Lists containing this project

README

          

# File Manager

[English](README.md) | [δΈ­ζ–‡](README_zh.md)

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/simongino/file-manager/docker-build.yml?branch=main)](https://github.com/simongino/file-manager/actions)
[![GitHub license](https://img.shields.io/github/license/simongino/file-manager)](https://github.com/simongino/file-manager/blob/main/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/simongino/file-manager)](https://github.com/simongino/file-manager/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/simongino/file-manager)](https://github.com/simongino/file-manager/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:
```bash
git clone https://github.com/your-username/file-manager.git
cd file-manager
```

2. Create necessary directories:
```bash
mkdir -p ~/middleware/postgres/data
mkdir -p ~/middleware/minio/data
```

3. Create `.env` file in the root directory:
```env
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
```

4. Start the services using Docker Compose:
```bash
docker-compose up -d
```

5. Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- MinIO Console: http://localhost:9001

## Development Setup

### Backend

1. Install PDM:
```bash
pip install pdm
```

2. Install dependencies:
```bash
cd backend
pdm install
```

3. Run the development server:
```bash
pdm run python -m uvicorn src.main:app --reload
```

### Frontend

1. Install dependencies:
```bash
cd frontend
npm install
```

2. Start the development server:
```bash
npm run dev
```

## API Documentation

Once the backend is running, you can access the API documentation at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc

## 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](LICENSE) file for details.

## Acknowledgments

- [FastAPI](https://fastapi.tiangolo.com/)
- [React](https://reactjs.org/)
- [Ant Design](https://ant.design/)
- [MinIO](https://min.io/)
- [PDM](https://pdm.fming.dev/)
# file-manager