Skip to content

tu-debug-ancut/PodcastCloudPlatform

Repository files navigation

🎧 Podcast Cloud Platform

A simple cloud-based podcast platform built using Python. It features a Streamlit frontend (app.py) and an aiohttp backend (server.py) for handling secure podcast uploads, downloads, verification, and history tracking.

✨ Features

  • Upload Podcast: Upload an MP3 file (podcast.mp3) with AES-GCM encryption and RSA signature generation.
  • Stream Podcast: Securely stream the uploaded podcast directly from the platform.
  • Verify Integrity: Verify the integrity of the podcast using cryptographic signatures and hashes.
  • Upload History: View a history of uploaded files with detailed metadata and timestamps.

📦 Prerequisites

  • Python 3.8+
  • Required Python packages:
    • streamlit
    • requests
    • aiohttp
    • cryptography

Install all dependencies using:

pip install streamlit requests aiohttp cryptography

⚙️ Setup Instructions

1. Clone the Repository

git clone <repository-url>
cd <repository-directory>

2. Install Dependencies

pip install -r requirements.txt

Or install manually using the command above.

3. Run the Backend Server

Start the aiohttp server:

python server.py
  • Server will run at: http://localhost:8888

4. Run the Frontend Application

Start the Streamlit app:

streamlit run app.py
  • App will be available at: http://localhost:8501

🚀 Usage

🔼 Upload a Podcast

  1. Open the app in your browser.
  2. Upload a file named podcast.mp3.
  3. Click Upload to securely encrypt and send it to the server.
  4. Metadata (file name, hash, nonce, key, signature, timestamp) will be displayed.

▶️ Stream a Podcast

  • Click Load and Play Podcast to download and stream the uploaded file.

🛡️ Verify Integrity

  • Click Check File Integrity to verify the file's authenticity using its hash and signature.

📚 View Upload History

  • The Upload History section displays all uploads with timestamps.

🗂️ Project Structure

├── app.py                # Frontend: Streamlit interface
├── server.py             # Backend: aiohttp API server
├── cloud_storage/        # Directory for encrypted files, metadata, and upload history
│   ├── podcast_encrypted.bin
│   ├── metadata.json
│   ├── upload_history.json

🔐 Security Features

  • AES-GCM Encryption: Podcast files are encrypted with a randomly generated key and nonce.
  • RSA Signatures: Metadata is signed using RSA and SHA-512 for integrity verification.
  • SHA-256 Hashing: Used to ensure file integrity.

⚠️ Notes

  • The backend server must be running before using the frontend.
  • Only files named podcast.mp3 are accepted.
  • A single encrypted file and its metadata are stored at a time.
  • Upload history is tracked in upload_history.json.

🛠️ Troubleshooting

  • Server not responding: Ensure the backend is running at http://localhost:8888.
  • Upload errors: Confirm the file is named podcast.mp3 and is a valid MP3 file.
  • Dependency issues: Check that all required packages are installed.

📄 License

This project is licensed under the MIT License.

About

A simple cloud-based podcast platform built using Python. It features a `Streamlit` frontend (`app.py`) and an `aiohttp` backend (`server.py`) for handling secure podcast uploads, downloads, verification, and history tracking.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors