Giter Site home page Giter Site logo

groovetube's Introduction

Contributors Forks Stargazers Issues LinkedIn GNU License


Logo

Groovetube

A social platform for sharing live music video performances.
Explore the docs »

View Demo · Report a Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

Logo

Summary

Groovetube is a video sharing web application inspired by YouTube, built using Python / Flask and utilizing React.js/Redux architecture. Groovetube allows users to:

  • Create an account / profile
  • Log in / Log out
  • Upload / share live music videos
  • Watch videos
  • View user profiles
  • Follow / unfollow other users
  • Search for videos
  • View video pages and comment on videos
  • Add a video to a user's collection

Built With

  • Javascript
  • React
  • Redux
  • Python
  • Flask
  • SQLAlchemy
  • PostgreSQL
  • CSS

Overall Structure

Back end

The app was built using Python / Flask on the back end with a postgreSQL database. Back end structure is RESTful and all the data requests use AJAX and are fulfilled with a JSON API. Associations are used to prefetch data in order to minimize SQL queries to the database.

Front end

The front end is built completely in React / JavaScript and utilizes Redux for global state management. React's virtual DOM allows for very fast rerendering without requiring new pages to be sent from the server.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installations

  • npm

    npm install npm@latest -g
  • pipenv

    pipenv install

Installation

  1. Clone the repository

    git clone https://github.com/gch910/groovetube.git
    
  2. Install Pipenv dependencies

    pipenv install --dev -r dev-requirements.txt && pipenv install -r requirements.txt
  3. Create a .env file based on the example with proper settings for your development environment

  4. Setup your PostgreSQL user, password and database and make sure it matches your .env file

  5. Get into your pipenv, migrate your database, seed your database, and run your flask app

    pipenv shell
    flask db upgrade
    flask seed all
    flask run
  6. Install NPM packages - cd into react-app

    npm install
  7. While still in the react-app folder

    npm start

Primary Components

User Authorization

The login page offers a simple but elegent display for entering user credentials. User authentication is handled in Flask using the flask_login package. The werkzeug.security package is used for password hashing. Passwords are not saved to the database, only password hashes. When users log in, the password they provide is rehashed and checked against the original encrypted password hash to verify credentials.

signin

Home Page

The Groovetube homepage features a responsive grid layout of the user's video collection if they are logged in, or a list of videos to browse if they are not. Each video thumbnail displays a static image which on hover will display a GIF of the video performance. The video collection updates as a user adds more to their collection and videos can be removed from the collection via the user's profile page at any time. The side navbar featured is present on all pages for easy navigation.

homepage

Video Page

On navigation to the video page, if the specified video is not already present in the redux store, a fetch request will be made to the backend which will respond with queried results of relevent video information. Am YouTube iframe embed will be rendered for easy interaction with the player. Using YouTube to host these videos cuts down on database storage and allows users to upload as many videos as they like. A logged in user can interact with the video page by adding/un-adding the video to their collection, adding/deleting comments, following/unfollowing the posting user, and navigating the video player, with page updates happening instantly. All of the updated video data is saved to the postgreSQL database where it can be retreived later on.

videopage

User Profile

At the top of the profile page, the user's profile image and username is displayed, with an option to upload/change the profile picture if they are logged in. By default a grid layout of the profile user's collected videos is rendered on initial navigation. On hover, if the logged in user matches the profile user, a button to remove an individual video is displayed, which displays a confirmation of removal once clicked. A navbar is also presented with options to view the user's uploads, followers and the users they are following. This navbar utilizes React state to only display information for the currently clicked link. Buttons to delete an uploaded video and unfollow users are only available if user auth has confirmed that this user is the owner of the profile. Additionally, a follow/unfollow button is available on the profile page if it does not belong to the logged in user.

profilepage

Search Results

When a user enters something into the searchbar, a fetch request is sent to the backend where the data intensive task of querying for matching results is handled. The backend responds with results for matching video titles, which is then rendered on the search results page with the appropriate interactive thumbnails.

search_results

Categories

Video results can be filtered based on the music genre to make it easier to browse desired results. A fetch request is made to the backend with the specified category ID, where a query is then made for all matching videos.

categories

Following

Clicking on the "following" nav-link on a user's profile page will display the users that they follow. If the logged in user matches the current profile, they are able to click the "unfollow" button which will delete that column in the database join table and immediately display the updated results.

following

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU License. See LICENSE for more information.

Contact

Gabriel - [email protected]

Project Link: https://groovetube.herokuapp.com/

Acknowledgements

groovetube's People

Contributors

gch910 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.