# Features — datafy_web (Datafy Web)

Evidence date: 2026-10-17. Source: `main` at `df8299e`.

Status words used here:

- **Current** — reachable from the router or the sidebar on this revision.
- **Present, not in the sidebar** — a route or widget exists; the sidebar section that was read does not link to it.
- **Generated binding** — a Supabase table class exists. Use from a screen was not confirmed one by one.
- **Unused in searched call sites** — a method exists and no screen call was found.
- **Pipeline only** — not a user-facing product feature.
- **Planned** — no product backlog was found. Nothing is marked planned unless the repository says so.

## Current features

| Feature | What the user can do | Where |
|---|---|---|
| Email sign-in | Sign in with email and password and land on the dashboard | `lib/pages/auth/login/login_widget.dart`, route `/login` |
| Session shell | Splash image, light and dark theme objects, English locale, path URLs | `lib/main.dart` |
| Dashboard | Overview for a customer: stores, reps, managers, KaChings, promos, surveys, tasks fixed in 7 days, top stores and reps (as described by the action comment). Charts for week report and store score | `/dashboard`, `lib/custom_code/actions/get_dashboard_overview.dart`, `lib/custom_code/widgets/` |
| Tasks | Task overview, store filter by role, image analysis call, Excel/file export | `/tasks`, `lib/pages/tasks/`, `analyze_image_api.dart`, `export_tasks_to_excel.dart` |
| Stores | Store overview, admin versus manager controls, issue counts | `/stores`, `lib/pages/stores/` |
| Non-issues | Product history and store-scoped non-issue view | `/nonIssues` |
| Products | Product overview with tab index and product history parameters | `/products`, `lib/pages/products/` |
| Promos | Promo overview, store filter, linked-user and all-promo PDF/CSV export, image PDF export | `/promos`, `export_to_pdf_promos_*.dart`, `export_promo_images_to_p_d_f.dart` |
| KaChing | Challenge overview, store filter, active-KaChing Excel export, linked and all-row PDF/CSV, image PDF | `/kachingNew`, `export_active_kachings_to_excel.dart` |
| Surveys | Survey overview, create, view, response view, question types including image, response PDF/CSV | `/surveys`, `/createSurvey`, `/viewSurvey`, `/viewSurveyResponse` |
| Notifications | Notification overview. Custom date-group and card widgets exist | `/notifications`, `lib/custom_code/widgets/enhanced_notification_card_widget.dart` |
| Profile | Profile route | `/profile` |
| Users (super admin) | List, add, edit, view users and admins. Link reps, managers, customers, and stores, including a bulk store link. Upload users from a file | `/users`, `lib/pages/users/`, `uploadfile_users.dart` |
| Customers (super admin) | Customer overview | `/customers`, `lib/pages/customers/` |
| Uploads | File upload into Supabase storage bucket `uploads` from user, task, and store screens | `lib/backend/supabase/storage/storage.dart` |
| Spreadsheet ingest | Custom upload actions for users, surveys, survey questions, promos, and KaChing | `lib/custom_code/actions/uploadfile*.dart` |
| Persisted UI state | Nav open/closed, page title, selected store and chain, role, super-admin, store lists, survey drafts | `lib/app_state.dart` using `flutter_secure_storage` |

## Present, not in the sidebar

| Feature | Route or location | Note |
|---|---|---|
| Create account | `/createAccount` | Linked from the login rich text. Password match check lives in `sign_up_with_email.dart` |
| SJ report | `/sjreport` | Upload, summary, Spar variant, archive tables, PDF and CSV export |
| Call sheet | `/callsheet` | Call cycle list, completed list, history, upload widget. Manager string is referenced |
| Base template pages | `/baseTemplatePage`, `/baseTemplatePageCopy` | FlutterFlow scaffold pages |
| SDC report export | `export_sdc_reports_to_file.dart` | REST calls `SDCReportCall` and `SDCReportPerChannelCall` exist in `api_calls.dart` |
| Store visibility export | `export_store_visibility_to_file.dart` | Table `store_visibility` |
| GPS and activity exports | `export_to_pdf_gps.dart`, `export_to_csv_gps.dart`, `export_to_*_activity.dart`, `export_to_*_historical.dart` | |
| Geolocator | `pubspec.yaml` dependency `geolocator` | Screen that reads device location was not confirmed |
| Sign in with Apple | `supabase_auth_manager.dart` | No screen call site found |
| Password reset | `SupabaseAuthManager.resetPassword` | No screen call site found |
| Phone sign-up | `sign_up_with_phone.dart` | Custom action present. Not confirmed on a route |
| WebP pick and convert | `pick_webp_on_web.dart`, `convert_webp_to_png_web.dart` | |

