https://discord.gg/botpress logo
Override Webchat for custom frontend
# 🤝help
f
Hi everyone, I was wondering if anyone had any experience with developing homegrown frontend with JS for the Botpress workflow logic and overriding the webchat feature? Could I use the Chat integration to achieve this?
s
Say more? Need a bit more context/info to understand what you mean. Like, you want to use Botpress Logic, but don't want to use the Webchat embed?
f
Yes exactly - is there a way to continue using the botpress workflow logic engine but build a separate frontend?
s
So yes, it can be done, i've done it myself, however... There are easy (but janky) ways to do it, and there are proper ways to do it. Either way, it takes a good bit of time and you become at the mercy of Botpress. The proper way to do it would be using the Botpress Chat API. There's plenty of documentation for it but definitely has a learning curve, however this is made a bit easier when developing with an AI coding buddy. The easy (but janky) way to do it would just be styling webchat with CSS which is super simple if you have a basic understanding of CSS. You can also us JS to add elements to the existing webchat, remove elements, change elements, etc. Either way, you will still have to do active ongoing development and maintenance. The easy way requires less maintenance and is generally set and forget until you want to use a new Webchat version. The proper way requires more maintenance as there are multiple updates to the Chat API every month as far as i'm aware. It entirely depends on what you are looking to achieve and how much time/work you're willing to put into it. Do you just not like the look of the webchat interface? Or are you trying to add more features to the webchat interface that it doesn't already have.
f
Thank you for your thoughtful answer! I'm an intern at a startup and they're trying to build a more unique-looking UI that's not just a chat window, but they want to keep the workflows that have already been built. They want to do away with the webchat in order to achieve a better-looking frontend. In your opinion would it be better to continue using Botpress for this use case despite all the changes?
s
For the sake of time and effort, I would just stick with Botpress. There are plenty of other bot builders just like it, but not many as user/developer friendly. I have no idea what your startup is looking to achieve, but any UI is possible using webchat. You can make standard webchat look however you want it to look. You can add your own watermark, text elements, features, etc. You can style it however you want it to look. Just takes a bit of creativity and knowhow. If AI is the sole purpose of the startup, I recommend just coding everything from scratch, don't use Botpress or any other bot builder. Design, code and implement your own logic onto your own interface, and use any AI API for your Personality Agent and implement some form of vector storage/semantic search. That way you can optimise, refine & style to your needs and you're not restricted in feature set or paywalled. If AI is not the sole purpose of the startup, just stick with Botpress. You can do literally anything you would need to do with webchat using CSS/JS and Botpress built-ins. Developing it to how you want it to look is super simple, even when you have to update to a new version of webchat. No point reinventing the wheel. If you have any specific ways you want to change the webchat UI, let me know, I could probably point you in the right direction of achieving what you want to achieve.
l
Yes, it's possible, and as @sparse-eve-63408 mentioned, it will take effort in understanding the documentation to build one https://cdn.discordapp.com/attachments/1399819383651696740/1399849097883553814/image.png?ex=688a7e90&is=68892d10&hm=0e23f4a8bf575dda25a657407395a9233f2d98318c6b4b09347983aa630153c5&