Quickstart¶
Get ScamShield AI running in 15 minutes -- from clone to your first scam-detection request.
1. Clone the repository¶
2. Create a Python virtual environment¶
ScamShield uses Python 3.11. The venv must live inside functions/ because Firebase CLI expects it there during deployment.
Python version matters
Firebase Cloud Functions 2nd gen requires Python 3.11. Using a different version may cause deployment failures. Verify with python --version after activating the venv.
3. Install dependencies¶
4. Configure environment variables¶
Copy the example file and fill in your keys:
Edit .env.local:
# Required: Get from https://aistudio.google.com/app/apikey
GEMINI_API_KEY=your-gemini-api-key-here
# Required: Generate your own API key for endpoint auth
# GUVI sends this in the x-api-key header when calling your endpoint
SCAMSHIELD_API_KEY=scamshield-your-generated-key-here
Generate a secure API key:
5. Run the test suite¶
All tests should pass. If any fail, check that your Python version is 3.11 and all dependencies installed correctly.
Tests never call real APIs
The test suite mocks all external services (Gemini, Firestore, GUVI callback). You do not need valid API keys to run tests.
6. Deploy to Firebase¶
First, make sure you are logged in and have a Firebase project set up (see Prerequisites and Configuration if you have not done this yet):
Set your secrets in Firebase Secret Manager:
Deploy:
First deploy takes 3-5 minutes
Subsequent deploys are faster. The CLI will print the function URL when done.
7. Test with curl¶
Once deployed, send a test request to verify the endpoint is working:
curl -X POST \
https://asia-south1-your-gcp-project-id.cloudfunctions.net/guvi_honeypot \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_SCAMSHIELD_API_KEY" \
-d '{
"sessionId": "test-session-001",
"currentMessage": {
"role": "scammer",
"content": "Hello, I am calling from SBI bank. Your account has been compromised. Please share your OTP to secure it."
},
"conversationHistory": []
}'
You should get a JSON response with:
- A persona-appropriate reply engaging the scammer
- Scam classification (e.g.,
BANKING_FRAUD) - Extracted evidence (phone numbers, UPI IDs, bank accounts, etc.)
{
"sessionId": "test-session-001",
"response": "Oh my! SBI bank? Which branch are you calling from, beta?...",
"scamDetected": true,
"scamType": "BANKING_FRAUD",
"confidence": 0.92,
"persona": "Sharma Uncle",
"extractedIntelligence": {
"bankAccounts": [],
"upiIds": [],
"phoneNumbers": [],
"urls": [],
"emailAddresses": [],
"names": [],
"organizations": ["SBI"],
"cryptoWallets": [],
"socialMediaHandles": [],
"otherEvidence": [],
"keywords": ["OTP", "account compromised"]
}
}
What's next?¶
- Configuration -- Detailed GCP project setup, Firestore rules, and CI/CD
- Local Development -- Emulators, testing, linting, and dashboard dev
- Prerequisites -- Full list of tools and accounts you need