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

@yagura/yagura

v0.1.5

Published

A solid, event-based layered web framework - written in TypeScript for Node.js

Downloads

3

Readme

Yagura Logo

A modular, unopinonated event-based web framework - written in TypeScript for Node.js

This package is currently undergoing development! Follow us on Twitter for updates and release announcements!

npm (scoped) Travis (.com) Coverage Status npm

Why use Yagura?

  • Write solid code: Promise-based, strongly typed API in TypeScript
  • Reuse your code: Modular and flexible event-based structure
    • Stack your Layers
    • Process an event as it trickles down through each Layer sequentially
    • Use Services to connect your application with the outside world (DBs, other APIs, etc.)
  • Scale your app: distributed event processing (coming soon)
  • Do it your way: Yagura gives you an unopinionated structure - you choose how to implement your solution

Do you use Yagura? Tell us more, we'd love to learn how to make it better: Twitter

Philosophy

Yagura (櫓, 矢倉) is the Japanese word for "tower" or "scaffold"

As software development keeps becoming more iterative, it's becoming harder and harder to foresee how much complexity the project will increase, which in turn leads to either under- or over-engineering.

Solution: build your application as a modular event-handling pipeline, where, as events trickle down, each Layer can provide:

  • Data processing
  • Routing
  • Middleware
  • Additional functionality
  • Backwards compatibility for bottom layers

...and more! By laying out your code in a clear, sequential event processing scaffold, you can freely* and easily add/remove entire parts of an application while maintaining integrity

(*as long as you've decoupled it properly; we're not responsible for developers writing an entire real-time "BigData" processing service with an HTTP API as a single Layer. Always follow good programming practices!)

Example

import { Yagura } from '@yagura/yagura'
import ... from '...' // roll out your own layers and services!

const app: Yagura = await Yagura.start(
  // Layers
  // quickly remove, reorder and replace each of the lines to reconfigure your pipeline with ease!
  [
      new MiddlewareLayer(),              // Generic HTTP middleware (ie. parse headers, request logging, handing multi-part...)
      new AuthenticationLayer({           // Authentication middleware (ie. verify whether user is authenticated, provide login routes...)
          requireLogin: true
      }),
      new ValidationLayer(),              // Request validation middleware (ie. verify request format, check required parameters...)
      new ResourceLayer(),                // HTTP resource layer (ie. perform queries, fetch data, elaborate response...)
      new ParsingLayer(),                 // Response parsing (ie. ensure object serialization, strip secret data, encode text according to locale...)
  ],
  // Services
  [
      new CoolLogger({                // Custom logger
          minLevel: 'debug'
      }),
      new CrashNotifier({             // Crash notification utility
          email: '[email protected]'
      }),
      new DatabaseConnection({        // Database access
          host: 'db.secretserver.com',
          username: 'root',
          password: 'S0meTh1ngStr0nG!',
          db: 'cool-data'
      }),
      new WebServer({                 // Simple HTTP web server
          port: 3000,
          https: true
      })
  ]
);

Docs & Community

Security issues

If you discover a security vulnerability in Yagura, please see Security Policies and Procedures.

Getting started

The quickest way to get started with Yagura is to create a new Node.js project with Yagura as a dependency:

$ npm install @yagura/yagura

Check out Yagura's extension packages to develop specific types of applications:

  • @yagura/http HTTP server and API development tools (supports HTTP/2!)
  • @yagura/realtime base Layers for realtime-based server development (such as MQTT, WebSockets, raw sockets (TCP/UDP), etc.)

Contribution guide

TBD

Tests

To run the test suite, first install the dependencies, then run npm run test:

$ npm install --devDependencies
$ npm run test

People

The original author of Yagura is James Kerber

List of all contributors

License

GNU GPLv3