Code Monkey home page Code Monkey logo

js-links's Introduction

js-links - Curating content from Javascripters daily chat logs

PRs Welcome

Landing Page

There are two ways to get started with JS Links.

If you just want to play around with the project, then set it up on your machine and do whatever you want with it.

If you decide to contribute a feature or parts of design, you will need to fork the project and send a pull request. Detailed and easy to understand instructions are available for you right here.

How to setup this project

Follow the next steps

Clone the project

git clone [email protected]:amite/js-links.git

Enter the folder

cd js-links

Install dependencies

yarn 

If you are using npm...

npm i

Run the dev server

npm run dev

And now you can start developing now on http://localhost:4000

Build assets for production

npm run prod

Running this command will create an assets folder that you can expose to your server.

Production mode in local

npm run start

You can check on http://localhost:8080

Coming soon

  • Docs
  • Your suggestions

Todo List for this App

  • Choosing and Configuring the right JS toolset

    • Add Package.json
    • Add editorconfig
    • Add linter
    • Add modular webpack setup
    • Add React
    • Add PostCSS support
    • Add inline svg support
    • Add webpack dev server
    • Add Hot Module Reloading
    • Add more prototype designs from contributors
  • Research Ranking Algorithms (hn) (issue)

  • Launch the Alpha!

See our CONTRIBUTING GUIDE

js-links's People

Contributors

amite avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

akshaynaik404

js-links's Issues

Unable to run npm install

I forked and cloned the repo and ran npm install it gives me following error: npm WARN enoent ENOENT: no such file or directory . package.json is missing.

How should we rank/score our shared links?

We want to make sure that the best daily content shows up on top anytime someone checks in. The links with the best score will show up on top. This means we have to assign a computed score to each link item that is posted.

So how do we score the best links?

  1. The latest links - sorted by time posted
  2. The most upvoted links - sorted by number of votes accumulated

In effect we can say that links decay over time - they have a certain freshness to them. Adding votes adds to their score but only incrementally.

Worth adding this excerpt:

Effects of gravity (G) and time (T)

Gravity and time have a significant impact on the score of an item. Generally these things hold true:

  • the score decreases as T increases, meaning that older items will get lower and lower scores
  • the score decreases much faster for older items if gravity is increased

For reference I am also adding the ranking algorithm at the heart of Hacker News:

In Python

def calculate_score(votes, item_hour_age, gravity=1.8):
      return (votes - 1) / pow((item_hour_age+2), gravity)

In PHP

function calculate_score($votes, $item_hour_age, $gravity=1.8) {
    return ($votes - 1) / pow(($item_hour_age+2), $gravity);
}

From the excerpt again:

Score = (P-1) / (T+2)^G

where,
P = points of an item (and -1 is to negate submitters vote)
T = time since submission (in hours)
G = Gravity, defaults to 1.8 in news.arc

more on the HN algo here: https://medium.com/hacking-and-gonzo/how-reddit-ranking-algorithms-work-ef111e33d0d9

How should we handle data for this app?

From my standpoint, I don't see much relational data happening in this app. When I see a link, I see unstructured data like title, description, date of creation, tags etc attached to the single input object.

So I was thinking of using a cloud based GraphQL service like https://www.graph.cool/ to host the data for our project. Yes. This is just like Parse or Firebase.

I will publish a small primer on GraphQL and what it does exactly. Rest assured it has fantastic integration with the React community.

What do you think about this choice? Would anyone else like to handle data in a different way?

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.