Good to know

Current project setup and usage notes

Back to app

Current flow

  1. Choose a reporting end date on the homepage.
  2. Click `Fetch and Generate` to load SaltHub data server-side.
  3. Review generated Account Management hierarchy reports in the table.
  4. Open the selected user's email preview below the table.

Live API configuration

  • The app is API-first.
  • External SaltHub credentials stay on the server.
  • The app reads `All_Users_API_Key`, `Users_Activity_API_Key`, and `API_Secret_Key` from `.env.local`.
  • Set `DATABASE_URL` to your Neon connection string to persist generated report runs.
  • The Account Management Team page now uses the live organization tree instead of hardcoded users.

Eligibility rules

  • `team_member` users are eligible only when their own department is exactly `Account Management`.
  • `business_owner` and `super_admin` users can belong to any department, but they are included when they belong to `Account Management` or sit above eligible Account Management users in the hierarchy.
  • Individual user reports are enabled for `team_member`, `project_lead`, `freelancer`, `contributor`, and `department_owner` when they belong to `Account Management`.
  • Individual user reports are generated only when that user has activity in the selected period.
  • `team_member` and `business_owner` reports use a trailing weekly window ending on the selected date.
  • `business_owner` reports are built from direct eligible Account Management user activity and can render as empty-state reports when no child activity exists.
  • `super_admin` reports use a trailing bi-weekly window ending on the selected date and are built from direct eligible business-owner rollups, using only eligible child Account Management user activity.

What the homepage does

  • Date-range based report generation
  • One selected report end date
  • Weekly activity fetch for individual users and business owners
  • Bi-weekly activity fetch for super admins
  • Prior equal-length period fetch for each cadence
  • Role-aware generated reports table
  • User email preview

Current limitations

  • Email sending works only when Brevo and sender environment variables are configured.
  • AI-generated narrative text runs only when `OpenAI_API_Key` is configured.
  • The official scoring formula is not implemented yet.
  • Score, prior score, and delta remain unavailable until that formula exists.
  • Generated report runs are saved to Neon when `DATABASE_URL` is configured.
  • Friction-note driven AI sections still use placeholders until that source is wired.

Missing-data behavior

  • The app does not fabricate unavailable fields.
  • Missing fields are shown directly in the preview.
  • Unavailable score-related values remain empty rather than guessed.
  • Disabled users can still appear in results, but they are flagged clearly.

Current input sources

  • The organization tree comes from `All_Users_API_Key`.
  • User activity comes from `Users_Activity_API_Key`.
  • Both requests use `API_Secret_Key` as the bearer token.
  • Optional narrative generation uses `OpenAI_API_Key` server-side.
  • Transactional sending uses Brevo with `Brevo_API_Key`, `BREVO_SENDER_EMAIL`, `BREVO_SENDER_NAME`, `REPORT_EMAIL_MODE`, and `REPORT_EMAIL_TEST_OVERRIDE`.
  • The current release no longer exposes manual upload mode in the product UI.