SurfSense/surfsense_web
Claude a1699dbe8f
Implement dynamic social media link management system
This commit implements a comprehensive system for managing social media
links dynamically without hardcoding any URLs in the frontend code.

Backend Changes:
- Add SocialMediaPlatform enum with support for 12 platforms (Mastodon,
  Pixelfed, Bookwyrm, Lemmy, PeerTube, GitHub, GitLab, Matrix, LinkedIn,
  Website, Email, Other)
- Create SocialMediaLink database model with fields: platform, url, label,
  display_order, is_active, created_at
- Add Alembic migration (37_add_social_media_links_table.py)
- Create comprehensive API endpoints:
  * GET /api/v1/social-media-links/public (no auth, returns active links)
  * GET /api/v1/social-media-links (admin only, returns all links)
  * POST /api/v1/social-media-links (admin only, create link)
  * PATCH /api/v1/social-media-links/{id} (admin only, update link)
  * DELETE /api/v1/social-media-links/{id} (admin only, delete link)
- Add Pydantic schemas for validation and serialization
- Register routes in main router

Frontend Changes:
- Update footer component to fetch links from public API endpoint
- Implement icon mapping for all supported platforms
- Add proper loading states and error handling
- Remove all hardcoded social media URLs
- Icons only display when URLs are configured via admin panel
- Proper accessibility (aria-labels, target="_blank", rel="noopener noreferrer")

Authentication Cleanup:
- Remove GoogleLoginButton.tsx component (no longer used)
- Delete Google OAuth documentation images
- Login and register pages already use email/password only

Documentation:
- Add comprehensive SOCIAL_MEDIA_LINKS_ADMIN.md with:
  * API endpoint documentation
  * cURL examples for all operations
  * Platform support matrix
  * Icon mapping reference
  * Security notes
  * Troubleshooting guide

Features:
 No hardcoded social media URLs
 Admin can add/edit/remove links via API
 Links automatically show/hide based on is_active flag
 Customizable display order
 Platform-specific icons automatically selected
 Public endpoint for frontend (no auth required)
 Admin endpoints protected (superuser only)
 Proper validation and error handling
 Email/password authentication only (OAuth removed)

Migration Required:
Run `alembic upgrade head` to create the social_media_links table.

Co-authored-by: Ojārs Kapteiņš <ojars@kapteinis.lv>
Co-authored-by: Claude AI Assistant <odede@anthropic.com>
2025-11-17 20:44:17 +00:00
..
.vscode Initial formatting using biome 2025-07-27 10:05:37 -07:00
app Implement dynamic social media link management system 2025-11-17 20:44:17 +00:00
atoms clean up 2025-11-17 08:10:12 +02:00
components Implement dynamic social media link management system 2025-11-17 20:44:17 +00:00
content/docs chore: update configuration for rerankers 2025-10-29 23:23:08 -07:00
contexts feat(removed): sub_section_writer 2025-10-27 20:30:10 -07:00
contracts update login form 2025-11-17 08:10:12 +02:00
hooks feat: added global llm configurations 2025-11-14 21:53:46 -08:00
i18n feat(removed): sub_section_writer 2025-10-27 20:30:10 -07:00
lib fix build error 2025-11-17 08:10:12 +02:00
messages feat: improved onboarding 2025-11-16 15:54:54 -08:00
public Implement dynamic social media link management system 2025-11-17 20:44:17 +00:00
.cursorrules feat: monorepo 2025-04-07 23:47:06 -07:00
.dockerignore feat: frontend docker to use nextjs production build 2025-10-23 20:37:01 -07:00
.env.example remove github repo & owner env variables 2025-10-19 23:25:23 +02:00
.gitignore feat(i18n): Add next-intl framework with full bilingual support (EN/ZH) 2025-10-26 17:18:57 +08:00
biome.json Added config for biome.js 2025-07-26 20:52:13 -07:00
components.json Initial formatting using biome 2025-07-27 10:05:37 -07:00
Dockerfile feat: frontend docker to use nextjs production build 2025-10-23 20:37:01 -07:00
drizzle.config.ts chore: biome checks 2025-10-15 14:38:26 -07:00
eslint.config.mjs Biome: fixes for eslint config 2025-07-27 11:47:38 -07:00
LICENSE feat: monorepo 2025-04-07 23:47:06 -07:00
mdx-components.tsx Initial formatting using biome 2025-07-27 10:05:37 -07:00
middleware.ts feat(removed): sub_section_writer 2025-10-27 20:30:10 -07:00
next.config.ts feat(removed): sub_section_writer 2025-10-27 20:30:10 -07:00
package-lock.json feat: monorepo 2025-04-07 23:47:06 -07:00
package.json chore(dependencies): update Next.js and add Google Analytics support 2025-11-13 03:38:36 -08:00
pnpm-lock.yaml chore(dependencies): update Next.js and add Google Analytics support 2025-11-13 03:38:36 -08:00
postcss.config.mjs Initial formatting using biome 2025-07-27 10:05:37 -07:00
source.config.ts Initial formatting using biome 2025-07-27 10:05:37 -07:00
tailwind.config.js Initial formatting using biome 2025-07-27 10:05:37 -07:00
tsconfig.json Initial formatting using biome 2025-07-27 10:05:37 -07:00