Skip to content

saswatsam786/movieNix

Repository files navigation


MovieNix Logo

MovieNix

A movie streaming platform built on the Hedera network
Hashgraph-SDK docs »

View Deployment

Table of Contents
  1. About The Project
  2. Server routes
  3. Database Schema
  4. Getting Started
  5. Our Team

About The Project

MovieNix is a decentralised application built on top of Hedera's Hashgraph-SDK where the idea is that the users can pay for movies in hbars directly to production companies without any intermediaries using Hedera's transaction system.

Built With

  • ReactJS for front-end
  • Hedera Hashgraph-SDK for creating decentralised accounts and payment system
  • Express middleware on the backened to handle api routes and requests
  • Firebase database and also used for authentication
  • TMDB api to fetch information and requied data for the movies
  • Heroku used for deploying and hosting the project
  • Github for CI/CD and git
  • Netlify for hosting and CI/CD

Features

  1. Built on the Hedera network - A movie streaming platform built on the decentralised Hedera network using the Hashgraph SDK with decentralised payment system.

  2. One Tap Buy - User can purchase any desired movie using the decentralised payment gateway by paying in hbars which requires just one tap and no further cards or UPI. The payment system is built using Hedera; the required amount for the movie is directly transferred from the user hedera account to the movie company hedera account.

  3. Pay Per Second (PPS) - We have provided an additional feature, if the user hasn't bought the movie and still wants to watch the movie the user can watch the respective movie by paying 0.01 hbar per second watched.

  4. Library - The user can view all his purchased movie in his library page. The purchased movie remains in the library or remain subscribed for 14 days.

  5. Check balance - Profile page has been made for the user, where one can see his Hedera account id, account balance, account creation date, and the number of movies added to his library.


Planned features for the project

  • Return to the last watched position of a movie.
  • Verified 'Movie production accounts' for production companies to upload their movies directly to the network
  • The hbars of purchasing or watching the movie in PPS should be transferred directly to the movie producing company's hedera account .
  • Comment and rating feature for each movie

(Back to top)

Server Routes

Type Route Description
GET /createAccount Creates an account for the user on the Hedera Network and creates and acount ID for them
POST /balance Checks the balance of the user
POST /transferMoney Used for making a transaction (buying/paying for a movie)
POST /deleteAccount Called when the user deletes his/her account essentially deleting their account from the Hedera network and Firestore database

Database Schema:

    accounts
      	├── user (string generated by Firebase)
      		  ├── accid (Account ID procvided by Hedera)
      		  ├── accountCreationDate
      		  ├── email 
      		  ├── lib (library array for the purchased movies)
      	    		├── libraryItem
      				       ├── expiryDate
      				       ├── id (movie ID from TMDB)
      				       ├── purchaseDate
      				       ├── time
      		  ├── privatekey (generated on account creation)
      		  ├── publickey (provided by Hedera)

(Back to top)

Getting started

git clone https://github.com/saswatsam786/movieNix.git
git checkout dev_branch

Create a .env file in the root directory:

REACT_APP_FIREBASE_API_KEY=<your_api_key>
REACT_APP_FIREBASE_AUTH_DOMAIN=<your_project_id>.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=<your_project_id>
REACT_APP_FIREBASE_STORAGE_BUCKET=<your_project_id>.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=<your_project_messaging_id>
REACT_APP_FIREBASE_APP_ID=<your_project_app_id>
REACT_APP_FIREBASE_TMDB_API_KEY=<tmdb_api_key>

Now create a .env file in the server directory:

MY_ACCOUNT_ID=<your_hedera_testnet_id>
MY_PRIVATE_KEY=<your_private_key>

Run the command in the root directory and the server directory to install all the dependencies:

# (for npm)
npm install
npm start

# (for yarn) 
yarn add
yarn start

To run the server on the local machine:

cd server

# (for npm)
npm i
npm start

# (for yarn)
npm i
yarn start

(Back to top)

Project Members

Team Atreus