https://github.com/crybapp/portal
Service deployed on VM instances to launch browsers
https://github.com/crybapp/portal
cryb docker hacktoberfest vm-instance
Last synced: 3 months ago
JSON representation
Service deployed on VM instances to launch browsers
- Host: GitHub
- URL: https://github.com/crybapp/portal
- Owner: crybapp
- License: mit
- Created: 2019-10-13T13:21:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-16T21:31:03.000Z (over 1 year ago)
- Last Synced: 2025-12-24T15:28:36.231Z (4 months ago)
- Topics: cryb, docker, hacktoberfest, vm-instance
- Language: TypeScript
- Homepage:
- Size: 371 KB
- Stars: 33
- Watchers: 1
- Forks: 12
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README

**@cryb/portal** - _VM instance_
[](https://github.com/crybapp/portal/graphs/contributors) [](https://github.com/crybapp/portal/blob/master/LICENSE) [](https://patreon.com/cryb) [](https://discord.gg/xdhEgD5)
## Docs
* [Info](#info)
* [Status](#status)
* [Codebase](#codebase)
* [Folder Structure](#folder-structure)
* [Code Style](#code-style)
* [First time setup](#first-time-setup)
* [Installation](#installation)
* [Running the app locally](#running-the-app-locally)
* [Background services](#background-services)
* [Starting @cryb/portal](#starting-@cryb/portal)
* [Questions / Issues](#questions--issues)
## Info
`@cryb/portal` is the instance deployed onto VM machines to act as the 'Virtual browser'.
`@cryb/portal` connect to `@cryb/portals` over WS to send and recieve updates like controller events and health updates.
### Status
`@cryb/portal` has been actively developed internally since September 2019, and is now open source as of October 2019.
## Codebase
The codebase for `@cryb/portal` is written in JavaScript, utilising TypeScript and Node.js.
### Code Style
We ask that you follow our [code style guidelines](https://github.com/crybapp/library/blob/master/code-style/STYLE.md) when contributing to this repository.
We use TSLint in order to lint our code. Run `yarn lint` before committing any code to ensure it's clean.
*Note: while we have most rules covered in our `tslint.json` config, it's good practice to familarise yourself with our code style guidelines*
### Folder Structure
```
cryb/portal/
└──┐ src # The core source code
├── browser # Class used to start services on the VM, such as Chromium and ffmpeg
├── clients # Our Express.js setup and WebSocket setup
├── config # Services such as queue management, etc
└── utils # Helper methods
```
### First time setup
First, clone the `@cryb/portal` repository locally:
```
git clone https://github.com/crybapp/portal.git
```
#### Installation
The following services need to be installed for `@cryb/portal` to function:
* `@cryb/portals`
* `@cryb/aperture` or Janus WebRTC Server
We recommend that you run the following services alongside `@cryb/portal`, but it's not required.
* `@cryb/api`
* `@cryb/web`
* `@cryb/aperture` or Janus WebRTC Server
You also need to install the required dependencies by running `yarn`
Ensure that `.env.example` is either copied and renamed to `.env`, or is simply renamed to `.env`.
In this file, you'll need some values. Documentation is available in the `.env.example` file.
### Running the app locally
#### Background Services
Make sure `@cryb/portals` is running on port 5000 and that you have setup `@cryb/aperture` or Janus WebRTC Server.
#### Starting @cryb/portal
We recommend that you use a service like [Docker](https://docker.com) to start an instance of `@cryb/portal`.
To run `@cryb/portal` in development mode on Docker, run `yarn docker:dev`.
Use `yarn docker:build` to build an image for deployment in production.
## Questions / Issues
If you have an issues with `@cryb/portal`, please either open a GitHub issue, contact a maintainer or join the [Cryb Discord Server](https://discord.gg/xdhEgD5) and ask in `#tech-support`.
## License
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fcrybapp%2Fportal?ref=badge_large)