Using Forge Viewer, you have the option of a Headless one, the option to add your own logo and get rid of extension that interact with the viewer is possible. I created a demonstration of this scenario using React on the Front End, Redux to handle states for Properties metadata access and NodeJS (Express) together with React-Scripts to handle the authentication and access to the use of the Forge services.
The available Extensions once in Full Screen mode are.
This sample show a simple integration of the Viewer in a headless way with custom made extensions. The front-end will look like:
The 6 models will need to translated and hosted on your own bucket. This will change the URN values that will need to be subtitued here. URN Gallery JSON
Feel free to use your own models in the Gallery.
The Restore State functionality is hardcoded for the specific models. You will need to get the State for each of your models and pass the new JSON value at this location Restore State JSON
Follow these instructions to get the app running locally:
git clone
this repositorycd
into the project's directoryserver/credentials.js
with your credentials, follow this templatenpm install
npm run watch
This will get a server running locally, open http://localhost:3000
on your browser to see the app running.
To run this app in production mode, run npm run build
and then npm start
in a production environment.
If you try to deploy this on Heroku, we set a postinstall
script that will run the build
script, so there is no need to run it again, simply let Heroku run npm start
(which it does automatically) and you'll be good to go.
To deploy this project to Heroku, be sure to set your environment variables in the dashboard:
FORGE_CLIENT_ID
FORGE_CLIENT_SECRET
This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
Jaime Rosales D.
Forge Partner Development
Forge Developer Portal