- Abstract
- Context and Business Goals
- Stakeholders
- Technical Requirements
- Proposed Solution
- Key Features
- Implementation Plan
- Measuring Success
- Challenges and Trade-offs
- Getting Started
- Demo Showcase
- How it Works
- Application Flowchart
- Project Structure
This RFC proposes the development and implementation of the GenAiGraphics application aimed at revolutionizing the way users interact with complex technology set ups. By integrapting 3D graphics rendering and AI-driven interactions, GenAiGraphics will provide users with an intuitive, interactive and visual aid that simplifies the set up process, reduces user errors, and enhances overall user experience.
In today's fast-paced technological landscape, users are often faced with complex technology set ups that require a high level of technical knowledge and expertise to configure. This can be a daunting task for many users, leading to frustration, errors, and suboptimal user experience. GenAiGraphics aims to address this challenge by providing users with an intuitive, interactive, and visual aid that simplifies the set up process and enhances overall user experience.
The key business goals of GenAiGraphics are as follows:
- Reducing Errors and Support Costs
- Enhancing User Experience and Satisfaction
- Streamlining the Set Up Process for novices and expert users
- Providing a Competitive Edge in the Market
- Product Team : Ensures the solution aligns with the product vision and goals
- Development Team : Responsible for the implementation and deployment of the solution
- Users : The end users who will interact with the GenAiGraphics application
To accurately capture the 3D graphics we conducted extensive user research, gathered feedback from customer support, and reviewed existing literature on 3D graphics rendering and AI integration.
The Key technical requirements for GenAiGraphics are as follows:
- 3D Graphics Rendering : Utiliazation of WebGL and Three.js to render high-quality interactive 3D graphics
- AI Chat Functionality : Integration with Azure ML Prompt Flow for intelligent, responsive chat interactions.
- User-Friendly Interface : Development using the Astro framework and Tailwind CSS for a seamless and visually appealing user experience.
- Scalability and Performance : Ensuring the application can handle a large number of users and complex models efficiently.
- Robust backend : An Express server to manage API reuqests and data storage.
- Phase 1: Research and Planning
- Conduct user research to identify user needs and gather feedback from stakeholders
- Define the scope, requirements, and timeline for the project
- Phase 2: Development
- Build the front-end interface using the Astro framework and Tailwind CSS
- Develop the core WebGL class using Three.js
- Integrate the Azure ML Prompt Flow API for AI chat functionality
- Set up the Express server for backend support
- Phase 3: Testing and Iteration
- Conduct extensive testing to ensure the application is bug-free and user-friendly
- Gather feedback from beta users and iterate on the design
- Phase 4: Deployment
- Deploy the application to a Azure cloud server
- Monitor performance and user feedback to make further improvements
- Helps users visually navigate technology setups, such as configuring a router. Relevant 3D models are loaded, zoomed in, and rotated based on the user's queries to demonstrate specific actions like plugging in, turning on/off, or resetting devices.
- Utilizes Three.js within a core WebGL class to manage rendering, scenes, camera control, resizing events, and frame animations.
- Frontend is built with Astro, featuring distinct pages and reusable components. TailwindCSS is integrated for styling, and server-side settings are configured for API proxying.
- AI-driven chatbot powered by Azure ML Prompt Flow handles user queries and provides intelligent responses and recommendations.
- An Express server acts as middleware, managing API requests using Axios, handling CORS, and logging requests.
- Employs TypeScript for static typing and robust tooling. Npm scripts manage build and development processes efficiently.
- TailwindCSS is integrated for rapid UI development with utility-first CSS.
- Conduct user research and gather feedback from stakeholders
- Define the scope, requirements, and timeline for the project
- Develop the front-end interface using the Astro framework and Tailwind CSS
- Build the core WebGL class using Three.js
- Integrate the Azure ML Prompt Flow API for AI chat functionality
- Set up the Express server for backend support
- Conduct extensive testing and gather feedback from beta users
- Deploy the application to an Azure cloud server
- Monitor performance and user feedback to make further improvements
The success of the GenAiGraphics application will be measured based on the following key metrics:
- User Engagement: The number of users interacting with the application and the average session duration.
- Error Reduction: Reduction in the number of support tickets related to technology set up issues.
- Engagement: User engagement metrics such as time spent on the application and interaction rates.
- Performance: System performance metrics such as response time and scalability.
- Complex of 3D Models: Ensuring the 3D models are both realistic and performant and can be challenging.
- AI Integration: Providing accurate and helpful AI responses requires robust training and fine-tuning of the models.
- Performance vs Realism: Balancing performance and realism of the 3D models with the need for a responsive and performant application.
- Development Time vs Features: Prioritizing key features to ensure a timely launch while planning for future enhancements.
Clone the repository:
git clone https://github.com/mollybeach/genaigraphics.git
cd genaigraphics
cd webapp
npm install
npm run start
- The user types a question into the ChatBar Component and submits it.
- The store.js triggers the updateMessagesStateEvent(), setting the $question store, adding the message to $historyMessages, and calling threejsCanvasEvent("loadingcircle") to display a loading indicator.
- The store.js then calls postAzureMLMessagesData() to send the question and chat history to Azure ML.
- Azure ML processes the input and responds with relevant data.
- On success, store.js sets $botResponse, adds the AI response to $historyMessages, and calls updateAnimationsStateEvent().
- azureML.js handles further processing by sending the chat history to Azure ML for - animation and recommendation commands.
- Azure ML returns animation commands, which store.js uses to update animations via threejsCanvasEvent().
- It also fetches recommendation commands and updates the recommendations.
- The threejsCanvasEvent(command) in store.js calls mapAssetAttributesByCommand(command), setting $animationAsset and $canvasTitle, and initializes ThreeCanvas.instance.
- ThreeCanvas class initializes the 3D scene, loads assets based on attributes, and supports various asset types like glb, fbx, mp4, png, multipleGlbs, and multipleMp4s. It adds necessary lighting and controls for an interactive experience.
- The ChatMessages Component subscribes to $historyMessages to render messages with typing animations.
- The ChatRecommendationBar Component subscribes to $recommendations to display recommendation buttons.
- The ChatBar Component updates the textarea with selected recommendations, ensuring smooth user interaction.οΈ
Start
|
v
+-------------------------------+
| ChatBar Component |
| - User types a question |
| - User submits the question |
+-------------------------------+
|
v
+-------------------------------+
| store.js |
| - updateMessagesStateEvent() |
| - Sets $question store |
| - Adds message to $historyMessages |
| - Calls threejsCanvasEvent("loadingcircle") |
+-------------------------------+
|
v
+-------------------------------+
| store.js |
| - Calls postAzureMLMessagesData(question, $historyMessages.get()) |
+-------------------------------+
|
v
+-------------------------------+
| azureML.js |
| - postAzureMLMessagesData() |
| - Sends question and chat history to Azure ML |
| - Receives response from Azure ML |
+-------------------------------+
|
v
+-------------------------------+
| store.js |
| - On success: |
| - Sets $botResponse |
| - Adds AI response to $historyMessages |
+-------------------------------+
|
v
+-------------------------------+
| store.js |
| - Calls updateAnimationsStateEvent() |
+-------------------------------+
|
v
+-------------------------------+
| azureML.js |
| - postAzureMLAnimationsData() |
| - Sends question and chat history to Azure ML |
| - Receives animation command from Azure ML |
+-------------------------------+
|
v
+-------------------------------+
| store.js |
| - Calls updateRecommendationsStateEvent() |
+-------------------------------+
|
v
+-------------------------------+
| azureML.js |
| - postAzureMLRecommendationsData() |
| - Sends question and chat history to Azure ML |
| - Receives recommendations from Azure ML |
+-------------------------------+
|
v
+-------------------------------+
| store.js |
| - updateAnimationsStateEvent()|
| - Calls threejsCanvasEvent() with new command |
| - updateRecommendationsStateEvent() |
| - Sets $recommendations |
+-------------------------------+
|
v
+-------------------------------+
| threejsCanvasEvent(command) |
| - Calls mapAssetAttributesByCommand(command) |
| - Sets $animationAsset and $canvasTitle |
| - Initializes ThreeCanvas.instance |
+-------------------------------+
|
v
+-------------------------------+
| mapAttributes.js |
| - mapAssetAttributesByCommand(command) |
| - Retrieves attributes from commandMap and assetMap |
+-------------------------------+
|
v
+-------------------------------+
| commandMap.js |
| - Maps commands to assets |
+-------------------------------+
|
v
+-------------------------------+
| assetMap.js |
| - Defines asset details |
+-------------------------------+
|
v
+-------------------------------+
| ThreeCanvas |
| - Initializes 3D scene |
| - Loads asset based on attributes |
| - Supports various asset types (glb, fbx, mp4, png, multipleGlbs, multipleMp4s) |
| - Adds lighting and controls |
+-------------------------------+
|
v
+-------------------------------+
| ChatMessages Component |
| - Subscribes to $historyMessages |
| - Renders messages including typing animation |
+-------------------------------+
|
v
+-------------------------------+
| ChatRecommendationBar Component |
| - Subscribes to $recommendations |
| - Renders recommendation buttons |
+-------------------------------+
|
v
+-------------------------------+
| ChatBar Component |
| - Updates textarea with recommendation on click |
+-------------------------------+
|
v
End
+-------------------------------+
| Express Server |
| - Serves static files |
| - Handles API requests |
+-------------------------------+
|
v
+-------------------------------+
| /api/getSecret/:key |
| - Fetches secrets from Azure |
+-------------------------------+
|
v
| Azure Configuration Service |
| - Stores configuration data |
+-------------------------------+
+-------------------------------+
| Python Azure Function: |
| telecom_ai/__init__.py |
| - Handles AI chat processing |
| - Sends question and chat history to Azure ML endpoint |
| - Receives and processes AI response |
+-------------------------------+
|
v
+-------------------------------+
| Python Azure Function: |
| animation-helper/__init__.py |
| - Handles animation requests |
| - Sends question and chat history to Azure ML endpoint |
| - Receives and processes animation commands |
+-------------------------------+
|
v
+-------------------------------+
| Python Azure Function: |
| recommendation-helper/__init__.py |
| - Handles recommendation requests |
| - Sends question and chat history to Azure ML endpoint |
| - Receives and processes recommendations |
+-------------------------------+
Inside of GenAiGraphics project, you'll see the following folders and files:
genaipgraphics/
βββ .github/
β βββ workflows/
β βββ azure-static-web-apps-gentle-ocean-0e505290f.yml
β βββ main_vz-llm.yml
βββ dells-curry-python/
β βββ animation-helper/
β β βββ __init__.py
β β βββ function.json
β β βββ sample.dat
β βββ recommendation-helper/
β β βββ __init__.py
β β βββ function.json
β β βββ sample.dat
β βββ secrets-api/
β β βββ __init__.py
β β βββ function.json
β β βββ sample.dat
β βββ telecom_ai/
β β βββ __init__.py
β β βββ function.json
β β βββ sample.dat
β βββ .gitignore
β βββ host.json
β βββ requirements.txt
βββ webapp/
β βββ config/
β β βββ astro.config.mjs
β β βββ config.js
β β βββ pretter.config.cjs
β β βββ tailwind.config.cjs
β β βββ tsconfig.json
β βββ public/
β β βββ images/
β β β βββ png/
β β β β βββ bot.png
β β β β βββ user.png
β β β βββ readme/
β β β β βββ brand-agent.png
β β β β βββ cable-router.png
β β β β βββ home-page.png
β β β β βββ router-green-button.png
β β β βββ svg/
β β β βββ favicon.svg
β β βββ models/
β β βββ fbx/
β β β βββ model_RouterDiff.png
β β β βββ model_RouterNrm.png
β β β βββ model_RouterOriginal.fbx
β β βββ glb/
β β β βββ model_BoomBox.glb
β β β βββ model_CreditCard.glb
β β β βββ model_DesktopPC.glb
β β β βββ model_EmojiHeart.glb
β β β βββ model_FilmClapperBoard.glb
β β β βββ model_FolderIcon.glb
β β β βββ model_Laptop.glb
β β β βββ model_LowPolyPhone.glb
β β β βββ model_MovieReel.glb
β β β βββ model_MusicIcons.glb
β β β βββ model_PhoneCallIcon.glb
β β β βββ model_PhoneRingIcon.glb
β β β βββ model_Plane.glb
β β β βββ model_RemoteControl.glb
β β β βββ model_RollingBag.glb
β β β βββ model_SaveToCloud.glb
β β β βββ model_SecurityCamera.glb
β β β βββ model_Sports.glb
β β β βββ model_Television.glb
β β β βββ model_VideoGameController.glb
β β β βββ model_VideoGameController2.glb
β β β βββ model_WifiExtender.glb
β β β βββ model_WifiIcon.glb
β β β βββ model_LogoAccenture.glb
β β β βββ model_Router90DegreeRotation.glb
β β β βββ model_RouterCableTexture.glb
β β β βββ model_RouterLightBlinkTexture.glb
β β β βββ model_RouterNoTexture.glb
β β β βββ model_RouterResetButtonTexture.glb
β β βββ gltf/
β β β βββ model_RouterCableTexture.gltf
β β β βββ model_RouterLightBlinkTexture.gltf
β β β βββ model_RouterNoTexture.gltf
β β β βββ model_RouterResetButtonTexture.gltf
β β βββ glsl/
β β β βββ earth.glsl
β β β βββ sphere.glsl
β β βββ mp4/
β β β βββ model_PhoneBlack.mp4
β β β βββ model_PhoneBlue.mp4
β β β βββ model_PhoneColorsAll.mp4
β β β βββ model_PhoneColorsMauve.mp4
β β β βββ model_PhoneColorsRed.mp4
β β β βββ model_PhoneColorsWhite.mp4
β β β βββ model_PhoneColorsYellow.mp4
β β β βββ model_House.mp4
β β β βββ model_House1stHalf.mp4
β β β βββ model_House2ndHalf.mp4
β β β βββ model_House2nd.mp4
β β β βββ model_HouseZoom.mp4
β β β βββ model_Upsell1st.mp4
β β β βββ model_Upsell2nd.mp4
β β β βββ model_Upsell3rd.mp4
β β β βββ model_Upsell4th.mp4
β β β βββ model_Upsell5th.mp4
β β β βββ model_UpsellPhoneColorsMultiStep1st.mp4
β β β βββ model_UpsellPhoneColorMultistep2nd.mp4
β β βββ spjs/
β β βββ torus.spjs
β β βββ sphere.spjs
β βββ src/
β β βββ api/
β β β βββ azureML.js
β β βββ components/
β β β βββ animations/
β β β β βββ Canvas.astro
β β β β βββ CanvasBar.astro
β β β β βββ CanvasScene.astro
β β β βββ common/
β β β β βββ Box.astro
β β β β βββ Card.astro
β β β β βββ CardHeader.astro
β β β β βββ CardHolder.astro
β β β β βββ Container.astro
β β β βββ messages/
β β β β βββ Chat.astro
β β β β βββ ChatBar.astro
β β β β βββ ChatMessages.astro
β β β β βββ ChatRecommendationBar.astro
β β β βββ primitives/
β β β β βββ Button.astro
β β β β βββ Link.astro
β β β β βββ Svg.astro
β β β βββ templates/
β β β βββ Footer.astro
β β β βββ Header.astro
β β β βββ Hero.astro
β β βββ data/
β β β βββ assets
β β β β βββ fbxAssets.js
β β β β βββ glbAssets.js
β β β β βββ glslAssets.js
β β β β βββ mp4Assets.js
β β β β βββ multipleGlbsAssets.js
β β β β βββ multipleMp4sAssets.js
β β β β βββ spjsAssets.js
β β β βββ text
β β β β βββ sampleMessageData.js
β β β β βββ sampleRecommendationsData.js
β β β βββ assetMap.js
β β β βββ baseCommand.js
β β β βββ commandMap.js
β β βββ graphics/
β β β βββ core/
β β β β βββ WebGL.js
β β β βββ shader/
β β β β βββ fragmentShader.glsl
β β β β βββ vertexShader.glsl
β β β βββutils/
β β β β βββ OrbitControls.ts
β β β βββ ThreeCanvas.ts
β β βββ layouts/
β β β βββ Layout.astro
β β βββ pages/
β β β βββ agent.astro
β β β βββ index.astro
β β βββ stores/
β β β βββ store.js
β β βββ styles/
β β βββ classStyles.js
β β βββ svgStyles.js
β βββ types/
β β βββ env.d.ts
β β βββ env.d.ts
β β βββ glsl.d.ts
β βββ .env
β βββ package.json
β βββ server.cjs
β βββ README.md
βββ .gitignore
βββ README.md
Astro looks for .astro
or .md
files in the src/pages/
directory. Each page is exposed as a route based on its file name.
There's nothing special about src/components/
, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the public/
directory.
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:3000 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run astro ... |
Run CLI commands like astro add , astro check |
npm run astro -- --help |
Get help using the Astro CLI |
Feel free to check our documentation or jump into our Discord server. .