Community
The community preset installs forum boards of voted posts with replies, chat channels, reactions, moderation with reports and bans, post scores, tags and search.
The community preset is for an app in the style of Discourse or Circle.
Members ask questions and start discussions on forum boards, vote on the
posts they find useful, reply in threads and talk in channels. Moderators
work through reported content and ban members who break the rules.
Config
Hold new posts and edits for review with the posts block's moderation
option; posts show at once by default, so the preset leaves it to your
config:
import { defineConfig } from "better-supabase/config";
export default defineConfig({
preset: "community",
blocks: { posts: { options: { moderation: "pre" } } },
});npx better-supabase init --preset community starts a new project from it,
and npx better-supabase apply --preset community adds it to one you have
(CLI).
Blocks
The preset is saas plus these blocks, and
whatever they require:
| Block | Role in the app |
|---|---|
| posts | Forum boards of posts, pinned and locked by moderators |
| messaging | The core under replies, channels and direct messages |
| channels | Public and private chat channels |
| comments | Threaded replies on a post |
| reactions | Up and down votes on posts, emoji on messages |
| moderation | Reports, the review queue, hiding and bans |
| scores | A score per post from its votes, with bands such as hot |
| tags | Topics on posts |
| search | Search over posts and channels for a Cmd+K dialog |
How the blocks connect
A forum is a posts board of kind forum. posts.vote(postId, value) stores
the vote as a reaction, and list({ sort: "top" }) orders a board by it.
Replies are comments on the subject post, so they are messages on the
messaging core, with mentions and reactions of their own
(posts).
Every post, reply and channel message is moderated through the same queue. A
report hides the content once it reaches the moderation block's
autoHideThreshold, a moderator's decision hides, removes or restores it,
and a banned member can't post, reply or report until the ban ends
(moderation).
A scoring model over the post subject type can weigh a post's vote score
(a votes metric), and its bands name the hot posts that scores.top lists
for a front page. Compute it from an outbox sink on the post events
(scores).
With ReUI
- The post board recipe for a board sorted by votes, with an upvote toggle and a New post dialog.
- Data Grid for the moderation queue, with Filters on status and reason.
- A channel sidebar with unread counts as a Badge.
Last updated on
Insurance and claims
The claims preset installs claimants, a claim state machine, approvals, evidence attachments, SLA clocks and comments.
Product feedback
The feedback preset installs feedback boards of voted ideas with roadmap statuses, replies, moderation, links from ideas to the work items that ship them, tags and search.