Code Monkey home page Code Monkey logo

bassa's Introduction

logo

Build Status Codacy Badge Docker Build Status PyPI PyPI Gitter

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 an interface to view and download the files in local server
  • Provide a rating system to 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 user when his/her download is completed
  • Mark inappropriate downloads
  • Provides admins 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

gitclone

Use python 3 instead of Python 2

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

setupsh

Database Setup

  1. Type below in a MySql terminal.
create database Bassa
  1. Type below in the root of project.
mysql -u root -p  Bassa < Bassa.sql
  1. Open components/core/DBCon.py and setup database username and password.

Test Server

  $ cd components/core/
  $ python3 Main.py

python3main

Bassa UI

Install dependencies with

$ cd ui/
$ npm install

To start

run gulp serve

gulp_serve

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

  • username - rand
  • password - pass

bassaui

Make sure you have aria2 installed.

run aria2c --enable-rpc

aria2c

How to Use Bassa

  • After Setting up Bassa, Login/Register.There are two types of users in Bassa- (1) The Admin and (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

Autoformat JS with Prettier

Find more plugins here

Run UI unit tests

	$ cd ui/
	$ npm test OR $ yarn test 

bassa's People

Contributors

agentmilindu avatar asutosh989 avatar azisnaufal avatar benjamin-mueggenburg avatar charithccmc avatar codacy-badger avatar harsh183 avatar hmadhawa avatar iammosespaulr avatar kaveeshbaddage avatar kmehant avatar lakinduakash avatar malithsen avatar nilmapeiris avatar nuwini avatar orkosinha avatar paarandika avatar padamchopra avatar pranayrobo avatar rajikaimal avatar rehrumesh avatar saisankargochhayat avatar scorpionhiccup avatar shlokj avatar tanmayanand44 avatar tharindupr avatar thuan2000 avatar uk175 avatar vivonk avatar yruwanmalee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bassa's Issues

Supporting Magnet Links in add downloads.

Currently only URL's are accepted by the application . Any other form of input results in a invalid url response .

Expected Behavior

  • As per app description , it supports magnet link support.
  • By default we are using aria2c , which supports magnet links , so i will be trying to implement support for magnet links.

Steps to Reproduce (for bugs)

  • Add a magnet link to add download space.

Unified script to start Bassa servers at once

In the current project there is no script to start all the three Bassa servers at once. Therefore, writing a script to start Bassa servers at once will make users comfortable. Hope that writing a unified script to install dependencies, start the server and change configurations will help. I will send a PR shortly.

Use Prettier

Currently JavaScript code (UI) is not configured to use a linter/formating tool. I would like to suggest Prettier, which is a formatting tool for JavaScript with opinionated styling.

Pros:
Prettier does a good in identifying bad code styles in JavaScript.
Highly adopted by modern JavaScript projects. Eg: React

Cons:
Opinionated styling.
Less options to add custom styling.

cc: @rehrumesh @malithsen
Neglected general issue template since this is not a bug report πŸŽƒ

Write a proper installation guide for Bassa

Installation guide should:

  • Provide all the necessary steps to install dependent tools

  • Provide all the steps to installation of Bassa App

  • Add necessary screen captures.

  • Windows

  • MacOS

  • Ubuntu

  • CentOS

  • Fedora

  • Arch

  • CoreOS

[Feature] Current user's name is not displayed on Logout menu

Expected Behavior

When system user is going to logout from the system, current user's user name should view in the Logout menu by the system.

Current Behavior

There is only logout button in the logout menu. That doesn't displayed who is the current user.

bassalogoutview

Possible Solution

Adding current user's user name in to the logout menu.

bassalogoutmenuwithusername

Context

This gives the opportunity to the user to know from which account he has been used to login to the system.

Your Environment

Wrong Credential handling in Login Page.

The Login page flickers to dashboard for a second and then reverts back to login page.

Expected Behavior

Should show invalid credential alert message.

Current Behavior

Shows flickering to dashboard and reverts back to login page.

Steps to Reproduce the bug

Try entering invalid username or
or bugs)
Try entering invalid username or password.
The url changes to dashboard for a second and then back to login page.
issue

[Bug] Admin section not accessible after refresh

After creating an account with Admin rights, navigating to the admin tab works fine. But after a refresh toast comes up with 'You don't have admin previlages'.

Expected Behavior

It should show up the admin section.

Current Behavior

Toast comes up showing 'You don't have admin previlages'.

Steps to Reproduce (for bugs)

  1. Create an account with Admin privileges.
  2. Navigate to admin tab/section.
  3. Refresh

Your Environment

  • Environment name and version (e.g. Chrome 39, node.js 5.4): Node.js v6.10.0, Python 3.5
  • Operating System and version (desktop or mobile): Desktop

I'm suspecting this as a bug. Hope @malithsen can give any info regarding this behavior πŸš€

