How albara-ai/flyrank-capstone-widget-platform works
FlyRank is an embeddable widget and lead-capture platform. Owners configure widgets and embed them on customer sites; visitors submit leads, which are validated, enriched, stored, and queued for background notification and optional intent classification. Owners can review leads and statistics, while cashier and admin flows handle redemption and tenant administration. The README documents these capabilities; some service and route internals were not sampled, so those connections are shown only where documented.
Main entry points: widget.js Embedded widget · public.py Public API · submissions.py Lead and job storage · db.py PostgreSQL
Components 22
Widget delivery
- Embedded widget
app/static/widget.js
Submission intake
- Public API
app/api/v1/public.py - Submission schema
app/domain/submissions.py - Submission workflow
app/services/submissions.py - Geo enrichment
app/services/geo.py
Background processing
- Job worker
app/jobs/worker.py - Job handlers
app/jobs/registry.py - Intent classification
app/services/classification.py - Email notification
app/services/notifications.py
Owner and admin
- Widget management
app/api/v1/widgets.py - Leads and stats
app/api/v1/leads.py - Account and cashier
app/api/v1/redeem.py - Admin console API
app/api/v1/admin.py - Owner and admin UI
app/api/ui.py
Platform services
- Geo providers
app/providers/geo/base.py - Lead and job storage
app/repositories/submissions.py - LLM provider chain
app/providers/factory.py - Tenant and keys
app/services/tenants.py - PostgreSQL
app/core/db.py
Other components
- Widget owner
- Customer site
- Site visitor
Connections 26
- Widget owner → Widget management: manages widgets
- Widget owner → Leads and stats: reviews leads
- Customer site → Embedded widget: loads script
- Embedded widget → Public API: fetches config
- Site visitor → Embedded widget: fills form
- Embedded widget → Public API: posts submission
- Public API → Submission schema: validates input
app/api/v1/public.py - Public API → Submission workflow: processes submission
app/api/v1/public.py - Submission workflow → Geo enrichment: enriches location
- Geo enrichment → Geo providers: queries providers
- Submission workflow → Lead and job storage: stores lead and jobs
- Lead and job storage → PostgreSQL: writes records
app/repositories/submissions.py - Job worker → Job handlers: dispatches jobs
app/jobs/worker.py - Job handlers → Intent classification: classifies intent
app/jobs/registry.py - Intent classification → LLM provider chain: uses provider chain
app/services/classification.py - Job handlers → Email notification: sends notification
app/jobs/registry.py - Job worker → Lead and job storage: claims and updates jobs
app/jobs/worker.py - Widget management → PostgreSQL: manages widget data
- Leads and stats → Lead and job storage: reads leads
- Account and cashier → Tenant and keys: checks account
- Admin console API → Tenant and keys: administers tenants
app/api/v1/admin.py - Widget owner → Owner and admin UI: uses web pages
- Owner and admin UI → Widget management: calls management API
- Owner and admin UI → Leads and stats: views dashboard
- Admin console API → PostgreSQL: administers records
- Tenant and keys → PostgreSQL: stores tenants and keys
app/services/tenants.py