GithubHelp home page GithubHelp logo

with-labs / popspace Goto Github PK

View Code? Open in Web Editor NEW
260.0 16.0 41.0 121.34 MB

Comprehensive source for PopSpace, virtual spaces for everybody

License: GNU General Public License v2.0

Dockerfile 0.13% JavaScript 17.93% TypeScript 81.34% Shell 0.04% HTML 0.45% CSS 0.12%

popspace's Introduction

PopSpace, virtual spaces for everybody.

PopSpace is the open source virtual canvas platform for chatting, collaborating, and playing.

Create your own spaces, on your own terms.

Learn more at PopSpace

Hero Shot

Quick Start

To install PopSpace you will need:

  • An Audio/Video media provider:
    • A deployed LiveKit server
    • A LiveKit Cloud account
    • Or, a Twilio account

Using the Docker Image (Recommended)

To skip building the image yourself, use our published image:

docker pull ghcr.io/with-labs/popspace:latest

Environment Variables

The following environment variables are required to run PopSpace in a Docker container or running locally. This assumes a persistent volume is mounted at /data:

# if you use LiveKit, define the following vars
REACT_APP_LIVEKIT_ENDPOINT=https://your-livekit-instance.com
LIVEKIT_API_KEY=<your livekit server key>
LIVEKIT_SECRET_KEY=<your livekit server secret key>
# if you use Twilio, define these instead.
# TWILIO_ACCOUNT_SID
# TWILIO_API_KEY_SECRET
# TWILIO_API_KEY_SID

# yes, these have different formats, sorry...
# NOTE: connection_limit=1 is vital for DATABASE_URL!!
DATABASE_URL=file:/data/db.sqlite?connection_limit=1
UNICORN_DATABASE_URL=/data/unicorn.sqlite
USER_FILES_DIRECTORY=/data/user-files
WALLPAPERS_DIRECTORY=/data/wallpapers
PUBLIC_URL=http://localhost:8889

You can put these in a .env file and run docker run -env-file .env ... to include them.

Ports

The Docker image will need the following ports exposed to run the various services:

  • 8888: the UI server
  • 8889: the API server
  • 8890: the socket server
  • 8891: the collaborative document server

The UI connects to each of these services on the corresponding port for the host it is being served from. For example, if you're running the container on localhost, the UI will try to connect to localhost:8889 for the API. If you host the container elsewhere on https://popspace.myserver.com, it will try to connect to https://popspace.myserver.com:8889 for the API.

If you would like to modify how the app tries to connect to services, the relevant file is noodle/src/api/services.ts.

Optional configuration

The rest of this configuration is optional. Popspace works without it.

S3 Setup

Using S3 for user files is optional. By default, all uploaded files are stored in the filesystem.

You'll need 2 S3 buckets to run the app, one for wallpapers and one for user file uploads.

Currently the user file upload bucket needs public access. There's currently no configuration to setup a separate host origin for user files, so you can't put them behind a CDN and restrict access. The user file upload system uses older uploading code, whereas the newer wallpapers feature relies on the file upload library that also lives in this repo and supports CloudFront or other custom serving origins.

Bucket setup must allow CORS access from the origin you use to host the app. That will depend on your own hosting! You should also review the policies and configurations below carefully and determine if you can adopt a more strict policy for your usage.

Wallpaper bucket setup

  • We recommend setting up a CloudFront distribution for the bucket and restricting object access to the CloudFront origin access identity.
  • You can use the following policy to setup CORS access for all origins, or be more specific and specify the origins you are using to host the app:
