AISocialInbox&CRM

Aproduction-ready,multi-tenantSaaSCRMthatletsNepalibusinessesmanageFacebook,Instagram,WhatsAppandTikTokcustomerconversationsfromasingleAI-poweredinboxreplyingtoDMsinstantlyinNepali,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)webhooksignatureverificationhandlingtheplatform-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-sidewithexpirytrackingusersnevercopytokensbyhand.Designedthefull-stackinfrastructurewithTanStackStart(SSR+type-safeserverfunctions),DrizzleORMoverPostgreSQL,BetterAuthforsessions,Cloudinaryformedia,andacustomthemingsystem.

TechnologiesUsed

TanStack StartTypeScriptDrizzle ORMPostgreSQLBetter AuthTailwind CSS
AI Social Inbox & CRM

AboutThisProject

Aproduction-ready,multi-tenantSaaSCRMthatletsNepalibusinessesmanageFacebook,Instagram,WhatsAppandTikTokcustomerconversationsfromasingleAI-poweredinboxreplyingtoDMsinstantlyinNepali,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)webhooksignatureverificationhandlingtheplatform-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-sidewithexpirytrackingusersnevercopytokensbyhand.Designedthefull-stackinfrastructurewithTanStackStart(SSR+type-safeserverfunctions),DrizzleORMoverPostgreSQL,BetterAuthforsessions,Cloudinaryformedia,andacustomthemingsystem.