Thazh Social

Backend (Next.js + Supabase + Cloudinary + Litterbox). Mobile client is built in Kotlin Jetpack Compose under /android.

Trạng thái dịch vụ
Supabase: chưa cấu hình
Cloudinary: chưa cấu hình
Litterbox: sẵn sàng (không cần khoá)
App: Thazh Social
API endpoints

Tất cả endpoint trả về JSON dạng { ok, data } hoặc { ok: false, error }. Auth dùng header Authorization: Bearer <jwt>.

Channels
  • GET /api/channels
  • POST /api/channels
  • GET /api/channels/:id/posts
  • POST /api/channels/:id/posts
  • POST /api/channels/:id/subscribe

Official Accounts
  • GET /api/official-accounts
  • POST /api/official-accounts
  • GET /api/official-accounts/:id/articles
  • POST /api/official-accounts/:id/articles

Feed / Posts
  • GET /api/posts
  • POST /api/posts
  • GET /api/posts/:id
  • POST /api/posts/:id/comments
  • POST /api/posts/:id/reactions

DM (1-1)
  • GET /api/dm/conversations
  • POST /api/dm/conversations
  • GET /api/dm/conversations/:id/messages
  • POST /api/dm/conversations/:id/messages

Stories (24h)
  • GET /api/stories
  • POST /api/stories
  • POST /api/stories/:id/view
  • POST /api/stories/:id/reactions

Emoji & Stickers
  • GET /api/emoji/packs
  • POST /api/emoji/packs
  • POST /api/emoji/packs/:id/items

Hot Search
  • GET /api/hot-search
  • GET /api/hot-search/:scope

Search
  • GET /api/search?q=&type=users|channels|posts|topics|miniprograms

Auth & 2FA
  • POST /api/auth/register
  • POST /api/auth/login
  • POST /api/auth/2fa/setup
  • POST /api/auth/2fa/verify
  • GET /api/me

Privacy / Reports
  • GET /api/me/privacy
  • PATCH /api/me/privacy
  • POST /api/reports
  • POST /api/blocks

Uploads
  • POST /api/upload/cloudinary-sign
  • POST /api/upload/litterbox

(Stub) Mini Programs
  • GET /api/mini-programs
  • POST /api/mini-programs

(Stub) Super Topics
  • GET /api/super-topics
  • POST /api/super-topics
  • GET /api/super-topics/:id/posts

(Stub) Groups
  • GET /api/groups
  • POST /api/groups
Hướng dẫn nhanh
  1. Tạo project Supabase, lấy URL + anon key + service role key.
  2. Mở Supabase SQL editor, dán nội dung backend/sql/schema.sql và chạy.
  3. Cấu hình các Secret tương ứng trong Replit.
  4. Build app Android trong /android, set API_BASE_URL trỏ tới domain này.
Kiểm tra /api/health