**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.
71 lines
1.6 KiB
Markdown
71 lines
1.6 KiB
Markdown
# 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:
|
|
```bash
|
|
cp .env.example .env
|
|
```
|
|
3. Install dependencies:
|
|
```bash
|
|
go mod download
|
|
```
|
|
4. Run migrations:
|
|
```bash
|
|
make migrate-up
|
|
```
|
|
|
|
### Running Locally
|
|
```bash
|
|
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:
|
|
```bash
|
|
./scripts/deploy.sh
|
|
```
|
|
|
|
### Using Docker
|
|
```bash
|
|
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.
|