A secure web application for storing, organizing, and sharing files built with Streamlit and Supabase.
- Secure Authentication: User registration and login powered by Supabase Auth
- File Upload: Easy drag-and-drop file uploading with preview
- File Management: View, download, and delete your files
- File Preview: Built-in preview support for images, videos, audio, and PDFs
- User Folders: Automatic organization with user-specific folders
- Usage Statistics: Track your storage usage and file metrics
- Responsive Design: Works on desktop and mobile devices
https://fileshare-app-nx795r34cwfbbkdptqyro9.streamlit.app/
- Python 3.7+
- Supabase account
- Git (optional)
git clone https://github.com/MohammedAazam/FileShare-Hub.git
cd FileShare-HubOr download the code as a ZIP file.
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txt- Create a Supabase account at https://supabase.io
- Create a new project
- Set up storage:
- Create a new bucket named
fileuploads - Set appropriate bucket policies (public or private)
- Create a new bucket named
- Enable Email Auth in Authentication settings
Create a .env file in the project root:
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_key
Make sure you have the supabase_client.py file with the following structure:
import os
from supabase import create_client, Client
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
def get_client(access_token=None, refresh_token=None):
url = os.environ.get("SUPABASE_URL")
key = os.environ.get("SUPABASE_KEY")
# Create basic client
supabase = create_client(url, key)
# If tokens are provided, set them to make authenticated requests
if access_token and refresh_token:
supabase.auth.set_session(access_token, refresh_token)
return supabaseCreate a requirements.txt file with the following:
streamlit>=1.20.0
python-dotenv>=0.19.0
supabase>=0.7.1
streamlit run app.pyThe application will be available at http://localhost:8501.
-
Sign Up/Login:
- Use the sidebar to create an account or log in
- Verify your email if required
-
Upload Files:
- Go to the "Upload Files" tab
- Drag and drop files or click to browse
- Click the "Upload File" button
-
View and Manage Files:
- Go to the "My Files" tab to see all your uploaded files
- Use the download button to get files
- Use the delete button to remove files
- Click "Preview" to view file contents when supported
-
View Statistics:
- Go to the "Stats" tab to see your storage usage
- Streamlit: Frontend and application logic
- Supabase Auth: User authentication and session management
- Supabase Storage: File storage and management
fileshare-hub/
│
├── app.py # Main application file
├── supabase_client.py # Supabase connection helper
├── .env # Environment variables (not tracked in git)
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- All user authentication is handled by Supabase Auth
- Files are stored in user-specific folders based on email
- Access tokens are stored in session state
- Password requirements follow Supabase defaults
Contributions are welcome! Please feel free to submit a Pull Request.
- 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.
If you have any questions or feedback, please contact: mohammedaazam757@outlook.com
Made with ❤️ by Mohammed Aazam