Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, 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.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

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

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers 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, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at https://discord.gg/bRCvFy9. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---

name: Bug report
about: Report incorrect or unexpected behavior of any cordis libraries/packages
title: ''
labels: 's: unverified, type: bug'
assignees: ''
---
<!-- Thanks to Discord.js for this bug report template -->

**Which cordis libraries/services are you facing this issue in?:**

**Please describe the problem you are having in as much detail as possible:**

**Include a reproducible code sample here, if possible:**

```ts
// Place your code here
```

**Further details:**

<!-- Only keep and fill out what's applicable to you
- `@cordis/gateway` version:
- `@cordis/bitfield` version:
- `@cordis/brokers` version:
- `@cordis/common` version:
- `@cordis/error` version:
- `@cordis/queue` version:
- `@cordis/redis-store` version:
- `@cordis/store` version:
- `@cordis/rest` version:
- `@cordis/routers` version:
- `@cordis/gateway` version:
- `@cordis/snowflake` version:
- `@cordis/gateway-service` version:
-->
- Node.js version:
- Operating system:
- Priority this issue should have – please be realistic and elaborate if possible:

<!--
Remove the comment and fill out the commit hash if this applies to you:
(While it's not a requirement to test your issue on the master branch, it would make fixing the problem a lot easier for us, so please do so if possible.)

- I have also tested the issue on latest master, commit hash: `xxx`
-->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discord server
url: https://discord.gg/37ysd5dPYk
about: Feel free to join our Discord server for any questions.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---

name: Feature request
about: Request a feature for any of the cordis libraries/services
title: ''
labels: 'type: enhancement'
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Eg. I'm always frustrated when [...]

**Describe the ideal solution**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

Adapted from the [Discord.js Feature Request Template](https://github.com/discordjs/discord.js/blob/master/.github/ISSUE_TEMPLATE/feature_request.md)
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**Please describe the changes this PR makes and why it should be merged:**



**Status and versioning classification:**

<!--
Please move lines that apply to you out of the comment:
- Code changes have been tested against the Discord API, or there are no code changes
- This PR changes the library's interface (methods or parameters added)
- This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
- This PR **only** includes non-code changes, like changes to documentation, README, etc.

Thanks to Discord.js for this pull request template.
-->
62 changes: 43 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,54 @@
<div align="center">
<br/>
<img width="400" height="400" src="media/cordis_transparent.png">
<h4>
A fully modular, micro-service based <a href="https://nodejs.org/">Node.js</a> wrapper around the <a href="https://discordapp.com/developers/docs/intro">Discord API</a>
</h3>

<p align="center">
<img width="190" height="190" src="media/cordis_no_letters_black.png">
<br />
<h3>
<strong>
<a href="https://cordis.didinele.me/">Explore the docs »</a><a href="https://discord.gg/37ysd5dPYk"> Join Our Discord!</a>
</strong>
</h2>
</p>

<p>
<img src="https://github.com/cordis-lib/cordis/actions/workflows/quality.yml/badge.svg" alt="Quality Check">
<img src="https://github.com/cordis-lib/cordis/actions/workflows/docs.yml/badge.svg" alt="Deploy Docs"><br>
<a href="https://github.com/cordis-lib/cordis/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-yellow.svg" alt="License: APACHE 2.0"></a>
<a href="https://github.com/cordis-lib/cordis/issues"><img src="https://img.shields.io/github/issues-raw/cordis-lib/cordis.svg?maxAge=25000" alt="Issues"></a>
<a href="https://github.com/cordis-lib/cordis/pulls"><img src="https://img.shields.io/github/issues-pr/cordis-lib/cordis.svg?style=flat" alt="GitHub pull requests"></a><br>
</p>
</div>

# About
cordis is a fully modular, micro-service based [Node.js](https://nodejs.org/) wrapper around the [Discord API](https://discordapp.com/developers/docs/intro)
# Packages

Cordis is cut up in the form of multiple packages/libraries:

- [`@cordis/bitfield`](https://github.com/cordis-lib/cordis/tree/main/libs/bitfield) - A simple structure for working with bitfields using BigInts
- [`@cordis/brokers`](https://github.com/cordis-lib/cordis/tree/main/libs/brokers) - Message brokers for routing patterns, pub/sub systems and RPC!
- [`@cordis/common`](https://github.com/cordis-lib/cordis/tree/main/libs/common) - Common structures and utility shared across packages.
- [`@cordis/gateway`](https://github.com/cordis-lib/cordis/tree/main/libs/gateway) - A very flexible way of connecting to Discord's gateway, with clustering support.
- [`@cordis/gateway-service`](https://github.com/cordis-lib/cordis/tree/main/services/gateway) ([Docker](https://hub.docker.com/r/cordislib/gateway)) - Service that hooks into RabbitMQ using `@cordis/gateway`
- [`@cordis/queue`](https://github.com/cordis-lib/cordis/tree/main/libs/queue) - A simple and compact sequential queue for async operations
- [`@cordis/redis-store`](https://github.com/cordis-lib/cordis/tree/main/libs/redis-store) - A Redis implementation of `@cordis/store`
- [`@cordis/rest`](https://github.com/cordis-lib/cordis/tree/main/libs/rest) - Tooling for making HTTP requests to Discord, with rate limiting handling
- [`@cordis/routers`](https://github.com/cordis-lib/cordis/tree/main/libs/routers) - Make API requests with ease using simple dynamic JavaScript property accessing
- [`@cordis/snowflake`](https://github.com/cordis-lib/cordis/tree/main/libs/snowflake) - A simple snowflake structure for destructuring Discord IDs into relevant information
- [`@cordis/store`](https://github.com/cordis-lib/cordis/tree/main/libs/store) - A simple map-like interface for holding key-value pairs - ships with an in-memory implementation

It is cut up in multiple packages/libraries:
# Contributing
We make use of [`PNPM`](https://pnpm.js.org/) to manage our monorepo setup. It is expected that you have an up-to-date version of it.

- `@cordis/bitfield`, for working with bitfields using BigInts
- `@cordis/brokers`, message brokers for routing patterns, pub/sub systems and RPC!
- `@cordis/common`, cordis core utilities
- `@cordis/gateway`, containing a very flexible way of connecting to Discord's gateway - with clustering support
- `@cordis/queue`, simple, small sequential queue for async operations
- `@cordis/redis-store`, Redis implementation of `@cordis/store`
- `@cordis/rest`, tooling for making HTTP requests to Discord, with rate limiting handling
- `@cordis/routers`, make API requests with ease using simple dynamic javascript property accessing
- `@cordis/snowflake`, simple snowflake structure for destructuring Discord IDs into relevant information
- `@cordis/store`, Simple map-like interface for holding key-value pairs - ships with an in-memory implementation
Please ensure you run `pnpm run lint`, `pnpm run build`, and `pnpm run test` in the root before pushing your commits.

But also services that hook into RabbitMQ using the libraries mentioned above:
Please ensure that you follow our [Code Of Conduct](https://github.com/discordjs/discord.js/blob/master/.github/CODE_OF_CONDUCT.md).

- `@cordis/gateway-service` - https://hub.docker.com/r/cordislib/gateway
If all checks out, [Submit a Pull Request](https://github.com/cordis-lib/cordis/compare)

# LICENSING

# Come talk to me on Discord!
© 2020, [didinele](https://github.com/didinele). Some rights reserved.

**Permanent invite link**: https://discord.gg/37ysd5dPYk
> Cordis is licensed under [Apache 2.0](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
21 changes: 15 additions & 6 deletions libs/bitfield/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
<div align = "center">
# `@cordis/bitfield`

# @cordis/bitfield
[![GitHub](https://img.shields.io/badge/License-Apache%202.0-yellow.svg)](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/v/@cordis/bitfield?color=crimson&logo=npm)](https://www.npmjs.com/package/@cordis/bitfield)
[![TypeScript](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml/badge.svg)](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)

</div>
Data structure for working with bitfields.

## Description

Data structure for working with bit fields.
## Installation
- `npm install @cordis/bitfield`
- `pnpm install @cordis/bitfield`
- `yarn add @cordis/bitfield`

## Documentation
You can find documentation for the whole project over at https://cordis.didinele.me

## Contributing
Please see the main [README.md](https://github.com/cordis-lib/cordis) for info on how to contribute to this package or the other `@cordis` packages.

## LICENSE
Licensed under the [Apache 2.0](https://github.com/cordis-lib/cordis/blob/main/LICENSE) license.
20 changes: 15 additions & 5 deletions libs/brokers/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
<div align = "center">
# `@cordis/brokers`

# @cordis/brokers
[![GitHub](https://img.shields.io/badge/License-Apache%202.0-yellow.svg)](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/v/@cordis/brokers?color=crimson&logo=npm)](https://www.npmjs.com/package/@cordis/brokers)
[![TypeScript](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml/badge.svg)](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)

</div>
A library containing message brokers for all sorts of patterns & protocols

## Description
A library containing message brokers for all sorts of patterns & protocols.
## Installation
- `npm install @cordis/brokers`
- `pnpm install @cordis/brokers`
- `yarn add @cordis/brokers`

## Documentation
You can find documentation for the whole project over at https://cordis.didinele.me

## Contributing
Please see the main [README.md](https://github.com/cordis-lib/cordis) for info on how to contribute to this package or the other `@cordis` packages.

## LICENSE
Licensed under the [Apache 2.0](https://github.com/cordis-lib/cordis/blob/main/LICENSE) license.
21 changes: 15 additions & 6 deletions libs/common/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
<div align = "center">
# `@cordis/common`

# @cordis/common

</div>

## Description
[![GitHub](https://img.shields.io/badge/License-Apache%202.0-yellow.svg)](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/v/@cordis/common?color=crimson&logo=npm)](https://www.npmjs.com/package/@cordis/common)
[![TypeScript](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml/badge.svg)](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)

A library containing cordis utility functions/types/structures.

## Installation
- `npm install @cordis/common`
- `pnpm install @cordis/common`
- `yarn add @cordis/common`

## Documentation
You can find documentation for the whole project over at https://cordis.didinele.me

## Contributing
Please see the main [README.md](https://github.com/cordis-lib/cordis) for info on how to contribute to this package or the other `@cordis` packages.

## LICENSE
Licensed under the [Apache 2.0](https://github.com/cordis-lib/cordis/blob/main/LICENSE) license.
21 changes: 15 additions & 6 deletions libs/error/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
<div align = "center">
# `@cordis/error`

# @cordis/error

</div>

## Description
[![GitHub](https://img.shields.io/badge/License-Apache%202.0-yellow.svg)](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/v/@cordis/error?color=crimson&logo=npm)](https://www.npmjs.com/package/@cordis/error)
[![TypeScript](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml/badge.svg)](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)

A library for easily creating error classes with pre-defined messages.

## Installation
- `npm install @cordis/error`
- `pnpm install @cordis/error`
- `yarn add @cordis/error`

## Documentation
You can find documentation for the whole project over at https://cordis.didinele.me

## Contributing
Please see the main [README.md](https://github.com/cordis-lib/cordis) for info on how to contribute to this package or the other `@cordis` packages.

## LICENSE
Licensed under the [Apache 2.0](https://github.com/cordis-lib/cordis/blob/main/LICENSE) license.
Loading