How aakanksha-1408/netguard works
NetGuard is a social-media safety app whose main user flow is checking links or QR codes and presenting a verdict with supporting evidence. Other major product areas include scam investigation, identity exposure mapping, scam-report heatmaps, articles, quizzes, and reporting. The graph follows explicit imports and calls in the sampled source index; unsampled page internals and some API wiring are not inferred.
Main entry points: aiQuota.ts AI quota and cache · LinkChecker.tsx Link checker UI · QRCodeScanner.tsx QR scanner UI · supabase.ts Supabase client
Components 33
User experience
- Home
src/app/page.tsx - Link checker page
src/app/link-checker/page.tsx - Link checker UI
src/components/LinkChecker.tsx - QR scanner page
src/app/qr-scanner/page.tsx - QR scanner UI
src/components/QRCodeScanner.tsx - Evidence panel
src/components/EvidencePanel.tsx - Chatbot page
src/app/chatbot/page.tsx - Scam chatbot
src/components/ScamChatbot.tsx - Identity map page
src/app/identity-map/page.tsx - Identity graph
src/components/IdentityGraph.tsx - Heatmap page
src/app/heatmap/page.tsx - Scam heatmap
src/components/ScamHeatmap.tsx - Articles
src/app/articles/page.tsx - Safety quiz
src/app/quiz/page.tsx - Report scam
src/app/report/page.tsx
Safety analysis
- QR analysis
src/lib/qrScanner.ts - Link assessment
src/lib/linkCheck.ts - URL scanner
src/lib/urlScanner.ts - Evidence identification
src/lib/identification.ts - Identity analysis
src/lib/identityMap.ts - Exposure store
src/lib/exposureStore.ts - Scam investigator
src/lib/scamInvestigator.ts
API services
- Scam reports API
src/app/api/scam-reports/route.ts - Investigation API
src/app/api/gemini/investigate/route.ts - News check API
src/app/api/gemini/news-check/route.ts - Link info API
src/app/api/gemini/link-info/route.ts - QR explain API
src/app/api/gemini/qr-explain/route.ts
Shared services
- AI quota and cache
src/lib/aiQuota.ts - Translations
src/lib/i18n
Persistence
- Supabase client
src/lib/supabase.ts - Supabase database
Other components
- Visitor
- Google Gemini
Connections 35
- Visitor → Home: opens
src/app/page.tsx - Home → Translations: uses language context
src/app/page.tsx - Link checker page → Link checker UI: renders
- QR scanner page → QR scanner UI: renders
- Link checker UI → Link assessment: runs checks
src/components/LinkChecker.tsx - Link checker UI → URL scanner: uses
src/components/LinkChecker.tsx - Link checker UI → Evidence identification: builds identification
src/components/LinkChecker.tsx - Link checker UI → Evidence panel: renders
src/components/LinkChecker.tsx - QR scanner UI → QR analysis: analyzes payload
src/components/QRCodeScanner.tsx - QR scanner UI → Link assessment: checks links
src/components/QRCodeScanner.tsx - QR scanner UI → Evidence identification: builds identification
src/components/QRCodeScanner.tsx - QR scanner UI → Evidence panel: renders
src/components/QRCodeScanner.tsx - Evidence panel → Evidence identification: uses
src/components/EvidencePanel.tsx - Chatbot page → Scam chatbot: renders
- Scam chatbot → Scam investigator: investigates
src/components/ScamChatbot.tsx - Identity map page → Identity graph: renders
src/app/identity-map/page.tsx - Identity map page → Identity analysis: uses
src/app/identity-map/page.tsx - Identity map page → Exposure store: uses
src/app/identity-map/page.tsx - Identity graph → Identity analysis: renders analysis
src/components/IdentityGraph.tsx - Heatmap page → Scam heatmap: renders
src/app/heatmap/page.tsx - Scam reports API → Supabase client: queries reports
src/app/api/scam-reports/route.ts - Scam reports API → Supabase database: reads and writes
src/app/api/scam-reports/route.ts - Scam reports API → Google Gemini
- Investigation API → AI quota and cache: uses quota helpers
src/app/api/gemini/investigate/route.ts - News check API → AI quota and cache: uses quota helpers
src/app/api/gemini/news-check/route.ts - Link info API → AI quota and cache: uses quota helpers
src/app/api/gemini/link-info/route.ts - QR explain API → AI quota and cache: uses quota helpers
src/app/api/gemini/qr-explain/route.ts - AI quota and cache → Supabase client: reads and updates cache
src/lib/aiQuota.ts - AI quota and cache → Supabase database: stores quota data
src/lib/aiQuota.ts - AI quota and cache → Google Gemini: requests generation
src/lib/aiQuota.ts - Supabase client → Supabase database: connects
src/lib/supabase.ts - Scam chatbot → Supabase client: uses
src/components/ScamChatbot.tsx - Identity map page → Translations: uses
src/app/identity-map/page.tsx - QR scanner UI → Translations: uses lookups
src/components/QRCodeScanner.tsx - Link checker UI → Supabase client: uses
src/components/LinkChecker.tsx