Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add-ons support #6468

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
eccb840
Initial add-ons API commit
keianhzo Jan 29, 2024
4e69cb6
Try to get some more info about the build error
keianhzo Feb 15, 2024
1b48d6e
Do not install dev dependencies in production
keianhzo Feb 15, 2024
3cc6d09
Revert tests
keianhzo Feb 15, 2024
f3d84cc
organize types
keianhzo Feb 15, 2024
4ff2d0e
Test
keianhzo Feb 22, 2024
460930f
Omit dev packages when installing deps in production
keianhzo Apr 10, 2024
3726836
Package lock update
keianhzo Apr 10, 2024
2781f1f
Increase log level
keianhzo Apr 10, 2024
ca5a91e
Try --legacy-peer-deps
keianhzo Apr 10, 2024
4a432f9
Use webpack in addons instead of tsup
keianhzo Apr 17, 2024
f0da86a
Revert docker image changes
keianhzo Apr 17, 2024
174c6fa
Remove portals addon
keianhzo Apr 17, 2024
56f6567
Update addon version
keianhzo Apr 18, 2024
f3d12c4
Update addons
keianhzo Apr 24, 2024
2240897
BGs initial support
keianhzo May 8, 2024
0956082
Packages updates
keianhzo May 8, 2024
5920ae4
Better handle of bitECS/addons state
keianhzo May 9, 2024
fe03f9c
Add lost trigger collision group
keianhzo May 10, 2024
4f4f186
Skip homepage when creating a new room
keianhzo May 10, 2024
5beeac1
Update BGs add-on
keianhzo May 10, 2024
b16f757
Add-ons docs
keianhzo May 13, 2024
e03ce8b
Fix format
keianhzo May 13, 2024
672c680
Fix image size
keianhzo May 13, 2024
644d101
Restore dockerfile
keianhzo May 13, 2024
d616838
Add add-on preferences update support
keianhzo May 21, 2024
129b460
Add post-processing addon
keianhzo May 23, 2024
7c20ad5
Use legacy peers for storybook
keianhzo May 23, 2024
905abd9
Pin addons versions
keianhzo May 24, 2024
c02bb8d
remove unnecessary legacy-peer-deps
keianhzo Jun 3, 2024
5b9ce83
Fix admin store access
keianhzo Jun 3, 2024
bccf94d
Update admin store ref
keianhzo Jun 3, 2024
064441a
Fix addon configuration
keianhzo Jun 13, 2024
392782e
Merge branch 'master' into addons
Exairnous Nov 15, 2024
ec5835b
[Mozilla Branding Removal] Update dependency links
Exairnous Nov 15, 2024
b0c1a7a
Unpin addons versions
Exairnous Nov 15, 2024
7a99b6f
Make dependency URL capitalization consistent
Exairnous Nov 15, 2024
e449f66
Merge branch 'master' into addons (likely breaks the branch)
Exairnous Nov 17, 2024
348c602
Revert "Merge branch 'master' into addons (likely breaks the branch)"
Exairnous Nov 17, 2024
2d34e73
Merge branch 'master' into addons
Exairnous Dec 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ Then visit https://hubs.local:8080 (note: HTTPS is required, you'll need to acce

