Skip to content

Commit

Permalink
Merge branch 'main' into clean-up-hero-sub-text
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekep-Obasi authored Oct 9, 2023
2 parents 13c4c22 + ef490fa commit 6d329c3
Show file tree
Hide file tree
Showing 27 changed files with 352 additions and 168 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn test
133 changes: 133 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement by sending a Direct Message to
https://twitter.com/gctroia.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
102 changes: 102 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Contributing

First off, thank you for considering contributing to Movex. It's people like you that make a difference in open source. By contributing to Movex, you agree to abide by the [Code of Conduct](https://github.com/movesthatmatter/movex/blob/main/CODE_OF_CONDUCT.md).

Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.

## What can I contribute

Movex is an open-source project and we love to receive contributions from our community — you!

Here are some ways you can contribute:
- Try building or deploying Movex and give feedback. You can follow this [Get Started](https://www.movex.dev/docs/overview/get_started) tutorial for an intro!
- Add new framework wrappers (e.g. libs/movex-vue, libs/movex-angular, etc.)
- Help with open issues or create your own
- Share your thoughts and suggestions with us
- Help create tutorials and blog posts
- Request a feature by submitting a proposal
- Report a bug
- Improve documentation - fix incomplete or missing docs, bad wording, examples or explanations.

## Responsibilities
* If you're making changes to the Movex core, ensure it runs correctly both on client AND server
* Create issues for any major changes and enhancements that you wish to make. Discuss things transparently and get community feedback.
* Ensure all regression tests are passing after your change
* Keep feature versions as small as possible, preferably one new feature per version.
* Be welcoming to newcomers and encourage diverse new contributors from all backgrounds.

## Your First Contribution

Unsure where to begin contributing to Movex? You can start by looking through the _good-fist-issue_ and _help-wanted_ issues:
- Good first issues - issues which should only require a few lines of code, and a test or two.
- Help wanted issues - issues which should be a bit more involved than beginner issues.

> **Working on your first Pull Request?**
> You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://kcd.im/pull-request)
# Development

**Important**: The project is a monorepo, meaning that it is a collection of multiple packages managed in the same repository.

These packages are located at `/libs` and they are the following:
- movex (the movex core)
- movex-core-utils (utility functions shared between each library)
- movex-service (the CLI tool, able to start movex in dev and built it for production)
- movex-server (the node backend running on the server)
- movex-react (the react wrapper)

Based on the issue you're working on, one or more of these libraries will be touched.

Visit the issue tracker to find a list of open issues that need attention.

## Step 1. Clone the repo

Fork, then clone the repo:

git clone https://github.com/your-username/movex.git

## Step 2. Build the Project

This repo uses Yarn for all package management.

When working on a library in `/libs` there is no need to build anything!

## Step 3. Testing

`yarn test`

To continuously watch and run tests, run the following:

`yarn test --watch`

Alternatively, to skip the nx caches you can run:

`yarn test --watch -- --skip-nx-cache`

## Step 4. Commit your changes

This repo uses [commitizen](https://github.com/commitizen/cz-cli) to keep the commits structured and tidy.

To commit run the following:

`yarn commit`

Optionally, if you'd like to keep running `git commit` you can configure the git hooks as in this [tutorial](https://github.com/commitizen/cz-cli#optional-running-commitizen-on-git-commit).

## Step 5. Sending a Pull Request
For non-trivial changes, please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.

On the other hand, sometimes the best way to start a conversation is to send a pull request. Use your best judgement!

In general, the contribution workflow looks like this:

- Open a new issue in the Issue tracker.
- Fork the repo.
- Create a new feature branch based off the master branch.
- Make sure all tests pass and there are no linting errors.
- Submit a pull request, referencing any issues it addresses.
- Please try to keep your pull request focused in scope and avoid including unrelated commits.

After you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements.

# Thank you for your contribution! 🙏
6 changes: 4 additions & 2 deletions apps/movex-docs/modules/home/HeroSubText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ export const HeroSubText: React.FC<Props> = (props) => {
does the heavy lifting to share state between peers in a network.
<br />
<br />
Build faster by only focusing on the App Logic & UI. Let Movex handle the
rest!
<b>
🚀 Build 10x faster by focusing only on the frontend – Movex handles the
rest!
</b>
</h3>
);
};
5 changes: 2 additions & 3 deletions apps/movex-docs/modules/home/HeroText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ type Props = {
export const HeroText: React.FC<Props> = (props) => {
return (
<h1 className={props.className}>
Simplify{' '}
<span className="text-transparent bg-clip-text bg-gradient-to-r from-movexBlue-400 via-indigo-500 to-purple-500 0from-movexBlue-300 sto-green-500 text-movexBlue-500">
Multiplayer
Realtime State Sync
</span>{' '}
State Management.
without the backend! 😎
{/* Build{' '}
<span className="text-transparent bg-clip-text bg-gradient-to-r from-movexBlue-400 via-indigo-500 to-purple-500 0from-movexBlue-300 sto-green-500 text-movexBlue-500">
Multiplayer Apps
Expand Down
Binary file added art/diagram/diagram_d-dark@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/diagram/diagram_d_with_bkg@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/diagram/diagram_d_with_bkg@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/diagram/diagram_d_with_bkg_dark@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/diagram/diagram_d_with_bkg_dark@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/social_media/banner_1280x640.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 0 additions & 32 deletions libs/movex-core-util/src/lib/core-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,40 +212,8 @@ export type MovexClient<Info extends UnknownRecord = {}> = {
subscribedAt: number;
}
>;

// TODO: Add later on
// lag: number;
// createdAt: number;
// upadtedAt: number;
// lastPingAt: mumber;
// status: 'idle' | 'active' | etc..
};

// export type Topic<TUniqueName extends string> = {
// id: TUniqueName;
// subscribers: Record<MovexClient['id'], null>; // Here it could use the full Peer?
// };

// type CollectionMapBaseItem = RRStore.CollectionMapBase[any];

// TODO: Rename to StoreResource and don't export
// TOOD: Move only in SessionStore maybe
// type SessionResource<TData extends UnknownRecord = {}> = {
// id: string;
// data: TData;
// subscribers: Record<
// MovexClient['id'],
// {
// subscribedAt: number;
// }
// >;
// };

// export type ObservableResource<TData extends UnknownRecord = {}> =
// Resource<TData> & {
// topic: Topic<string>['id'];
// };

export type ResourceIdentifierObj<TResourceType extends string> = {
resourceType: TResourceType;
resourceId: GenericResource['id'];
Expand Down
2 changes: 1 addition & 1 deletion libs/movex-react/src/lib/MovexBoundResource.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { bindResource } from 'movex-react';
import { bindResource } from './hooks';
import {
MovexDefinition,
MovexClient,
Expand Down
2 changes: 1 addition & 1 deletion libs/movex-react/src/lib/MovexContextStateChange.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext, useEffect } from 'react';
import { MovexContext, MovexContextProps } from 'movex-react';
import { MovexContext, MovexContextProps } from './MovexContext';

type Props = React.PropsWithChildren<{
onChange: (next: MovexContextProps<any>) => void;
Expand Down
2 changes: 1 addition & 1 deletion libs/movex-react/src/lib/MovexResourceBounder.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useMovexBoundResourceFromRid, useMovexClientId } from 'movex-react';
import { useMovexBoundResourceFromRid, useMovexClientId } from './hooks';
import { MovexDefinition, MovexClient } from 'movex';
import { ResourceIdentifier } from 'movex-core-util';

Expand Down
Loading

0 comments on commit 6d329c3

Please sign in to comment.