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 ➜
The Changing Landscape of the Tech Industry: Layoffs, Hiring Trends, and the Rise of A

The Changing Landscape of the Tech Industry: Layoffs, Hiring Trends, and the Rise of A

The tech industry has long been known for its rapid growth, lucrative salaries, and innovative products. However, recent developments have shed light on the challenges faced by tech companies, leading to significant changes in the employment landscape. In this blog post, we will explore the current state of the tech industry, focusing on the decline in business performance, layoffs, hiring trends, and the disruptive potential of artificial intelligence (AI).

Career
Beiryu

Beiryu

Contributor

1
How to build a Portfolio Tracking like CoinMarketCap from Zero (Part 1)

How to build a Portfolio Tracking like CoinMarketCap from Zero (Part 1)

Tutorials
Crypto
Backend
Beiryu

Beiryu

Contributor

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