-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
85 changed files
with
13,376 additions
and
3,777 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
|
||
"nrwl.angular-console", | ||
"esbenp.prettier-vscode" | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,81 @@ | ||
# SoketiMonorepo | ||
# soketipfs — Real-Time 🤝 Web3 | ||
|
||
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a> | ||
[](https://discord.gg/VgfKCQydjb) | ||
|
||
✨ **This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)** ✨ | ||
soketipfs is a framework for building distributed applications using Websockets. It is built on top of [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js) and uses the IPFS networking protocol via [Helia](https://github.com/ipfs/helia). | ||
|
||
## Generate code | ||
## 🤝 Supporting | ||
|
||
If you happen to use Nx plugins, you can leverage code generators that might come with it. | ||
soketipfs is meant to be open source, forever and ever. It solves issues that many developers face - the one of wanting to be limitless while testing locally or performing benchmarks. More than that, itt is also suited for production usage, either it is public for your frontend applications or internal to your team. | ||
|
||
Run `nx list` to get a list of available plugins and whether they have generators. Then run `nx list <plugin-name>` to see what generators are available. | ||
The frequency of releases and maintenance is based on the available time, which is tight as hell. Recently, there were issues with the maintenance and this caused infrequent updates, as well as infrequent support. | ||
|
||
Learn more about [Nx generators on the docs](https://nx.dev/plugin-features/use-code-generators). | ||
To cover some of the expenses of handling new features or having to maintain the project, we would be more than happy if you can donate towards the goal. This will ensure that soketipfs will be taken care of at its full extent. | ||
|
||
## Running tasks | ||
**[💰 Sponsor the development via Github Sponsors](https://github.com/sponsors/rennokki)** | ||
|
||
To execute tasks with Nx use the following syntax: | ||
## Features | ||
|
||
``` | ||
nx <target> <project> <...options> | ||
``` | ||
### SRF (🌍 Scalable | ✨ Resilient | 🏎️ Fast) | ||
|
||
You can also run multiple targets: | ||
soketipfs is built with the SRF principles in mind. It is designed to be scalable, resilient and fast by nature, leveraging the power of uWebSockets.js and the IPFS networking. | ||
|
||
``` | ||
nx run-many -t <target1> <target2> | ||
``` | ||
While IPFS is public, soketipfs is designed to be used in private networks, where you can control the nodes that are part of the network — you have a fully private and secure network for your real-time application. 🚀 | ||
|
||
..or add `-p` to filter specific projects | ||
The server is built on top of [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js) - a C application ported to Node.js. uWebSockets.js is demonstrated to perform at levels [_8.5x that of Fastify_](https://alexhultman.medium.com/serving-100k-requests-second-from-a-fanless-raspberry-pi-4-over-ethernet-fdd2c2e05a1e) and at least [_10x that of Socket.IO_](https://medium.com/swlh/100k-secure-websockets-with-raspberry-pi-4-1ba5d2127a23). ([_source_](https://github.com/uNetworking/uWebSockets.js)) | ||
|
||
``` | ||
nx run-many -t <target1> <target2> -p <proj1> <proj2> | ||
``` | ||
### Cheaper 🤑 | ||
|
||
For a $49 plan on Pusher, you get a limited amount of connections (500) and messages (30M). | ||
|
||
With soketipfs, for the price of an instance on Vultr or DigitalOcean ($5-$10), you get virtually unlimited connections, messages, and some more! | ||
|
||
soketipfs is capable to hold thousands of active connections with high traffic on less than **1 GB and 1 CPU** in the cloud. You can also [get free $100 on Vultr to try out soketipfs →](https://www.vultr.com/?ref=9032189-8H) | ||
|
||
### Pusher Protocol 📡 | ||
|
||
Targets can be defined in the `package.json` or `projects.json`. Learn more [in the docs](https://nx.dev/core-features/run-tasks). | ||
soketipfs implements the [Pusher Protocol v7](https://pusher.com/docs/channels/library\_auth\_reference/pusher-websockets-protocol#version-7-2017-11). Your existing projects that connect to Pusher requires minimal code change to make it work with soketipfs - you just add the host and port and swap the credentials. | ||
|
||
## Want better Editor Integration? | ||
## ⁉ Ideas or Discussions? | ||
|
||
Have a look at the [Nx Console extensions](https://nx.dev/nx-console). It provides autocomplete support, a UI for exploring and running tasks & generators, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users. | ||
Have any ideas that can make into the project? Perhaps you have questions? [Jump into the discussions board](https://github.com/soketi/soketipfs/discussions) or [join the Discord channel](https://discord.gg/VgfKCQydjb) | ||
|
||
## Ready to deploy? | ||
## 🔒 Security | ||
|
||
Just run `nx build demoapp` to build the application. The build artifacts will be stored in the `dist/` directory, ready to be deployed. | ||
If you discover any security related issues, please email <[email protected]> instead of using the issue tracker. | ||
|
||
## Set up CI! | ||
## 🎉 Credits | ||
|
||
- [Alex Renoki](https://github.com/rennokki) | ||
- [Pusher Protocol](https://pusher.com/docs/channels/library_auth_reference/pusher-websockets-protocol) | ||
- [All Contributors](../../contributors) | ||
|
||
## 🤝 Contributing | ||
|
||
✨ **This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)** ✨ | ||
|
||
### Learn more | ||
|
||
- [Nx Documentation](https://nx.dev) | ||
- [30-minute video showing all Nx features](https://nx.dev/getting-started/what-is-nx) | ||
|
||
### Install dependencies | ||
|
||
Run `npm install` to install all dependencies. | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
Nx comes with local caching already built-in (check your `nx.json`). On CI you might want to go a step further. | ||
### Packages | ||
|
||
- [Set up remote caching](https://nx.dev/core-features/share-your-cache) | ||
- [Set up task distribution across multiple machines](https://nx.dev/nx-cloud/features/distribute-task-execution) | ||
- [Learn more how to setup CI](https://nx.dev/recipes/ci) | ||
soketipfs is a monorepo, and it's composed of the following packages: | ||
|
||
## Connect with us! | ||
- [brain](./packages/brain/README.md): Used to cache data in memory | ||
- [connections](./packages/connections/README.md): Base implementation for Websocket connections handling | ||
- [gossiper](./packages/gossiper/README.md): Integration for the Gossip protocol, used to broadcast messages to all nodes in the network | ||
- [routing](./packages/routing/README.md): Unified implementation for HTTP routing or handling custom events in the network | ||
- [server](./packages/server/README.md): Ready-to-go & customizable server implemenations for soketipfs | ||
- [utils](./packages/utils/README.md): Utility functions used across the packages | ||
|
||
- [Join the community](https://nx.dev/community) | ||
- [Subscribe to the Nx Youtube Channel](https://www.youtube.com/@nxdevtools) | ||
- [Follow us on Twitter](https://twitter.com/nxdevtools) | ||
Each abstraction has its own place in the soketipfs ecosystem, and they can be used independently or together. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.