AISocialInbox&CRM
Aproduction-ready,multi-tenantSaaSCRMthatletsNepalibusinessesmanageFacebook,Instagram,WhatsAppandTikTokcustomerconversationsfromasingleAI-poweredinbox—replyingtoDMsinstantlyinNepali,capturingleads,andautomatingsalesconversations.–Builtamulti-tenantarchitecturewithrole-basedaccesscontrol(superadmin/shop-admin/staff),per-shopdataisolation,plan-basedaccountlimits,andasuperadminplatformconsoleformanagingtenants,plansandglobalconfiguration.–Engineeredafirst-partyMetaintegration(nothird-partymiddleware):FacebookLoginOAuthflow,securesigned-stateCSRFprotection,automaticdiscoveryofPages&linkedInstagramBusinessaccounts,anddual-secret(FB+Instagram)webhooksignatureverification—handlingtheplatform-specificroutingquirksofMessengervs.InstagramDirect.–DevelopedanAIauto-replyenginepoweredbyGoogleGeminithatgeneratescontext-awarerepliesinNepali(Devanagari),withaconfigurablesystemprompt,keyword-basedreplypatterns(price,delivery,availability,discounts),per-accountAI/human/hybridmodes,andmonthlyusagequotasenforcedperplan.–Implementedareal-timeunifiedinboxwithinboundwebhookingestionthatroutesmessagestothecorrecttenant,auto-fetchescustomerprofilenames&photosfromtheGraphAPI,capturesleads(name,phone,location)fromconversations,andpersistsfullconversationhistory.–Createdaone-clickaccountconnectionexperience:OAuth-discoveredPages/Instagramaccountsarepresentedinapicker,profilephotosarere-hostedtoCloudinaryforpermanence,andlong-livedpagetokensarestoredsecurelyserver-sidewithexpirytracking—usersnevercopytokensbyhand.–Designedthefull-stackinfrastructurewithTanStackStart(SSR+type-safeserverfunctions),DrizzleORMoverPostgreSQL,BetterAuthforsessions,Cloudinaryformedia,andacustomthemingsystem.
TechnologiesUsed

AboutThisProject
Aproduction-ready,multi-tenantSaaSCRMthatletsNepalibusinessesmanageFacebook,Instagram,WhatsAppandTikTokcustomerconversationsfromasingleAI-poweredinbox—replyingtoDMsinstantlyinNepali,capturingleads,andautomatingsalesconversations.–Builtamulti-tenantarchitecturewithrole-basedaccesscontrol(superadmin/shop-admin/staff),per-shopdataisolation,plan-basedaccountlimits,andasuperadminplatformconsoleformanagingtenants,plansandglobalconfiguration.–Engineeredafirst-partyMetaintegration(nothird-partymiddleware):FacebookLoginOAuthflow,securesigned-stateCSRFprotection,automaticdiscoveryofPages&linkedInstagramBusinessaccounts,anddual-secret(FB+Instagram)webhooksignatureverification—handlingtheplatform-specificroutingquirksofMessengervs.InstagramDirect.–DevelopedanAIauto-replyenginepoweredbyGoogleGeminithatgeneratescontext-awarerepliesinNepali(Devanagari),withaconfigurablesystemprompt,keyword-basedreplypatterns(price,delivery,availability,discounts),per-accountAI/human/hybridmodes,andmonthlyusagequotasenforcedperplan.–Implementedareal-timeunifiedinboxwithinboundwebhookingestionthatroutesmessagestothecorrecttenant,auto-fetchescustomerprofilenames&photosfromtheGraphAPI,capturesleads(name,phone,location)fromconversations,andpersistsfullconversationhistory.–Createdaone-clickaccountconnectionexperience:OAuth-discoveredPages/Instagramaccountsarepresentedinapicker,profilephotosarere-hostedtoCloudinaryforpermanence,andlong-livedpagetokensarestoredsecurelyserver-sidewithexpirytracking—usersnevercopytokensbyhand.–Designedthefull-stackinfrastructurewithTanStackStart(SSR+type-safeserverfunctions),DrizzleORMoverPostgreSQL,BetterAuthforsessions,Cloudinaryformedia,andacustomthemingsystem.