CubeCommons aggregates video, audio, digital publications, and activity booklets by arts organizations and artists across northern Turtle Island (Canada). This repository contains the front-end React app, Express services, and database schema details to run the project.
This is the front-end user interface in the form of a typical React application.
This includes the cube-svc
microservice that supports all operations. Additionally, there is a VTT service responsible for coordinating subtitle generation between GCP and OpenAI.
CubeCommons utilizes a serverless database solution called CockroachDB. Cockroach Labs offers a generous free tier that auto-scales based on demand. You may use any database solution you wish. The schema details are outlined below.
users
: table for authentication and authorization information as well as user account statuses.profiles
: table for organization related information, is associated to a user identity 1:1.playlists
: table for playlist related information including basic metadata and a list of associated content items.files
: table for data related to cloudflare information like upload endpoints and external data required to interact with cloudflare.content
: table for metadata related to a piece of content on CubeCommons like description, tags, contributors, etc.vtt
: table for metadata related to generated or uploaded VTT files associated to a piece of content.There is a small set of user permissions that are associated to the user record allowing actions to be taken. The thresholds are:
anonymous
: any user visiting the site gets the anonymous permission (regardless if they are authenticated or not).active
: any user who has completed the user registration and verified their email has the active permission.contentEditor
: any authenticated user who has completed profile registration has the contentEditor permission.The above services are packaged into Docker containers and deployed to Google Cloud Run for resource, instance, and scalability management. These docker containers can be deployed using any server structure that you wish.
The built front-end React app is hosted on Cloudflare Pages. There is some light configuration in the tsconfig.json
to support this deployment. Cloudflare Pages offers a generous free tier and automatic deployments and may be switched out for any alternative hosting option.
CubeCommons uses a third-party tool called Gov4Git to govern its' issues and pull requests. This Tool was developed by Digital Minister Audrey Tang (they/them) and their collaborators – architects of Taiwan’s internationally acclaimed digital democracy technology. Learn more about Audrey Tang: https://www.plurality.net/ Gov4git installation links and instructions can be found here: https://gitrules.ai/
Follow these steps to get started with Gov4Git for CubeCommons:
Requesting Voting Tokens:
Formatting "New Issues" as Requests or Proposals:
gov4git:managed
which will push it to the voting platform. This will ensure your issue is pushed to the CubeCommons Gov4Git desktop app for tokens to be granted or the community to vote on.cube
with tables: content
, files
, playlists
, profiles
, users
, and vtt
./sql/cockroach_init.sql
.Email notifications sent to users for activities like account creation or password management are coordinated with Brevo. Brevo assists with template management, newsletter campaigns, and is the mail server. CubeCommons uses Brevo's APIs to implement this functionality so a Brevo account is a requirement to proceed.
cd services/cube-svc/
cp .env.example .env
.env
.COCKROACH_DB_CONNECTION_STRING
, BREVO_API_KEY
and everything prefixed with CLOUDFLARE_
.JWT_TOKEN_SECRET
it can be any value, but must match the value used for the identity server (configured in GCP).npm i
npm run start
The service will now be running on http://localhost:8080
cd client
cp .env.example .env
REACT_APP_CUBE_SVC_URL
to the endpoint configured above.REACT_APP_HCAPTCHA_KEY
with the key of your hcaptcha account.npm i
npm run start
Site styles can be referenced in the theme file.
We welcome code contributions to CubeCommons! This can be new features or components that you have developed after forking our code. Please follow these steps to contribute:
gov4git:managed
label to your PR to allow the Gov4Git bot to parse your request.Please ensure your code follows the project's coding standards and includes appropriate tests.
More detailed instructions for contributing to the project can be found in README_CONTRIBUTIONS.md
This project is licensed under the MIT License. See the LICENSE file for more details.
For any questions or support, please contact us at support@cubecommons.ca.
A section to document any known issues or bugs.
Please report any new issues in the GitHub issues section.