diff --git a/README.md b/README.md deleted file mode 120000 index 2ea67ad8..00000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -libs/movex/README.md \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..4657aa23 --- /dev/null +++ b/README.md @@ -0,0 +1,125 @@ +
+ + + Movex Logo + +
+ +
+

Serverless real-time data sharing infrastructure for frontend developers

+ Build multiplayer games, chat apps or anything in between without worrying about the server side, backend logic or even the network! Works with React out of the box! +
+ +
+
+ +[![NPM version][npm-image]][npm-url] +[![License][license-image]][license-url] +[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dwyl/esta/issues) +![CI](https://github.com/movesthatmatter/movex/actions/workflows/node.js.yml/badge.svg) +![Type Script Compilation](https://github.com/movesthatmatter/movex/actions/workflows/tsc-compiler.yml/badge.svg) + + +[npm-url]: https://npmjs.org/package/movex +[npm-image]: https://img.shields.io/badge/dynamic/json?color=orange&label=movex&query=version&url=https%3A%2F%2Fraw.githubusercontent.com%2Fmovesthatmatter%2Fmovex%2Fmain%2Flibs%2Fmovex%2Fpackage.json +[license-image]: https://img.shields.io/badge/license-MIT-green +[license-url]: https://github.com/movesthatmatter/movex/blob/main/LICENSE + +
+ +## 🧐 Why Movex + +__Movex let's you cut the development effort in half and ship faster by abstracting the backend logic and server-side away! 🎉__ + +With it's unique approach and set of features Movex gives you the freedom to focus only on the front-end while still maintaining all of the control over the App Logic, UI/UX and Authority over Data. + +In addition it comes pre-packed with: +- the ability to keep parts of the shared state private to specific users. [See Secret State](https://www.movex.dev/docs/features/secret_state) +- ensures the minimun amount of data is sent over the wire with each update. [See Deterministic Action Propagation](https://www.movex.dev/docs/features/functional) +- keeps bad actors away by keeping the Data Reconciliation Logic out of the client reach. [See Authoritative Server](https://www.movex.dev/docs/features/server_authoritative) + + +--- +
+

🎉🚀 Movex is participating in Hacktoberfest! 🥳😍

+
+ +### Here are some ways you can contribute too: +- Fix one of the [#hactoberfest issues](https://github.com/movesthatmatter/movex/issues?q=is%3Aissue+is%3Aopen+label%3Ahacktoberfest). +- Give feedback. +- **🙏 Give us a Github Star** +- Request a new feature +- File a bug report +- Add tests +- Use Movex to build your own game or application. [See examples below](#-examples)! + +--- + +## 🚀 Examples + +- **Chat App** - https://github.com/GabrielCTroia/movex-next-chat +- **Multiplayer Rock Paper Scissors Game** - https://codesandbox.io/s/rps-demo-x877yl + +## ⭐️ Features +- 🤯 __No Backend logic to manage__ - Movex takes care of it for you! [See how](https://www.movex.dev/docs/features/frontend_only). +- 👑 __Authoritative Server__ +- 🤩 __Real-time synchronization__ +- 🤐 __Secret State__ +- 😎 __Follows the Flux API__ +- 😍 __Works with Vanilla JS or any Framework__ + +## 🧙🏽‍♂️ How Movex works + +At the client level, Movex adheres to the [Flux Pattern](https://medium.com/weekly-webtips/flux-pattern-architecture-in-react-35d0b55313f6) to react to UI changes. Additionally, it employs the ["Deterministic Action Propagation Method"](https://www.movex.dev/docs/features/functional#determinstic-action-propagation) to synchronize any state changes with the Global (Master) State which lives on the server. Consequently, this process instantly updates all other peers on the network, ensuring real-time data synchronization. [Learn More](https://www.movex.dev/docs/how). + +
+ + + Movex Logo + +
+ +## 👩‍💻 Getting Started + +Visit the [Docs](https://www.movex.dev/docs/overview/get_started) to get started with Movex. + +## 🙏 Contributing + +First off, thank you for showing an interest in contributing to the Movex project! We have created a [Contributing Guide](https://github.com/movesthatmatter/movex/blob/main/CONTRIBUTING.md) that will show you how to setup a development environment and how to open pull requests and submit changes. + +- 🚀 Want to participate in **#hacktoberfest**? +We have a selection of [#hactoberfest issues](https://github.com/movesthatmatter/movex/issues?q=is%3Aissue+is%3Aopen+label%3Ahacktoberfest). + +- Want to help with the code? +Please check out our [Good First Issue](https://github.com/movesthatmatter/movex/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) section. + +- Don't wanna' code? +Any feedback is welcome and greatly appreciated so please don't hesitate to open an [issue](https://github.com/movesthatmatter/movex/issues). + +- For any other help, you can write us on our [Discord](https://discord.gg/N8k447EmBh), [Twitter](https://twitter.com/gctroia) or just [open an issue](https://github.com/movesthatmatter/movex/issues)! + +
+ +> #### Before You Contribute, make sure your commits are signed using SSH, GPG os S/MIME +> This is **very important** for #hacktoberfest so Github can trace your contribution correctly. +> [Learn more about signing commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification). +> +> **ALSO:** Please see our [Requirements For Opening PRs](https://github.com/movesthatmatter/movex/blob/main/CONTRIBUTING.md#opening-pull-request-requirements). + +## 🛡️ License + +Movex is licensed under the MIT License - see the [LICENSE](https://github.com/movesthatmatter/movex/blob/main/LICENSE) file for details. + +## 👽 Community + +[Join our Discord](https://discord.gg/N8k447EmBh) + +## 🥷 Thanks To All Contributors + +Movex wouldn't be the same without you, so thank you all for your amazing efforts and contribution! + + + Contributors + + +Made with [contrib.rocks](https://contrib.rocks). diff --git a/libs/movex-core-util/src/lib/core-types.ts b/libs/movex-core-util/src/lib/core-types.ts index 08ce6fa7..f665d045 100644 --- a/libs/movex-core-util/src/lib/core-types.ts +++ b/libs/movex-core-util/src/lib/core-types.ts @@ -1,5 +1,7 @@ import { UnknownRecord } from './core-util'; + +// eslint-disable-next-line @typescript-eslint/no-namespace export namespace NestedObjectUtil { // The Paths Types is taken from https://stackoverflow.com/a/58436959/2093626 @@ -28,7 +30,7 @@ export namespace NestedObjectUtil { 20, ...0[] ]; - + type Join = K extends string | number ? P extends string | number ? `${K}${'' extends P ? '' : '.'}${P}` @@ -106,6 +108,8 @@ export namespace NestedObjectUtil { : T; } +export type EmptyObject = Record; + export interface WsResponse { event: string; data: T; @@ -139,7 +143,7 @@ export type UnknownIdentifiableRecord = { id: string } & Record< >; export type AnyIdentifiableRecord = { id: string } & Record; -export type UnidentifiableModel = Omit; +export type UnidentifiableModel = Omit; // TODO: Remove all of these if not used @@ -202,7 +206,7 @@ export type GenericResourceOfType = Resource< export type GenericResourceType = GenericResource['type']; -export type MovexClient = { +export type MovexClient = { id: string; info?: Info; // User Info or whatever subscriptions: Record< @@ -289,7 +293,7 @@ export type SessionStoreCollectionMap< export type OnlySessionCollectionMapOfResourceKeys< ResourceCollectionMap extends CollectionMapBase, SessionCollectionMap = SessionStoreCollectionMap -> = StringKeys>>; +> = StringKeys>>; export type CreateMatchReq = { matcher: SessionMatch['matcher']; @@ -332,4 +336,4 @@ export type GetIOPayloadErrTypeFrom> = // val: 'asda', // }; -// const x = {} as IOPayloadResultErrType; +// const x = {} as IOPayloadResultErrType; \ No newline at end of file diff --git a/package.json b/package.json index de803a9d..4af35e31 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "tsc-all": "tsc -b libs/movex libs/movex-server libs/movex-core-util libs/movex-react libs/movex-examples apps/movex-demo apps/movex-demo-api apps/movex-demo-e2e apps/movex-docs apps/movex-docs-e2e", "build": "nx build movex-demo", "test": "nx run-many --all --target=test --skip-nx-cache", - "dev-movex-docs" : "npx nx serve movex-docs", + "dev-movex-docs": "npx nx serve movex-docs", + "lint-all-libs": "npx nx run-many --parallel --target=lint --projects=movex-core-util,movex,movex-server,movex-service,movex-react,movex-vue --quiet", "push-all-libs--locally": "cd dist/libs/movex && npm version pre && yalc push && cd -; cd dist/libs/movex-server && npm version pre && yalc push && cd -; cd dist/libs/movex-core-util && npm version pre && yalc push && cd -; cd dist/libs/movex-react && npm version pre && yalc push && cd -; cd dist/libs/movex-service && npm version pre && yalc push && cd -;", "publish-movex": "cd dist/libs/movex && npm publish && cd -;", "publish-movex-server": "cd dist/libs/movex-server && npm publish && cd -;",