> Note: When running the Hubs client locally, you will still connect to the development versions of the [reticulum](https://github.com/Hubs-Foundation/reticulum) server. This server does not allow being accessed outside of localhost. If you want to host your own Hubs servers, please check out [Hubs Community Edition](https://github.com/Hubs-Foundation/hubs-cloud/tree/master/community-edition).

## Add-ons

Hubs client add-ons are pluggable libraries that are installed as part of the client and loaded at runtime. Add-ons allow functionality to the Hubs core and allow easy Hubs client extensibility while maintaining the Hubs client core lean and minimal.

You can read more about add-ons installation and development [here](doc/add-ons.md).

## Contributing

Read our [contributor guide](./CONTRIBUTING.md) to learn how you can submit bug reports, feature requests, and pull requests.
Expand All @@ -49,11 +55,10 @@ Contributors are expected to abide by the project's [Code of Conduct](./CODE_OF_

## Additional Resources

* [Reticulum](https://github.com/Hubs-Foundation/reticulum) - Phoenix-based backend for managing state and presence.
* [Networked A-Frame](https://github.com/Hubs-Foundation/networked-aframe).
* [Hubs-Ops](https://github.com/Hubs-Foundation/hubs-ops) - Infrastructure as code + management tools for running necessary backend services on AWS.
- [Reticulum](https://github.com/Hubs-Foundation/reticulum) - Phoenix-based backend for managing state and presence.
- [Networked A-Frame](https://github.com/Hubs-Foundation/networked-aframe).
- [Hubs-Ops](https://github.com/Hubs-Foundation/hubs-ops) - Infrastructure as code + management tools for running necessary backend services on AWS.

## License

Hubs is licensed with the [Mozilla Public License 2.0](./LICENSE)

8 changes: 8 additions & 0 deletions addons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"addons": [
"hubs-duck-addon",
"hubs-portals-addon",
"hubs-behavior-graphs-addon",
"hubs-postprocessing-addon"
]
}
112 changes: 60 additions & 52 deletions admin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"dependencies": {
"@iarna/toml": "^2.2.3",
"@mozilla/lilypad-ui": "^1.8.2",
"aframe": "github:hubs-foundation/aframe#hubs/master",
"bitecs": "github:hubs-foundation/bitECS#hubs-patches",
"aframe": "github:Hubs-Foundation/aframe#hubs/master",
"bitecs": "github:Hubs-Foundation/bitECS#hubs-patches",
"classnames": "^2.2.5",
"hubs": "file:..",
"react": "^16.1.1",
"react-admin": "^2.6.3",
"react-dom": "^16.1.1",
"react-intl": "^2.4.0",
"three": "github:hubs-foundation/three.js#hubs-patches-141"
"three": "github:Hubs-Foundation/three.js#hubs-patches-141"
},
"devDependencies": {
"@babel/core": "^7.18.9",
Expand Down
6 changes: 4 additions & 2 deletions admin/src/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ import { AutoEndSessionDialog } from "./react-components/auto-end-session-dialog
import registerTelemetry from "hubs/src/telemetry";
import { createMuiTheme, withStyles } from "@material-ui/core/styles";
import { UnauthorizedPage } from "./react-components/unauthorized";
import { store } from "hubs/src/utils/store-instance";
import { getStore } from "hubs/src/utils/store-instance";

const qs = new URLSearchParams(location.hash.split("?")[1]);

window.APP = { store };
window.APP = { store: getStore() };

registerTelemetry("/admin", "Hubs Admin");

Expand Down Expand Up @@ -185,6 +185,7 @@ const mountUI = async (retPhxChannel, customRoutes, layout) => {

let permsTokenRefreshInterval;

const store = APP.store;
if (configs.POSTGREST_SERVER) {
dataProvider = postgrestClient(configs.POSTGREST_SERVER);
authProvider = postgrestAuthenticatior.createAuthProvider(retPhxChannel);
Expand Down Expand Up @@ -234,6 +235,7 @@ const HiddenAppBar = withStyles({
document.addEventListener("DOMContentLoaded", async () => {
const socket = await connectToReticulum();

const store = APP.store;
if (store.state && store.state.credentials && store.state.credentials.token) {
setItaAuthToken(store.state.credentials.token);
try {
Expand Down
3 changes: 2 additions & 1 deletion admin/src/react-components/service-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import LinearProgress from "@material-ui/core/LinearProgress";
import clsx from "classnames";
import { Title } from "react-admin";
import theme from "../utils/sample-theme";
import { store } from "hubs/src/utils/store-instance";
import { getStore } from "hubs/src/utils/store-instance";
import withCommonStyles from "../utils/with-common-styles";
import {
getEditableConfig,
Expand Down Expand Up @@ -649,6 +649,7 @@ const AppConfigEditor = withStyles(styles)(
class AppConfigEditor extends ConfigurationEditor {
constructor(props) {
super(props);
const store = getStore();
if (store.state && store.state.credentials && store.state.credentials.token) {
AppConfigUtils.setAuthToken(store.state.credentials.token);
}
Expand Down
Loading
Loading