Giter Club home page Giter Club logo

susper.com's Introduction

susper.com

master: Build Status development: Build Status Codacy Badge Code Climate codecov Gitter Average time to resolve an issue Percentage of issues still open

Susper is a decentralized Search Engine that uses the peer to peer system YaCy and Apache Solr to crawl and index search results.

You can test the branches of susper here:

Communication

Our chat channel is on gitter: https://gitter.im/fossasia/susper.com

Components and Technology

This is a front-end for Susper running on YaCy server. The retrieval of search results is done using YaCy search API.

  • Solr and Javascript(JSON)

Search results are displayed using Solr server which is embedded into YaCy. All search results must be provided by a YaCy search server which includes a Solr with a specialized JSON result writer. When a search request is made in one of the search templates, an HTTP request is made to YaCy. The response is done in JSON because that can much better be parsed than XML in JavaScript. To overcome the same origin policy in JavaScript, the result is capsuled into a JSONP response.

Technology Stack

  • HTML - Structure of the web page generated.
  • Bootstrap-3.3.7 - Used for responsive design.
  • CSS - Styling options and details of the web page.
  • Javascript(JSON) - Used to store information for deploying the application such as dependencies.
  • Angular-4 - Structure for deployment of the web page.

Requirements

Angular Installation

First, we will need to install angular-cli by using the following command:

npm install -g @angular/cli@latest

How to deploy?

Deploy to Docker Cloud Deploy

Running on localhost:

  • Step 1: Fork susper repository and clone it to your desktop
  • Step 2: Then cd into that cloned folder
  • Step 3: Then execute the command: npm install
  • Step 4: Deploy locally by running this:ng serve
  • Step 5: Go to localhost:4200 where the application will be running locally

For deploying with Github Pages:

With these very simple steps you can have susper deployed:

  • Step 1: Fork susper repository and clone it to your desktop
  • Step 2: Then checkout to your master branch git checkout master
  • Step 3: Deploy by running this: ng build and then npm run deploy
  • Step 4: Visit https://yourusername.github.io/susper and you should see the Susper search running
  • Step 5: As you search you might see that it can't find anything, to resolve this, on search you will see there is a red shield on the search bar, click on it and allow to load unsafe scripts
  • Step 6: Reload and you will have a fully functioning Susper search deployed on GitHub pages

For deploying with Surge:

Surge will automatically generate a deployment link whenever a pull request passes CI.

Suppose pull request number is 200 and it passes Travis CI. The deployment link can be found here: https://pr-200-fossasia-susper.surge.sh

Contributions, Bug Reports, Feature Requests

This is an Open Source project and we would be happy to see contributors who report bugs and file feature requests submitting pull requests as well. Please report issues here https://github.com/fossasia/susper.com/issues

Contributions Best Practices

