GithubHelp home page GithubHelp logo

vibhorgupta-gh / bassa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scorelab/bassa

1.0 2.0 0.0 3.46 MB

Automated Download Queue for Enterprise to take the best use of Internet bandwidth

License: GNU General Public License v3.0

Python 32.08% Dockerfile 1.03% Shell 6.66% JavaScript 42.47% HTML 12.23% CSS 5.54%

bassa's Introduction

logo

Build Status Codacy Badge Docker Build PyPI Gitter Backers on Open Collective Sponsors on Open Collective

Automated Download Queue for Enterprise to take the best use of Internet bandwidth

About

Bassa solves the problem of wasting internet bandwidth by queuing a download if it is larger than a given threshold value in high traffic and when the traffic is low, it completes the download of the files. After the files are downloaded, the users can get their files from the local servers which do not require external internet bandwidth.

Main functionalities

  • Provides an interface for users to add their downloads as links or torrent magnet links
  • Provide users with an interface to view and download the files in the local server
  • Provide a rating system for users to rate the files residing in local server
  • Automatically start and stop downloading in given time frame
  • Automatically clean the disks and make room for new downloads
  • Notify the users when his/her download is completed
  • Mark inappropriate downloads
  • Provides admins with an interface to deal with inappropriate files

Installation

Note:

  • Windows users can check the installation guide here.

First clone the Repository git clone https://github.com/scorelab/Bassa.git cd Bassa

gitclone

Use python 3 instead of Python 2

  $ sudo ./setup.sh

  $ cd components/core/
  $ sudo python3 setup.py develop

setupsh

Bassa has 4 main compoenents,

  1. Database
  2. Bassa API
  3. aria2
  4. Bassa UI

Database Setup

1.Type below in a MySql terminal.

create database Bassa

2.Type below in the root of project.

cd db_schema
mysql -u root -p  Bassa < Bassa.sql

3.Open components/core/DBCon.py and setup database username and password.

_db=MySQLdb.connect("db", os.environ.get('YOUR_DB_USERNAME'), os.environ.get('YOUR_DB_PASSWORD'), os.environ.get('Bassa'))

If you don't have environment variables setup, you can use the following line with hard coded values for testing purposes

_db=MySQLdb.connect(host="localhost", user="YOUR_DB_USERNAME", passwd="YOUR_DB_PASSWORD",db= "Bassa")

Bassa API

  $ cd components/core/
  $ python3 Main.py

python3main

Run aria2

run aria2c --enable-rpc

Read more on installing aria2 here

aria2c

Bassa UI

Install dependencies with

$ cd ui/
$ npm install

To start

run gulp serve

gulp_serve

In the first time you log in, the credentials would be as follows.

  • username - rand
  • password - pass

bassaui

Running Tests

API Tests

  • Make sure the python server is working and you have an open connection to the database.
  • Open the python console in your terminal by running the command python3.
  • In the console that opens, import the test files, like so:
 from tests.Bassa_endpoint_test import *
 from tests.login_test import *

UI Tests

cd ui
npm test OR yarn test

Using Docker-Compose

Run the docker-compose at the project directory to deploy the core API, UI and the DB.

$ docker-compose up

How to Use Bassa

  • After Setting up Bassa, Login/Register. There are two types of users in Bassa
    1. The Admin
    2. The Normal Users
  • A user can add a link through the webapp and Bassa stores it in the local server right away. This way multiple users can add various links, but the downloads won’t start right away.
  • The organisation admin can start the downloads at a time of his/her liking.
  • Then the users who had added links for certain files can download them from the local servers at a much higher speed.
  • You can even watch a video tutorial for the same on Youtube

Developers

Please go through the developer guides in Bassa wiki

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! πŸ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

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.