-
-
How AutoRep works
-
Our system combines vector search, semantic understanding, and generative AI to deliver contextually perfect responses.
-
Dashboard
-
Hero section of the landing page
-
Post tracking for AutoRep to monitor it comments
-
Monitor and manage all Facebook comment interactions
-
Add business resources page
-
Connect Facebook page
-
User profile setting
Inspiration
Small businesses rely heavily on Facebook ads and posts to generate sales. But when customers comment with questions like “How much?” or “Is this still available?”, many businesses fail to respond quickly, losing opportunities. We wanted to solve this by building an AI agent that replies instantly using the business’s own FAQs, catalogs, and promotions.
What it does
AutoRep connects to a business’s Facebook Page, ingests their resources (FAQs, product lists, discounts), and uses semantic search + AI to generate instant replies to customer comments. Businesses can:
- Upload text or PDF resources.
- Connect their Facebook Pages securely via OAuth.
- Let AutoRep automatically or semi-automatically respond to comments and track reply status in a dashboard.
How we built it
- Backend: Express app deployed as a Firebase Function (Gen 2). Handles Facebook OAuth, webhooks, comment ingestion, and resource upload.
- Database: TiDB Serverless for scalable SQL + vector search. Resources are chunked and embedded for semantic matching.
- Frontend: Next.js with Tailwind + shadcn/ui. Businesses can connect Pages, upload resources, and view comments.
- AI Layer: Gemini API generates context-aware replies from matched chunks.
Challenges we ran into
- Debugging Facebook OAuth redirect URIs.
- Getting Firebase Functions to talk to TiDB (initially failed due to localhost config).
- Managing secrets securely across environments.
- Designing chunking + vector search so answers were accurate.
Accomplishments that we're proud of
- Fully working OAuth flow that stores page tokens.
- Seamless integration of TiDB vector search with real business data.
- A functional end-to-end pipeline: comment → vector search → AI reply → send via Facebook API.
What we learned
- Deep insights into Facebook’s Graph API and permission scopes.
- Best practices for Firebase Functions (secrets, scaling, error handling).
- How to design data models that bridge SQL + vector search.
What’s next for AutoRep
- Add support for multi-channel messaging (Instagram, WhatsApp).
- Build analytics dashboards so businesses can track sales impact.
- Train custom AI models per business for more personalized replies.
- Offer a marketplace where SMEs can subscribe to AutoRep as a SaaS.
TiDB Cloud account Email associated with the Project: wizprinze212@gmail.com
Project code repository: https://github.com/DaveBalm/autorep1.0
Built With
- cloud-functions
- comments
- dotenv
- firebase
- firebase-functions-(gen-2)-database:-tidb-serverless-(sql-+-vector-search)-ai:-google-gemini-api-(for-generating-contextual-replies)-authentication:-facebook-oauth-2.0-(graph-api-v21)-infrastructure:-firebase-hosting
- gemini
- javascript
- languages:-typescript
- lucide-react
- mysql2
- react
- secrets-manager-apis-&-sdks:-facebook-graph-api-(pages
- shadcn/ui-backend:-express.js
- sql-frontend:-next.js
- tailwindcss
- tidb

Log in or sign up for Devpost to join the conversation.