feat: superadmin-configurable Hacker Links shown as cards on hacker home - #143
Merged
Conversation
Co-Authored-By: Caleb Bae <baecal000@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Caleb Bae <baecal000@gmail.com>
…er-links # Conflicts: # docs/docs.go
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
hacker_linkstable (migration 000033) with label/url/icon/display_order, seeded with Devpost + Discord.HackerLinksStore(List/Create/Update/Delete) wired intoStorage+ mock store.GET /v1/hacker-links(any authenticated user) andGET/POST/PUT/DELETE /v1/superadmin/hacker-links(superadmin only). Payload validation restrictsicontodevpost|discord|github|instagram|globe|linkand requires a valid URL. Handler tests + regenerated swagger docs included.Frontend (
client/portal):/hacker-linksand renders each as an external-link card (<a target="_blank">) styled like the existing quick-link cubes, sorted bydisplay_order./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/lib/hacker-link-icons.tswith custom Devpost/Discord SVGs (hacker-link-brand-icons.tsx) and Lucide fallbacks.Testing
go vet ./...,go test ./cmd/api/ ./internal/...pass (includes newhacker_links_test.go).npm run lintandnpm run buildpass inclient/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