[
    {
        "AllowedHeaders": [
            "Authorization"
        ],
        "AllowedMethods": [
            "GET",
            "HEAD"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [],
        "MaxAgeSeconds": 3000
    }
]

User File bucket setup

  • Unfortunately this bucket requires public access for all objects
{
    "Version": "2012-10-17",
    "Id": "Policy1604614964751",
    "Statement": [
        {
            "Sid": "Stmt1604614962916",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::<YOUR BUCKET NAME>/*"
        }
    ]
}
  • CORS access must be configured to allow PUT requests in order to upload files using presigned URLs.
[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "PUT"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]

Adding environment variables

Finally, you'll need to provide environment variables to start using your S3 buckets for file storage instead of the filesystem:

# you need an S3 bucket for storing uploaded wallpapers
WALLPAPER_FILES_BUCKET_NAME
# you can set a custom origin for a wallpaper CDN (use this to
# setup CloudFront for example). If not, set this to
# `https://${WALLPAPER_FILES_BUCKET_NAME}.s3.amazonaws.com`
WALLPAPER_FILES_ORIGIN
# you need an S3 bucket for storing uploaded user files.
# this one doesn't use custom origin.
USER_FILES_BUCKET_NAME
# your AWS config and credentials
AWS_REGION
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY

Becoming an Admin

The only privilege admins have currently is to create and modify room templates. If that's not necessary (for example, you ran the seed command to setup default templates), you don't need to worry about this.

You can set your own actor up as an admin after connecting to the app. After you connect the first time, your actor connection info is cached in your browser, so the actor you use should remain stable until you clear cache or change browsers.

You can determine your actor ID by opening the console while the app is open and printing client.actor.actorId. To become an admin, access your database and flip the admin column to true for your actor. There's no other way to do that currently if you don't have direct database access.

TLS support

It's probably easiest to terminate TLS outside the container, like at a load balancer level or in a Kubernetes service. But if your hosting is easier to manage by specifying a certificate to the app's services directly, you can do that by mounting your TLS files in the container and providing environment variables SSL_PRIVATE_KEY_PATH and SSL_CERTIFICATE_PATH to the container.

These are used by all the backend servers to set up TLS.

The services

The app has several backend services.

The UI

The UI server is a simple SPA Express server which hosts the files generated via Create React App in the ./noodle source directory.

The API

Source in ./noodle-api. This is the HTTP server. HTTP requests are used for a few things like creating rooms, joining media calls, and uploading files.

The Socket Server

Called 'hermes' internally, its source is in ./hermes. Clients connect to this server via websocket. Events are passed from the client for all kinds of user actions, and then the server broadcasts response events to all peers to keep them synchronized.

The message protocol is not well-documented, but you can find a full list of incoming and outgoing message types in ./noodle/src/api/roomState/types/socketProtocol. The backend handlers for these messages are located in ./hermes/src/server/processors.

Having a separate server for HTTP and Socket connections is probably overkill for a self-hosted app! As PopSpace's usage moves in this direction, it might be welcome to combine these two services by moving the HTTP routes into the Hermes Express server.

The Collaborative Document Server

Called 'unicorn' internally, its source is in ./unicorn/app. It's essentially a thin wrapper around ShareDB to use a websocket transport, combined with a NextJS server to host an (unused) frontend for direct document editing.

The client utilizes the React component found in ./unicorn/component to render collaborative document widgets which connect to this server.

Other libraries

In addition to the backend services, there are a few internal libraries in use:

  • @withso/noodle-shared: the shared library for managing some common business logic and database connections
  • @withso/file-upload: an abstraction around user file management which includes image processing

In the current repo setup, these libraries are included as Yarn workspaces and are symlinked into the top-level node_modules to be referenced by other services.

Local building

To build the Docker image yourself, you need to first build all the app services and libraries:

# install dependencies
yarn install
# build source files for all app services
yarn precontainerize

Then build the Docker image:

docker build -t popspace .

Local development

First, build some dependencies by reusing the containerization preparation script:

# install dependencies
yarn install
# build source files for all app services
yarn precontainerize

To run services locally, you can use the umbrella script from the root of the repo:

yarn dev

Or you can run each service individually - refer to the README in each service directory.

popspace's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

popspace's Issues

Making PopSpace a standalone deploy

We'd love to evolve PopSpace from a stack which is dependent on various external services to a self-contained, Docker-deployable product which gives you the full experience with no extra setup or bills besides your own hosting.

To do that, we need to move the stack dependencies into a group of deployed containers which all work together, probably using Docker Compose.

Here's the list of things we'd need to internalize:

  • Media servers (LiveKit)
  • File storage (currently, S3)
  • Database (currently, Postgres)

For media services, LiveKit can already be deployed as a solo container, so this should be pretty straightforward! Since we recently released a new version which can connect to LiveKit for media, it should be a matter of including a LiveKit container as part of a Compose deployment and correctly configuring the relevant environment variables.

For file storage, we can just store things on the mounted volume. There's not much need for a robust CDN infrastructure now that PopSpace is a single-team standalone oriented product. The file-upload project was designed to be abstract so that we could swap in different file storage methods like this, but unfortunately it's not used for user file uploads (only wallpapers), so there's some extra work to do to unify the file handling logic in the app before we can swap out the S3 piece.

For the database, we use Prisma - so we could potentially move to SQLite, also on-volume. While SQLite is lightweight, again, scaling is not such a concern for this new phase of the PopSpace product. As long as our existing SQL is compatible with SQLite, it could be an easy drop-in replacement, just a matter of setting up the database and migrating as part of the Docker image.

While we're hoping to get all this done, full disclosure, we're quite busy building PopStage these days, so it may take some time. Community input and contributions are welcome!

Using jitsi

Any thoughts on using jitsi meet instead of a paid service?

Error when running yarn precontainerize

root@ad448bdddcce:/popspace# yarn precontainerize
yarn run v1.22.19
$ yarn build-lib && yarn build
$ concurrently npm:build-lib:*
[build-lib:*files]
[build-lib:*files] > build-lib:files
[build-lib:*files] > yarn workspace @withso/file-upload build
[build-lib:*files]
[build-lib:*unicorn:component]
[build-lib:*unicorn:component] > build-lib:unicorn:component
[build-lib:*unicorn:component] > yarn workspace @withso/unicorn build
[build-lib:*unicorn:component]
[build-lib:*shared]
[build-lib:*shared] > build-lib:shared
[build-lib:*shared] > yarn workspace @withso/noodle-shared build
[build-lib:*shared]
warning package.json: License should be a valid SPDX license expression
$ tsc
$ rm -rf dist && mkdir dist && babel src -d dist --copy-files
$ tsc
[build-lib:*unicorn:component] Error: Couldn't find preset "@babel/preset-env" relative to directory "/popspace/unicorn/component"
[build-lib:*unicorn:component] at /usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
[build-lib:*unicorn:component] at Array.map ()
[build-lib:*unicorn:component] at OptionManager.resolvePresets (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
[build-lib:*unicorn:component] at OptionManager.mergePresets (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
[build-lib:*unicorn:component] at OptionManager.mergeOptions (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
[build-lib:*unicorn:component] at OptionManager.init (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
[build-lib:*unicorn:component] at File.initOptions (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/index.js:212:65)
[build-lib:*unicorn:component] at new File (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/index.js:135:24)
[build-lib:*unicorn:component] at Pipeline.transform (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
[build-lib:*unicorn:component] at transform (/usr/lib/node_modules/babel-cli/lib/babel/util.js:50:22)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
[build-lib:*unicorn:component] Exit code: 1
[build-lib:*unicorn:component] Command: /usr/bin/node
[build-lib:*unicorn:component] Arguments: /usr/lib/node_modules/yarn/lib/cli.js build
[build-lib:*unicorn:component] Directory: /popspace/unicorn/component
[build-lib:*unicorn:component] Output:
[build-lib:*unicorn:component]
info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
[build-lib:*unicorn:component] npm run build-lib:unicorn:component exited with code 1
[build-lib:*files] error TS2468: Cannot find global value 'Promise'.
[build-lib:*files] src/FileManager.test.ts(3,1): error TS2304: Cannot find name 'jest'.
[build-lib:*files] src/FileManager.test.ts(4,1): error TS2304: Cannot find name 'jest'.
[build-lib:*files] src/FileManager.test.ts(7,21): error TS2304: Cannot find name 'jest'.
[build-lib:*files] src/FileManager.test.ts(8,5): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*files] src/FileManager.test.ts(12,15): error TS2304: Cannot find name 'jest'.
[build-lib:*files] src/FileManager.test.ts(16,23): error TS2304: Cannot find name 'jest'.
[build-lib:*files] src/FileManager.test.ts(17,23): error TS2304: Cannot find name 'jest'.
[build-lib:*files] src/FileManager.test.ts(18,20): error TS2304: Cannot find name 'jest'.
[build-lib:*files] src/FileManager.test.ts(28,18): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] src/FileManager.test.ts(30,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try npm i --save-dev @types/jest or npm i --save-dev @types/mocha.
[build-lib:*files] src/FileManager.test.ts(33,3): error TS2304: Cannot find name 'beforeEach'.
[build-lib:*files] src/FileManager.test.ts(41,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try npm i --save-dev @types/jest or npm i --save-dev @types/mocha.
[build-lib:*files] src/FileManager.test.ts(41,36): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*files] src/FileManager.test.ts(49,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(50,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(52,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(57,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(64,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(65,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(66,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(67,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(70,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try npm i --save-dev @types/jest or npm i --save-dev @types/mocha.
[build-lib:*files] src/FileManager.test.ts(70,75): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*files] src/FileManager.test.ts(84,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(85,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(87,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(92,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(99,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(100,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(101,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(102,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(105,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try npm i --save-dev @types/jest or npm i --save-dev @types/mocha.
[build-lib:*files] src/FileManager.test.ts(105,49): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*files] src/FileManager.test.ts(113,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(114,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(116,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(121,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(127,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(138,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(139,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(140,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(141,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(142,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(148,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try npm i --save-dev @types/jest or npm i --save-dev @types/mocha.
[build-lib:*files] src/FileManager.test.ts(148,47): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*files] src/FileManager.test.ts(151,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(152,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(154,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(155,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(159,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(160,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(165,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try npm i --save-dev @types/jest or npm i --save-dev @types/mocha.
[build-lib:*files] src/FileManager.test.ts(165,73): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*files] src/FileManager.test.ts(180,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(181,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(183,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(184,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(187,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(191,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.test.ts(192,5): error TS2304: Cannot find name 'expect'.
[build-lib:*files] src/FileManager.ts(1,25): error TS2307: Cannot find module 'path' or its corresponding type declarations.
[build-lib:*files] src/FileManager.ts(2,28): error TS2307: Cannot find module 'uuid' or its corresponding type declarations.
[build-lib:*files] src/FileManager.ts(69,11): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] src/FileManager.ts(69,11): error TS4033: Property 'buffer' of exported interface has or is using private name 'Buffer'.
[build-lib:*files] src/FileManager.ts(115,23): error TS2550: Property 'startsWith' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
[build-lib:*files] src/FileManager.ts(142,12): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*files] src/S3.ts(1,17): error TS2307: Cannot find module 'aws-sdk' or its corresponding type declarations.
[build-lib:*files] src/S3.ts(3,23): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] src/S3.ts(28,45): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] src/S3.ts(30,38): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] src/S3.ts(31,35): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] src/S3.ts(35,21): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*files] src/S3.ts(76,42): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] src/mocks/imageProcessing.ts(1,34): error TS2304: Cannot find name 'jest'.
[build-lib:*files] src/mocks/imageProcessing.ts(1,51): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] src/mocks/imageProcessing.ts(2,3): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*files] src/mocks/imageProcessing.ts(4,37): error TS2304: Cannot find name 'jest'.
[build-lib:*files] src/imageProcessing.ts(1,19): error TS2307: Cannot find module 'sharp' or its corresponding type declarations.
[build-lib:*files] src/imageProcessing.ts(5,41): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] src/imageProcessing.ts(18,50): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*files] types/withso__with-shared/index.d.ts(2,28): error TS2307: Cannot find module 'massive' or its corresponding type declarations.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
[build-lib:*files] Exit code: 1
[build-lib:*files] Command: /usr/bin/node
[build-lib:*files] Arguments: /usr/lib/node_modules/yarn/lib/cli.js build
[build-lib:*files] Directory: /popspace/file-upload
[build-lib:*files] Output:
[build-lib:*files]
info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
[build-lib:*files] npm run build-lib:files exited with code 1
[build-lib:*shared] error TS2468: Cannot find global value 'Promise'.
[build-lib:*shared] src/api/middleware.ts(1,38): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/api/middleware.ts(2,49): error TS2307: Cannot find module 'express' or its corresponding type declarations.
[build-lib:*shared] src/api/middleware.ts(10,3): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*shared] src/api/middleware.ts(13,16): error TS2664: Invalid module name in augmentation, module 'express' cannot be found.
[build-lib:*shared] src/api/middleware.ts(53,10): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*shared] src/db/accounts.ts(1,25): error TS2307: Cannot find module 'express' or its corresponding type declarations.
[build-lib:*shared] src/db/config.ts(2,21): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*shared] src/db/constants.ts(1,31): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
[build-lib:*shared] src/db/events.ts(1,25): error TS2307: Cannot find module 'express' or its corresponding type declarations.
[build-lib:*shared] src/db/events.ts(2,29): error TS2307: Cannot find module 'ua-parser-js' or its corresponding type declarations.
[build-lib:*shared] src/db/events.ts(3,17): error TS2307: Cannot find module 'url' or its corresponding type declarations.
[build-lib:*shared] src/db/events.ts(8,16): error TS2664: Invalid module name in augmentation, module 'express' cannot be found.
[build-lib:*shared] src/db/magic.ts(1,27): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/db/pg.ts(1,23): error TS2307: Cannot find module 'async-lock' or its corresponding type declarations.
[build-lib:*shared] src/db/pg.ts(2,21): error TS2307: Cannot find module 'massive' or its corresponding type declarations.
[build-lib:*shared] src/db/pg.ts(3,16): error TS2307: Cannot find module 'pg' or its corresponding type declarations.
[build-lib:*shared] src/db/pg.ts(4,21): error TS2307: Cannot find module 'pg-monitor' or its corresponding type declarations.
[build-lib:*shared] src/db/pg.ts(33,3): error TS2304: Cannot find name 'global'.
[build-lib:*shared] src/db/pg.ts(36,12): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*shared] src/db/pg.ts(39,7): error TS2304: Cannot find name 'global'.
[build-lib:*shared] src/db/pg.ts(41,4): error TS2304: Cannot find name 'global'.
[build-lib:*shared] src/db/pg.ts(106,9): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*shared] src/db/prisma.ts(1,30): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/db/redis/redis_base.ts(1,19): error TS2307: Cannot find module 'redis' or its corresponding type declarations.
[build-lib:*shared] src/db/redis/redis_base.ts(38,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(49,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(68,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(103,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(104,34): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*shared] src/db/redis/redis_base.ts(140,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(152,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(161,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(167,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(180,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(186,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(192,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(198,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(207,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(213,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(219,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(225,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(231,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(237,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(243,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(249,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(255,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/redis/redis_base.ts(261,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/room/data.ts(39,17): error TS2550: Property 'assign' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
[build-lib:*shared] src/db/room/data.ts(74,20): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
[build-lib:*shared] src/db/room/memberships.ts(1,22): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/db/room/names_and_routes.ts(1,32): error TS2307: Cannot find module 'crypto-random-string' or its corresponding type declarations.
[build-lib:*shared] src/db/room/permissions.ts(1,22): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/db/room/templates.ts(1,23): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/db/room/templates.ts(86,22): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/db/serialization.ts(8,55): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
[build-lib:*shared] src/db/serialization.ts(30,34): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
[build-lib:*shared] src/db/serialization.ts(40,22): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
[build-lib:*shared] src/db/serialization.ts(48,12): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
[build-lib:*shared] src/db/serialization.ts(55,2): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
[build-lib:*shared] src/db/time.ts(1,20): error TS2307: Cannot find module 'moment' or its corresponding type declarations.
[build-lib:*shared] src/index.ts(15,9): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*shared] src/index.ts(18,12): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*shared] src/index.ts(26,15): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/lib/auth.ts(1,25): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/lib/auth.ts(2,20): error TS2307: Cannot find module 'moment' or its corresponding type declarations.
[build-lib:*shared] src/lib/auth.ts(72,31): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
[build-lib:*shared] src/lib/otp.ts(1,27): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/lib/otp.ts(2,32): error TS2307: Cannot find module 'crypto-random-string' or its corresponding type declarations.
[build-lib:*shared] src/lib/otp.ts(3,20): error TS2307: Cannot find module 'moment' or its corresponding type declarations.
[build-lib:*shared] src/lib/routes.ts(1,27): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/models/actor.ts(1,34): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/models/profile.ts(1,23): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/models/profile.ts(23,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/models/profile.ts(26,17): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/models/room_data.ts(1,22): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/models/room_data.ts(52,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/models/room_widget.ts(1,61): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/models/room_with_state.ts(1,22): error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.
[build-lib:*shared] src/models/room_with_state.ts(28,22): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/models/room_with_state.ts(31,21): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/models/room_with_state.ts(50,32): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
[build-lib:*shared] src/models/room_with_state.ts(55,11): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
[build-lib:*shared] src/net/_net.ts(2,15): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*shared] src/net/http_client.ts(1,24): error TS2307: Cannot find module 'https' or its corresponding type declarations.
[build-lib:*shared] src/net/http_client.ts(29,19): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
[build-lib:*shared] src/net/http_client.ts(43,16): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
[build-lib:*shared] Exit code: 2
[build-lib:*shared] Command: /usr/bin/node
[build-lib:*shared] Arguments: /usr/lib/node_modules/yarn/lib/cli.js build
[build-lib:*shared] Directory: /popspace/noodle-shared
[build-lib:*shared] Output:
[build-lib:*shared]
info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
[build-lib:*shared] npm run build-lib:shared exited with code 2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
root@ad448bdddcce:/popspace#

Documentation

"Twilio : could it be optional ? not clear."

"The message protocol is not well-documented, but you can find a full list of incoming and outgoing message types in ./noodle/src/api/roomState/types/socketProtocol." : better not say it's not well documented but later improve with a picture like a diagram ;)

Postgress : replaçable by sqlite in the future ?

and S3 by local files in the future ?

New error

Ok so I got (nearly) everything working including voice and video. But then all of a sudden I went into a room and its doing this:

https://i.imgur.com/UhBzaIN.png

What does it mean? I tried restarting the machine and everything

API Error preventing uploading of files

[2023-11-19T10:50:43.880] [ERROR] app - Unexpected API error /upload_file: {} TypeError: Cannot read properties of undefined (reading 'thumbnailUrl')
    at Object.createFileMetadata (/usr/src/app/noodle-api/src/lib/files.js:18:38)
    at FileManager.<anonymous> (/usr/src/app/file-upload/dist/FileManager.js:105:95)
    at step (/usr/src/app/file-upload/dist/FileManager.js:33:23)
    at Object.next (/usr/src/app/file-upload/dist/FileManager.js:14:53)
    at fulfilled (/usr/src/app/file-upload/dist/FileManager.js:5:58)

Couple issues

The notepad does not load it just spins forever. Also when I upload a file it displays as just the picture name and not the actual jpg file image

Allow non-Amazon S3 backends

There's currently a fair share of S3-compatible object stores, for example MinIO. It would be nice if PopSpace didn't require using Amazon's services to prevent further centralization of the web.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.