Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

rewyre

1.2.0 • Public • Published

Rewyre Framework

Introduction

The rewyre framework is built on top of express, and express-ws and utilises TypeScript to give you a powerful wiring tool to create API applications in a very short time. The framework uses TypeScript decorators to apply controller and routing functionality and apply additional controls.

The package was originally called aether-framework and then changed to @rewyre/core and is now just named as rewyre, I apologise for this, I was very conflicted with what to name it.

IMPORTANT This project has been completely re-written from ground up for the latest version 1 release, this is because the project did not have enough flexibility than what it needed when it released in alpha, therefore this is the final version of the API and structure.


Installation

You can install from NPM with:

npm install --save rewyre

Examples

Below are some demos and examples you can try out to help with your development experience and to use as a base.

Documentation

The documentation is availabe here: Documentation.

NOTE: The rewyre-vue project has not been updated to the latest rewyre stable release, but I plan to update that in the coming months, or you are welcome to create some pull requests instead.

Examples & Demos

Depending on what you want to get out of it, you can look at the demo for a full to-do demo, if you plan to use this for a larger application then there is a boilerplate I have created called: rewyre-vue from which the whole project has been created to support Vue 3 + Rewyre + TypeScript, You can check it out here.


Available Features

The below lists the features and their stable state, this framework's API will not change for the forseable future, any changes will be fully implemented and any non-backwards compatible changes will be in the latest major version, following the semver versioning scheme.

Feature Description Status
HTTP Server The HTTP server is the base for the framework and is built on top of Express. Stable
WebSocket Server The WebSocket server uses express-ws package to apply WebSocket support. Stable
Middleware Support Standard Express middleware is supported using the useMiddleware method. Stable
Static Assets Standard Express static is supported as well using the useStatic method. Stable
Controllers Controller classes and the @Controller decorator are both implemented. Stable
Controller Routes Controller routes are and the @Route decorator are both implemented. Stable
Models Model classes and the @Model decorator are both implemented. Stable
Injections Injections are done using a single @Inject decorator and you can inject one or many, you can inject models and providers to any service or controller as required. Stable
Services Service classes and the @Service decorator are both implemented and services can run on a loop based on seconds. Stable
Providers Providers and the @Provide decorator are both implemented, the provider allows you to create built in helper classes that can be injected to controllers, and services. Stable

Upcoming Features

There is some functionality left to implement including:

  • Authentication Decorator - To implement an authentication decorator for out-of-the-box permissions.
  • Threaded Decorator - To add support for controllers being run in a different thread, to long processes.
  • Plugin Support - There is a plan to add plugin support, but I am not sure what this will look like yet.

Future Plans

The future for this library is big, I have many plans to add lots of new features and more decorators to add additional features, and I plan to turn this (slowly) into a full out-of-the-box TypeScript based framework for building Node.JS server side applications. This framework can handle any structure and can be included into other applications like Vue.JS Server-Side Rendering. You can use this framework for API first structure or even to use it to build a basic website, using Express routing.


Development Overview

While I additionally add new functionality they will go through various states, they will be developed in the develop branch and new features will be labelled alpha until everything has been finalised, then moved to beta status while I test for bugs, and then stable once the API won't change and I have removed any bugs I can find, of course if you find a bug then please, create an issue!

Install

npm i rewyre

DownloadsWeekly Downloads

27

Version

1.2.0

License

CC-BY-ND-4.0

Unpacked Size

300 kB

Total Files

145

Last publish

Collaborators

  • avatar