What is frontend setup?
Frontend setup involves adding the AI extension to the Atoti UI. This extension provides the user interface components for AI features like Visualize This and Auto-Explain.Why set up the frontend?
Setting up the frontend enables the following capabilities:- Display the AI assistant interface in the Atoti UI
- Enable natural language interaction with data
- Provide UI components for AI-powered features
- Create a seamless user experience for AI features
Prerequisites
Before setting up the frontend, ensure the following requirements are met:- Backend AI features are configured (Visualize This and/or Auto-Explain)
Setup for integrated frontend
Use this approach when the Atoti UI is integrated with the Java application.Add the UI dependency
Add the Atoti UI dependency to the project. Add the following topom.xml:
Add the AI extension
Create the extensions configuration filesrc/main/resources/static/atoti-ui/extensions.json, or open it if it already exists. Add an @activeviam/ai-extension entry to its JSON object, with the value extensions/@activeviam/ai-extension/extensionEntry.js.
Verify the setup
After completing the setup, verify that the AI extension is available:- Build the project
- Start the Atoti application
- Open the Atoti UI in a browser
- Check that the AI assistant appears in the interface
Setup for standalone frontend
Use this approach when the Atoti UI runs as a separate application without a build zip.Add the AI extension to the application
Create the standalone application as described in Set up Atoti UI. Then, in itspackage.json:
- Add
@activeviam/ai-extensiontodependencies, at the version of Atoti UI being used. - Pass
./node_modules/@activeviam/ai-extensionto the--extensionsoption ofatoti-ui-cli build-application, next to the application’s own extensions.
antd to 5.6.4 through the overrides of pnpm-workspace.yaml.
Build and start
Install the dependencies withnpm install, then build and start the frontend with npm run build and npm start.
Verify the setup
After starting the frontend, verify that the AI extension is available:- Open the Atoti UI in a browser (typically at
http://localhost:3000) - Check that the AI assistant appears in the interface
Troubleshooting
If the AI extension does not appear, check the following:- The backend AI features are properly configured
- The extensions.json file is in the correct location
- The file contains valid JSON
- The Atoti UI version is compatible with the AI extension
- The browser cache is cleared
Related reading
After setting up the frontend, proceed to use AI features:- Use Visualize This to create visualizations
- Use Auto-Explain to analyze data variations