diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..6bbfc6e
--- /dev/null
+++ b/.github/CODE_OF_CONDUCT.md
@@ -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
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..88304b3
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -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: ''
+---
+
+
+**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:**
+
+
+- Node.js version:
+- Operating system:
+- Priority this issue should have – please be realistic and elaborate if possible:
+
+
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..b0cd014
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -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.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..a9a7b4a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -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)
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..cd5719b
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,15 @@
+**Please describe the changes this PR makes and why it should be merged:**
+
+
+
+**Status and versioning classification:**
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 17216fa..7b9eb0b 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,54 @@
-
+

+
+ A fully modular, micro-service based Node.js wrapper around the Discord API
+
+
-
+
+
+
+ 
+
+
+ 
+
-# 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)
diff --git a/libs/bitfield/README.md b/libs/bitfield/README.md
index 547e326..3dac1e6 100644
--- a/libs/bitfield/README.md
+++ b/libs/bitfield/README.md
@@ -1,12 +1,21 @@
-
+# `@cordis/bitfield`
-# @cordis/bitfield
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/bitfield)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
-
+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.
\ No newline at end of file
diff --git a/libs/brokers/README.md b/libs/brokers/README.md
index a89741c..4371a10 100644
--- a/libs/brokers/README.md
+++ b/libs/brokers/README.md
@@ -1,11 +1,21 @@
-
+# `@cordis/brokers`
-# @cordis/brokers
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/brokers)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
-
+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.
\ No newline at end of file
diff --git a/libs/common/README.md b/libs/common/README.md
index 31feb7f..3adeaad 100644
--- a/libs/common/README.md
+++ b/libs/common/README.md
@@ -1,12 +1,21 @@
-
+# `@cordis/common`
-# @cordis/common
-
-
-
-## Description
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/common)
+[](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.
\ No newline at end of file
diff --git a/libs/error/README.md b/libs/error/README.md
index 351e288..78738cc 100644
--- a/libs/error/README.md
+++ b/libs/error/README.md
@@ -1,12 +1,21 @@
-
+# `@cordis/error`
-# @cordis/error
-
-
-
-## Description
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/error)
+[](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.
\ No newline at end of file
diff --git a/libs/gateway/README.md b/libs/gateway/README.md
index 9ac115f..6794c8d 100644
--- a/libs/gateway/README.md
+++ b/libs/gateway/README.md
@@ -1,15 +1,18 @@
-
+# `@cordis/gateway`
-# @cordis/gateway
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/gateway)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
-
+The cordis WS client for Discord's API.
-## Description
-The cordis WS client for Discord's API
-___
+## Installation
+- `npm install @cordis/gateway`
+- `pnpm install @cordis/gateway`
+- `yarn add @cordis/gateway`
-## Example usage
-```js
+## Example Usage
+```ts
const { Cluster } = require('@cordis/gateway');
const main = async () => {
@@ -33,7 +36,12 @@ const main = async () => {
main();
```
-___
## 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.
\ No newline at end of file
diff --git a/libs/queue/README.md b/libs/queue/README.md
index c2c00c4..d6c2ac3 100644
--- a/libs/queue/README.md
+++ b/libs/queue/README.md
@@ -1,12 +1,21 @@
-
+# `@cordis/queue`
-# @cordis/queue
-
-
-
-## Description
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/queue)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
Simple and sequential queue for async operations.
+## Installation
+- `npm install @cordis/queue`
+- `pnpm install @cordis/queue`
+- `yarn add @cordis/queue`
+
## 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.
\ No newline at end of file
diff --git a/libs/redis-store/README.md b/libs/redis-store/README.md
index 1015feb..3f0e804 100644
--- a/libs/redis-store/README.md
+++ b/libs/redis-store/README.md
@@ -1,14 +1,23 @@
-
+# `@cordis/redis-store`
-# @cordis/redis-store
-
-
-
-## Description
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/redis-store)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
Simple data structure for holding key-value pairs, taking from both Maps and Arrays.
-This package implements `@cordis/store` using Redis hashes.
+This package implements [`@cordis/store`](https://github.com/cordis-lib/cordis/tree/main/libs/store) using Redis hashes.
+
+## Installation
+- `npm install @cordis/redis-store`
+- `pnpm install @cordis/redis-store`
+- `yarn add @cordis/redis-store`
## 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.
\ No newline at end of file
diff --git a/libs/rest/README.md b/libs/rest/README.md
index b1bc093..0ba3afb 100644
--- a/libs/rest/README.md
+++ b/libs/rest/README.md
@@ -1,17 +1,20 @@
-
+# `@cordis/rest`
-# @cordis/rest
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/rest)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
-
-
-## Description
Cordis' REST utilities for the Discord API
Note: Props to https://github.com/spec-tacles/spectacles.js for the Mutex logic.
-___
-## Example usage
-```js
+## Installation
+- `npm install @cordis/rest`
+- `pnpm install @cordis/rest`
+- `yarn add @cordis/rest`
+
+## Example Usage
+```ts
const { RestManager } = require('@cordis/rest');
const main = async () => {
@@ -28,7 +31,12 @@ const main = async () => {
main();
```
-___
## 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.
\ No newline at end of file
diff --git a/libs/routers/README.md b/libs/routers/README.md
index d2df220..020d1bd 100644
--- a/libs/routers/README.md
+++ b/libs/routers/README.md
@@ -1,16 +1,18 @@
-
+# `@cordis/routers`
-# @cordis/routers
-
-
-
-## Description
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/routers)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
Construct API paths using simple JavaScript property accessing and execute requests with method calls.
-## Example
+## Installation
+- `npm install @cordis/routers`
+- `pnpm install @cordis/routers`
+- `yarn add @cordis/routers`
-```js
+## Example Usage
+```ts
const { buildRestRouter } = require('@cordis/router');
const { RestManager } = require('@cordis/rest');
@@ -23,3 +25,9 @@ console.log(user);
## 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.
\ No newline at end of file
diff --git a/libs/snowflake/README.md b/libs/snowflake/README.md
index b53eb53..7012f63 100644
--- a/libs/snowflake/README.md
+++ b/libs/snowflake/README.md
@@ -1,12 +1,21 @@
-
+# `@cordis/snowflake`
-# @cordis/snowflake
-
-
-
-# Description
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/snowflake)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
Simple package for destructuring (Twitter) Discord snowflakes.
+## Installation
+- `npm install @cordis/snowflake`
+- `pnpm install @cordis/snowflake`
+- `yarn add @cordis/snowflake`
+
## 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.
\ No newline at end of file
diff --git a/libs/store/README.md b/libs/store/README.md
index 4dbf17d..adf2152 100644
--- a/libs/store/README.md
+++ b/libs/store/README.md
@@ -1,14 +1,23 @@
-
+# `@cordis/store`
-# @cordis/store
-
-
-
-## Description
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://www.npmjs.com/package/@cordis/store)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
Simple data structure for holding key-value pairs, taking from both Maps and Arrays.
This package implements a simple in-memory store that actually extends the standard Map.
+## Installation
+- `npm install @cordis/store`
+- `pnpm install @cordis/store`
+- `yarn add @cordis/store`
+
## 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.
\ No newline at end of file
diff --git a/media/cordis_transparent.png b/media/cordis_transparent.png
new file mode 100644
index 0000000..f0b33f6
Binary files /dev/null and b/media/cordis_transparent.png differ
diff --git a/services/gateway/README.md b/services/gateway/README.md
index 274951d..88a1eaa 100644
--- a/services/gateway/README.md
+++ b/services/gateway/README.md
@@ -1,9 +1,15 @@
-
+# `@cordis/gateway-service`
-# Cordis gateway service
+[](https://github.com/cordis-lib/cordis/blob/main/LICENSE)
+[](https://github.com/cordis-lib/cordis/actions/workflows/quality.yml)
-
-
-## Description
Docker service for the cordis gateway, respecting [the spec](https://github.com/cordis-lib/spec).
+
+You can find the image [here](https://hub.docker.com/r/cordislib/gateway)
+
+## 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.
\ No newline at end of file