The original ticket asked to trace File Search, Chat, and Timelines features. None of these exist in SafairBru. SafairBru is a forecasting gamification platform for FlySafair. Its actual features are: leaderboard, forecast submission, profile/achievements, admin panel, AI content generation, API endpoints, auth, email notifications, and Dropbox data integration.
Key finding: Graphify detected zero cross-file call edges between router and domain layers. All 1,247 call edges are intra-file. This means either (a) the graph extraction missed Python import-based calls, or (b) routers use dependency injection / request-time resolution that static analysis cannot trace. Every feature with a multi-layer chain is marked PARTIAL because cross-file connectivity cannot be confirmed from the graph alone.
ROUTERS (HTTP handlers) DOMAIN (business logic) DATA LAYER
============================= ======================== ==========
routers/pages.py ------?-----> domain/leaderboard.py ------?-----> domain/firebase.py
login_page() get_monthly_leaderboard() get_db()
leaderboard_page() get_annual_leaderboard() _init_firebase()
forecast_page() ------?-----> domain/scoring.py
profile_page() calculate_monthly_scores()
scoring_rules_page() ------?-----> domain/forecasts.py
password_change_page() save_forecast()
forecast_submit() get_user_forecast()
------?-----> domain/achievements.py
get_user_achievements()
------?-----> domain/auth.py ----------?-----> domain/firebase.py
verify_password()
create_session_token()
validate_session_token()
routers/admin.py -----?-----> domain/settings.py
admin_index() (31 routes) get_settings()
------?-----> domain/users.py ----------?-----> domain/firebase.py
create_user()
------?-----> domain/scheduler.py
carry_over_forecasts()
routers/fragments.py -?-----> domain/ai.py ----------?-----> OpenAI / Gemini API
(25 HTMX fragments) generate_ai_content()
generate_leaderboard_commentary()
build_tone_directive()
routers/api.py -------?-----> domain/leaderboard.py
api_monthly()
api_annual()
api_alltime()
domain/dropbox.py ------?-----> Dropbox API
get_dropbox_data()
_fetch_from_dropbox()
domain/email.py -------?-----> SMTP / Resend
send_event_email()
send_winners_announcement()
----?----> = cross-file call NOT confirmed in graph (static analysis gap)
---------> = intra-file call confirmed in graphFunctions from the old app.py that have NOT been ported to the new architecture. Sorted by connection count (how many other functions depend on them). Streamlit-specific functions excluded.
| Function | Community | Deps | Location |
|---|---|---|---|
main() |
Leaderboard Calculation | 25 | app.py:L14679 |
get_cached_data() |
Leaderboard Calculation | 19 | app.py:L3693 |
set_cached_data() |
Leaderboard Calculation | 19 | app.py:L3707 |
clear_cache() |
Admin & Cache Management | 18 | app.py:L3716 |
build_results_published_email_content() |
Leaderboard Calculation | 15 | app.py:L4431 |
get_user_profile_stats() |
Leaderboard Calculation | 14 | app.py:L7167 |
is_ai_error_response() |
Leaderboard Display & Export | 13 | app.py:L554 |
build_forecast_lock_email_content() |
Admin & Cache Management | 12 | app.py:L4228 |
request_password_reset_for_user() |
Admin & Cache Management | 12 | app.py:L5425 |
get_user_leaderboard_rank_summary() |
Leaderboard Calculation | 12 | app.py:L6746 |
get_competition_ai_guardrails() |
Leaderboard Display & Export | 11 | app.py:L541 |
warm_runtime_leaderboard_caches() |
Leaderboard Calculation | 11 | app.py:L7146 |
get_user_current_rank() |
Leaderboard Calculation | 9 | app.py:L3544 |
save_local_data() |
Leaderboard Router | 9 | app.py:L3669 |
get_user() |
Admin & Cache Management | 9 | app.py:L3759 |
calculate_head_to_head() |
Leaderboard Calculation | 9 | app.py:L7717 |
get_sidebar_ranks() |
Leaderboard Calculation | 8 | app.py:L3570 |
ensure_firebase_auth_user() |
Admin & Cache Management | 8 | app.py:L5300 |
sync_password_to_firebase_auth() |
Admin & Cache Management | 8 | app.py:L5383 |
force_refresh_dropbox_data() |
Leaderboard Calculation | 8 | app.py:L6599 |
get_sales_daily_preview() |
Leaderboard Calculation | 8 | app.py:L6620 |
get_ai_roast() |
Leaderboard Display & Export | 7 | app.py:L1472 |
get_ai_performance_analysis() |
Leaderboard Display & Export | 7 | app.py:L1572 |
get_previous_leaderboard_state() |
Admin Router | 7 | app.py:L2198 |
save_leaderboard_state() |
Admin Router | 7 | app.py:L2213 |
send_event_notification_email() |
Core App Logic & Scoring | 7 | app.py:L4031 |
reserve_event_email_idempotency() |
Leaderboard Router | 7 | app.py:L4732 |
send_firebase_password_reset_email() |
Admin & Cache Management | 7 | app.py:L5258 |
update_settings() |
Admin & Cache Management | 7 | app.py:L5767 |
get_latest_sales_date() |
Leaderboard Calculation | 7 | app.py:L6661 |