FileCloud is a file storage and management system with built-in deduplication using SHA256 checksums. This project consists of a FastAPI middleware, frontend interface, and Node.js server.
- ✅ File upload with drag-and-drop interface
- ✅ SHA256-based file deduplication
- ✅ AWS S3 integration for storage
- ✅ RESTful API middleware
- ✅ Modern OwnCloud-like UI
- ✅ Progress tracking for uploads
- ✅ User-based file management
The project consists of three main components:
- FastAPI Middleware: Handles file processing, deduplication, and AWS S3 interactions
- Frontend UI: OwnCloud-like interface for users to interact with the system
- Node.js Server: Serves the frontend assets
- Python 3.8+
- Node.js 14+
- AWS Account with S3 bucket configured
- AWS Lambda (optional for additional processing)
# Clone the repository
git clone https://github.com/yourusername/filecloud.git
cd filecloud/middleware
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install fastapi uvicorn python-dotenv requests
# Create .env file
echo "UPLOAD_API=https://your-aws-lambda-url.amazonaws.com/upload" > .env
# Run the server
uvicorn main:app --reload --port 8000# Navigate to frontend directory
cd ../frontend
# Install dependencies
npm install
# Run the development server
node server.jsThe frontend will be available at http://localhost:5501.
Create a .env file in the middleware directory with the following:
UPLOAD_API=https://your-aws-lambda-url.amazonaws.com/upload
POST /owncloud-upload?userID={userID}
Parameters:
userID: User identifier for file ownership
Request Body:
- Form data with
filefield containing the file to upload
Response:
{
"fileName": "example.jpg",
"fileHash": "8f7d88e901a5ad3a05d8cc0de93313fd76028f076ccd1d416cbf0fdb3e1c10fe",
"s3Key": "user123/example.jpg",
"deduplicated": false
}For more detailed documentation, please visit our GitBook.
The documentation includes:
- Complete API reference
- AWS setup guide
- Advanced configuration options
- Performance optimization tips
- Security best practices
# For middleware tests
cd middleware
pytest
# For frontend tests
cd frontend
npm test# Build frontend
cd frontend
npm run build
# Deploy middleware
cd middleware
# Follow deployment steps for your hosting platform- 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


