Skip to content

feat: superadmin-configurable Hacker Links shown as cards on hacker home - #143

Merged
balebbae merged 9 commits into
mainfrom
devin/1787947848-hacker-links
Sep 2, 2026
Merged

feat: superadmin-configurable Hacker Links shown as cards on hacker home#143
balebbae merged 9 commits into
mainfrom
devin/1787947848-hacker-links

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Adds a configurable "Hacker Links" feature: superadmins manage external links that render as clickable cards on the hacker home page (/app), alongside the existing Hacker Pack/FAQ/Contact cards. Defaults to Devpost and Discord (seeded by migration) with brand icons.

Backend:

  • New hacker_links table (migration 000033) with label/url/icon/display_order, seeded with Devpost + Discord.
  • HackerLinksStore (List/Create/Update/Delete) wired into Storage + mock store.
  • Routes: GET /v1/hacker-links (any authenticated user) and GET/POST/PUT/DELETE /v1/superadmin/hacker-links (superadmin only). Payload validation restricts icon to devpost|discord|github|instagram|globe|link and requires a valid URL. Handler tests + regenerated swagger docs included.

Frontend (client/portal):

  • Hacker dashboard fetches /hacker-links and renders each as an external-link card (<a target="_blank">) styled like the existing quick-link cubes, sorted by display_order.
  • New superadmin page at /admin/sa/hacker-links ("Hacker Links" sidebar tab): left side is a live hacker-style preview of the cards; right side is an add/edit/delete editor (zustand store, mirrors the FAQ admin pattern). Preview updates immediately as links change.
  • Shared icon map in shared/lib/hacker-link-icons.ts with custom Devpost/Discord SVGs (hacker-link-brand-icons.tsx) and Lucide fallbacks.

Testing

  • go vet ./..., go test ./cmd/api/ ./internal/... pass (includes new hacker_links_test.go).
  • npm run lint and npm run build pass in client/portal.

Link to Devin session: https://app.devin.ai/sessions/02640661685b4219882363f9fddec1cd
Open in Devin Desktop: https://app.devin.ai/desktop/session/02640661685b4219882363f9fddec1cd?variant=devin
Requested by: @balebbae

Co-Authored-By: Caleb Bae <baecal000@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot changed the title Add superadmin-configurable Hacker Links shown as cards on hacker home feat: superadmin-configurable Hacker Links shown as cards on hacker home Aug 28, 2026
devin-ai-integration Bot and others added 8 commits August 28, 2026 20:19
Co-Authored-By: Caleb Bae <baecal000@gmail.com>
Main added 000033-000046 (rsvp/travel), so 000033_add_hacker_links collided with 000033_add_rsvp_status_type and golang-migrate would refuse to run. Renumber to 000047, move the default Devpost/Discord rows into a separate 000048 seed migration per the one-concern-per-migration rule, and drop the trigger before the table in the down migration to match faqs/sponsors. Also add a role-gate test asserting admins get 403 on the superadmin hacker-links routes.
…ard preview

The Hacker Pack card sits in the same quick-links grid as the configurable hacker links, so surface its Notion embed editor on the Hacker Links page too (still available under Settings). The hacker preview now renders the built-in Hacker Pack/FAQ/Contact cards as inert reference tiles ahead of the configured links, dimming Hacker Pack when no embed is saved. Embed snippet helpers are extracted from HackerPackTab so both surfaces share identical parsing.
The filled brand glyphs read as solid black blobs next to the stroke-based Lucide icons in the icon picker and on the hacker dashboard. Redraw both as stroke paths on Lucide's 24-grid/2-unit-stroke spec with round caps and joins so they share the same optical weight and honour the caller's strokeWidth. Discord outline adapted from Tabler Icons (MIT).
@balebbae
balebbae merged commit f3d6a1c into main Sep 2, 2026
3 checks passed
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