Entity Object Documentation

The Entity object represents a core data structure within Replyke, designed to support various use cases, including social media posts, marketplace products, static content, and location-based listings.

Properties

PropertyTypeDescription
idstringUnique identifier for the entity.
referenceIdstringIdentifier referencing the original item in an external system or static ID.
shortIdstringAuto-generated short identifier for sharing links.
projectIdstringIdentifier linking the entity to a specific project.
userUserLean | nullBasic user information of the entity creator, if applicable.
titlestring | nullTitle of the entity (if applicable).
contentstring | nullMain content of the entity.
mentionsMention[]List of users mentioned in the content. Each Mention object includes a user’s ID and username.
mediaRecord<string, any>[]Array of media objects attached to the entity.
keywordsstring[]Tags or keywords associated with the entity.
upvotesstring[]List of user IDs who upvoted the entity.
downvotesstring[]List of user IDs who downvoted the entity.
repliesCountnumberTotal number of comments and replies.
viewsnumberTotal number of views.
scorenumberHotness score based on user activity.
scoreUpdatedAtDateTimestamp of last score update.
location{ type: "Point", coordinates: [number, number] } | nullOptional GeoJSON location ([longitude, latitude]).
metadataRecord<string, any>Custom metadata (max size: 10KB).
topCommentTopComment | nullThe top-ranked comment for this entity, if available.
createdAtDateTimestamp when the entity was created.
updatedAtDateTimestamp of the most recent update.
deletedAtDate | nullTimestamp if the entity was deleted (null if active).

Example Use Cases

Social Media Post

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "content": "Check out this amazing sunset!",
  "media": [
    { "url": "https://example.com/media/sunset.jpg", "size": "2MB" }
  ],
  "keywords": ["sunset", "nature"],
  "user": { "id": "550e8400-e29b-41d4-a716-446655440001", "name": "John Doe" }
}

Marketplace Product

{
  "id": "550e8400-e29b-41d4-a716-446655440002",
  "title": "Wireless Earbuds",
  "content": "Experience high-quality sound with our new earbuds.",
  "media": [],
  "keywords": ["electronics", "audio"]
}

Static Page (About Us)

{
  "id": "550e8400-e29b-41d4-a716-446655440003",
  "referenceId": "about-page",
  "title": "About Us",
  "content": "Welcome to our platform. Here is what we do.",
  "media": [],
  "user": null
}

Location-Based Listing (Hotel)

{
  "id": "550e8400-e29b-41d4-a716-446655440004",
  "title": "Cozy Beachside Hotel",
  "content": "Enjoy your stay at our beautiful beachside hotel.",
  "location": { "type": "Point", "coordinates": [34.0522, -118.2437] },
  "metadata": { "rating": 4.5, "price": "199.99" },
  "user": { "id": "550e8400-e29b-41d4-a716-446655440005", "name": "Sunrise Hotels" }
}

Flexibility for Integration

The Entity object is designed to be flexible, allowing developers to integrate Replyke into existing datasets without modifying their original structure. This ensures compatibility with different use cases and project requirements.