A modern file management system built with FastAPI and React, featuring secure file sharing, access control, and real-time updates.
-
📁 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
- Docker and Docker Compose
- Node.js 20+ (for local development)
- Python 3.11+ (for local development)
- PostgreSQL 15+
- MinIO
- Clone the repository:
git clone https://github.com/your-username/file-manager.git
cd file-manager
- Create necessary directories:
mkdir -p ~/middleware/postgres/data
mkdir -p ~/middleware/minio/data
- 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
- Start the services using Docker Compose:
docker-compose up -d
- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- MinIO Console: http://localhost:9001
- Install PDM:
pip install pdm
- Install dependencies:
cd backend
pdm install
- Run the development server:
pdm run python -m uvicorn src.main:app --reload
- Install dependencies:
cd frontend
npm install
- Start the development server:
npm run dev
Once the backend is running, you can access the API documentation at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
The project uses Docker for containerization:
- Backend:
ghcr.io/your-username/file-manager-backend:main
- Frontend:
ghcr.io/your-username/file-manager-frontend:main
.
├── 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.