## Duplicate or older screen trees

These directories exist beside the routed screens. FlutterFlow often leaves copies. They are **Implemented** as files. Whether any copy is still embedded in a routed page was not exhaustively checked.

| Tree | Routed counterpart |
|---|---|
| `lib/pages/task/` | `lib/pages/tasks/` is the `/tasks` route |
| `lib/pages/user/` | `lib/pages/users/` is the `/users` route. Includes `user_list_copy` and `app_users_list` |
| `lib/pages/report/` | Overlaps SJ report and call sheet upload widgets |
| `lib/pages/sites/`, `lib/pages/items/` | Embed `UploadSjreportWidget` |

Provenance: **Inferred** that the `*copy*` names and the unrouted trees are leftovers. Confirmation is required before treating them as deprecated.

## Generated data bindings that support features

83 table or view classes under `lib/backend/supabase/database/tables/`. Grouped by area:

- People: `user`, `app_user`, `auth_user_view`, `user_view`, `user_email_view`, `user_sign_in_info`, `user_activity`, `user_store`, `rep_list`.
- Customers: `customer`, `customer_user`, `customer_store`, `customer_client`, `customer_brand`, `client`, `brand`.
- Stores: `store`, `store_view`, `store_view_new`, `store_view_all`, `store_view_admin`, `store_user_link`, `store_user_flattened`, `view_store_user_link`, `store_customer_link`, `store_visibility`, `store_updates_log`, `store_processing_queue`, `sites`, `channel_data`.
- Products: `product`, `product_store`, `product_images`, `product_grouped`, `product_full_list`, `product_ml`, `producy_view`, `temp_products`, `store_product`, `product_store_processing_queue`, `category_images`.
- Tasks and issues: `task`, `task_file`, `tasks_create_logs`, `main_issue`, `linked_issue`.
- Surveys: `survey`, `survey_questions`, `survey_multiple_choice`, `survey_responses`, `survey_store_link`.
- Promos and KaChing: `promos`, `promo_uploads`, `promo_gallery`, `promo_kaching_uploads`, `promos_linked_users`, `store_promo`, `kaching`, `kaching_uploads`, `kaching_gallery`, `kaching_linked_users`.
- Field reports: `sjreport`, `sjreport_uploads`, `sjreport_summary`, `sjreport_spar`, `sjreport_archive`, `callsheet`, `combined_week_report`.
- Files and logs: `file`, `file_upload`, `notification`, `logs`, `log`, `queue_processing_log`, `version`, `model_versions`, `archive_settings`.
- Names that look non-production: `test_tenant`, `test_table`, `task_john`, `john_data`, `store_backup_20241118`, `store_product_backup_20241128`.

`producy_view` is the table name in code (spelling as generated).

## Pipeline features (not product UI)

| Item | State on `main` |
|---|---|
| SonarQube scan | Active on default, `main`, pull requests, and custom `manual-security-scan` |
| Safety, Gitleaks, OWASP Dependency-Check, Selenium step, Supabase `deploy_results` | Active on pull requests and `manual-security-scan`. Commented on `main` |
| Bandit | Commented everywhere it appears |
| Resend email and Slack post | Commented |
| S3 deploy and CloudFront invalidation | Commented. Deployment environment name in the step is `Production` |

## Recently changed (from commit subjects)

The tip commit `df8299e` (2026-01-19) only records a Bitbucket edit of `bitbucket-pipelines.yml`. Earlier subjects that name product or delivery work: "update web" (2024-09-09), "Add AWS deployment", "Update to latest version". A file-level diff of those commits was not taken. Provenance: **Documented** in commit subjects only.

## Deprecated or removed

No removal notice was found. Backup tables and `*copy*` screens are still in the tree. Do not treat them as removed.

## Not found

- In-app product tour, billing, or subscription.
- A documented feature flag system. `FFDevEnvironmentValues.currentEnvironment` is the constant `Production`.
- Push notifications (no Firebase messaging dependency was seen in `pubspec.yaml`).
- A maintained changelog inside the application repository.
