Skip to content

iTwin/transformations-api-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transformations Sample App

A React-based sample application demonstrating iTwin Platform Transformations Filter by Saved View transformation.

alt text

Prerequisites

  • Node.js 22
  • iTwin Platform account and application registration

Installation

  1. Clone the repository:
git clone https://github.com/iTwin/transformations-api-sample.git
cd transformations-sample
  1. Install dependencies:
npm ci
  1. Configure environment variables: Create a .env file in the root directory with the following variables:
IMJS_AUTH_CLIENT_CLIENT_ID=""
IMJS_AUTH_CLIENT_REDIRECT_URI="http://localhost:3000/sign-in"
IMJS_AUTH_CLIENT_LOGOUT_URI="http://localhost:3000/sign-out"
IMJS_AUTH_CLIENT_SCOPES="itwin-platform"
IMJS_AUTH_AUTHORITY="https://ims.bentley.com"

Fill in IMJS_AUTH_CLIENT_CLIENT_ID with your created SPA client id.

Getting Started

  1. Start the development server:
npm start
  1. Open your browser and navigate to http://localhost:3000

  2. Sign in with your iTwin Platform credentials

  3. Follow the step-by-step workflow:

    • Select source iTwin and iModel
    • Configure transformation settings
    • Process transformation
    • View results

Project Structure

src/
├── App.tsx                                     # Root component of the app
├── common/
│   ├── hooks/                                  # Custom hooks used in the app
│   │   └── transformationsHooks.ts             # Transformations API hooks
│   ├── library/                                # Various reusable functions
│   │   └── transformationsClient.ts            # Transformations API client
│   └── ui/                                     # UI components used in the App
└── filter-sample/                              # Filter by Saved View components
    ├── create-configuration/                   # UI components used to configure and run transformation
    ├── view-progress/                          # UI components used to track transformation progress
    └── view-results/                           # UI components used to open viewer to inspect transformation results

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Additional Resources

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published