ShareMore is a cloud-based file-sharing website that allows users to upload and download files securely through a unique code. It also includes a peer-to-peer file sharing feature and a watch party feature, enabling synchronized video playback across multiple users.
- Features
- Tech Stack
- Installation
- Running the Project
- Usage
- Folder Structure
- API Endpoints
- Watch Party
- Contributing
- License
- File Upload and Download: Upload files and share them through unique codes. Download files by entering the corresponding code.
- Peer-to-Peer File Sharing: Share files directly between peers using WebRTC and PeerJS.
- Watch Party: Watch YouTube videos in sync with others. Users can create or join a watch party using a unique session code.
- Frontend: React, Tailwind CSS
- Backend: Flask, Flask-CORS, Flask-SocketIO
- Real-Time Communication: WebSocket, Socket.IO (for Watch Party)
- Peer-to-Peer File Sharing: PeerJS
-
Clone the Repository:
git clone https://github.com/your-username/ShareMore.git cd ShareMore
-
Backend Setup:
- Ensure you have Python 3.8+ installed.
- Install the necessary dependencies:
cd backend python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Frontend Setup:
- Install Node.js (v14+ recommended).
- Navigate to the
frontend
directory and install dependencies:
cd ../frontend npm install
-
Start the Backend:
- Navigate to the
backend
directory and activate the virtual environment if not already active. - Run the Flask application:
flask run
- For real-time functionality, use Gunicorn with Flask-SocketIO:
gunicorn --worker-class eventlet -w 1 app:app
- Navigate to the
-
Start the Frontend:
- In the
frontend
directory, start the React application:
npm start
- The frontend will be accessible at
http://localhost:3000
.
- In the
-
File Upload:
- Go to the Upload page, select a file, and click Upload.
- You'll receive a unique code to share with the recipient.
-
File Download:
- Go to the Download page, enter the code, and download the file.
-
Peer-to-Peer Sharing:
- Navigate to the P2P File Sharing page, select a file, enter the recipient's Peer ID, and start the transfer.
-
Watch Party:
- From the home page, go to Watch Party.
- Create or join a party, paste a YouTube link, and enjoy synchronized viewing with others.
ShareMore/
├── backend/
│ ├── app.py # Main Flask application
│ ├── transfer_info.json # Stores active transfers
│ ├── templates/ # HTML templates
│ └── static/ # Static files
├── frontend/
│ ├── public/ # Public assets
│ ├── src/ # React source code
│ │ ├── components/ # React components
│ │ ├── App.js # Main app component
│ │ └── index.js # Entry point
│ └── package.json # Frontend dependencies
└── README.md # Project README
- Endpoint:
/api/upload
- Method:
POST
- Description: Uploads a file and returns a unique code for download.
- Endpoint:
/api/download
- Method:
POST
- Description: Downloads a file using the unique code.
Further endpoints will be added as new features are implemented, including P2P and Watch Party functionality.
The Watch Party feature uses Socket.IO for real-time video synchronization. Users can play, pause, and seek within a YouTube video, and these actions will reflect for all participants in the same session.