Hi! This is a podcasting application that provides incentive to listen due to the underlining cryptocurrency rewards. The application itself stores podcast data in a PostgreSQL DB.
The users have the option to either listen anonymously, or provide the public key to their wallet so they can unlock the option to mine Podcoin while listening to podcasts and donate to podcast content creators.
The users also have the option to contribute to podcast content creators. The content creators will receive 100% of the donations. The donators even get a 30% split of the block reward. This is split based on contributions/transactions on that block. The last 50% of the reward goes 20% to the solver of the block proof and 30% to the miners based on guesses provided.
NOTE: All dependencies and instructions assume Windows 10 OS
- Install PostgreSQL from here.
- Install Python 3.7.4 from here.
- Make sure to add the correct folders to your path/
- Clone this repository.
git clone https://github.com/anirudhmungre/PodcastAsABlockchain.git
Open the postgreSQL cli using powershell and run the following code from generate.sql:
-- Create the appropriate Database and connect
CREATE DATABASE podcasting;
\c podcasting;
-- Create the extension required for UUID's
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- Remove the table if it already exists
DROP TABLE IF EXISTS Podcast;
-- Create the required table
CREATE TABLE Podcast
(
id uuid NOT NULL DEFAULT uuid_generate_v1(),
title text NOT NULL,
media text NOT NULL,
posterkey text NOT NULL,
date timestamp without time zone NOT NULL DEFAULT now(),
CONSTRAINT podcast_pkey PRIMARY KEY (id)
);
This will create a Database by the name of podcasting -> Connect to the database -> create a table Podcast with the appropriate fields.
- Make sure postgres is running by opening pgadmin or starting the database from CLI
- Put a database.ini file in the server directory with the following configuration
[postgresql]
host=localhost
database=podcasting
user=<postgres username. Default: postgres>
password=<postgres password. Default: postgres>
- Enter the server folder.
cd server
- Activate the python virtual environment.
podchain/Scritps/activate
- Start the server instance on port 5000.
python main.py 5000
- Enter the client folder.
cd client
- Start locally hosting a server for the client on port 8000.
python -m http.server 8000
- Go to your browser (This was tested in Chrome) at http://localhost:8000 you should see a screen similar to the blank screen below.
Initially because the database is empty there will be no podcast options on the main page. This is how to perform different operations to use the application.
You can upload a podcast and will receive 100% of the donations to your podcast in PodCoin!
- Click on the upload tab at the top of the page.
- Enter the title, podcoin wallet key, and upload a mp3 file from /documentation/audio or your own.
- CLICK UPLOAD!
You can listen completely anonymously without entering a podcoin wallet key!
- Make sure you're on the listen tab and you have mining set to off.
- Click the play button on the podcast you want to listen to.
- ENJOY!
You can add a new wallet to the PodChain and view PodCoin funds!
- Click on the wallet tab.
- Enter your PodCoin wallet key in the Key section.
- Click ADD WALLET To add wallet to podchain.
- Click REFRESH To check funds.
You can use some of your computer resources to mine PodCoin while listening to PodCoin
- Make sure you're on the listen tab and you have mining set to on.
- Make sure you have a PodCoin wallet set in the wallet tab.
- Start listening to any podcast and start mining!
You can support your favorite content creators by donating to their podcasts!