Prim+RPC

0

Easy-to-understand, type-safe, transport-agnostic RPC/IPC for JavaScript, supporting callbacks, batching, file uploads, custom serialization, and more.

Productivity

rpc
api
javascript
json

Prim+RPC. Pictured are two very short JavaScript files: a simple function on the server-side and a call to that function on the client-side. Tagline: "Backend, meet Frontend"

npm npm license npm bundle size 1

Prim+RPC is a bridge between JavaScript environments. Call functions on the server as if they exist on the client, without the wrappers. It's just JavaScript. You could bridge:

  • Web server and client
  • Two browser tabs
  • Main thread and Web Worker
  • Two separate processes
  • Any other separated JavaScript environments

Prim+RPC is framework-agnostic (bring your own server and client tools), fully-typed, lightweight, doesn't require a compile-step, and is loaded with features:

  • File handling
  • Callback support
  • Custom serialization
  • Error handling
  • Request batching
  • HTML form handling
  • Documentation generation
  • Access control

If you know JavaScript, you know how to use Prim+RPC. If you want access to a function, just call it: less setup, easier access, quicker development of your API.

šŸ“– Read the Docs āˆ™ šŸ’” Examples āˆ™ āš™ļø Setup āˆ™ šŸ”Œ Plugins āˆ™ šŸ§‘ā€šŸ’» Follow Author

Contributions

[!NOTE]

Prim+RPC is in early stages and is marching towards a stable release. Support Prim+RPC by starring the repository, sharing with others, and following for updates.

Happy to have you! Please see the Contribution Guide to learn more. If you're only looking for how to use the library, please see the Documentation.

Issues & Security

  • If you have any questions or are having trouble, feel free to open a new discussion.
  • For security-related issues, please refer to the Security Policy.
  • If you discover a non-security issue with Prim+RPC, please file a new issue so I can take a look!

Release Plan

[!WARNING]

Prim+RPC is in alpha and it may be unstable. Keep up-to-date with the latest releases, report any found security issues, and participate in discussions to help shape the future of the project!

Prim+RPC is planned to become stable by the end of Q1 2024, alongside the release Ted's portfolio website that will make use of it.

Prim+RPC Core, the framework-agnostic core of the project, will become stable first and will be released once the default plugins are stable. Lastly, Prim+RPC's optional tooling (such as documentation generation) will become stable. At this point, the alpha tag is planned to be removed. Once I am using Prim+RPC in production, a v1.0 will be released.

Licenses

This project consists of three parts: Code, Documentation, and Assets:

Code: The Prim+RPC code libraries (RPC core, plugins, and tooling) are licensed under the Apache 2.0 license. You may find library source code in the /libs folder of this project. Assets, which may appear alongside Code, are excluded from this license.

Documentation: The documentation website and text are proprietary. You may find documentation in the /apps folder of this project. Unauthorized usage of Documentation outside of fair use is strictly prohibited.

Assets: The "Prim+RPC" name and logo as well as the "Dose of Ted" name and logo are proprietary. Assets are excluded from all licenses, regardless of where they are located in the project. Unauthorized usage of Assets outside of fair use is strictly prohibited.

Footnotes

  1. These badges report stats for @doseofted/prim-rpc on the npm registry. ā†©