Friend Service System Design
March 14, 2025
Friend Service System Design
The Friend feature facilitates the management of user relationships, enabling connections and providing options for blocking interactions when necessary. This functionality enhances player connectivity and serves as a foundation for additional features, such as activity tracking and social engagement opportunities.
Use cases diagram
A visual depiction of what is being written about
Database details
Database: NoSQL
#Database CollectionDescription
1friend_friend_requestsid: uuid • recipient_profile_id: ObjectId • requester_profile_id: ObjectId • status: String "PENDING"|"ACCEPTED"|"DECLINED" • message: String • feedback: String • created_at: Datecreated_by: ObjectIdmodified_at: Datemodified_by: ObjectId
2friend_friendsid: uuid • profile_id: ObjectId • friend_profile_id: ObjectId • created_at: Datecreated_by: ObjectIdmodified_at: Datemodified_by: ObjectIddeleted_at: Datedeleted_by: ObjectId
Database relationship
A visual depiction of what is being written about
API details
#PathDescriptionMethodHeadersRequestResponse
1profile/internal/v1/{userId}/friend-requestsView pending friend requestsGET• x-server-keyN/A{     items: [        {            id: String,            recipientProfileId: ObjectId,            requesterProfileId: ObjectId,            status: String "PENDING"|"ACCEPTED"|"DECLINED",            message: String,            feedback: String,            createdAt: Date,            createdBy: ObjectId,            modifiedAt: Date,            modifiedBy: ObjectId      }    ]    paging: {        cursors: {            before: String,            after: String        }    }}
2profile/internal/v1/{userId}/friend-requestsSend personalized friend requestPOST• x-server-key{    recipientProfileId: String,    message?: String, }{    id: String,    recipientProfileId: ObjectId,    requesterProfileId: ObjectId,    status: "PENDING",    message: String,    feedback: String,    createdAt: Date,    createdBy: ObjectId,    modifiedAt: Date,    modifiedBy: ObjectId}
3profile/internal/v1/{userId}/friend-requests/{requestId}/acceptAccept friend requestPUT• x-server-keyN/ASuccessResponseDTO
4profile/internal/v1/{userId}/friend-requests/{requestId}/declineDecline friend requestPUT• x-server-key{    feedback?: String  }SuccessResponseDTO
5profile/internal/v1/{userId}/friendsView all friendsGET• x-server-keyN/A{    items: [        {            id: String,            profileId: ObjectId            friendProfileId: ObjectId            createdAt: Date,            createdBy: ObjectId,            modifiedAt: Date,            modifiedBy: ObjectId,            deletedAt: Date,            deletedBy: ObjectId        }    ]    paging: {        cursors: {            before: String,            after: String        }    }}
6profile/internal/v1/{userId}/friends/{friendProfileId}Remove a friendDELETE• x-server-keyN/ASuccessResponseDTO
7profile/cms/v1/{userId}/friend-requestsView all friend requestsGET• x-access-tokenN/A{    items: [        {            id: String,            recipientProfileId: ObjectId,            requesterProfileId: ObjectId,            status: String "PENDING"|"ACCEPTED"|"DECLINED",            message: String,            feedback: String,            createdAt: Date,            createdBy: ObjectId,            modifiedAt: Date,            modifiedBy: ObjectId      }    ]    paging: {        cursors: {            before: String,            after: String        }    }}
8profile/cms/v1/{userId}/friendsView all friendsGET• x-access-tokenN/A{    items: [        {            id: String,            profileId: ObjectId            friendProfileId: ObjectId            createdAt: Date,            createdBy: ObjectId,            modifiedAt: Date,            modifiedBy: ObjectId,            deletedAt: Date,            deletedBy: ObjectId        }    ]    paging: {        cursors: {            before: String,            after: String        }    }}
Diagrams
A visual depiction of what is being written about
A visual depiction of what is being written about

Discussion (0)

Loading...

Recommended articles

More articles ➜
How to write technical specification

How to write technical specification

Because after a long period of time, we may not be able to remember what and why we decide for that design.

Tutorials
Beiryu

Beiryu

Contributor

0
Xây dựng hệ thống streaming video

Xây dựng hệ thống streaming video

Xin chào các bạn, hôm nay mình sẽ chia sẻ với các bạn về kinh nghiệm xây dựng hệ thống streaming video và cách tích hợp với các dịch vụ của bên thứ ba như Dropbox và Bunny. Qua bài viết này, mình hy vọng sẽ cung cấp cho các bạn một cái nhìn tổng quan về kiến trúc streaming video và những lựa chọn phổ biến khi làm việc với các dịch vụ bên ngoài.

Backend
Tutorials
Frontend
Beiryu

Beiryu

Contributor

2
Subscribe to the newsletter
Get emails from me about web development, tech, and early access to new articles.