User Feature Design for Content Platforms: Login, Membership, Messaging, Feeds, and Favorites
This article explains how to design five core user features on a content platform: login, membership, notifications, feeds, and favorites. It covers the shared identity, permission, and event bus foundations these features rely on, then walks through design principles and implementation steps in engineering order, along with the reliability, security, and privacy considerations for each.
On a content platform, users notice user-facing features before they notice the content itself. Login determines who can enter. Membership defines the scope of benefits. Messages determine timeliness. Feeds shape a sense of freshness. Favorites hold long-term value. These five features look separate, but they share the same identity, permission, and event bus systems. The sections below follow the engineering order and offer design principles and implementation paths you can apply directly.
1. Unified Identity and Login State Design
Login is the prerequisite for every other feature. We recommend stateless tokens with a short-lived refresh mechanism. Access tokens should expire within 15 minutes. Refresh tokens should be stored in an HttpOnly cookie and bound to the device fingerprint. The server only verifies the signature and expiration time and does not maintain a session table, which makes horizontal scaling easier.
For multi-device login, sessions are distinguished by device ID, and users can actively sign out other devices. Passwords must be stored with a slow hashing algorithm and a salt. Provide a second verification step, such as SMS or in-app confirmation, to reduce the risk of credential stuffing. After a successful login, return the user’s basic profile immediately (role, membership status, notification preferences) so that later API calls do not need to query it repeatedly.
2. Membership System and Entitlement Gateway
Membership is not a simple boolean flag. It is a set of composable benefit policies. We recommend abstracting benefits into “capability codes,” for example “HD download,” “priority review,” or “exclusive templates.”
After a successful payment, write the entitlements to the entitlement table with an expiration time. Each request passes through the entitlement gateway, which decides whether to allow it or downgrade it based on the user’s currently valid capability codes. The gateway uses a local cache with a version number, so it does not hit the database on every request.
Expiration is handled by a scheduled task that scans for expired entries, combined with message queue compensation to ensure eventual consistency. When a refund or downgrade happens, revoke the related capability codes at the same time and send an in-app message, so users do not notice a delay in the change.
3. Reliable Message Delivery
Messages travel through two paths: a real-time channel and an offline compensation path. The real-time channel uses long connections or server push and shards by user, so messages for the same user stay in order. The offline path writes undelivered records to a message table, and the client pulls them the next time the user logs in or opens the app.
Message templates are decoupled from business logic. Business teams only publish events, such as “favorite succeeded,” and the template engine renders the final text based on the user’s language and channel. To prevent message flooding, messages of the same type for the same user are merged within a short time window. Read status uses cursors instead of per-message updates, which reduces write pressure.
Sensitive operations, such as account anomalies and payment results, must use a separate high-priority channel to guarantee delivery.
4. Building the Feed Timeline
A feed is essentially an aggregation of follow relationships and content events.
Write path: when a user creates content or interacts with it, send a lightweight index (content ID, timestamp, author ID) to each follower’s list. Use asynchronous batch writes so the main flow is not blocked.
Read path: pull indexes in reverse chronological order, then batch-fill the content details. Apply deduplication and filtering to remove deleted or blocked content.
To control storage growth, keep only the latest N items or the last M days, and archive older data to object storage. For accounts with very large follower counts, use a hybrid of fan-out on write and pull at read time. Regular users use fan-out on write, while top accounts switch to pulling on read.
The cache layer uses the user ID plus a time window as the key. On a cache hit, the system returns the data directly. On a miss, it falls back to the origin data store.
5. Favorites and Personal Content Assets
A favorite is more than a “like.” It is the user’s personal content library.
The data model uses a composite primary key of user ID and content ID. It records the favorite time, the source (search, recommendation, or another user’s profile), and any custom groups. Queries support filtering by time, group, and content type, and the feature supports export.
To prevent abuse, set rate limits per user and a total quantity cap. When an author deletes content or sets it to private, mark the related favorite records as invalid but keep their metadata, so the user can find them later. Favorite actions also feed back as recommendation signals, which creates a positive loop.
For storage, keep hot data in a relational database and archive cold data on a regular schedule. This balances query performance and cost.
6. Cross-Cutting Capabilities and Engineering Safeguards
All the features above depend on a shared permission middleware, audit logs, and rate limiting.
The permission middleware runs at the gateway layer, which keeps permission checks out of scattered business code. Audit logs record key operations (login, entitlement changes, favorite deletion) for compliance and issue tracing. Rate limiting works per user and per API, which prevents overload at a single point.
Monitoring covers login success rate, message delivery latency, feed P99 latency, and favorite write QPS, with multi-level alerts. For gray releases, route traffic by the last digit of the user ID, so a faulty release can be rolled back quickly.
For data consistency, cross-service operations must use transactional messages or compensation tasks. Nested synchronous remote calls are not allowed.
7. Security and Privacy Baselines
Collect the minimum amount of user data, and encrypt sensitive fields at rest. When favorites and feeds involve other users’ content, always check visibility to prevent unauthorized access. Filter message content for sensitive words and spam.
Decouple the membership payment flow from business logic. Treat payment callbacks as the source of truth, and handle them idempotently on the local side. Review the permission matrix regularly to confirm that new APIs cannot bypass the gateway.
Through the layered design above, login, membership, messaging, feeds, and favorites are no longer five isolated modules. They operate as one integrated system built around the same identity and event bus. Developers can roll them out in phases by priority: first establish login and permissions, then add messaging and feeds, and finally improve favorites and membership benefits. Keep validating each step with data on retention and engagement. That is how the user center becomes a core competitive advantage for the platform.
