Skip to content
peresramirezPublic

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

243 Commits

Folders and files

Repository files navigation

AskOnce

AskOnce Logo

Ask once. Know everything.

AI-powered client onboarding for agencies and freelancers.
AskOnce replaces discovery calls with a guided AI session that qualifies leads, captures requirements, and produces a branded brief automatically.

MIT License TypeScript React Vite Supabase Tailwind CSS Google Gemini

GitHub · Live Demo · Open Issues

Overview

AskOnce eliminates the 1-2 hour discovery call most service businesses still rely on. An agency creates a workflow once, shares a session link, and receives a completed AI-generated brief with branding applied automatically.

Core Product Flow

AskOnce combines five pieces into one onboarding experience:

  • Pre-qualification gate to filter low-fit leads before AI usage starts
  • Context harvesting to analyze a client website before asking questions
  • Conversational AI through chat or voice
  • Live brief generation that builds while the client responds
  • Branded PDF output for the agency team to review and act on

Features

For agencies

  • Workflow builder for qualification steps, service questions, budget gates, and AI behavior
  • Real-time session pipeline with progress tracking and status updates
  • Accept and reject actions from the dashboard
  • Email automation through HappyRobot-backed Supabase Edge Functions
  • Outbound follow-up calls through HappyRobot
  • Branded PDF output using agency identity
  • Analytics for completion and funnel visibility

For clients

  • No-login onboarding through a shared session link
  • Website analysis before the AI asks redundant questions
  • Guided chat and browser voice flow with live brief generation
  • Agency branding carried through the session and PDF
  • Mobile-friendly experience

Tech Stack

Frontend

Technology Purpose
React 18 + TypeScript Application UI
Vite Dev server and bundling
Tailwind CSS Styling system
shadcn/ui Base UI primitives
Framer Motion UI motion and transitions
Recharts Analytics charts
@react-pdf/renderer PDF generation
React Hook Form + Zod Forms and validation

Backend and infrastructure

Technology Purpose
Supabase Postgres, Auth, Realtime, Storage
Supabase Edge Functions Secure server-side API layer
Gemini Dynamic question generation and brief writing
ElevenLabs Browser-based voice agent and voice session runtime
HappyRobot Outbound follow-up calls and email delivery
Firecrawl / scraping pipeline Website context harvesting

Architecture

Agency Dashboard -> Supabase Auth + Database -> Edge Functions
Client Session -> Pre-qualification -> Context Harvesting -> AI Chat -> Live Brief -> PDF

External services:
- ElevenLabs for the in-browser voice agent experience
- HappyRobot for outbound follow-up calls and email workflows
- Gemini for extraction, chat orchestration, and final brief generation
- Firecrawl / scraping pipeline for website context collection

Edge functions

Function Purpose
harvest-context Scrape and analyze the client website
extract-brief Extract structured brief data during chat
generate-brief Generate final copy for the brief
chat-message Send messages through the AI chat flow
create-elevenlabs-agent Create or update the ElevenLabs browser voice agent for a workflow
elevenlabs-token Mint a browser voice session token for ElevenLabs
send-email Deliver accept/reject emails
trigger-call Launch outbound recovery calls

Getting Started

Prerequisites

  • Node.js 18+
  • npm
  • Supabase project
  • ElevenLabs account
  • HappyRobot account
  • Gemini API access
  • Firecrawl API access

Install

git clone git@github.com:peres84/AskOnce.git
cd AskOnce
npm install

Environment variables

Create a local .env file with:

VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_key
VITE_USE_MOCK_AGENT=false

Sensitive provider secrets should not be exposed as VITE_ variables. Keep ElevenLabs, HappyRobot, Gemini, Firecrawl, and service-role keys in Supabase Edge Function secrets only.

Run locally

npm run dev

Available scripts

npm run dev
npm run build
npm run build:dev
npm run lint
npm run test

Supabase Setup

supabase login
supabase link --project-ref your-project-ref
supabase db push

supabase secrets set ELEVENLABS_API_KEY=your_key
supabase secrets set ELEVENLABS_VOICE_ID=your_voice_id
supabase secrets set HAPPYROBOT_API_KEY=your_key
supabase secrets set GEMINI_API_KEY=your_key
supabase secrets set FIRECRAWL_API_KEY=your_key
supabase secrets set SUPABASE_SERVICE_KEY=your_key

supabase functions deploy harvest-context
supabase functions deploy extract-brief
supabase functions deploy generate-brief
supabase functions deploy chat-message
supabase functions deploy create-elevenlabs-agent
supabase functions deploy elevenlabs-token
supabase functions deploy send-email
supabase functions deploy trigger-call

Template Assets

Template previews used for onboarding or gallery selection live in templates/.

Current local asset set:

  • 6 categories
  • 5 images per category
  • JSON manifest ready for Supabase upload

Relevant files:

  • templates/divi-layouts-manifest.json
  • scripts/fetch-divi-previews.mjs
  • scripts/upload-templates.ts

To upload templates:

SUPABASE_URL=your_url \
SUPABASE_SERVICE_KEY=your_key \
npx ts-node scripts/upload-templates.ts

Project Structure

AskOnce/
├── scripts/
│   ├── fetch-divi-previews.mjs
│   └── upload-templates.ts
├── src/
│   ├── assets/
│   │   └── askonce-logo.png
│   ├── components/
│   │   ├── pdf/
│   │   ├── session/
│   │   ├── sessions/
│   │   ├── ui/
│   │   └── workflow/
│   ├── contexts/
│   ├── hooks/
│   ├── lib/
│   ├── pages/
│   └── test/
├── supabase/
│   └── functions/
│       ├── _shared/
│       ├── chat-message/
│       ├── create-elevenlabs-agent/
│       ├── elevenlabs-token/
│       ├── extract-brief/
│       ├── generate-brief/
│       ├── harvest-context/
│       ├── send-email/
│       └── trigger-call/
└── templates/
    ├── divi-layouts-manifest.json
    └── previews/

Database Model

At a high level the app works around these core records:

  • agencies for branding, settings, and communication defaults
  • workflows for onboarding configuration and ElevenLabs voice-agent linkage
  • sessions for client progress, extracted brief data, and outcomes
  • templates for visual template metadata and uploaded assets

See supabase/ migrations and functions for implementation details.

Roadmap

  • Agency onboarding and dashboard
  • Workflow builder
  • Client session flow
  • Pre-qualification gate
  • Context harvesting
  • AI chat integration
  • Live brief generation
  • Branded PDF output
  • Accept/reject actions
  • Outbound follow-up call trigger
  • Template preview ingestion
  • Public landing page refinement
  • Full template library expansion
  • White-label custom domains
  • CRM and automation integrations

License

MIT. See LICENSE.

Author

Built by Javier Peres.

GitHub: @peres84

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages