On this page
A neighborhood association or professional circle needs boundaries before it needs a busy feed. This community app brief puts group membership, posts and events behind explicit access rules. The initial version should prove that an approved member can participate while an outsider cannot retrieve private material, even through a direct request. Use it as a build specification, not evidence of an existing community.
Screens
- Feed: Read member posts in the currently selected group, with clear visibility labels.
- Events: View upcoming gatherings, their timezone and the group allowed to attend.
- Members: Browse permitted member profiles without exposing private contact information.
- Groups: Request membership, inspect approval status and leave a group.
- Sign in: Establish the member identity before loading protected community content.
Data model
| Table | Key fields | Purpose |
|---|---|---|
| members | id (uuid), display_name (text), status (text) | Record a minimal community identity; keep email outside the public directory. |
| groups | id (uuid), name (text), visibility (text), approval_required (bool) | Describe the boundary that protects discussion and event discovery. |
| memberships | group_id (uuid), member_id (uuid), role (text), status (text) | Give each member a unique group relationship and server-managed authority. |
| posts | id (uuid), group_id (uuid), author_id (uuid), body (text), created_at (timestamptz) | Store discussions with an explicit parent group rather than inferring access from feed filters. |
| events | id (uuid), group_id (uuid), starts_at (timestamptz), timezone (text), venue (text) | Keep event schedules and venues within the same membership boundary. |
| safety_actions | id (uuid), actor_id (uuid), target_id (uuid), kind (text), reason (text), status (text) | Separate report, block and moderation records through validated action types. |
Authorize reads through active group membership and changes through author or moderator roles. With a connected backend, enforce row-level security on every group-owned table and storage path; hiding a group in navigation is insufficient. Keep reports visible to their reporter and assigned moderators, not the accused member. Blocking must affect discovery and interaction according to an owner-approved policy, while moderation decisions retain an audit trail. Recheck membership before sending event pushes so former members do not receive private venue details.
Native features
A community app needs selective alerts about group activity and optional cached reading for members with poor connectivity. Route remote notifications through FCM on Android or APNs on iPhone, respecting each group's event and discussion preferences. Room or SwiftData can cache approved posts, but cached reading is not permission to keep fetching after membership ends. A system photo picker can attach an event poster without exposing the whole library. Exclude private group names and report details from lock-screen text unless the member deliberately enables such previews.
Android notes (Kotlin and Jetpack Compose)
Give each group's LazyColumn its own paging cursor and use post IDs as stable keys. Material 3 filter chips can separate discussions, announcements and events without combining their unread counts. Present report reasons in a ModalBottomSheet, saving the selected target ID before the feed changes beneath it. Navigation Compose should resolve an event link only after the membership repository confirms active access. In an Android device test, open two groups with similarly titled events, switch between them while new posts arrive, and report one post. Check the report identifies the intended author and group rather than whichever row occupies the old position.
iPhone notes (Swift and SwiftUI)
Model the selected group as a NavigationStack destination with its own observable feed, and use a SwiftUI List that preserves post identity during refresh. Add .refreshable to request current membership as well as newer discussions. A report sheet with medium and large detents should keep the target post summary visible above the reason field. UserNotifications routing must handle pending approval differently from active membership. On an iPhone, cache a private discussion, have a moderator remove that account, then reopen from an event push. Clear inaccessible content and explain the membership change without leaking the event description into the denial screen.
Copy-paste prompt
Build a community app for Android with Feed, Events, Members, Groups and Sign in. Connect my chosen backend only after asking for group visibility, admission rules, moderator authority and event timezone policy. Model members, groups, memberships, posts, events and safety actions. Make a private group unreadable to nonmembers through server-enforced policies. Provide reporting, blocking and a restricted moderator review workflow; ask how blocked members should appear in shared groups. Deliver actual event and discussion push through configured services, never a timer pretending to be remote delivery. Ask which events merit an alert and what may appear on the lock screen. Include loading, no groups, pending approval, empty feed, failed posting and notification-permission-denied states. Accept the build only after two approved accounts exchange a post, an outsider fails to fetch it, a moderator processes a report and a real backgrounded phone receives an authorized push.
Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.
Acceptance test
Include a membership-revocation race in the community checks: open an event as a member, remove that membership from another session and attempt to refresh its venue. The server must refuse the refresh, and the client must discard the previously permitted detail rather than keeping it behind an obsolete navigation route.
- Create a private gardening group with account A, request admission with B and verify the pending member cannot read posts or event venues.
- Approve B, publish a post containing a distinctive phrase and confirm B sees it while unapproved account C receives an access error on a direct request.
- Schedule an event using a real venue and time, background B’s phone and send its push through the configured delivery service; also repeat with notification permission denied.
- Report the post and block its author from B; confirm the configured interaction restriction and review the report using the moderator account.
- Reopen B’s app to verify membership and event persistence, then remove B and confirm both fresh requests and cached private discussion are unavailable.
Frequently asked questions
Can a blocked person still share a group?
That is a community policy decision, not something the generator should silently choose. Specify whether blocking hides posts, prevents direct contact or requires moderator intervention, and apply the chosen restrictions on the server.
Who should see a report about a moderator?
Provide an escalation role that is separate from the reported person. Avoid giving every member unrestricted access to report text, screenshots or the identity of the reporter.
Will an Events badge prove push works?
No; a badge derived from stored events proves only in-app state. Require a server-triggered message reaching another signed-in member’s real phone, with delivery failures recorded without promising guaranteed arrival.
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.