{"id":20382685,"url":"https://github.com/autodesk-forge/forge-tokenflex-export","last_synced_at":"2025-04-12T08:53:54.404Z","repository":{"id":39563455,"uuid":"145627869","full_name":"Autodesk-Forge/forge-tokenflex-export","owner":"Autodesk-Forge","description":"A boilerplate Forge app to report on TokenFlex usage data","archived":false,"fork":false,"pushed_at":"2023-03-18T13:39:15.000Z","size":2567,"stargazers_count":4,"open_issues_count":31,"forks_count":7,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-12T08:53:48.761Z","etag":null,"topics":["autodesk-tokenflex","koa2","nodejs","vuejs"],"latest_commit_sha":null,"homepage":"https://tokenflex-consumption-report.herokuapp.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Autodesk-Forge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-21T22:54:59.000Z","updated_at":"2023-03-14T14:47:34.000Z","dependencies_parsed_at":"2023-01-31T20:46:03.097Z","dependency_job_id":null,"html_url":"https://github.com/Autodesk-Forge/forge-tokenflex-export","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-tokenflex-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-tokenflex-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-tokenflex-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-tokenflex-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Autodesk-Forge","download_url":"https://codeload.github.com/Autodesk-Forge/forge-tokenflex-export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543882,"owners_count":21121838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autodesk-tokenflex","koa2","nodejs","vuejs"],"created_at":"2024-11-15T02:18:37.307Z","updated_at":"2025-04-12T08:53:54.383Z","avatar_url":"https://github.com/Autodesk-Forge.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# consumption-reporting-vue-koa-app\n\n[![TokenFlex](https://img.shields.io/badge/TokenFlex-v1-green.svg)](https://forge.autodesk.com/en/docs/tokenflex/v1/overview/)\n[![koa2](https://img.shields.io/badge/koa-2-green.svg)](https://github.com/koajs/koa)\n[![vuetify](https://img.shields.io/badge/Vuetify-1.3-blue.svg)](https://github.com/vuetifyjs/vuetify)\n[![oauth](https://img.shields.io/badge/passport--oauth-1-brightgreen.svg)](https://github.com/jaredhanson/passport-oauth)\u003cbr/\u003e\n[![travisCI](https://travis-ci.org/dukedhx/consumption-reporting-vue-koa-app.svg?branch=master)](https://travis-ci.org/dukedhx/consumption-reporting-vue-koa-app)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![codebeat badge](https://codebeat.co/badges/d26ae8ba-e166-4f2a-9357-52d7c126391a)](https://codebeat.co/projects/github-com-dukedhx-consumption-reporting-vue-koa-app-master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/79b42eaa59c06ec13703/maintainability)](https://codeclimate.com/github/dukedhx/consumption-reporting-vue-koa-app/maintainability)\n[![MIT](https://camo.githubusercontent.com/b323cc1dc1fbf413e36d79b86abc71b68b648e4b/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f767565746966792e737667)](https://opensource.org/licenses/MIT)\u003cbr/\u003e\n[![zenhub](https://camo.githubusercontent.com/7e10f7ff8cd1064be463e8846910c6a2aa2d2567/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d616e616765645f776974682d5a656e4875622d3565363062612e737667)](https://app.zenhub.com/workspace/o/dukedhx/consumption-reporting-vue-koa-app/)\n[![Stackoverflow](https://img.shields.io/badge/ask-stackoverflow-yellow.svg)](https://stackoverflow.com/questions/ask?tags=%5bautodesk-forge)\n\n\n\n## Description\n\nDemonstrates how to build custom reports using Forge TokenFlex API.\n\nUses [3-legged oAuth2](https://forge.autodesk.com/en/docs/oauth/v2/tutorials/get-3-legged-token/) to authenticate with Forge. Uses [chart.js](http://www.chartjs.org/) and [Google Maps](https://developers.google.com/maps/documentation/javascript/tutorial) API to create usage dashboard.\n\n### Thumbnail\n![Thumbnail](/thumbnail.png)\n\n### [Live Demo](https://tokenflex-consumption-report.herokuapp.com)\n\n### Pre-requisites\n\n- Forge Account: Learn how to create a Forge Account, activate subscription and create an app at [this tutorial](http://learnforge.autodesk.io/#/account/)\n- Node.js \u003e= 8.0\n- Internet connectivity to the Google Map API\n- Tested to be working on: Chrome, Safari, Firefox and IE Edge\n- A Google API Key for Google Maps, you can get one [here](https://developers.google.com/maps/documentation/javascript/get-api-key)\n- When logging into the web dashboard, you should login with the Autodesk ID of a contract manager or software coordinator to gain access to the contracts' usage data. If you login with a user that does not have such roles, the API will return no data.\n- In order to access TokenFlex API, your contract manager needs to login in the accounts portal and assign the Forge subscription to the Forge account user. Before he can assign the subscription he will need to unassign the subscription from his user account. Contact your account manager for assistance.\n\n### Setup\n\n- Create a Forge App with access to the ```Misc API```.\n\n- Clone this project or download it. It's recommended to install [GitHub desktop](https://desktop.github.com/). To clone via command line, use the following (**Terminal** on MacOS/Linux, **Git Shell** on Windows):\n```\ngit clone https://github.com/Autodesk-Forge/tokenflex-nodejs-report.webapp\n```\n- Initialize and install the dependencies\n```bash\nexport FORGE_CLIENT_ID=[YOUR_CLIENT_ID]\nexport FORGE_CLIENT_SECRET=[YOUR_CLIENT_SECRET]\nexport FORGE_CALLBACK_URL=[YOUR_CALLBACK_URL]\nexport GoogleAPIKey=[YOUR_GOOGLEAPI_KEY]\nnpm install\n```\n\n### Running Locally\n\n- To run the front end with the Vue LiveServer (see it live at http://localhost:8080/):\n```bash\nnpm run serve\n```\n\n- To run the app in dev mode (see it live at http://localhost:5000/):\n```bash\nnpm run dev\n```\n\n### Debug Options\n\n\nTo apply new Client ID/Secret or Callback URL, run below to recreate the config file\n```bash\nnpm run init '[YOUR_CLIENT_ID]' '[YOUR_CLIENT_SECRET]' '[YOUR_CALLBACK_URL]' '[YOUR_GOOGLEAPI_KEY]'\n```\n\nTo build the front end (Compiler will emit build outputs to ```./www```):\n```bash\nnpm run build\n```\n\nTo run both the front and back ends in single APP mode, you will need to have built the front end beforehand (see it live at http://localhost:8080/):\n```bash\nNODE_ENV=production npm run init '[YOUR_CLIENT_ID]' '[YOUR_CLIENT_SECRET]' '[YOUR_CALLBACK_URL]' '[YOUR_GOOGLEAPI_KEY]'# Settimg up prod config for first time use\nnpm run prod\n```\n\nTo [lint](http://javascriptlint.com/) the source code:\n```bash\nnpm run lint # eslint with Javascript Standard Style for frontend code\nnpm run standard # eslint with Javascript Standard Style for backend code\n```\n\nOptional Environment Variables, leave them empty for default values:\n- FORGE_AUTH_URL\n- FORGE_TOKEN_URL\n- TOKENFLEX_PATH\n- TOKENFLEX_API_HOST\n- LOGOUTACCOUNT_URL\n- VUE_HOST\n\n### Deployment\n\nTo deploy this application to [Heroku](https://heroku.com/), make sure the following [config vars](https://devcenter.heroku.com/articles/config-vars) are set up correctly:\n- *FORGE_CLIENT_ID*\n- *FORGE_CLIENT_SECRET*\n- *FORGE_CALLBACK_URL*\n- *GoogleAPIKey*\n\nAnd **FORGE_CALLBACK_URL** must follow the pattern below and match the one set for your Forge APP:\n ```\n \u003cnameofyourapp\u003e.herokuapp.com/api/forge/oauth\n ```\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?template=https://github.com/mazerab/consumption-reporting-vue-koa-app)\n\nWatch [this video](https://www.youtube.com/watch?v=Oqa9O20Gj0c) on how to deploy samples to Heroku.\n\n### Further Reading\n\nDocumentation:\n\n* [Authentication API](https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/overview/)\n\nTutorials:\n\nBlogs:\n\n* [Forge Blog](https://forge.autodesk.com)\n\nOther samples:\n\n* [Python script](https://github.com/mazerab/forge-consumption-reporting-sample) to download usage data to CSV file\n\nFor any questions regarding this sample or the technologies involved, ask a question on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=%5bautodesk-forge,forge-tokenflex) or email to \u003ca href=\"mailto:forge.help@autodesk.com?subject=Question on Tokenflex\u0026body=Just have a question regarding the tokenflex-reporting-python-script sample: \"\u003eAutodesk Forge Developer Advocates\u003c/a\u003e.\n\n### License\n\nThis sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). Please see the [LICENSE](LICENSE) file for full details.\n\n\n### Authors\n\n- Bastien Mazeran [@BastienMazeran](https://twitter.com/BastienMazeran)\n- Bryan Huang [@LinkedIn](https://linkedin.com/in/bryan-huang-1447b862)\n\nSee more at [Forge blog](https://forge.autodesk.com/blog).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fforge-tokenflex-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautodesk-forge%2Fforge-tokenflex-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fforge-tokenflex-export/lists"}