Identity & sessioncurrent
- Register/login và kiểm tra username/email.
- Hash password/refresh token, phát JWT pair.
- Verify/forgot password enqueue email worker.
- Logout blacklist access token trong Redis.
Bản đồ từ HTTP entrypoint tới domain service, database, Redis queue, worker và external provider. Route comment hoặc module không được mount không được tính là API hiện hành.
Mọi endpoint hiện hành nằm dưới /api/v1. HLS là ngoại lệ về body parser vì cần raw body để xác minh chữ ký.
Các nhóm dưới đây được mount thật trong src/routes/index.ts. Catalog chi tiết chứa method, path, auth, handler và source file cho từng endpoint.
/admin14
/ai1
/auth13
/circle35
/circle-ai1
/health1
/me6
/message-groups6
/museum2
/notification5
/posts22
/pusher1
/quests2
/search3
/topic2
/upload2
/user4
/users4
/webhooks2
npm run docs:routes để sinh lại catalog từ TypeScript AST.Mỗi thẻ gom các endpoint cùng một hành vi và chỉ ra phần xử lý sau HTTP response khi có queue hoặc realtime side effect.
Không phải mọi tên queue đều có worker riêng: likes_events là Redis list do like worker drain; friend-request scheduling hiện dùng message queue.
| Queue / structure | Consumer | Mục đích |
|---|---|---|
email_queue | email worker | Verify email, forgot password, invitation email. |
bloom_queue | bloom worker | Cập nhật Redis Bloom cho username/email. |
pinecone_queue | pine worker | Sinh embedding và upsert Pinecone. |
like_queue + likes_events | like worker | Drain event Redis, sync DB và phát like notification. |
notification | notification worker | Batch reply/mention notification mỗi 5 giây. |
message_queue | message worker | Batch chat notification mỗi 3 giây. |
evaluation_queue | evaluate worker | Chấm post/report, cập nhật quality, HP/EXP và moderation. |
delta_hp_queue | delta HP worker | Tăng/giảm circle energy theo job. |
auto_remove_ban_queue | auto-remove-ban worker | Dọn timed ban đã hết hạn. |
friend_request_queue | không có worker riêng | Constant/queue được tạo, nhưng scheduler hiện add friend request job vào message queue. |
GET /topic đang hoạt động cho search; route list topic cũ trong code đã comment nên không được tính thêm.modules/internal và api/internal.html mô tả endpoint internal cũ, nhưng router internal không được mount trong src/routes/index.ts.friend_request_queue có trong constants/producer nhưng không có worker riêng; initFriendRequest() hiện thao tác trên message queue.