Spaces:
Running

B24_Database / README.md
Nrighton233j
Replace with B24 Database service
5fa25cc
|
Raw History Blame Contribute Delete
1.21 kB
metadata
title: B24 Database
emoji: 🗄️
colorFrom: green
colorTo: gray
sdk: docker
pinned: false

B24 Database

Owns users, friendships, groups (metadata/membership/permissions), statuses, favorites, calls, points/tasks, reports, security recovery, chat mutes, disappearing-message durations, and announcements.

Does NOT own: message/group-message content (-> Messages service), app version / OTA bundle metadata (-> OTA service). See messages_ota_extracted.py for the functions that were moved out of here.

Only reachable through the gateway - every route requires X-Internal-Secret to match INTERNAL_SECRET, so it should never be called directly by an app.

Env vars

Var Purpose
INTERNAL_SECRET Must match what the gateway sends as X-Internal-Auth
DB_PATH Where the sqlite file lives. Default /data/b24.db. Note: on HF Spaces this is ephemeral unless persistent storage is enabled on the Space - without it, data resets on every restart/rebuild.

Endpoints

REST wrapper over database.py, one route per function - see app.py. Covers /users/*, /friends/*, /statuses/*, /favorites/*, /calls/*, /tasks/*, /points/*, /reports/*.