npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@filipnest/filters

v1.3.3

Published

Social messaging/chat based around context, people and quality filters. Free and open source. Decentralised. Translatable.

Downloads

1

Readme

Filters

Social messaging/chat based around context, people and quality filters. Free and open source. Decentralised. Translatable.

Quick start for users

  • filters.social
  • Register for an account (you can read posts without)
  • Put in tags in the top box to switch contexts.
  • Messages automatically get tagged with the context they're in. Plus things like author and a message id for replies.
  • You can use special filters like author= to filter down further. There's a big button to help you with all of these (and they're listed below).
  • All filters/tags can be reversed/negated with an exclamation point !author=filipnest or !poetry.
  • You can vote on posts. And filter based on who's voted on them using upvoted=username and downvoted=username filters. Or only show posts that have a certain number of votes with the minpoints= filter.
  • #hashtags work within messages (the same as switching/adding contexts). As do @mentions. @@username is a private message.
  • You can set global filters for your username to filter out stuff regardless of current context.
  • You can listen to other instances of filters (that's the decentralised part).

Quick start for developers

  • npm install filters.social
  • cd node_modules\filters.social
  • npm start

This will run on port 80 and put files and data in an automatically created /data directory. See config file section lower down for more information on settings you can pass in as arguments. You can pass a config argument to point to a JSON file with these set. For example npm start config=myconfig.json.

Main, slower, about

Filters is a demo/concept/experiment of a decentralised social messaging platform with a focus on context. It's a bit like Twitter if you could filter away all the things you did and didn't want to read and have discussions on a specific topic with specific people while filtering out content you don't want based on topic, author, points (votes) the post has and more.

You can switch contexts easily by typing tags into a big context box at the top of the page but can also set default contexts and filters for yourself to only show content by specific users (or not by specific users) or content that has a certain amount of points throughout the whole system.

Have a play at filters.social or deploy your own instance (instructions below) and add any thoughts to the issue queue here on GitHub. Feedback and contributions would be hugely appreciated.

The decentralised bit means you can run your own copy of it (it's free and open source) and communicate with other copies.

Developers can even switch the database they want to use via a database API. Deploy a copy using the instructions in the deployment section and play around. There's also a REST and websockets API to help development.

Automatically added tags

  • The userid of the author
  • A unique id for the message itself (always prefixed with msg-)
  • Any tags from the current context (switch context if you want to write in a different one)

Manually adding tags

Aside from changing the context in the context box, you can add extra tags by prefixing words with the # symbol. Mentions are pretty much the same prefixed with a @ and are also added to the message's tags. Double @@ is a private message.

Points

Messages can be voted up or down (or both currently, not sure if bug/feature!). This is useful for filtering away good or bad content. One upvote and one downvote per user per message.

Special filters

  • !tag negates the tag so makes sure it's not there. !world,hello would show all things tagged with hello but not world.
  • minpoints=value only shows posts with points greater or equal to the value field. So minpoints=10 would only show posts with points greater or equal to 10.
  • author=userid only shows posts by that author. So author=FilipNest would only show posts by a user with the id FilipNest.
  • upvoted=userid and downvoted=userid return only posts that the specified userid has upvoted/downvoted.
  • @userid is not really a special filter, it's just a tag specific to users.
  • @@userid is like mentions but only users with that user id will be able to see the message. Private messaging.

All special filters can also be preceded by a ! to negate the filter.

Navigating through a message

  • Author will lead you to a filter for them. All their messages will appear here. It's kinda like a profile page but there are no profile pages. Just discussion contexts.
  • Reply button will add a filter for the message id and mention the author.
  • Filter button will lead you to the filtered context of this message (if it's different from the current context. It's not visible if the context is the same).
  • Any tags that aren't in the current context appear above the message preceded by a + sign. You can click on them to go to that context.

Channels

If you know of multiple instances/servers of the Filters software running you can listen to all of them just by adding the urls to the external channel box in your settings (see the bit about decentralisation above for more info). You can additionally authenticate to get private messages and more by typing in access tokens from one site to the other on the settings page.

Formatting messages

URLS will be turned into links automatically, hashtags and mentions (#tag @username) will be turned into filter links. Basic image uploading is also supported (alt text and more coming soon).

Messages are formatted using the typogr typographical library so punctuation is curled and improved.

Author's reasons for making this

1) Context and control over what's on your feed

I love Twitter, everyone keeps wanting to replace it but I still love it. One thing that annoys me though is that sometimes the lack of a context behind a feed makes it seem like everyone's just shouting over each other about things. I mostly tweet about music but, in a year of a lot of big political events and other things, my tweets about music seem a bit funny next to everything else. I've even seen people get annoyed with others about tweeting something irrelevant to what they want to hear about.

I grew up on message boards (mostly music ones) and chat rooms (games). Both had closed contexts and communities where you could discuss one thing without being distracted or pushed into discussing other things.

Filters' messages are all tagged and you can add context to a stream and shift within contexts to filter out anything (or anyone).

Additional filters for things such as who wrote a post, who upvoted/downvoted it or how many points it has (all filters can also be negated and combined) allow you to have full control over what you see. You can also share or bookmark these contexts as all they are is simple to write out urls.

2) Decentralisation

Storing all messages on one company's servers means you're forced to follow whatever advertising, privacy and content policies that company puts forward. Filters is decentralised. Any instance can listen to messages from any other instance (go into your personal preferences and type some urls in for channels you want to read, if they're hosting Filters instances the messages will be pulled into your feed and filtered just like the other messages). This allows you to create copies of the same software (it's free and open source) that support different features or look different but still understand messages from other instances.

Developer instructions

Filters is built using Node.js. It uses the NedB JavaScript database but has a database API so you can slot in other databases if you want.

The config file

Put in a file called config.json and in it (JSON format) put the following options if you want to configure your filters instance:

  • port - which port should filters run on?
  • secret - a secret key used for signing cookies, if you don't specify this a random one will be created on startup but that means your sessions won't be persistent between server restarts.
  • pageSize - how many messages to show in one page.
  • database - the name of a JavaScript file to handle database queries/storage. Look at nedb.js for example functions.
  • fileSize - Max file upload size in bytes
  • data - Directory where the database and files will be stored

You can pass any of these as arguments as well so npm start port=100 for example.

Translations

There's a basic locales directory with English at the moment. All the strings should be in there. If you understand another language and would want to contribute pull requests with translations would be amazing.

JSON feed of messages

Add ?format=json to a Filters url to get messages in JSON format. If you pass a code parameter in (you can get this from your settings screen once logged in) you can make REST calls while logged in.

Help!

Filters is free and open source and I would very much like your help. Whether it's suggestions, code or design, everything would be very much appreciated.

The code is still being tidied up after the initial get-all-the-features-in so if you want to make improvements to anything please do so and put in a pull request so they can be merged in. Or just say what's awful in an issue.

Thank you!

License

Filters is released under the ISC license.

Credits

Font

The main font used by Filters is Fira Sans.

Libraries

See package.json file for libraries used. Additionally using a fork of jQuery Tags Input.

Icons (via Noun Project)

  • Reply icon by Jan-Christoph Borchardt
  • Filter icon by Ismael Ruiz
  • Picture icon by Suavis
  • Lock icon by Edward Boatman