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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@vito-nv/weare-expressjs

v1.0.2

Published

We Are libraries used for NodeJS + ExpressJS.

Readme

Introduction - We Are Project and We Are Platform

The We Are partnership, consisting of the Flemish Institute for Technological Research (VITO) – Flemish Patients' Platform (VPP) – Domus Medica (DM) – Zorgnet Icuro (ZI), is committed to enabling the ethical and safe reuse of personal health data for both public and private purposes, with the citizen at the center. The project collaborates closely with Athumi, the provider of the [SOLID] (https://solidproject.org/TR/) data vault system in Flanders. This system allows citizens to securely store their data in vaults and share it with third parties based on consent. This project was made possible thanks to the European recovery fund; the Department of Economy, Science & Innovation; the Department of Care & the Department of Digital Flanders. More information at www.we-are-health.be.

We Are Express-js

We Are Express-js is a Typescript library that can act on express js applications as middleware to provide you with boilerplate functionality to interact with We Are and the Athumi Solid architecture.

We Are Express-js library that needs to be used for interacting with Athumi Solid pods on We Are are concentrated in the middleware directory. It contains logic to interact with the pods and verifiable credentials via authenticated sessions. In order to store extra information, we also created a session-data.ts module to keep the relevant Solid session data.

middleware

pod-middleware.ts

This is middleware to get the pods of a user. The option exists to make a session mandatory. If the requestor doesn't have a valid session, a 401 will be thrown.

resource-middleware.ts

Middleware that can be used to do interaction with the pod: getResource and writeResource, which will interact with the pod with linked data. It will respectively retrieve and write a Solid Dataset to the pod. The other two functions are readFile and writeFile. They will read and write files to the pod automaticaly as middleware. The files don't need to be RDF data.

(note) If file upload want to be used via resource-middleware the file-upload needs to be loaded as middleware: app.use(fileUpload({debug: true}));

session-middleware.ts

The session-middleware.ts to fetch the session from storage and expose it to the next middleware. The session must be authenticated; otherwise, an error will be thrown in case it is mandatory. This middleware can be reused for all routes requiring authentication. The session is made available to other middlewares by the following command:

        res.locals.session = await getSessionFromStorageWrapper(
            req.session.solidSid!,
            this?.storage as IStorage | undefined
        ).catch(() => { /* ignore error, handled below */ });

vc-middleware.ts

The validateAccessGrantmiddleware function is used to validate the presence and validity of an access grant in the session. This function checks if an access grant is stored in the session and if it has not expired. If the access grant is missing or expired, the request is rejected with a 403 status code.

session

Extra Solid information in the session is

  • solidSid: this contains the solid Session id.
  • locale: this is the locale of the logged in user.
  • pods: a list of pod addresses belonging to the user.
  • redirectUrl: the redirect url used to redirect the user after returning from IdP
  • accessGrant: the access grant for the backend application
  • accessGrantExpirationDate: the access grant expiration date. This is handy to check validity of the access grant.
  • workaroundActive: a temporary workaround which can contain the values: 'create_web_id' or 'delete_pod'