sojorn/sojorn_docs/LEGACY_README.md
Patrick Britton 3c4680bdd7 Initial commit: Complete threaded conversation system with inline replies
**Major Features Added:**
- **Inline Reply System**: Replace compose screen with inline reply boxes
- **Thread Navigation**: Parent/child navigation with jump functionality
- **Chain Flow UI**: Reply counts, expand/collapse animations, visual hierarchy
- **Enhanced Animations**: Smooth transitions, hover effects, micro-interactions

 **Frontend Changes:**
- **ThreadedCommentWidget**: Complete rewrite with animations and navigation
- **ThreadNode Model**: Added parent references and descendant counting
- **ThreadedConversationScreen**: Integrated navigation handlers
- **PostDetailScreen**: Replaced with threaded conversation view
- **ComposeScreen**: Added reply indicators and context
- **PostActions**: Fixed visibility checks for chain buttons

 **Backend Changes:**
- **API Route**: Added /posts/:id/thread endpoint
- **Post Repository**: Include allow_chain and visibility fields in feed
- **Thread Handler**: Support for fetching post chains

 **UI/UX Improvements:**
- **Reply Context**: Clear indication when replying to specific posts
- **Character Counting**: 500 character limit with live counter
- **Visual Hierarchy**: Depth-based indentation and styling
- **Smooth Animations**: SizeTransition, FadeTransition, hover states
- **Chain Navigation**: Parent/child buttons with visual feedback

 **Technical Enhancements:**
- **Animation Controllers**: Proper lifecycle management
- **State Management**: Clean separation of concerns
- **Navigation Callbacks**: Reusable navigation system
- **Error Handling**: Graceful fallbacks and user feedback

This creates a Reddit-style threaded conversation experience with smooth
animations, inline replies, and intuitive navigation between posts in a chain.
2026-01-30 07:40:19 -06:00

96 lines
3.1 KiB
Markdown

# sojorn
sojorn is a calm, consent-first social platform built to slow attention and reduce hostility by design. The project pairs a Flutter client with a Supabase backend and Edge Functions that enforce tone gating, mutual-consent conversations, and trust-aware ranking.
## Product Principles
- Calm is structural, not performative.
- Hostility is contained; clean content remains visible.
- Exposure is opt-in, filtering is private, and blocking is absolute.
- Conversation requires mutual consent (mutual follow).
- Attention is non-possessive: feeds rotate and trends fade.
- Transparency is a feature: reach rules are explainable.
## Tech Stack
- **Client:** Flutter (mobile + web) in `sojorn_app/`
- **Backend:** Supabase (Postgres, Auth, RLS, Edge Functions) in `supabase/`
- **Media:** Cloudflare R2 signing for uploads/downloads
- **Tooling:** PowerShell helpers for dev and deployment
## What Lives Here
```
sojorn/
docs/ Architecture, setup, and deployment guides
sojorn_app/ Flutter app (mobile + web)
supabase/ Database + Edge Functions
troubleshooting/ Notes and fixes for common issues
.env Local secrets for dev scripts
run_dev.ps1 Run Flutter app with .env defines (device)
run_web.ps1 Run Flutter app in Chrome with .env defines
deploy_all_functions.ps1 Deploy all Edge Functions to Supabase
import requests.py Standalone API test script
test_r2_credentials.js Quick R2 credential check
```
## Backend Capabilities (Edge Functions)
- **Publishing:** `publish-post`, `publish-comment`, `manage-post`
- **Feeds:** `feed-personal`, `feed-sojorn`, `trending`
- **Moderation & Trust:** `tone-check`, `report`, `calculate-harmony`
- **Social Graph:** `follow`, `block`, `save`, `appreciate`
- **Profiles & Auth:** `signup`, `profile`, `profile-posts`, `delete-account`, `deactivate-account`
- **Notifications & Beacons:** `notifications`, `create-beacon`
- **Media:** `upload-image` with R2 signing support
Shared logic lives in `supabase/functions/_shared/` (tone detection, ranking, validation, R2 signing, etc.).
## Getting Started (Local)
1. **Create a local `.env`** with at least:
- `SUPABASE_URL`
- `SUPABASE_ANON_KEY`
- `API_BASE_URL`
2. **Start Supabase and apply migrations:**
```bash
supabase start
supabase db reset
```
3. **Run the Flutter app:**
```bash
./run_dev.ps1
```
Or run the web build:
```bash
./run_web.ps1
```
4. **Deploy Edge Functions when needed:**
```bash
./deploy_all_functions.ps1
```
For detailed setup, seeding, and troubleshooting, see the docs listed below.
## Key Docs
- `docs/QUICK_START.md`
- `docs/SETUP.md`
- `docs/DEPLOYMENT.md`
- `docs/EDGE_FUNCTIONS.md`
- `docs/ARCHITECTURE.md`
- `docs/DESIGN_SYSTEM.md`
- `docs/IMAGE_UPLOAD_IMPLEMENTATION.md`
## Notes
- The root `.env` file is used by `run_dev.ps1` and `run_web.ps1` to pass `--dart-define` values into Flutter.
- The Supabase functions list is reflected in `deploy_all_functions.ps1`. Update it when adding new functions.
## License
To be determined.