Fastify backend for MoMicro Assist with Firebase auth, Stripe premium billing, chatbot management, public widget embeds, websocket messaging, AI replies, and local vector search.
npm start- Swagger UI:
/docs - Firebase auth page:
/static/auth.html - Widget script:
/chat/script/:chatbotId - Widget iframe:
/chat/iframe/:chatbotId
- Authenticate with Firebase and exchange the Firebase token for a backend session at
/v1/auth/session. - Create a chatbot in
/v1/chatbots. Setsettings.defaultLanguage(for exampleenglish,german,french) and provide text fields in that language. To list allowed languages, useGET /v1/chatbots/languages. To edit only one translated language without GPT retranslation, usePATCH /v1/chatbots/:chatbotId/languages/:language. - Publish it and install it with the snippet from
/v1/chatbots/:chatbotId/install. You can force widget language from website via?lang=on embed URL (/chat/script/:chatbotId?lang=enor/chat/iframe/:chatbotId?lang=german). - Start a chatbot trial with
/v1/subscription/trialor buy a chatbot tier with/v1/subscription/checkout(chatbotIdis required,tierIdsupportsauthandfullby default). - Upload
pdf,txt, orjsonfiles to/v1/chatbots/:chatbotId/files(fulltier or trial by default).
free: manual chat only, noauthClient, no AI, no knowledge files.auth:$20/mo, enablesauthClientconversations without AI.full:$50/mo, enablesauthClient, AI replies, and knowledge files.- You can extend or override tiers with
BILLING_TIER_DEFINITIONSJSON, and configure default Stripe prices withSTRIPE_AUTH_PRICE_IDandSTRIPE_FULL_PRICE_ID.