Skip to content

Latest commit

 

History

History
116 lines (96 loc) · 8.13 KB

File metadata and controls

116 lines (96 loc) · 8.13 KB

website

Most of it is pretty straightforward / static page stuff.

Page layout is based on a global .section class that enforces width consistency between all pages - I'd familiarize myself with that one as it gets used basically everywhere to bound the layout (and also allow things to break free of the layout by adding .expand as a subclass). Rest is deliberately kept unabstracted to allow maximal flexibility (which is especially nice with AI exports from figma, just do whatever works, few rails).

Some things are legacy and esoteric - e.g. the header and footer are super messy - lean on AI is probably enough to figure it out if you ever want to refactor it.

translations

Translations are generated by AI from the content folder - there's two types of translations, tina cms and i18n - I've been using i18n more at the cost of not having direct CMSability via tina - this is because tina operates in "markdown chunks" that make it extremely annoying/hard to implement more advanced sections - you can do it, but I recommend just dropping tina and go full i18n

Translations automatically run on any changes to the /content folder via a github action - it cleans up orphaned translations and keeps track of which files changed via content hashes so the AI pipeline only translates changes instead of the whole folder on every commit.

faq translations

FAQs are pulled from nocodb via webhook, which triggers a github action, which writes to /content/external/faq - just as above, it gets re-translated automatically on change because its in the content folder - you'll have to cycle the github token as I am using my personal access token currently, it will probably stop working at some point

if you have other sources (e.g. make a cms in the future or whatever), you can put it in the content folder and it'll also get translated - its fully dynamic

blog

the Devcon blog is pulled from the ethereum blog via RSS

you can fetch all our blogposts via the "Event" category, then you can further filter by the "Subcategory" which can be either Devcon or Devconnect - if this isn't working, its likely because the blog doesn't have the proper tags upstream in the blog repo - whoever handles the post submissions to the blog repo (historically Rose/Joe) would need to fix that / be aware of these categories - you can also create PRs there yourself, should be trivial to figure out how it works by inspecting the blog repo

social cards (og images) — DC8 asset layout

The session/AV cards (/api/social/schedule/[id], /api/social/av/[id]) pick assets per event (session.eventId === 'devcon8' vs everything else):

  • public/social/dc7/ and public/social/dc8/ — one directory per event, each with logo.png, prism.png (background art) and tracks/*.png. dc8 also holds kv-bg.jpg (the Mumbai key visual at 1966×1106, resized from src/components/common/dc-8/hero/images/devcon-8-india-bg.png) — the schedule card's backdrop since the 2026-08 brand pass; dc8/prism.png is now only used by the AV thumbnail route. dc7 also holds the schedule-u background (personalized.png) and legacy extras (characters/, clock, pin — unreferenced by the card code).
  • The DC8 Social/YouTube card (renderDc8SocialCard in services/social-cards/dc8-social-card.tsx, Figma Dev Handoff 5068:1593 ff) serves both api/social/schedule/[id] (1200×630) and api/social/av/[id] (1920×1080) for devcon8 sessions; it is set in Poppins Regular/Medium/Bold (public/fonts/Poppins-{Regular,500,Bold}.ttf via poppinsFonts()). DC7/SEA keeps the original Inter designs untouched.
  • DC8 track badges (570px octagons) and per-track card colors are mapped by normalized Pretalx track name in services/social-cards/track-images.ts (DC8_TRACK_BADGES / DC8_TRACK_COLORS, client-safe module shared with the session share page, which also hosts the type/CLS label formatting helpers); unmapped tracks (Art&Culture, Invited speaker, Community Hubs) fall back to a neutral badge on the default gradient.
  • devcon8 sessions missing from devcon-api are fetched live from Pretalx as a fallback (getSessionFromPretalx) — requires the organizer-level PRETALX_API_KEY on Netlify.
  • Speaker share card (/api/social/speaker/[id]/, renderDc8SpeakerCard in services/social-cards/dc8-speaker-card.tsx, Figma Dev Handoff 5118:6111): consumed as og:image by the event app's /speakers/[id] pages (the app only emits metadata; all rendering lives here). Mumbai KV backdrop + floating gradient card, 224px ringed avatar (marigold ring + FEATURED for speakers with a featured devcon8 session, purple-300 otherwise), session count and up to three topic tags derived from the speaker's devcon8 sessions (one /speakers/:id call — the payload embeds every session with its eventId). Adds Poppins SemiBold (public/fonts/Poppins-SemiBold.ttf) to poppinsFonts(). Cache key social-cards/speaker/{id}.jpg. Outside production ?event=devcon-7 previews the card against older data.

Open items before the DC8 card is final:

  • Re-enable the og-cache read + write lines in services/og-cache.ts (both commented TEMPORARY while iterating — every scrape currently re-renders and the serve-stale safety net is off).
  • Restore the confirmed-only gate for devcon8 in src/pages/schedule/[event]/[code].tsx (TEMPORARY exemption).
  • The AV thumbnail route (api/social/av/[id]) still renders the old prism/periwinkle design with DC7 copy — needs its own DC8 pass.
  • The DC8 schedule card always shows the Mumbai date block (per the Figma frames); once a schedule is published, decide whether scheduled sessions should surface room/time again (getDay still maps DC7 dates).

qr code redirects

devcon.org/qr/<slug>[/<placement>] redirects are managed by the team in the NocoDB table "QR redirects" (base "QR codes"; table id in the NOCODB_QR_TABLE_ID env var, read with the site's existing NocoDB token). Columns: Slug (path after /qr/), Target URL (absolute or a devcon.org path), Keyword (Matomo mtm_kwd, defaults to the slug's first segment), Active, Notes. Anything after the slug in a scanned URL is the placement (/qr/app/airport = row app, placement airport) and lands in mtm_placement; mtm_campaign is always qr. Unknown or inactive slugs go to the homepage with mtm_kwd=unknown. Targets that must stay out of the public repo (Pretix voucher links) live only in the table.

Flow: src/middleware.ts rewrites /qr/* (any locale) to /api/qr/* (src/pages/api/qr/[[...path]].ts), which answers a 302 kept in Netlify's durable CDN cache per scanned URL (1 h for a match, 1 min for the fallback) under the qr-redirects tag, no stale-while-revalidate; browsers are told not to keep the redirect. Every CDN miss reads NocoDB: there is no memory cache on purpose, because an instance holding the old table would refill the CDN with it after a purge (seen in testing). On a NocoDB failure the service (src/services/qr-redirects.ts) falls back to the last rows it read and then to a built-in safety net for the public targets. /api/qr/refresh/ re-reads NocoDB and purges the tag; the NocoDB webhook calls it on every row change, so edits go live at once.

Printable image: append ?svg to any resolving QR URL (https://devcon.org/qr/web/ns?svg) to get the QR code as SVG, ?svg&download to save it as a file. It encodes the short /qr/ URL (never the destination), error correction Q, 4-module quiet zone, black on white, scalable. Unknown slugs get a 404 so a typo cannot be printed. Netlify's Next runtime keys the CDN cache on the path and ignores the query string (netlify-vary: query=__nextDataReq|_rsc), so the middleware rewrites ?svg (and /qr/x.svg) to /api/qr-image/x?svg (same handler, own path; no file extension in the target, which the runtime would answer with a visible 308) and the image is served no-store; otherwise an image request would poison the redirect of that URL for a day (seen live on 2026-10-01). Any new query-based variant must follow the same rule. Print guidance: at least 2 cm wide for hand-held scanning, larger for screens or banners, never invert colours. The old per-target rules in netlify.toml were removed on 2026-10-01; the early-bird QR rule stays.