On this page
A focused social feed can start with chronological posts and follows instead of an opaque recommendation engine. This brief tests whether one person can publish, another can follow and both see consistent visibility rules. It also treats reporting, blocking and moderation as launch requirements. A Notifications screen is only an inbox until real server-triggered pushes reach a phone outside the foreground app.
Screens
- Feed: Read a chronological list of permitted posts from followed accounts.
- Create post: Write a caption and attach a permitted camera image.
- Profile: View allowed posts, follow controls and a block or report action.
- Notifications: Read stored interaction events with access-checked destinations.
- Sign in: Establish the author and follower identity before private requests.
Data model
| Table | Key fields | Purpose |
|---|---|---|
| posts | id (uuid), author_id (uuid), caption (text), media_path (text), visibility (text) | Record authored material and its audience alongside the protected image reference. |
| likes | post_id (uuid), user_id (uuid), created_at (timestamptz) | Keep one reaction per person and post with a composite uniqueness constraint. |
| follows | follower_id (uuid), followed_id (uuid), status (text) | Represent approved follow relationships separately from a feed’s temporary state. |
| reports | id (uuid), reporter_id (uuid), post_id (uuid), reason (text), status (text) | Give moderators a restricted queue without exposing reporter details publicly. |
| blocks | blocker_id (uuid), blocked_id (uuid), created_at (timestamptz) | Provide a server-checkable restriction on discovery and interaction. |
| notifications | id (uuid), recipient_id (uuid), actor_id (uuid), post_id (uuid), read_at (timestamptz) | Store recipient-owned interaction events independently of push transport. |
For the backend, implement row-level security covering post audiences, approved followers, reaction writes and notification recipients. A private post is readable only by its author and approved participants in that audience, not by anyone who guesses a media URL. Restrict reporting evidence to the reporter and designated reviewers, and prevent clients from assigning themselves moderator privileges. Blocking should constrain feed reads, profile discovery and interactions according to a written policy. Server-created notification records and a private device-token registry must recheck access before real push dispatch.
Native features for the social feed app
Keep chosen media private until the user submits a post, and do not publish an empty placeholder while files are still uploading. A notification cannot grant access to a deleted post, a blocked author or content outside the viewer’s audience.
| Feature | Android (Kotlin) | iPhone (SwiftUI) | Notes |
|---|---|---|---|
| Post media selection | Photo Picker with per-image upload state | PhotosPicker with preview and removal | Keep chosen media private until the user submits a post, and do not publish an empty placeholder while files are still uploading. |
| Mention and reply alerts | Authorized post and reply push routes | Notification routing after membership checks | A notification cannot grant access to a deleted post, a blocked author or content outside the viewer’s audience. |
| Report and block controls | Record-bound moderation bottom sheet | Report sheet and account blocking action | Send an explicit post or reply identifier with the report, then explain how blocking changes the visible feed. |
Android notes (Kotlin and Jetpack Compose)
Build the feed in a LazyColumn keyed by post ID and keep reply counts separate from row position. A ViewModel should reconcile refreshed server reactions so rapidly tapping Like does not leave the count permanently incremented twice.
- Use the Photo Picker for selected attachments, with a Room draft for caption and local references. An approved retryable media upload can use WorkManager, but the publication step should wait for server acceptance and should not expose an unfinished draft to followers.
- Open report reasons in a Material 3 ModalBottomSheet anchored to a fixed post identifier. Navigation Compose deep links must reload authorization, especially after an author is blocked; cached feed content is not permission to view newly restricted replies.
- On Android with author and viewer accounts, publish a caption with two images, like it rapidly, then block the author from the viewer account. Tap a previously delivered reply alert and refresh the feed. Check that blocked material does not reappear from the cache and reaction counts reconcile correctly.
iPhone notes (Swift and SwiftUI)
Use a SwiftUI List of identifiable posts and NavigationStack routes for post detail and author profiles. Keep composer state outside the feed row, so refreshing or sorting the timeline cannot erase an unfinished caption.
- PhotosPicker imports should produce previews before any Publish action. Store draft text and attachment references with SwiftData if restoration is required, and present a failed-media retry without quietly posting only the caption.
- Offer report and block actions in sheets with distinct consequences. UserNotifications may route to a reply identifier, but the detail view must fetch current access rules and handle removed posts without showing a stale cached body behind the error message.
- On an iPhone, begin a media post, switch apps during import, and return to inspect the draft. Publish once, then remove the post from an authorized account and open its old notification. Confirm the unavailable state is readable with VoiceOver and no deleted image flashes during loading.
Copy-paste prompt
Build a social feed app for Android containing Feed, Create post, Profile, Notifications and Sign in. Start with chronological followed-account posts. Ask about public versus approved-follower audiences, block behavior, moderator roles and post retention. Model posts, likes, follows, reports, blocks and recipient-owned notifications; use private media storage and server-enforced audience policies. Add real camera capture, upload retries and unique likes. Reporting must create a restricted review item, and blocking must affect server reads and interactions. Wire actual remote push from authorized backend events using configured credentials and device tokens; the Notifications screen alone is not delivery. Include loading, no followed posts, upload failure, removed content and camera or notification permission denied. Acceptance requires publishing a real photo, following from another account, reopening into the saved feed, rejecting an unauthorized private-image fetch and receiving a genuine background push without leaking blocked content.
Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.
Acceptance test
Check a visibility change while another phone has the post open: revoke its approved audience, refresh and verify both caption retrieval and image access are denied. Preserve an unsuccessful upload draft without presenting it as a published post. Define how long rejected uploads and moderation evidence remain, and remove abandoned media through an authorized cleanup process. A reported post should retain a restricted review reference even if its author withdraws it, according to the published retention policy.
- Create accounts A and B, approve B as a follower and capture a real photo for an audience-restricted post from A.
- Confirm B sees the caption and image, likes it once and cannot produce multiple likes by repeatedly tapping.
- Background A’s phone and verify a server-triggered like push arrives through the configured service; inspect the matching stored notification.
- Reopen B’s app and verify follow status, post and reaction persist, then request the media using unrelated account C and expect denial.
- Report A’s post from B, apply a block and verify the configured feed and interaction restrictions; deny camera permission on a new draft without losing its caption.
Frequently asked questions
Can private images use a public bucket?
No: a private audience cannot be enforced by hiding an otherwise public image URL. Protect both the database reference and the storage object, checking audience membership when granting access.
Must the first feed recommend strangers?
A chronological feed of approved follows is a clearer initial contract. Recommendations introduce additional ranking and safety decisions that should not be hidden inside a basic follow feature.
Who receives a push when a post is removed?
Define that behavior explicitly and keep removal reasons out of unrelated recipients’ notifications. Any queued interaction alert should recheck current post access and block rules before dispatch.
Build this blueprint
The blueprint prompt, ready for your platform. Edit anything before you send it.
Opens Apirex with this prompt. Pick the Android · Kotlin tab before you send. The Free plan includes 5 Rex Credits a day.