{"id":39683849,"url":"https://github.com/crybapp/api","last_synced_at":"2026-01-18T09:56:23.804Z","repository":{"id":46835643,"uuid":"214823954","full_name":"crybapp/api","owner":"crybapp","description":"Core service used to handle events from clients","archived":false,"fork":false,"pushed_at":"2024-09-12T23:12:38.000Z","size":494,"stargazers_count":35,"open_issues_count":27,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-24T15:28:36.149Z","etag":null,"topics":["api","cryb","hacktoberfest","service","websocket"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crybapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null},"funding":{"patreon":"cryb"}},"created_at":"2019-10-13T13:20:40.000Z","updated_at":"2025-08-21T09:12:27.000Z","dependencies_parsed_at":"2023-02-17T08:05:40.707Z","dependency_job_id":null,"html_url":"https://github.com/crybapp/api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/crybapp/api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crybapp%2Fapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crybapp%2Fapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crybapp%2Fapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crybapp%2Fapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crybapp","download_url":"https://codeload.github.com/crybapp/api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crybapp%2Fapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cryb","hacktoberfest","service","websocket"],"created_at":"2026-01-18T09:56:23.742Z","updated_at":"2026-01-18T09:56:23.797Z","avatar_url":"https://github.com/crybapp.png","language":"TypeScript","funding_links":["https://patreon.com/cryb"],"categories":[],"sub_categories":[],"readme":"![Cryb OSS](.github/api-icon.png \"@cryb/api Logo\")\n\n**@cryb/api** - _Core services_\n\n[![GitHub contributors](https://img.shields.io/github/contributors/crybapp/api)](https://github.com/crybapp/api/graphs/contributors) [![License](https://img.shields.io/github/license/crybapp/api)](https://github.com/crybapp/api/blob/master/LICENSE) [![Patreon Donate](https://img.shields.io/badge/donate-Patreon-red.svg)](https://patreon.com/cryb) [![Chat on Discord](https://discord.com/api/guilds/594942455749672983/widget.png)](https://discord.gg/xdhEgD5)\n\n## Docs\n\n* [Info](#info)\n  * [Status](#status)\n* [Codebase](#codebase)\n  * [Folder Structure](#folder-structure)\n  * [Code Style](#code-style)\n  * [First time setup](#first-time-setup)\n    * [Installation](#installation)\n  * [Running the app locally](#running-the-app-locally)\n    * [Background services](#background-services)\n    * [Starting @cryb/api](#starting-@cryb/api)\n* [Questions / Issues](#questions--issues)\n\n## Info\n\n`@cryb/api` is the core service used to handle requests from clients over REST and WebSocket.\n\nEvents such as Room creation, user authentication and requests to `@cryb/portals` to create VM instances are sent from `@cryb/api`.\n\n### Status\n\n`@cryb/api` has been actively developed internally since August 2019, and is now open source as of October 2019.\n\n## Codebase\n\nThe codebase for `@cryb/api` is written in JavaScript, utilising TypeScript and Node.js. Express.js is used for our REST API, while the WebSocket API uses the `ws` module.\n\nMongoDB is used as the primary database, while Redis is used for cache and PUB/SUB.\n\n### Code Style\n\nWe ask that you follow our [code style guidelines](https://github.com/crybapp/library/blob/master/code-style/STYLE.md) when contributing to this repository.\n\nWe use ESLint in order to lint our code. Run `yarn lint` before committing any code to ensure it's clean.\n\n*Note: while we have most rules covered in our `.eslintrc.js` config, it's good practice to familarise yourself with our code style guidelines.*\n\n### Folder Structure\n\n```\ncryb/api/\n└──┐ src # The core source code\n   ├── config # Config files for Redis, Passport, etc\n   ├── controllers # Our REST route controller files\n   ├── drivers # Methods used to talk to other microservices, such as @cryb/portals\n   ├── models # Models for our a data types, such as users and rooms\n   ├── schemas # Mongoose schema files\n   ├── server # Our Express.js setup\n   ├── services # Abstractions for Oauth2, etc\n   └── utils # Helper methods\n```\n\n### First time setup\n\nFirst, clone the `@cryb/api` repository locally:\n\n```\ngit clone https://github.com/crybapp/api.git\n```\n\n#### Installation\n\nThe following services need to be installed for `@cryb/api` to function:\n\n* MongoDB\n* Redis\n\nWe recommend that you run the following services alongside `@cryb/api`, but it's not required.\n\n* `@cryb/portals`\n* `@cryb/aperture`\n\nYou also need to install the required dependencies by running `yarn`.\n\nEnsure that `.env.example` is either copied and renamed to `.env`, or is simply renamed to `.env`.\n\nIn this file, you'll need some values. Documentation is available in the `.env.example` file.\n\n### Running the app locally\n\n#### Background Services\n\nMake sure that you have installed MongoDB and Redis, and they are both running locally on port 27017 and 6379 respectively.\n\nThe command to start MongoDB is `mongod`, and the command to start Redis is `redis-server`.\nMost Linux distributions will have those packaged, and will start automatically with your system.\n\nIf you're developing a feature that requires the VM infrastructure, then make sure `@cryb/portals` and `@cryb/aperture` are running.\n\n#### Starting @cryb/api\n\nTo run `@cryb/api` in development mode, run `yarn dev`.\n\nIt is recommended that in production you run `yarn build`, then `yarn start`.\n\n## Questions / Issues\n\nIf you have an issues with `@cryb/api`, please either open a GitHub issue, contact a maintainer or join the [Cryb Discord Server](https://discord.gg/xdhEgD5) and ask in `#tech-support`.\n\n## License\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcrybapp%2Fapi.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcrybapp%2Fapi?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrybapp%2Fapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrybapp%2Fapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrybapp%2Fapi/lists"}