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

owndir

v0.0.23

Published

Forgive me while I wax philosophic - I'm still figuring out how to explain what OwnDir is, so I'm starting with **why** it is.

Downloads

1,206

Readme

Why

Forgive me while I wax philosophic - I'm still figuring out how to explain what OwnDir is, so I'm starting with why it is.

There's something perverse in how so much of our modern ecosystem is built for scale (real or aspirational). Every incentive bends away from user agency. Code is managed and distributed by sites and app stores - it updates itself without your permission, or it breaks itself out from under you. Data is aggregated and hoarded at every turn. Maybe it gets monetized, or maybe it just gets stolen. Apps that should have been websites, but they want the emails and phone numbers of everyone you've ever known. Websites that retain your data, trying to lock you in, to build up a big enough network effect that people can't not use them. This is classic "if you aren't the customer you're the product". It's not for us. It's shitty, and it doesn't have to be.

That isn't to say that there's nothing of value - if anything, that's half the problem. Facebook can be really useful for keeping in touch with people - the fact that it stalks you across the internet, that it's embedded you in a global social graph, all of that's beside the point, for an individual. That crap only matter for Facebook. Google Maps is another great example of this: it's hugely useful for navigating even familiar spaces. But that's incidental - google maps doesn't exist to let you find your way around, it exists to let Google follow everyone. Navigation is the bait.

That's the pattern that I want to disrupt. We can have nice things, and that we don't have to compromise with tech giants (or tech giant wannabes) who're looking for any way to manipulate us, or sell us out. The part of facebook that's actually good, isn't that complicated. Most things that people need are even simpler. If we make it easier to retain control of data, and clearer that control is retained, we can have software that works for us, that we know works for us. As software gets smaller and closer, this only gets easier.

What

In as pithy terms as possible, OwnDir is a web framework for single-user apps. It exists to run wee little home-grown web-apps, backed by a local folder. Though it doesn't have to be used this way, the idea is that the app be local-only.

Given a directory tree, OwnDir will load code from each directory, as an inheritance heirarchy.

  • On the server side, these nodes inform a router - each folder can specify http request handlers.
  • On the client side, the same nodes expose JSX components, specifying how to display their respective folders.
  • a simple filesystem api gives both access to the contents of the folder
  • a basic plugin system means (eventually) you don't have to build everything from scratch.

Think of it like Electron, if it didn't bundle chrome. Everyone has a browser anyways, so why bother including it? Bridge the filesystem directly into it, run whatever system access you want out of the server.

Think of it like Wordpress, if it backed onto arbitrary plain-text files, instead of mysql. Mix-n-match flexibility, where you cobble together your own whatever-the-fuck, hopefully out of mostly off-the-shelf parts.

Trust, Sharing vs Publishing

As an extension of naked files, OwnDir sees a world with a single all-powerful user. There aren't accounts or controls - you could build them, if you wanted, but at the end of the day it would all be files on your harddrive anyways. Nothing could stop you from editting them directly.

Because OwnDir interprets code from the directory, it's directly embedded in the same space as the files it's representing. If you shared the folder, you would also be sharing the OwnDir. Put that baby in a network drive, share it with Syncthing, store it in source control, hell put it in Dropbox. Then the folder becomes a shared space, where anyone with access can collaborate and interact.

It should be noticed that this is not safe. You could never run a normal message-board like this - everyone has full write access to everything, and bad actors could spam dickbutts, or delete everything, or rewrite history to make other participants have said whatever. Safety is not a requirement, though, unless you're trying to operate on the open internet. Trust only becomes a problem at larger scales. If you have a little dry-erase board on your fridge door, it has all the same "problems".

(It should be stated that, OwnDir still provides mechanisms to build out a regular server, so you could theoretically run an outward-facing message board using it. A more traditional framework would almost certainly be a better choice for that purpose. OwnDir is working hard to narrow gap between the client and the filesystem, and that's really not something that you want to do, in a public-facing context).

Inspirations (an incomplete list)

  • https://tiddlywiki.com/
  • https://obsidian.md/
  • https://cristobal.space/writing/folk
  • https://www.robinsloan.com/notes/home-cooked-app/
  • https://www.gwern.net/docs/technology/2004-03-30-shirky-situatedsoftware.html