Skip to content

Share reports#657

Merged
pontusab merged 2 commits into
mainfrom
feature/sharable-reports
Nov 27, 2025
Merged

Share reports#657
pontusab merged 2 commits into
mainfrom
feature/sharable-reports

Conversation

@pontusab
Copy link
Copy Markdown
Contributor

@pontusab pontusab commented Nov 26, 2025

Note

Adds shareable report links for key metrics with public viewer pages/OG images, backed by new API/DB endpoints and UI to create and share links.

  • Backend/API:
    • Add reportTypeSchema, createReportSchema, getReportByLinkIdSchema, getChartDataByLinkIdSchema in apps/api/src/schemas/reports.ts.
    • Extend TRPC router with reports.create, reports.getByLinkId, reports.getChartDataByLinkId (public) and map DB errors to TRPC errors; return shortUrl.
  • Database:
    • Introduce ReportNotFoundError, ReportExpiredError, InvalidReportTypeError and export via @midday/db/errors.
    • Implement report creation/fetch and chart-data-by-link in src/queries/reports.ts; join team info; support multiple report types.
    • Update reportTypes enum and table schema; add migration 0001_add_report_types.sql.
  • Dashboard/UI:
    • New public routes /(public)/r/[linkId] for report page and opengraph-image.tsx; cache results; show team/logo/date range; render charts via PublicMetricView.
    • Add share UI: ShareMetricButton + ShareMetricModal (expiry, copy/open, X/LinkedIn) and integrate into metric cards (revenue, profit, expenses, burn rate, runway, category expenses).
    • Allow unauthenticated access to /r/ in middleware.
    • Improve dropdown menu (portal option) for in-card menus.
  • Other:
    • Strengthen decrypt input validation in @midday/encryption.
    • Invoice OG templates: switch to Hedvig fonts and font styling.
    • Chat input: accept PDFs/images; prompt-input accept matching for multiple MIME types.

Written by Cursor Bugbot for commit 89ddf13. This will update automatically on new commits. Configure here.

@pontusab pontusab merged commit f2a6065 into main Nov 27, 2025
7 checks passed
pontusab added a commit that referenced this pull request Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant