Skip to main content

Installation

This guide provides comprehensive installation instructions for integrating FlowX.AI UI Toolkits into your Angular or React application. Follow the framework-specific steps to set up the toolkit with all required dependencies and configuration.

System requirements

Before installing, verify your development environment meets these requirements:

Required software

  • Node.js: Version 16.x or higher (18.x recommended)
  • npm: Version 8.x or higher, or equivalent package manager (yarn, pnpm)
  • Git: For version control and package installation

Framework requirements

  • Angular CLI 14.x or higher
  • Angular 14.x - 17.x (depending on toolkit version)
  • TypeScript 4.6 or higher
  • RxJS 7.x

FlowX.AI platform access

  • Active FlowX.AI platform instance
  • API endpoint URL
  • Valid authentication credentials
  • Process definition access

Verify Node.js and npm

Check your installed versions:
node --version  # Should output v16.x.x or higher
npm --version   # Should output 8.x.x or higher
If you need to upgrade Node.js, download the latest LTS version from nodejs.org.

Installation steps

1

Install the Angular UI Toolkit package

Install the toolkit package matching your FlowX.AI platform version:
# Install latest version (5.5.0)
npm install @flowx/angular-ui-toolkit@latest

# Or install a specific version
npm install @flowx/[email protected]

# For LTS version (4.7.11)
npm install @flowx/[email protected]
2

Install peer dependencies

The toolkit requires specific peer dependencies. Install any missing packages:
npm install @angular/common @angular/core rxjs
Most Angular projects already have these dependencies. Check your package.json to verify.
3

Import the FlowX module

Add the FlowX module to your application module:
app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { FlowxModule, FlowxConfig } from '@flowx/angular-ui-toolkit';
import { AppComponent } from './app.component';
import { environment } from '../environments/environment';

const flowxConfig: FlowxConfig = {
  apiUrl: environment.flowxApiUrl,
  processApiPath: '/process',
  authToken: environment.flowxAuthToken,
  locale: 'en-US',
  translationsPath: '/assets/i18n'
};

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    FlowxModule.forRoot(flowxConfig)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
4

Configure environment variables

Store your FlowX.AI configuration in environment files:
environment.ts
export const environment = {
  production: false,
  flowxApiUrl: 'https://dev-api.flowx.example.com',
  flowxAuthToken: 'your-development-token'
};
environment.prod.ts
export const environment = {
  production: true,
  flowxApiUrl: 'https://api.flowx.example.com',
  flowxAuthToken: ''  // Set via environment variable in production
};
Never commit authentication tokens to version control. Use environment variables or secure configuration management in production.
5

Import stylesheets

Add the toolkit styles to your angular.json:
angular.json
{
  "projects": {
    "your-app-name": {
      "architect": {
        "build": {
          "options": {
            "styles": [
              "src/styles.scss",
              "node_modules/@flowx/angular-ui-toolkit/styles/main.scss"
            ],
            "scripts": []
          }
        }
      }
    }
  }
}
Alternatively, import in your global styles.scss:
styles.scss
@import '@flowx/angular-ui-toolkit/styles/main';
6

Set up assets (optional)

If using internationalization, configure translation files:
angular.json
{
  "projects": {
    "your-app-name": {
      "architect": {
        "build": {
          "options": {
            "assets": [
              "src/favicon.ico",
              "src/assets",
              {
                "glob": "**/*",
                "input": "node_modules/@flowx/angular-ui-toolkit/assets/i18n",
                "output": "/assets/i18n"
              }
            ]
          }
        }
      }
    }
  }
}

Configuration options

The FlowX configuration object accepts these properties:
PropertyTypeRequiredDescription
apiUrlstringYesBase URL of your FlowX.AI platform API
processApiPathstringYesPath to process API endpoints (typically /process)
authTokenstringYesAuthentication token for API requests
localestringNoDefault locale for internationalization (default: en-US)
translationsPathstringNoPath to translation files for i18n
timeoutnumberNoRequest timeout in milliseconds (default: 30000)
retryAttemptsnumberNoNumber of retry attempts for failed requests (default: 3)
enableLoggingbooleanNoEnable debug logging (default: false in production)

Example advanced configuration

const flowxConfig: FlowxConfig = {
  apiUrl: 'https://api.flowx.example.com',
  processApiPath: '/process',
  authToken: getAuthToken(), // Function that retrieves token securely
  locale: 'en-US',
  translationsPath: '/assets/i18n',
  timeout: 45000,
  retryAttempts: 5,
  enableLogging: !environment.production
};

Verify installation

Confirm the toolkit is installed correctly:
# Angular
npm list @flowx/angular-ui-toolkit

# React
npm list @flowx/react-ui-toolkit
The build should complete without errors. Check for:
  • No dependency resolution errors
  • No TypeScript compilation errors
  • Styles properly bundled in output

Troubleshooting

Peer dependency conflicts

If you see peer dependency warnings:
npm install --legacy-peer-deps
Or update conflicting packages to compatible versions.

Module resolution errors

For TypeScript module resolution issues, update your tsconfig.json:
tsconfig.json
{
  "compilerOptions": {
    "moduleResolution": "node",
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true
  }
}

Style import issues

If styles don’t load:
  1. Verify the CSS/SCSS file path in your imports
  2. Check that your build tool processes CSS files
  3. Clear build cache and rebuild: rm -rf dist node_modules/.cache && npm run build

Authentication errors

If you get 401/403 errors:
  1. Verify your authentication token is valid
  2. Check token hasn’t expired
  3. Confirm API URL is correct and accessible
  4. Verify CORS settings on your FlowX.AI platform instance

Next steps

Usage guide

Learn how to use FlowX components in your application

Theming

Customize the look and feel to match your brand

Build docs developers (and LLMs) love