Commits

  • Write clear meaningful git commit messages (Do read http://chris.beams.io/posts/git-commit/)
  • Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. (More info at https://github.com/blog/1506-closing-issues-via-pull-requests )
  • When you make very very minor changes to a PR of yours (like for example fixing a failing Travis build or some small style corrections or minor changes requested by reviewers) make sure you squash your commits afterwards so that you don't have an absurd number of commits for a very small fix. (Learn how to squash at https://davidwalsh.name/squash-commits-git )
  • When you're submitting a PR for a UI-related issue, it would be really awesome if you add a screenshot of your change or a link to a deployment where it can be tested out along with your PR. It makes it very easy for the reviewers and you'll also get reviews quicker.

Feature Requests and Bug Reports

  • When you file a feature request or when you are submitting a bug, report to the [issue tracker] (https://github.com/fossasia/susper.com/issues)
  • Make sure you add steps to reproduce it, especially if that bug is some weird/rare one.

Join the development

  • Before you join development, please set up the project on your local machine, run it and go through the application completely. Press any button you can find and see where it leads to. Explore. (Don't worry ... Nothing will happen to the app or to you due to the exploring ๐Ÿ˜‰. Only thing that will happen is, you'll be more familiar with what is where and might even get some cool ideas on how to improve various aspects of the app.)
  • If you would like to work on an issue, drop in a comment at the issue. If it is already assigned to someone, but there is no sign of any work being done, please free to drop in a comment so that the issue can be assigned to you if the previous assignee has dropped it entirely.

Do read the Open Source Developer Guide and Best Practices at FOSSASIA.

Issue and Branch Policy

Before making a pull request, please file an issue so that other developers have the chance to give feedback or discuss details. Please match every pull request with an issue and add the issue number in description e.g. like "Fixes #123".

We have the following branches:

  • development All development goes on in the development branch. If you're making a contribution, please make a pull request to development. PRs to the branch must pass a build check and a unit-test check on Travis.
  • master This branch contains shipped code. After significant features/bug-fixes are accumulated on development, the development branch is merged into the master branch.
  • gh-pages This branch contains the auto-generated build artifacts of the master branch that is generated by Travis. The build artifacts on this branch are used to build the site on susper.com .

LICENSE

The repository is licensed under Creative Commons Attribution 2.0 License (CC-BY 2.0).

Maintainers

The project is maintained by

Development server

Run ng serve for a dev server. Navigate to localhost:4200. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng g component component-name to generate a new component. You can also use ng g directive/pipe/service/class.

Build

Run ng build to build the project. The build artefacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor. Before running the tests make sure you are serving the app via ng serve.

Update Angular-CLI

To update Angular-CLI to a new version, you must update both the global package and your project's local package.

Global package

npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest

Local package

rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell
npm install --save-dev @angular/cli@latest
npm install

Extras

Add Susper as default Search Engine in Google Chrome

susper.com's People

Contributors

alejoheredia avatar bhaveshan avatar collinx avatar dishebh avatar harshit98 avatar idealadarsh avatar imgurpreetsk avatar isuruab avatar khyatidoshi avatar luccioman avatar marauderer97 avatar mariobehling avatar nancy-chauhan avatar navirocker avatar neeraj3029 avatar nikhilrayaprolu avatar orbiter avatar parths007 avatar pipe-runner avatar prabhupant avatar praveenojha33 avatar rajvaibhavdubey avatar samagragupta avatar sandeepm96 avatar sathiraumesh avatar shreyanshdwivedi avatar sj29-innovate avatar subhahu123 avatar sudo-panda avatar valentinbercaru 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

susper.com's Issues

Redesigning the site using MaterializeCSS framework.

As mentioned in issue no #37 , the style of susper.com looks a bit dull. It should be attractive and eye-catching in terms of styling. Here are the screenshots -

selection_008

It should be styled similar to loklak.net. Also, we can add a tag-line between susper logo and search bar. We can discuss about it though if we need it.

selection_007

Result Page -

selection_009

selection_010

Add more tests

this is an evolutionary issue. and one could start by contributing the tests to those functions not covered in the test suite .
addition of the code coverage tools could also be done.

SUSPER logo directs to yacy.net

On the homepage susper.com , clicking on SUSPER logo directs to yacy.net . The logo should not link to any website just like Google search engine.

Search bar on 404 error page needs to be changed

The search bar in the 404 page needs to be updated. It does not render search results, moreover it needs to be updated to the latest version which looks like this
image

instead of:

image

NOTE:Instead of hard coding the search bar every time we use it, simply including the navbar component would be more efficient.

add codecoverage scripts , html linters

adding the codecoverage , and html linters would make the code quallity better and easier to view and understand. one picking up this issue needs to correct html lint errors present in the project too.

  • add codecoverage

  • add html linter and correct lint errors present

Design Changes

We could do following do following changes

  1. Alignment of the search results page(PS:the red lines), please see the image below
    alignment

  2. The Menu about right now works on both hover and click, we can keep it just one which would be make it easy even I feel icons are pretty huge may be we could change dropdown menu as next pic
    menu button
    menu-dropdown

  3. Floater's position could be fix such that when we scroll it stays at bottom instead of moving along the scroll and we could hide the flyer in mobile or make some change such that it doesn't overlaps texts
    flyer s position
    flyerinmobile

  4. Favicon is not displayed
    favicon

All these issues are very small I would suggest first timers solving them, I am ready to help if needed.

Problems with pagination bar

When we navigate from one page of images, to the next and then click on the all tab, we get results from the 10th page(since a 100 images are displayed each time).
image

This may confuse the user, we have two possible solutions

  1. Separate pagination bar for each view type(image, all etc)
  2. Set page to 1, every time a new view type is clicked on
    (Note: Google implements the second suggestion)

ngrx implementation for redux based architecture

currently we have only one component for results page, but it is a bad practice to have a whole page as one component .subdividing the results component to subcomponents will lead to cross component communication, and extending susper in future would lead to many more cross component state dependencies.
so a solution to this is to implement redux based architecture for search results and any other cross dependencies in future.

Blurred icons.

In about this page section- the icons seems to be blurred (not sharp, pixels are observed) . I would like to work on this.
Also rather than using pictures, we can use icons. It would be much better to have fast website.
selection_002

Pagination shifts from it's original position.

Searching images more than 3 - seems good. Pagination remains in it's position. But, searching images less than 3 - the pagination shifts from it's position upwards. Here are the screenshots -
screenshot from 2017-02-15 18-31-16
selection_003

design change of susper

implement susper ,similar to google.

  • Implement a menu with tabs "All", "Images", "Videos" and "Search Tools"

  • On clicking "Search Tools" show submenus

  • Below menu "All" show options

  • Sort by date

  • All Results, File Types, Provider, Authors - with a dropdown menu that opens on scroll over and shows tick boxes

  • Below Images show options

  •         All Images, File Types (only show image file types here), Provider, Authors - with a dropdown menu that opens on scroll over and shows tick boxes
    
  • Below Videos show options

  •         All Videos, File Types (only show video file types here), Provider, Authors - with a dropdown menu that opens on scroll over and shows tick boxes
    

image

The goal would be to implement a design closer to google than to the old susper design with the sidebar.
more details can be found at
fossasia/susper-backbone#5

Site not loading.

Whether I go to susper.com or work locally on my machine (localhost:4200) the site ends up loading a default options box.
screenshot from 2017-02-18 22-14-56

Images appear by clicking 2 times on 'images' tab.

Here are the screenshots -
First click on the image tab shows- link of the images but no images are display.

screenshot from 2017-02-19 08-03-02

Second click on the image tab shows- images with no link (from the website they have been rendered).

screenshot from 2017-02-19 08-03-22

It should be similar to Google- on single click images appear with respective links.

Change in component architecture

The search bar in the home page and the results page need to be linked, i.e, text in one should be displayed in the other. I think a common component that is injected into both pages will be a solution. What do you think @nikhilrayaprolu ?

Site not responsive on different screens

I was testing out the site on different screen sizes and it seems that the site is not responsive on all screens. Here are the screenshots:
screenshot_2017-02-21_02-32-46
screenshot_2017-02-21_02-32-57
I would like to work on this issue. Thanks

implementing 404 page

when we type a url which isn't present , the site isn't rendering us anything in router-outlet. a 404 error page implementation would make this fixed

Add "About" page

Clicking on About this page under the help icon gives a 404 error.
image

adding the filters and search tools

the present filter functionality and search tools functionality could be implemented.

  • implement the filters

  • implemet the search tools bar

No search bar - blank page on Chrome

The start page of susper is currently blank. It shows an option to add search to Firefox very shortly (on Chrome) and then only a blank white page is shown.

screenshot from 2017-02-19 06-58-06

Help icon to be modified

The links under the help icon are redundant as they all point to yacysearch(as it was in susper-backbone), they require to be updated, and restyled. @mariobehling Any ideas on how to go about this? Especially since google has no feature like this.
Susper:
image

Google:
image

Problems with the pagination bar

The pagination bar has the following two problems

  1. The next and previous only update the pagination bar, not the entire page
  2. Its functionality for images is unclear, as it tries to display images from the same page where documents were last viewed.
    @mariobehling @nikhilrayaprolu What do you suggest? How should images be displayed? Should there be paging for them at all? Google doesnot display images in pages, it displays all of them at once. Should we implement something like that?
    If images and videos have the paging system too, then where should it start from, from page 1 or the page the user is currently viewing in say documents?

adding a custom domain to susper

since github doesn't make calls to http servers (mixed content) ,susper doesn't work on github pages .one way we could make a workaround for this is to publish the site to a custom domain by adding a CNAME file.
@mariobehling

SUSPER logo not linked to homepage.

Here are the screenshots of the following logo i'm taking about :-
11
11a

On clicking the SUSPER it should- direct to susper.com just like Google.

Resizing the logo at top-right side.

We should resize the susper logo - it should be little more big in size. And there is too much area between the logo and the search bar. It should also be reduced. It should have similar design just like Google have! Here are the screenshots -

selection_002

selection_001

refactor susper's result page

result's page is a single component now . which could be sub divided into many components which makes the code maintainable and understandable.

  • Search bar component.
  • Autocomplete component.
  • Infobox component.
  • Related search component.
  • Dropdown component.
  • Navbar component.
  • Footer navbar component.

Left :-

  • Pagination component.

  • Images component

  • videos component

Clicking on the link directs to 404 Page not found.

Searching a particular thing, and results being fetched is working good! But when I click on any of the link - it redirects me to 404 Page not found. Here are the screenshots -
selection_001
After clicking on a desired link -
screenshot from 2017-02-15 18-20-44

change matrix parameters to query parameters

the url parameters are implemented as matrix parameters(default way to pass parameters in angular2 using semi colon) now , but since matrix parameters are not good for our case ,it is better to change them to query parameters with ? and &.

auto search on key up

now when ever user wants to search something he has to type it and click enter , a auto search feature while user types would fix this

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.