chore: update contribution guidelines (#2849)
* chore: update contribution guidelines * reoslve review concerns
This commit is contained in:
@@ -3,4 +3,3 @@ node_modules
|
|||||||
package.json
|
package.json
|
||||||
package-lock.json
|
package-lock.json
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
|
||||||
+136
-20
@@ -2,43 +2,159 @@
|
|||||||
|
|
||||||
First off, thanks for taking the time to contribute! ❤️
|
First off, thanks for taking the time to contribute! ❤️
|
||||||
|
|
||||||
All types of contributions are encouraged and valued. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
|
This document describes the process of contributing to Cinny. It is intended
|
||||||
|
for anyone considering opening an **issue**, **discussion** or **pull request**.
|
||||||
|
For people who are interested in developing Cinny and technical details behind
|
||||||
|
it, please check out our ["Developing Cinny"](HACKING.md) document as well.
|
||||||
|
|
||||||
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
|
> And if you like the project, but just don't have time to contribute, that's fine.
|
||||||
|
> There are other easy ways to support the project and show your
|
||||||
|
> appreciation, which we would also be very happy about:
|
||||||
|
>
|
||||||
> - Star the project
|
> - Star the project
|
||||||
> - Tweet about it (tag @cinnyapp)
|
> - Tweet about it (tag @cinnyapp)
|
||||||
> - Refer this project in your project's readme
|
> - Refer this project in your project's readme
|
||||||
> - Mention the project at local meetups and tell your friends/colleagues
|
> - Mention the project at local meetups and tell your friends/colleagues
|
||||||
> - [Donate to us](https://cinny.in/#sponsor)
|
> - [Donate to us](https://cinny.in/#sponsor)
|
||||||
|
|
||||||
## Bug reports
|
## The Critical Rule
|
||||||
|
|
||||||
Bug reports and feature suggestions must use descriptive and concise titles and be submitted to [GitHub Issues](https://github.com/ajbura/cinny/issues). Please use the search function to make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected.
|
**The most important rule: you must understand your code.** If you can't
|
||||||
|
explain what your changes do and how they interact with the greater system, do not contribute to this project.
|
||||||
|
|
||||||
## Pull requests
|
## AI Usage
|
||||||
|
|
||||||
|
The Cinny project stictly does not allow any AI generated code. Any pull request containing it will be rejected. **This is very important.**
|
||||||
|
|
||||||
|
## Quick Guide
|
||||||
|
|
||||||
|
### I'd like to contribute
|
||||||
|
|
||||||
> ### Legal Notice
|
> ### Legal Notice
|
||||||
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. You will also be asked to [sign the CLA](https://github.com/cinnyapp/cla) upon submiting your pull request.
|
>
|
||||||
|
> When contributing to this project, you must agree that you have authored 100%
|
||||||
|
> of the content, that you have the necessary rights to the content and that
|
||||||
|
> the content you contribute may be provided under the project license. You will
|
||||||
|
> also be asked to [sign the CLA] ([why CLA?]) upon submiting your pull request.
|
||||||
|
|
||||||
**NOTE: If you want to add new features, please discuss with maintainers before coding or opening a pull request.** This is to ensure that we are on same track and following our roadmap.
|
[All issues are actionable](#issues-are-actionable). Pick one and start
|
||||||
|
working on it. Thank you. If you need help or guidance, comment on the issue.
|
||||||
|
Issues that are extra friendly to new contributors are tagged with
|
||||||
|
["contributor friendly"].
|
||||||
|
|
||||||
**Please use clean, concise titles for your pull requests.** We use commit squashing, so the final commit in the dev branch will carry the title of the pull request. For easier sorting in changelog, start your pull request titles using one of the verbs "Add", "Change", "Remove", or "Fix" (present tense).
|
["contributor friendly"]: https://github.com/cinnyapp/cinny/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22contributor%20friendly%22
|
||||||
|
[sign the cla]: https://github.com/cinnyapp/cla
|
||||||
|
[why CLA?]: https://github.com/cinnyapp/cla#but-why
|
||||||
|
|
||||||
Example:
|
### I have a bug! / Something isn't working
|
||||||
|
|
||||||
|Not ideal|Better|
|
First, search the issue tracker and discussions for similar issues. Tip: also
|
||||||
|---|----|
|
search for [closed issues] and [discussions] — your issue might have already
|
||||||
|Fixed markAllAsRead in RoomTimeline|Fix read marker when paginating room timeline|
|
been fixed!
|
||||||
|
|
||||||
It is not always possible to phrase every change in such a manner, but it is desired.
|
> [!NOTE]
|
||||||
|
>
|
||||||
|
> If there is an _open_ issue or discussion that matches your problem,
|
||||||
|
> **please do not comment on it unless you have valuable insight to add**.
|
||||||
|
>
|
||||||
|
> GitHub has a very _noisy_ set of default notification settings which
|
||||||
|
> sends an email to _every participant_ in an issue/discussion every time
|
||||||
|
> someone adds a comment. Instead, use the handy upvote button for discussions,
|
||||||
|
> and/or emoji reactions on both discussions and issues, which are a visible
|
||||||
|
> yet non-disruptive way to show your support.
|
||||||
|
|
||||||
**The smaller the set of changes in the pull request is, the quicker it can be reviewed and merged.** Splitting tasks into multiple smaller pull requests is often preferable.
|
If your issue hasn't been reported already, open an ["Issue Triage"] discussion
|
||||||
|
and make sure to fill in the template **completely**. They are vital for
|
||||||
|
maintainers to figure out important details about your setup.
|
||||||
|
|
||||||
Also, we use [ESLint](https://eslint.org/) for clean and stylistically consistent code syntax, so make sure your pull request follow it.
|
> [!WARNING]
|
||||||
|
>
|
||||||
|
> A _very_ common mistake is to file a bug report either as a Q&A or a Feature
|
||||||
|
> Request. **Please don't do this.** Otherwise, maintainers would have to ask
|
||||||
|
> for your system information again manually, and sometimes they will even ask
|
||||||
|
> you to create a new discussion because of how few detailed information is
|
||||||
|
> required for other discussion types compared to Issue Triage.
|
||||||
|
>
|
||||||
|
> Because of this, please make sure that you _only_ use the "Issue Triage"
|
||||||
|
> category for reporting bugs — thank you!
|
||||||
|
|
||||||
**For any query or design discussion, join our [Matrix room](https://matrix.to/#/#cinny:matrix.org).**
|
[closed issues]: https://github.com/cinnyapp/cinny/issues?q=is%3Aissue%20state%3Aclosed
|
||||||
|
[discussions]: https://github.com/cinnyapp/cinny/discussions?discussions_q=is%3Aclosed
|
||||||
|
["issue triage"]: https://github.com/cinnyapp/cinny/discussions/new?category=issue-triage
|
||||||
|
|
||||||
## Helpful links
|
### I have an idea for a feature
|
||||||
- [BEM methodology](http://getbem.com/introduction/)
|
|
||||||
- [Atomic design](https://bradfrost.com/blog/post/atomic-web-design/)
|
Like bug reports, first search through both issues and discussions and try to
|
||||||
- [Matrix JavaScript SDK documentation](https://matrix-org.github.io/matrix-js-sdk/index.html)
|
find if your feature has already been requested. Otherwise, open a discussion
|
||||||
|
in the ["Feature Requests, Ideas"] category.
|
||||||
|
|
||||||
|
["feature requests, ideas"]: https://github.com/cinnyapp/cinny/discussions/new?category=feature-requests-ideas
|
||||||
|
|
||||||
|
### I've implemented a feature
|
||||||
|
|
||||||
|
1. If there is an issue for the feature, open a pull request straight away.
|
||||||
|
2. If there is no issue, open a discussion and link to your branch.
|
||||||
|
3. If you want to live dangerously, open a pull request and
|
||||||
|
[hope for the best](#pull-requests-implement-an-issue).
|
||||||
|
|
||||||
|
### I have a question which is neither a bug report nor a feature request
|
||||||
|
|
||||||
|
Open an [Q&A discussion], or join our [Matrix Space] and ask away in the
|
||||||
|
`Cinny Support` room.
|
||||||
|
|
||||||
|
Do not use other rooms to ask for help as our rooms are mostly specific
|
||||||
|
topic only. If you do ask a question there, you will be redirected
|
||||||
|
to `Cinny Support` room instead.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> If your question is about a missing feature, please open a discussion under
|
||||||
|
> the ["Feature Requests, Ideas"] category. If Cinny is behaving
|
||||||
|
> unexpectedly, use the ["Issue Triage"] category.
|
||||||
|
>
|
||||||
|
> The "Q&A" category is strictly for other kinds of discussions and do not
|
||||||
|
> require detailed information unlike the two other categories, meaning that
|
||||||
|
> maintainers would have to spend the extra effort to ask for basic information
|
||||||
|
> if you submit a bug report under this category.
|
||||||
|
>
|
||||||
|
> Therefore, please **pay attention to the category** before opening
|
||||||
|
> discussions to save us all some time and energy. Thank you!
|
||||||
|
|
||||||
|
[q&a discussion]: https://github.com/cinnyapp/cinny/discussions/new?category=q-a
|
||||||
|
[matrix space]: https://matrix.to/#/#cinny:matrix.org
|
||||||
|
|
||||||
|
## General Patterns
|
||||||
|
|
||||||
|
### Issues are Actionable
|
||||||
|
|
||||||
|
The Cinny [issue tracker](https://github.com/cinnyapp/cinny/issues)
|
||||||
|
is for _actionable items_.
|
||||||
|
|
||||||
|
Unlike some other projects, Cinny **does not use the issue tracker for
|
||||||
|
discussion or feature requests**. Instead, we use GitHub
|
||||||
|
[discussions](https://github.com/cinnyapp/cinny/discussions) for that.
|
||||||
|
Once a discussion reaches a point where a well-understood, actionable
|
||||||
|
item is identified, it is moved to the issue tracker. **This pattern
|
||||||
|
makes it easier for maintainers or contributors to find issues to work on
|
||||||
|
since _every issue_ is ready to be worked on.**
|
||||||
|
|
||||||
|
If you are experiencing a bug and have clear steps to reproduce it, please
|
||||||
|
open an issue. If you are experiencing a bug but you are not sure how to
|
||||||
|
reproduce it or aren't sure if it's a bug, please open a discussion.
|
||||||
|
If you have an idea for a feature, please open a discussion.
|
||||||
|
|
||||||
|
### Pull Requests Implement an Issue
|
||||||
|
|
||||||
|
Pull requests should be associated with a previously accepted issue.
|
||||||
|
**If you open a pull request for something that wasn't previously discussed,**
|
||||||
|
it may be closed or remain stale for an indefinite period of time. I'm not
|
||||||
|
saying it will never be accepted, but the odds are stacked against you.
|
||||||
|
|
||||||
|
Issues tagged with "feature" represent accepted, well-scoped feature requests.
|
||||||
|
If you implement an issue tagged with feature as described in the issue, your
|
||||||
|
pull request will be accepted with a high degree of certainty.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
>
|
||||||
|
> **Pull requests are NOT a place to discuss feature design.** Please do
|
||||||
|
> not open a WIP pull request to discuss a feature. Instead, use a discussion
|
||||||
|
> and link to your branch.
|
||||||
|
|||||||
+60
@@ -0,0 +1,60 @@
|
|||||||
|
# Developing Cinny
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> We recommend using a version manager as versions change very quickly.
|
||||||
|
> You will likely need to switch between multiple Node.js versions based
|
||||||
|
> on the needs of different projects you're working on. [NVM-windows]
|
||||||
|
> on Windows and [nvm] on Linux/macOS are pretty good choices. Recommended
|
||||||
|
> nodejs version is Krypton LTS (v24.13.1).
|
||||||
|
|
||||||
|
[nvm-windows]: https://github.com/coreybutler/nvm-windows#installation--upgrades
|
||||||
|
[nvm]: https://github.com/nvm-sh/nvm
|
||||||
|
|
||||||
|
Execute the following commands to start a development server:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm ci # Installs all dependencies
|
||||||
|
npm start # Serve a development version
|
||||||
|
```
|
||||||
|
|
||||||
|
To build the app:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build # Compiles the app into the dist/ directory
|
||||||
|
```
|
||||||
|
|
||||||
|
To commit changes:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run commit
|
||||||
|
```
|
||||||
|
|
||||||
|
## Running with Docker
|
||||||
|
|
||||||
|
This repository includes a Dockerfile, which builds the application from
|
||||||
|
source and serves it with Nginx on port 80. To use this locally, you can
|
||||||
|
build the container like so:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build -t cinny:latest .
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then run the container you've built with a command similar to this:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -p 8080:80 cinny:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
This will forward your `localhost` port 8080 to the container's port 80.
|
||||||
|
You can visit the app in your browser by navigating to `http://localhost:8080`.
|
||||||
|
|
||||||
|
## Code formatting
|
||||||
|
|
||||||
|
We use [ESLint](https://eslint.org/) for clean and stylistically
|
||||||
|
consistent code syntax, so make sure your pull request follow it.
|
||||||
|
|
||||||
|
## Helpful links
|
||||||
|
|
||||||
|
- [BEM methodology](http://getbem.com/introduction/)
|
||||||
|
- [Atomic design](https://bradfrost.com/blog/post/atomic-web-design/)
|
||||||
|
- [Matrix JavaScript SDK documentation](https://matrix-org.github.io/matrix-js-sdk/index.html)
|
||||||
@@ -12,31 +12,64 @@
|
|||||||
<img alt="Sponsor Cinny" src="https://img.shields.io/opencollective/all/cinny?logo=opencollective&style=social"></a>
|
<img alt="Sponsor Cinny" src="https://img.shields.io/opencollective/all/cinny?logo=opencollective&style=social"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
A Matrix client focusing primarily on simple, elegant and secure interface. The main goal is to have an instant messaging application that is easy on people and has a modern touch.
|
A Matrix client focusing primarily on simple, elegant and secure interface.
|
||||||
|
The main goal is to have an instant messaging application that is easy on
|
||||||
|
people and has a modern touch.
|
||||||
- [Roadmap](https://github.com/orgs/cinnyapp/projects/1)
|
- [Roadmap](https://github.com/orgs/cinnyapp/projects/1)
|
||||||
- [Contributing](./CONTRIBUTING.md)
|
- [Contributing](./CONTRIBUTING.md)
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
We are currently in the [process of replacing the matrix-js-sdk](https://github.com/cinnyapp/cinny/issues/257#issuecomment-3714406704) with our own SDK. As a result, we will not be accepting any pull requests until further notice.
|
We are currently in the process of [replacing] the matrix-js-sdk with our
|
||||||
Thank you for your understanding.
|
own SDK. As a result, we will not be accepting any pull requests until
|
||||||
|
further notice. Thank you for your understanding.
|
||||||
|
|
||||||
|
[replacing]: https://github.com/cinnyapp/cinny/issues/257#issuecomment-3714406704
|
||||||
|
|
||||||
<img align="center" src="https://raw.githubusercontent.com/cinnyapp/cinny-site/main/assets/preview2-light.png" height="380">
|
<img align="center" src="https://raw.githubusercontent.com/cinnyapp/cinny-site/main/assets/preview2-light.png" height="380">
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
The web app is available at [app.cinny.in](https://app.cinny.in/) and gets updated on each new release. The `dev` branch is continuously deployed at [dev.cinny.in](https://dev.cinny.in) but keep in mind that it could have things broken.
|
The web app is available at [app.cinny.in] and gets updated on each new
|
||||||
|
release. The `dev` branch is continuously deployed at [dev.cinny.in]
|
||||||
|
but keep in mind that it could have things broken.
|
||||||
|
|
||||||
You can also download our desktop app from the [cinny-desktop repository](https://github.com/cinnyapp/cinny-desktop).
|
You can also download our desktop app from the [cinny-desktop repository].
|
||||||
|
|
||||||
|
[app.cinny.in]: https://app.cinny.in
|
||||||
|
[dev.cinny.in]: https://dev.cinny.in
|
||||||
|
[cinny-desktop repository]: https://github.com/cinnyapp/cinny-desktop
|
||||||
|
|
||||||
|
## Contributing and Developing
|
||||||
|
|
||||||
|
If you have any ideas, issues, etc. regarding Cinny, or would like to
|
||||||
|
contribute to Cinny through pull requests, please check out our
|
||||||
|
["Contributing to Cinny"](CONTRIBUTING.md) document. Those who would like
|
||||||
|
to get involved with Cinny's development as well should also read the
|
||||||
|
["Developing Cinny"](HACKING.md) document for more technical details.
|
||||||
|
|
||||||
## Self-hosting
|
## Self-hosting
|
||||||
To host Cinny on your own, simply download the tarball from [GitHub releases](https://github.com/cinnyapp/cinny/releases/latest), and serve the files from `dist/` using your preferred webserver. Alternatively, you can just pull the docker image from [DockerHub](https://hub.docker.com/r/ajbura/cinny) or [GitHub Container Registry](https://github.com/cinnyapp/cinny/pkgs/container/cinny).
|
To host Cinny on your own, simply download the tarball from
|
||||||
|
[GitHub releases], and serve the files from `dist/` using your preferred
|
||||||
|
webserver. Alternatively, you can just pull the docker image from
|
||||||
|
[DockerHub] or [GitHub Container Registry].
|
||||||
|
|
||||||
* The default homeservers and explore pages are defined in [`config.json`](config.json).
|
* The default homeservers and explore pages are defined in [`config.json`](config.json).
|
||||||
|
|
||||||
* You need to set up redirects to serve the assests. Example configurations; [netlify](netlify.toml), [nginx](contrib/nginx/cinny.domain.tld.conf), [caddy](contrib/caddy/caddyfile).
|
* You need to set up redirects to serve the assests. Example configurations;
|
||||||
* If you have trouble configuring redirects you can [enable hash routing](config.json#L35) — the url in the browser will have a `/#/` between the domain and open channel (ie. `app.cinny.in/#/home/` instead of `app.cinny.in/home/`) but you won't have to configure your webserver.
|
[netlify](netlify.toml), [nginx](contrib/nginx/cinny.domain.tld.conf),
|
||||||
|
[caddy](contrib/caddy/caddyfile).
|
||||||
|
* If you have trouble configuring redirects you can
|
||||||
|
[enable hash routing](config.json#L35) — the url in the browser will have
|
||||||
|
a `/#/` between the domain and open channel (ie. `app.cinny.in/#/home/`
|
||||||
|
instead of `app.cinny.in/home/`) but you won't have to configure your webserver.
|
||||||
|
|
||||||
* To deploy on subdirectory, you need to rebuild the app youself after updating the `base` path in [`build.config.ts`](build.config.ts).
|
* To deploy on subdirectory, you need to rebuild the app youself after
|
||||||
* For example, if you want to deploy on `https://cinny.in/app`, then set `base: '/app'`.
|
updating the `base` path in [`build.config.ts`](build.config.ts).
|
||||||
|
* For example, if you want to deploy on `https://cinny.in/app`, then
|
||||||
|
set `base: '/app'`.
|
||||||
|
|
||||||
|
[GitHub releases]: https://github.com/cinnyapp/cinny/releases/latest
|
||||||
|
[DockerHub]: https://hub.docker.com/r/ajbura/cinny
|
||||||
|
[GitHub Container Registry]: https://github.com/cinnyapp/cinny/pkgs/container/cinny
|
||||||
|
|
||||||
<details><summary><b>PGP Public Key to verify tarball</b></summary>
|
<details><summary><b>PGP Public Key to verify tarball</b></summary>
|
||||||
|
|
||||||
@@ -85,31 +118,11 @@ mxFo+ioe/ABCufSmyqFye0psX3Sp
|
|||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Local development
|
## License
|
||||||
> [!TIP]
|
Cinny Project
|
||||||
> We recommend using a version manager as versions change very quickly. You will likely need to switch between multiple Node.js versions based on the needs of different projects you're working on. [NVM on windows](https://github.com/coreybutler/nvm-windows#installation--upgrades) on Windows and [nvm](https://github.com/nvm-sh/nvm) on Linux/macOS are pretty good choices. Recommended nodejs version is Krypton LTS (v24.13.1).
|
Copyright © 2024–present Ajay Bura
|
||||||
|
https://cinny.in
|
||||||
|
|
||||||
Execute the following commands to start a development server:
|
Cinny is licensed under the GNU Affero General Public License,
|
||||||
```sh
|
Version 3 of the License (AGPL-3.0-only).
|
||||||
npm ci # Installs all dependencies
|
You may obtain a copy of the License at https://www.gnu.org/licenses/agpl-3.0.html
|
||||||
npm start # Serve a development version
|
|
||||||
```
|
|
||||||
|
|
||||||
To build the app:
|
|
||||||
```sh
|
|
||||||
npm run build # Compiles the app into the dist/ directory
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running with Docker
|
|
||||||
This repository includes a Dockerfile, which builds the application from source and serves it with Nginx on port 80. To
|
|
||||||
use this locally, you can build the container like so:
|
|
||||||
```
|
|
||||||
docker build -t cinny:latest .
|
|
||||||
```
|
|
||||||
|
|
||||||
You can then run the container you've built with a command similar to this:
|
|
||||||
```
|
|
||||||
docker run -p 8080:80 cinny:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
This will forward your `localhost` port 8080 to the container's port 80. You can visit the app in your browser by navigating to `http://localhost:8080`.
|
|
||||||
Reference in New Issue
Block a user