Thousands of small businesses have become economically unsustainable due to the effects of Covid-19. For older business owners who are not technologically savvy or whose english is not their first language, they cannot contract someone to build their website or have a hard time using services like Wix or Wordpress.
We built a POC in a previous hackathon and have decided to expand upon it by moving towards a production infrastructure (hosting state in dynamodb, having api behind api gateway/lambdas, and hosting user images on amazon s3). We have also added more languages to our localization, vietnamese, korean, spanish along with the original English and Chinese.
What it does
The Messenger bot opens up upon the creation of a new Facebook page and talks to the creator asking if the creator would like to create an external webpage for their business. The chat is very simple and is offered in multiple languages to cater to those whose english is not their first language. The user fills in information which is dynamically added to an external webpage supported by a free Github page or in the future we plan to host it under our own domain, making it free for the user. Upon completion of building the website, the user can open the chat for the option to edit the website.
How I built it
Our entry point is facebook messenger. Messenger contacts our backend api (nodejs) that stores/updates the user state (where they are in our conversation), and contacts wit ai to check on user intent. We then collect information from the user and generate a website json which a front end sit (react/bootstrap) consumes and displays the website.
For infrastructure, we have the backend components behind two lambdas. One to handle messenger/chat state and one to generate and deliver website json data. We need to build one more to handle dynamic infrastructure changes such as adding a subdomain to a website using route53. User data is stored in dynamodb, user images in S3, and site templates are in S3.
Challenges I ran into
As most of our members our students it's hard to find time to work on this project together. We designed this project so that it should be easy for most developers to hop in and assist so right now having a hand to help or a mentor to see if our architecture is sound would be nice as we spend a lot of time researching as we are still pretty new.
Coding challenges: Synchronization issues with dynamodb/multiple events coming in from facebook and getting data to be in order. State management is pretty complex even for a linear flow and we would like to clean it up.
What's next for WebCreator Bot
As we move to a scalable/prod architecture. We have noticed that some companies (like facebook) you can request specific access to generate facebook pages if you speak to their community manager. This can expand possibility of what this APP can do for their users. Such as generating a FB page for the business and website with description in one go. We plan to talk to other companies like square, grubhub, ubereats to see if any of them can integrate with our bot and allow users to easily setup their service on their platforms as well.
Right now state management is pretty linear, although NLP helps with a more natural flow for changing data and adding data, we have not developed a way to move from the linearity of the initial creation. So our plan is to change this and look into a mechanism to jump back to website creation state where they left off if a user asks a question for example.
More themes! Right now we only support one theme for a restaurant. We can bootstrap more websites and make a website for webcreator for people to use our sdk to generatee a bootstrap website, and share their designs so people can select them for their site!
Github link for those interested. https://github.com/Keydex/MessengerWebBot/tree/update-middleware-api
I stream development of this bot here! https://www.twitch.tv/khyodo_
Feel free to contact me if you'd like to help out working on it or have any questions! Excited to move this to a full prod/scale!