sojorn/sojorn_docs/TODO.md
Patrick Britton 4315da74b2 docs: Update TODO and add Funkwhale deployment guide
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 16:03:45 -06:00

127 lines
5.2 KiB
Markdown

# Sojorn Development Status
**Last Updated**: February 18, 2026
**Branch**: goSojorn — **Status**: Active Development — MVP near-complete
---
## Shipped and Working
### Core Platform
- Go backend (Gin, pgx v5, PostgreSQL) — 100% migrated from Supabase
- JWT auth with refresh tokens, email verification, ALTCHA bot protection
- Posts: create, edit, delete, visibility, chains, reactions, saves
- Comments: threaded with replies
- Feed: algorithmic (5-factor scoring), chronological fallback
- Feed algorithm: engagement weighting, cooling period (0.2x multiplier), 60/20/20 diversity injection, impression recording
- Repost/boost: 4 repost types, amplification analytics, trending posts
- Image/video uploads to Cloudflare R2 with signed URLs
- GET /media/sign?path=X — resolves relative R2 keys to full URLs
- Video moderation: FFmpeg frame extraction -> R2 upload -> Google Vision AI + OpenAI analysis
- Follow/unfollow, search (users/posts/hashtags/beacons)
- Profile widget system with layout persistence
- Blocking: single, by handle, bulk import (POST /users/me/blocks/bulk)
- E2EE chat (X3DH), push notifications (FCM)
- Beacons + Neighborhoods (OSM-based)
- Groups: create/join/leave, member management, discovery, E2EE capsules
- Capsule key distribution and auto-healing rotation
- Group feed endpoint
- Capsule admin: rotate keys, invite member, remove member, settings
- GET /users/by-handle/:handle — profile lookup for capsule invite
- Health check service: /health, /health/detailed, /health/ready, /health/live
- Content moderation: OpenAI text + Google Vision images, Three Poisons scoring
- NSFW labeling, blur toggles, appeal system, safe links
- GeoIP, Nginx reverse proxy + SSL/TLS
- Audio overlay proxy: GET /audio/library, GET /audio/library/:trackId/listen
- Returns 503 until FUNKWHALE_BASE is set — gracefully handled in Flutter
### Admin Panel (Next.js, port 3001)
- Dashboard, user management, post management, bulk actions
- Moderation queue, AI moderation config/audit, appeals, reports
- Algorithm config tuning + live feed scores viewer
- Categories, neighborhoods, official accounts scheduler
- Storage browser, system health, reserved usernames, safe domains
- Email templates with test send
- Groups and Capsules page (list, member management, deactivate, key rotation status)
- Quip Repair page (list missing thumbnails, server-side FFmpeg repair)
### Flutter App
- Full audio overlay system in Quip recorder:
- AudioLibraryScreen: Device tab (file_picker) + Library tab (Funkwhale via Go proxy)
- EnhancedQuipRecorderScreen: music button, audio chip, volume slider
- VideoStitchingService: ffmpeg audio mix pass (amix with dropout_transition)
- Group navigation (clusters → GroupScreen)
- Public cluster group feed
- Share post via share_plus
- Signed media URL resolution via Go backend
---
## Needs Server Deploy
Code is on goSojorn branch, NOT yet live. The `internal` remote may be missing on the server.
```bash
ssh -i ~/.ssh/mpls.pem patrick@116.202.231.103
cd /opt/sojorn
# Add internal remote if missing:
git remote get-url internal 2>/dev/null || git remote add internal https://git.mp.ls/patrick/sojorn.git
git pull internal goSojorn
psql "$DATABASE_URL" -f go-backend/migrations/20260218_feed_impressions_and_group_keys.sql
cd go-backend && go build -o bin/api ./cmd/api/...
echo PASSWORD | sudo -S systemctl restart sojorn-api.service
```
---
## Remaining Work
### High Priority
**Funkwhale Infrastructure** (audio library backend)
- Deploy Funkwhale Docker pod on server — see sojorn_docs/FUNKWHALE_DEPLOYMENT.md
- Add to /opt/sojorn/.env: `FUNKWHALE_BASE=http://127.0.0.1:5000`
- Seed with royalty-free tracks
- Optional: `audio.sojorn.net` Nginx block + SSL cert
### Medium Priority
**Flutter Polish**
- sojorn_rich_text.dart — profile navigation from @mentions
- post_with_video_widget.dart — post options menu (edit, delete, report)
- video_player_with_comments.dart — more options button
- reading_post_card.dart — share functionality
**Algorithm Transparency**
- Show users why a post appeared in their feed
- A/B testing framework for algorithm weights
### Low Priority
**Code Cleanup**
- Delete go-backend/cmd/supabase-migrate/ (dead tool)
- Remove stale Supabase comments in go-backend/internal/middleware/auth.go
- Remove forceResetBrokenKeys() from simple_e2ee_service.dart
- go-backend root: loose check_table.go, seed_groups*.go — conflicting main, move or delete
**Infrastructure**
- CI/CD pipeline (currently manual deploy)
- Integration test suite exists but is dead code (internal/testing/)
---
## Completed This Sprint (Feb 17-18, 2026)
- Feed cooling period + diversity injection + impression recording
- Video frame upload to R2 (was returning local /tmp path)
- Admin: Groups & Capsules page, Quip Repair page, Algorithm feed scores viewer
- BulkBlockUsers endpoint
- Group feed, key management, member invite/remove, settings endpoints
- Capsule auto key rotation on open + admin modals (rotate, invite, remove, settings)
- Flutter: group navigation, group feed, share_plus, signed URL, quip repair wired to Go
- Health check service wired into routes
- GET /media/sign and GET /users/by-handle/:handle endpoints added
- Full audio overlay system: AudioLibraryScreen, Funkwhale proxy routes, ffmpeg amix