Inspiration
World Trade Center Ciudad de México (WTC) is a massive, fast-paced commercial hub housing over 800 businesses, from corporate B2B services to retail and dining. We realized that traditional static directories fail in high-density environments. Visitors and office workers have complex, multi-variable needs (e.g., "I need to print 50 pages, grab an oat milk latte, and buy a corporate gift, all in the next 30 minutes"). We were inspired to replace passive scrolling with an intelligent "AI Concierge" that understands intent, and reads internal business catalogs to connect supply and demand instantly.
What it does
Publimapa is a "Dual-Discovery Engine." It offers a traditional grid layout for casual browsing, but its core is an AI Concierge powered by Gemini 2.5 Flash. Users can ask complex queries, and the AI cross-references the entire WTC database—including businesse PDFs and service catalogs, to provide exact recommendations and directions. It supports multimodal search (e.g., uploading a photo of a broken cable to find a matching electronics store). For businesses, it operates on a secure, automated Pay-Per-Lead (PPL) model where they only pay when a customer actually contacts them by a WhatsApp message.
How we built it
We engineered a highly cost-effective, serverless architecture tailored for a bootstrapped startup:
- Database & Logic: We use Google Sheets as a visual CMS, powered by Google Apps Script which acts as our backend API and webhook listener.
- Middleware & Data Ingestion: SheetMonkey routes frontend leads into our database securely, bypassing CORS issues.
- AI & Caching: We use Cloudflare Pages and KV Storage. To avoid sending our massive database to the AI on every single query, we use a Cloudflare Cron Job to update the Gemini Context Caching API once an hour.
- PDF Processing (pending): We will use Make.com to intercept uploaded PDF catalogs during business onboarding.
- Monetization (pending): We will integrate the STP SPEI API via webhooks for automated fiat-to-token billing.
Challenges we ran into
Our biggest hurdle was the "Token Trap" of RAG (Retrieval-Augmented Generation). Feeding 800 raw PDF menus into the AI for every search would push our API costs to over $2,000/month. Additionally, we faced security challenges with our PPL model, specifically preventing users from messaging businesses that had a zero balance (Zero-Balance Exploit), and handling spam submissions that would unfairly charge our clients.
Accomplishments that we're proud of
We successfully solved the Token Trap by building a "Pre-Summarization" pipeline. When a business uploads a PDF, Make.com extracts the text and uses Gemini to compress it into a dense, 50-word keyword summary before it hits our database. Combined with Gemini's Context Caching, we reduced our projected AI costs by over 80%. We are also incredibly proud of our future automated PPL billing engine—a bespoke Apps Script webhook that listens for STP SPEI bank transfers and instantly converts fiat (MXN) into arcade-style "Lead Credits" without human intervention. Finally, our Anti-Spam Bot protects business balances by actively scrubbing incoming webhooks for banned keywords and rate limits.
What we learned
We, not being software developers, learned that AI engineering is as much about cost-architecture and data-pipeline management as it is about prompt engineering. We mastered serverless webhook routing, state management in Google Workspace, and the massive UX benefits of Context Caching for low-latency AI responses.
What's next for Publimapa
We will continue developing and implementing the business model at the World Trade Center Ciudad de México and plan to expand to other high-density commercial hubs and businesses and profesionals associations across Mexico. We intend to deepen our B2B features, allowing Gemini, for example, to automatically draft Request for Proposal (RFP) emails when a user searches for bulk services.
Day-to-Day AI Use, Human vs. AI, and Economic Opportunity:
We used AI heavily in development; Cursor (an AI IDE) acts as our technical co-founder, enabling a non-technical founding team members like us, to build complex serverless infrastructure. In operations, AI handles the heavy lifting: pre-summarizing business catalogs, curating search results, and filtering spam. We can then focus on strategy, B2B sales, and client relationships.
Economically, Publimapa democratizes visibility for small businesses. In a traditional business directory, a small cafe is buried beneath corporate giants. With Publimapa, if a user specifically asks for "vegan pastries," the AI highlights the small cafe instantly. By utilizing a Pay-Per-Lead model, businesses aren't gated by expensive monthly marketing retainers; they only pay for actual business opportunities (leads), creating a risk-free environment for local commerce to thrive.
Built With
- cloudflare
- cursor
- gemini-2.5flash
- github
- google-apps-script
- google-spreadsheets
- sheetmonkey
Log in or sign up for Devpost to join the conversation.