feat(org): dynamic open graph images for school sites (#709)

* feat(org): add dynamic open graph images for school sites

Generate branded 1200x630 OG images for org public sites via GET /org/og/:siteName.png.
Paying cloud orgs include their landing-page tagline; free plans show a Powered by
ClassroomIO watermark. Dashboard org-site meta tags now point at the dynamic image.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* feat(org): enable custom favicon upload and org-site rendering

Allow org admins to upload a favicon from domain settings, persist it via
PUT /organization, and render it on public org sites with logo fallback.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* fix(org): scope custom favicon to public org-site routes only

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* refactor(api): inline org-site OG rendering, remove @cio/og-images package

Move template and render helpers into apps/api/src/utils/org-site-og.ts.
Certificates stay in a shared package because they support multiple templates;
org OG is a single API-only concern.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* chore: remove packages/og-images directory

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* refactor(api): mount org OG image under /org-site/og

Align with existing org-site public routes (/org-site/course) instead of a
top-level /org prefix.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* refactor(plans): consolidate isOrgOnFreePlan into options-based utility

Move orgId guard and self-hosted/plan checks into @cio/utils/plans.
Dashboard and API callers pass plans, isSelfHosted, and optional orgId
directly; remove the dashboard store wrapper.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* fix(org): require orgId for free-plan check and translate favicon strings

Treat missing orgId as not on free plan so nav gating matches prior
behavior when currentOrg is unset. Pass organization.id from OG service.

Add favicon settings translations for all non-English locales.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* refactor(dashboard): move meta tag helpers to metaTags.server.ts

Keep PRIVATE_SERVER_URL resolution in a server-only module so dynamic
private env imports cannot leak into universal or client bundles.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>
This commit is contained in:
Rotimi Best
2026-07-07 22:15:11 +01:00
committed by GitHub
co-authored by Rotimi Best Cursor Agent
parent af95c6280c
commit b8fca607aa
31 changed files with 665 additions and 58 deletions
@@ -1635,6 +1635,10 @@
"reconnect_description": "This domain needs to be connected again to generate new setup records.",
"error_description": "This custom domain exists, but verification is not complete yet.",
"custom_favicon": "Custom favicon",
"custom_favicon_description": "Shown in browser tabs when visitors open your public school site. Falls back to your organization logo when unset.",
"custom_favicon_save": "Save favicon",
"custom_favicon_remove": "Remove favicon",
"custom_favicon_saved": "Favicon updated",
"custom_code": "Custom code"
},
"customize_lms": {