[Login] Logic for checking whether an account is confirmed or not via email

Application login doesn't check whether the account is confirmed/approved or not via email. Account should be confirmed in order to.

Expected Behavior

When user login, if the account is not confirmed, it should display a message indicating that the account should be confirmed.

Current Behavior

Currently this logic has not been implemented.

Possible Solution

Create logic related to checking user account confirmation.

Steps to Reproduce (for bugs)

1.Create a new account
2.Sign in.

Back-end unit tests

This thread will be used for tracking issues related to back-end testing.

Work in progress !!!

Redesign the Bassa signup page

The structure and the design of the sign up page needs more attention. I have redesigned the sign in page and I am planning to redesign thr signup accordingly to provide the consistency of the UI.

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

[Bug] Broken route /ui

/ui/ route is broken

Expected Behavior

Pointing to localhost:5000/ui should serve the UI.

Current Behavior

Pointing to localhost:5000/ui in development gives an error.

Possible Solution

Steps to Reproduce (for bugs)

  1. Start the server
  2. Point the browser to localhost:5000/ui

Your Environment

  • Environment name and version (e.g. Chrome 39, node.js 5.4): Chromium 53
  • Operating System and version (desktop or mobile): Ubuntu 14.04 LTS

Auth levels of API should be generic

Currently, the auth levels of the API documentation is not generic, but specific to one use case( Educational institute ).

Auth levels
0: ADMIN
1: STUDENT
2: ACADEMIC
3: NONACADEMIC

These roles should be generalized and should be explained what each role/auth level can do and can't do.

Store database credentials in the config file

Currently database credentials are hard coded to the dbcon.py
I suggest keeping them on a .conf file.
Further I think it's good to combine both current .conf files to a single one.

Add all the configurations to a single conf file

Expected Behavior

We need to implement a method to add all the configs to a single file (or multiple files to make things more clear) and fetch them from there. These conf file(s) should be in JSON or YAML format. Preferably with a web UI for admins to do the configs.

Current Behavior

Currently, a number of configurations which are vital to the system are scattered all over the code and it is hard to keep track of them.

Possible Solution

Use the existing ConfReader class and extend it to support all the configurations.

Badges on README.md not working

Following two badge takes the user to a 404 page when clicked.

image

Expected Behavior

Ideally, they should lead to the PyPI package page.

Update README on first time login credentials

In the first time someone login to Bassa, the username and password credentials should be given to proceed. Since the credentials are not mentioned in the README file I will add a PR shortly.

Making ReadMe file more comprehensive

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

[Unit tests] Travis perf issue

Travis-CI takes a lot of time when running unit tests. This can be avoided to a certain extent by caching dependencies.

Making a how to use Bassa video tutorial / GIF guide.

Expected Behavior

This is for users who are new to Bassa to understand its functioning and relating how it could be useful to them in their problem-solving.

Current Behavior

Currently, we have a how-to setup readme.

Possible Solution

We need a screencast or a GIF aided post explaining the use of Bassa.

[Unit tests] Using ChromeDriver instead of PhantomJS

ChromeDriver can be used instead of the PhantomJS driver which is currently used in the project for unit tests. As Phantom2 is being developed heavily breaking changes can be introduced. In fact when configuring the project for unit tests I got several breaking changes due to Phantom2 releases and it's plugin changes. Therefore I propose to use ChromeDriver instead of PhantomJS since Chrome is a stable project and can be used for heavy unit tests and e2e tests can be handled smoothly with Chrome.

Downloads in the Bassa server fails

When bassa try to download multiple files, it crashes the app,

Expected Behavior

Bassa should be able to handle concurrent downloads without any issues.

Current Behavior

If there are multiple downloads, server crashes.

Possible Solution

Remove the stat module.

Update README on python version and database setup

The steps on how to setup the database for Bassa is not stated in the README file. Also, Bassa seems to work only on Python 3, due to dependency issues. However this is not mentioned in the README. I will send a PR shortly.

Release checklist for v 1.0

  • Solve database write issue
  • Refine authentication, rating and flagging of inappropriate content
  • Automatic suggestions before new downloads
  • Refine disk cleaning method
  • Finish front-end
  • Docker and Vagrant images for deployment

As an additional task, if we have enough time, we can look in to identifying inappropriate downloads.

Bassa Wiki should be improved

Bassa Wiki Home should be about Bassa, not about PWAs. README.md has stuff which mainly targets a developer( API endpoints, etc ) and might frustrate a user. The wiki should have a "How to install" guide. etc from a user's perspective.

Current Behavior

Currently, the wiki has nothing about Bassa but an article on PWA.

Possible Solution

Should create wiki pages as follows.

  • How to install guide
    • On Windows
    • On Linux
    • On MacOS
  • How to use guide
  • Troubleshoot guide.

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.