Autodesk-Forge / forge-react-boiler.nodejs

React and Node.js boilerplate examples collection: Provides a boilerplate project for using the Forge APIs in a modern React + Node.js web application
MIT License
54 stars 24 forks source link

OAuth2 Data-Management Model-Derivative Viewer

About Forge React Boiler

A boilerplate project to quickly get started using Autodesk Forge Platform Web Services in a modern React + Node.js Web Application. The base project is initially derived from the React Redux Starter Kit.

Thumbnail

thumbnail

React Support

React >= 0.13.x

Browser Support

Forge React Boiler is responsive, mobile friendly and has been tested on the following browsers:

Running the sample

Configuration is controlled by NODE_ENV environment variable, make sure to set it properly to development or production, based on the configuration type you want to run.

In development, the client is dynamically built by the webpack-dev-middleware, so just run:

In production, the client requires a build step, so run:

Loading custom models in the Forge Viewer

The project contains a default model located in /resources/models/seat that can be loaded with no further setup and will also work offline.

If you want to load a model from Autodesk Cloud, you first need to generate a viewable URN as documented in the Prepare a File for the Viewer tutorial.

Using the same Forge ClientId & ClientSecret used to upload the model, populate environment variables used by the config files (in /config):

Restart the server, you can then directly load your model by specifying design URN as query parameter in the url of the viewer page:

http://localhost:3000/viewer?urn=YOUR_URN_HERE

Deploy to Heroku

Use your Forge ClientId & ClientSecret obtained while Creating a new Forge App

And Press Deploy button below:

Deploy

Wait for a while once the Heroku App has been deployed as the client needs to be built after the first run

More about Autodesk Forge Platform and Web Applications of the future?

Check it out at developer.autodesk.com.

Look at our Quickstarts Guide to find the Forge SDK's for the programming language of your choice.

About the Author

https://twitter.com/F3lipek

Web Applications using Forge React Boiler

(Feel free to add your own by submitting a pull request...)