Profiles, Giphy, uploads, settings UI

Backend:
- Auth: split routes into RegisterPublicRoutes + RegisterProtectedRoutes
- Auth: PATCH /me for profile updates (display_name, bio, accent_color, status_text)
- Auth: Gravatar fallback for avatars on register
- DB: users table now has bio, accent_color, status_text columns
- giphy/client.go: Search() and GetTrending() against Giphy API
- upload/handlers.go: MinIO file upload + serve
- config: added GiphyConfig and MinIO config
- cmd/server: wired giphy (/gifs/search, /gifs/trending), upload (/upload), files (/files/*) routes

Frontend:
- auth store: updated User interface with new profile fields, added updateProfile()
- UserSettings.tsx: terminal-styled profile editor (display_name, bio, accent_color, status_text, avatar upload)
- GiphyPicker.tsx: terminal-styled GIF picker with search + trending
- ChatArea.tsx: integrated [GIF] button into message input
- App.tsx: imports UserSettings, added /settings route
This commit is contained in:
2026-06-28 16:06:08 -04:00
parent bb5a56816b
commit e69553af02
18 changed files with 1422 additions and 352 deletions
+38
View File
@@ -12,7 +12,11 @@ type Config struct {
Port string
Database DatabaseConfig
Valkey ValkeyConfig
MinIO MinIOConfig
LiveKit LiveKitConfig
WebPush WebPushConfig
Session SessionConfig
Giphy GiphyConfig
}
type DatabaseConfig struct {
@@ -27,6 +31,30 @@ type ValkeyConfig struct {
URL string
}
type MinIOConfig struct {
Endpoint string
AccessKey string
SecretKey string
Bucket string
UseSSL bool
}
type LiveKitConfig struct {
URL string
APIKey string
Secret string
}
type WebPushConfig struct {
PublicKey string
PrivateKey string
Subject string
}
type GiphyConfig struct {
APIKey string
}
type SessionConfig struct {
CookieName string
Duration time.Duration
@@ -46,10 +74,20 @@ func Load() *Config {
Valkey: ValkeyConfig{
URL: getEnv("VALKEY_URL", "redis://localhost:***@example.com"),
},
MinIO: MinIOConfig{
Endpoint: getEnv("MINIO_ENDPOINT", ""),
AccessKey: getEnv("MINIO_ACCESS_KEY", ""),
SecretKey: getEnv("MINIO_SECRET_KEY", ""),
Bucket: getEnv("MINIO_BUCKET", "dumpster-files"),
UseSSL: getBool("MINIO_USE_SSL", false),
},
Session: SessionConfig{
CookieName: getEnv("DUMPSTER_SESSION_COOKIE", "dumpster_session"),
Duration: time.Duration(getInt("DUMPSTER_SESSION_DAYS", 30)) * 24 * time.Hour,
},
Giphy: GiphyConfig{
APIKey: getEnv("GIPHY_API_KEY", ""),
},
}
}