Start free trial

Ship · Guidelines

Guidelines

Build your extension with these rules and it looks and works like the rest of ForumSpark, on every theme. The robot checks every rule it can find in code when you upload a release; the reviewer checks the rest. The same rules are in the AGENTS.md file of every new extension, so your coding assistant follows them too.

Must, or the check fails

Rule Do this Not this
Use x-ui.select for dropdowns Use <x-ui.select> for one choice and <x-ui.multi-select> for several. <select name="country">
Use x-ui.date-time for dates and times Use <x-ui.date-time name="starts_at" />. <input type="date">
Put the editor in a tiptapEditor container Wrap <x-editor :attachments="true"> in an element with x-data="tiptapEditor({...})". <x-editor name="content" /> on its own
Use x-ui.member-picker to choose a member Use <x-ui.member-picker name="user_id" /> so members are searched and picked by name. <input type="text" name="username">
Escape what you show Print values with {{ }}. Show formatted text with <x-rich-text> after it has been cleaned. {!! $pin->title !!}
Read settings through config or extension settings Declare a setting in the Developer section and read it with $this->setting(), or use config(). Reading MAP_KEY straight from the environment in extension code.
Read core data through the models Use the models, like Topic::query(), so every query stays inside the board. DB::table('topics')
Only change your own tables Create and change tables that start with your ext_ prefix, from the Tables page. A migration that adds a column to topics
Implement Followable when you use HasFollowers class Note extends Model implements Followable { use HasFollowers; }, so the board knows the model offers follow. use HasFollowers; in a model that does not implement Followable
Implement Reactable when you use HasReactions class Note extends Model implements Reactable { use HasReactions; }, so the board knows the model offers reactions. use HasReactions; in a model that does not implement Reactable
Implement Moderatable when you use HasModerationState class Note extends Model implements Moderatable { use HasModerationState; }, so the board knows the model offers moderation. use HasModerationState; in a model that does not implement Moderatable
Implement SearchableContent when you use HasContentSearch class Note extends Model implements SearchableContent { use HasContentSearch; }, so the board knows the model offers search. use HasContentSearch; in a model that does not implement SearchableContent

Should, shown as a suggestion

Rule Do this Not this
Use theme colours Use classes and the theme variables, like var(--fs-text-muted), so every theme can restyle it. color: #e11d48
Style with classes Give the element a class and style it in your CSS. <div style="color:red">
Use Font Awesome icons Use <i class="fa-solid fa-check" aria-hidden="true"></i>. Emojis in buttons, titles or messages
Make every sentence translatable Write {{ __('vendor-name::messages.key') }} and add the text on the Translations page. <h2>Newest pins</h2>
Write plain sentences Use a full stop or a comma. Pins, maps and more, all in one place (with a long dash)
Use the board layout Wrap forum pages in <x-forum-layout> and admin pages in <x-admin-layout> with <x-acp.page>. A page with its own <html> and <head>
Look right on every theme Build with the components, and keep your own CSS to layout and spacing that inherits colours. CSS that only works with the default theme
Write titles and buttons in sentence case Add a pin Add A Pin
Keep src/Services for replaceable services class CaptchaService implements Captcha, made with php artisan fs:make service captcha. Put helper classes in another folder. a class in src/Services that implements none of AiClient, ContentModerationProvider, Captcha
Keep src/Takeovers for page takeovers class SearchIndexPage implements PageTakeover, made with php artisan fs:make takeover search.index. Put helper classes in another folder. a class in src/Takeovers that does not implement PageTakeover

Every component is on the Components page of the Developer section on your developer board, with a live example and code to copy.