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.
- Host: GitHub
- URL: https://github.com/simongino/file-manager
- Owner: SimonGino
- License: mit
- Created: 2025-01-16T09:45:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-22T03:23:03.000Z (over 1 year ago)
- Last Synced: 2025-03-17T22:08:37.386Z (over 1 year ago)
- Topics: document-management, fastapi, file-management, file-sharing, react
- Language: Python
- Homepage: https://file.mytest.cc
- Size: 167 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# File Manager
[English](README.md) | [δΈζ](README_zh.md)
[](https://github.com/simongino/file-manager/actions)
[](https://github.com/simongino/file-manager/blob/main/LICENSE)
[](https://github.com/simongino/file-manager/stargazers)
[](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