sojorn/go-backend
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
..
cmd Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
internal Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
pkg/utils Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
scripts Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
.env.example Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
chain_button_fix.patch Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
directus-docker-compose.yml Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
Dockerfile Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
firebase-service-account.json Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
fixdb-linux Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
go.mod Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
go.sum Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
import_supabase_linux Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
login_response.json Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
Makefile Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
migrate-linux Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
migrate.exe Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
migration_tool.exe Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
nginx_sojorn.conf Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
README.md Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
seeder-linux Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
seeder_linux Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
verify.exe Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00
verify_linux Initial commit: Complete threaded conversation system with inline replies 2026-01-30 07:40:19 -06:00

Sojorn Backend Engine (Golang)

Production-grade Golang backend migrated from Supabase Edge Functions.

Tech Stack

  • Language: Go 1.21+
  • Framework: Gin Gonic
  • Database: PostgreSQL with PostGIS
  • Auth: JWT (compatible with Supabase)
  • Logging: Zerolog
  • Deployment: Docker / Systemd

Getting Started

Prerequisites

  • Go 1.21 or higher
  • PostgreSQL 15+ with PostGIS extension
  • golang-migrate CLI (for migrations)

Setup

  1. Clone the repository
  2. Copy .env.example to .env and fill in your details:
    cp .env.example .env
    
  3. Install dependencies:
    go mod download
    
  4. Run migrations:
    make migrate-up
    

Running Locally

go run cmd/api/main.go

The server will start on http://localhost:8080.

API Documentation

Auth & Profiles

  • POST /api/v1/signup: Complete profile creation after auth
  • GET /api/v1/profiles/:id: Get user profile
  • GET /api/v1/profile: Get current user profile

Posts & Feed

  • POST /api/v1/posts: Create a new post or beacon
  • GET /api/v1/feed: Get personal feed

Deployment

Using Systemd (Ubuntu/Debian)

  1. Edit scripts/deploy.sh with your VPS details.
  2. Run the deployment script:
    ./scripts/deploy.sh
    

Using Docker

docker build -t sojorn-api .
docker run -p 8080:8080 --env-file .env sojorn-api

Migration Notes

  • RLS policies have been moved to application-level middleware.
  • Supabase-specific triggers for metrics are maintained in SQL migrations.
  • E2EE session management is ported to handlers/services.