# better-supabase recipes

> Components and screens for the blocks, built from shadcn components and the blocks' hooks, for Next.js and, where they fit a phone, Expo.

## Available

- [Notification bell](https://bettersupabase.com/recipes/notification-bell.md): A header button with the unread count, which updates when a notification arrives or is read.
- [Notification list](https://bettersupabase.com/recipes/notification-list.md): The caller's latest notifications with an unread marker, loaded again on every change.
- [Command search](https://bettersupabase.com/recipes/command-search.md): A search dialog over the search index, with favorites and recents before the user types.
- [Onboarding checklist](https://bettersupabase.com/recipes/onboarding-checklist.md): The organization's getting-started steps with progress, hidden once every step is done.
- [Comment thread](https://bettersupabase.com/recipes/comment-thread.md): A record's comments with their authors and a form to add one, kept current after each write.
- [Organization switcher](https://bettersupabase.com/recipes/org-switcher.md): A menu of the user's organizations that switches the active one and refreshes the session for its tenant claim.
- [Plan picker](https://bettersupabase.com/recipes/plan-picker.md): The plans with their prices and a checkout button each. Checkout starts in a server action or API route that holds the Stripe key, and the client opens the URL it returns.
- [Usage meter](https://bettersupabase.com/recipes/usage-meter.md): This period's usage per meter against the plan's quota, with the reset date.
- [Feature gate](https://bettersupabase.com/recipes/feature-gate.md): Content shown only when the active organization's plan includes a feature, read from the session's features claim and updated when the session refreshes.
- [Settings layout](https://bettersupabase.com/recipes/settings-layout.md): Settings pages generated from the settings definition: a section per scope and a control per key, picked by the kind its schema declares.
- [Members table](https://bettersupabase.com/recipes/members-table.md): An organization's members with their roles, where a role change shows at once and a member can be removed.
- [Invite dialog](https://bettersupabase.com/recipes/invite-dialog.md): A form that invites a teammate by email with a role, then shows the token for the accept link.
- [API keys table](https://bettersupabase.com/recipes/api-keys-table.md): The organization's API keys, with a form that creates one and shows its token once, and a revoke button per key.
- [Audit log table](https://bettersupabase.com/recipes/audit-log-table.md): The audit trail, newest first, with filters by actor and action and older pages on demand.
- [Tag input](https://bettersupabase.com/recipes/tag-input.md): A record's tags with suggestions, where typing a name adds a tag or creates it.
- [Announcement banner](https://bettersupabase.com/recipes/announcement-banner.md): The newest live announcement for the user and organization, with a dismiss button.
- [Profile form](https://bettersupabase.com/recipes/profile-form.md): A form that updates the caller's display name through a server action and shows field errors.
- [Two-factor setup](https://bettersupabase.com/recipes/mfa-setup.md): A card that enrolls an authenticator app with a QR code, verifies the first code and removes the factor.
- [Inbox with threads](https://bettersupabase.com/recipes/inbox-threads.md): A shared inbox queue with search and status, assignee and channel filters in the URL; each row opens its thread beside the list.
- [Channel sidebar](https://bettersupabase.com/recipes/channel-sidebar.md): The caller's channels with unread and mention counts, kept live, with dialogs to browse, join and create channels.
- [Message list](https://bettersupabase.com/recipes/message-list.md): A conversation's messages over Realtime, with older pages on demand, who is typing, reply counts and the composer.
- [Message composer](https://bettersupabase.com/recipes/message-composer.md): A message box that sends on Enter, signals typing, and uploads dropped, pasted or picked files onto the message.
- [Thread panel](https://bettersupabase.com/recipes/thread-panel.md): A thread beside the channel: the root message, its replies live over Realtime, and a composer that replies into it.
- [Presence avatars](https://bettersupabase.com/recipes/presence-avatars.md): Who else has a record open (a channel, a comment thread's record or a document), on the record's presence topic.
- [Workspace URL field](https://bettersupabase.com/recipes/workspace-url-field.md): An organization form with a name and a URL slug, where reserved and taken slugs come back as field errors.
- [Chat with history](https://bettersupabase.com/recipes/chat-with-history.md): An AI chat that stores every message, resumes a stored conversation and streams the reply.
- [Chat message as Markdown](https://bettersupabase.com/recipes/chat-message-markdown.md): An assistant answer rendered as Markdown with Streamdown: a caret while it streams, static once stored, and only safe elements and links.
- [Knowledge base upload](https://bettersupabase.com/recipes/knowledge-upload.md): A form that adds a document to the knowledge base, which chunks and embeds it for search.
- [Agent activity](https://bettersupabase.com/recipes/agent-run-trace.md): The agent runs for the organization with their steps and the approvals that wait for a person.
- [Workflow canvas](https://bettersupabase.com/recipes/workflow-canvas.md): A node editor for a workflow definition that saves drafts, publishes versions and runs the workflow.
- [Workflow runs](https://bettersupabase.com/recipes/workflow-runs.md): The latest workflow runs with their status, which update while a run is in progress.
- [Connector credentials](https://bettersupabase.com/recipes/connector-setup.md): A sheet that stores a connector credential encrypted and revokes it, without reading the secret back.
- [Support session banner](https://bettersupabase.com/recipes/support-session-banner.md): A banner that tells the user a support agent is viewing the app as them, rendered on the server.
- [AI task queue](https://bettersupabase.com/recipes/ai-task-queue.md): A table of scheduled AI prompts with each task's next run and latest run status, plus pause and resume.
- [AI provider settings](https://bettersupabase.com/recipes/ai-provider-settings.md): A settings card that lists the organization's own AI provider keys and models, adds a key to Vault and removes one.
- [Push opt-in](https://bettersupabase.com/recipes/push-opt-in.md): A card that registers this browser for web push and removes it again.
- [Metrics dashboard](https://bettersupabase.com/recipes/metrics-dashboard.md): A card per metric: the 30-day total against the 30 days before, with daily bars.
- [Feature flags](https://bettersupabase.com/recipes/feature-flag-toggles.md): Which feature flags are on for the active organization, read-only.
- [Rule builder](https://bettersupabase.com/recipes/rule-builder.md): A condition tree with field, operator and value rows, nested And and Or groups, drag to reorder and a fixed first condition, saved as a versioned rule.
- [Can](https://bettersupabase.com/recipes/can.md): Shows an action only to members who hold a permission key; the checks of one render share one round trip.
- [Subject link](https://bettersupabase.com/recipes/subject-link.md): A link to any subject type, titled and routed by subject_titles, with plain text for a record the caller can't read.
- [Subject chip](https://bettersupabase.com/recipes/subject-chip.md): A compact badge with a subject's type and title that links to its page.
- [Sessions list](https://bettersupabase.com/recipes/sessions-list.md): The caller's signed-in devices with the last activity and a button to end each session.
- [SSO connection settings](https://bettersupabase.com/recipes/sso-settings.md): The organization's SAML or OIDC connection with its domains and the role new members get.
- [Access requests inbox](https://bettersupabase.com/recipes/access-requests-inbox.md): Requests for access to a resource, with approve and deny buttons for the owner.
- [Grants editor](https://bettersupabase.com/recipes/grants-editor.md): The grants on a drive item, inherited ones included, with a picker to share it with a member or team at a role.
- [File request upload](https://bettersupabase.com/recipes/file-request-upload.md): The public page of a file request link, where anyone with the link sends a file into a folder, with the link's password when it has one.
- [Document register](https://bettersupabase.com/recipes/document-register.md): The organization's controlled documents in a data grid with their number, status, effective version and next review date, flagged when the review is due.
- [Reactions bar](https://bettersupabase.com/recipes/reactions-bar.md): Emoji reactions under a record with counts, which toggle the caller's own reaction.
- [Share link dialog](https://bettersupabase.com/recipes/share-link-dialog.md): A dialog that creates an expiring link to a record and revokes it.
- [Attachments uploader](https://bettersupabase.com/recipes/attachments-uploader.md): A drop zone that uploads files to a record and lists them with a download link.
- [Waitlist signup](https://bettersupabase.com/recipes/waitlist-signup.md): An email form that joins the waitlist and shows the position in line.
- [Contact detail](https://bettersupabase.com/recipes/contact-detail.md): A person or company with its details, related contacts and the latest activity.
- [Deal board](https://bettersupabase.com/recipes/deal-board.md): Deals as cards in pipeline stage columns, moved by drag and drop.
- [Sequence builder](https://bettersupabase.com/recipes/sequence-builder.md): Each sequence's email, wait and task steps in order, with its enrollment counts, an Add step dialog and an Activate or Pause button.
- [Activity timeline](https://bettersupabase.com/recipes/activity-timeline.md): Calls, emails and meetings with a contact, newest first.
- [Quote builder](https://bettersupabase.com/recipes/quote-builder.md): A quote with line items, discounts and totals in minor units, sent for acceptance.
- [Targets progress](https://bettersupabase.com/recipes/targets-progress.md): Sales targets for the period with the progress toward each one.
- [Work item board](https://bettersupabase.com/recipes/work-item-board.md): Work items in state columns, ordered by rank and moved through allowed transitions.
- [Entity form](https://bettersupabase.com/recipes/entity-form.md): A create dialog whose inputs come from `recordForm`: the entity's own fields and the organization's custom fields, validated together by `useRecordForm` before the Server Action runs.
- [Work item grid](https://bettersupabase.com/recipes/work-item-grid.md): A data grid of work items with filters, sorting and saved views.
- [Approvals queue](https://bettersupabase.com/recipes/approvals-queue.md): Requests waiting for the caller's decision, with approve and reject buttons.
- [My work](https://bettersupabase.com/recipes/my-work.md): What waits on the caller across the installed blocks, from `getMyWork`: assigned work, approvals, due reminders, mentions and SLA warnings, each linked to its record.
- [Subject timeline](https://bettersupabase.com/recipes/subject-timeline.md): One record's comments, files and versions merged newest first, from `bsb.record(...).timeline`, skipping the bindings the caller can't read.
- [SLA badges](https://bettersupabase.com/recipes/sla-badges.md): A badge on a record with the time left before its SLA is breached.
- [Custom fields editor](https://bettersupabase.com/recipes/custom-fields-editor.md): A settings page that adds, orders and removes the custom fields of a record type.
- [Bulk action bar](https://bettersupabase.com/recipes/bulk-action-bar.md): A bar over a selection of rows that runs an action on all of them and reports failures.
- [Undo toast](https://bettersupabase.com/recipes/undo-toast.md): A toast after a delete with a button that restores the record from the trash.
- [Related items panel](https://bettersupabase.com/recipes/related-items-panel.md): The records linked to a record, with a picker to add or remove a link.
- [Employee directory](https://bettersupabase.com/recipes/employee-directory.md): A list of employees with server-side search, a status filter and a link to each record.
- [Qualification matrix](https://bettersupabase.com/recipes/qualification-matrix.md): A table of the members who lack a required qualification, hold an expired one or will lose one soon.
- [My qualifications](https://bettersupabase.com/recipes/my-qualifications.md): The signed-in member's certificates and licences with their expiry, and the required ones they still lack.
- [Roster board](https://bettersupabase.com/recipes/roster-board.md): This week's shifts in a column per day, with their status and how many places are filled.
- [Medication chart](https://bettersupabase.com/recipes/medication-chart.md): A record's medication orders for today, with the status of each planned dose.
- [Care plan editor](https://bettersupabase.com/recipes/care-plan-editor.md): A client's care plan as a tree of problems, goals and actions, with the status of each and the actions that wait for an approval.
- [Care plan evaluations](https://bettersupabase.com/recipes/care-plan-evaluations.md): The evaluations of a care plan's goals in a data grid, the newest first, with the goal status each one found.
- [Hiring board](https://bettersupabase.com/recipes/hiring-board.md): Candidates for an opening as cards in interview stage columns.
- [Timesheet](https://bettersupabase.com/recipes/timesheet.md): A week of time entries per project with a running timer and totals.
- [Dispatch board](https://bettersupabase.com/recipes/dispatch-board.md): A week of technicians by day with their scheduled work orders, and the backlog to schedule.
- [Technician day](https://bettersupabase.com/recipes/technician-day.md): A technician's stops for the day in route order, each with the button that moves it on.
- [Shipment tracking](https://bettersupabase.com/recipes/shipment-tracking.md): Shipments with their status and the tracking timeline of the selected one, newest event first.
- [Invoices table](https://bettersupabase.com/recipes/invoices-table.md): The organization's invoices with their status, amount and a link to the PDF.
- [Product catalog grid](https://bettersupabase.com/recipes/product-catalog-grid.md): Products in a grid with prices, variants and a filter by collection.
- [Inventory table](https://bettersupabase.com/recipes/inventory-table.md): Stock levels per product and location, with a form to adjust a count.
- [Order detail](https://bettersupabase.com/recipes/order-detail.md): An order with its lines, totals, payment state and fulfillment steps.
- [Kitchen display](https://bettersupabase.com/recipes/kitchen-display.md): Open tickets per kitchen station, each line moved from queued to served, refreshed over Realtime.
- [Order state board](https://bettersupabase.com/recipes/order-state-board.md): Today's kitchen orders in preparation-state columns; dragging an order forward moves all of its lines.
- [Promotion code field](https://bettersupabase.com/recipes/promotion-code-field.md): A field that checks a promotion code and shows the discount it gives.
- [Calendar view](https://bettersupabase.com/recipes/calendar-view.md): A month and week calendar of events with a dialog to add one.
- [Booking page](https://bettersupabase.com/recipes/booking-page.md): A public page that shows open slots and books one without overlaps.
- [Availability editor](https://bettersupabase.com/recipes/availability-editor.md): Weekly working hours and date overrides that set which slots can be booked.
- [Reminders list](https://bettersupabase.com/recipes/reminders-list.md): The next events with the caller's reminders on each, to add a reminder at an offset before an event or remove one.
- [Drive explorer](https://bettersupabase.com/recipes/drive-explorer.md): Folders and files with upload, rename, move and a breadcrumb trail, each file with its labels and the approval of its current version.
- [Version history](https://bettersupabase.com/recipes/version-history.md): The saved versions of a record with a diff and a button to restore one.
- [Trash bin](https://bettersupabase.com/recipes/trash-bin.md): Deleted records with buttons to restore them or delete them for good.
- [Form builder](https://bettersupabase.com/recipes/form-builder.md): An editor for form fields and a preview, with the responses in a table.
- [Post board](https://bettersupabase.com/recipes/post-board.md): A feedback board's posts ranked by votes, with an upvote toggle, the roadmap status, moderation state and a New post dialog.
- [Course outline](https://bettersupabase.com/recipes/course-outline.md): A course's modules and lessons in rank order, with the caller's progress, certificate and an Enroll button.
- [Lesson player](https://bettersupabase.com/recipes/lesson-player.md): One lesson's content with a Mark as done button, or its quiz, which the database grades on submit.
- [CSV import wizard](https://bettersupabase.com/recipes/csv-import-wizard.md): A stepper that uploads a CSV, maps its columns, validates the rows and imports them.
- [Templates gallery](https://bettersupabase.com/recipes/templates-gallery.md): Templates in a grid with a preview and a button to create a record from one.
- [Document editor](https://bettersupabase.com/recipes/document-editor.md): A rich text editor for a document with autosave, collaborators and a suggestion mode that editors accept or reject.
- [Webhook endpoints](https://bettersupabase.com/recipes/webhook-endpoints.md): The organization's webhook endpoints with their recent deliveries and a retry button.
- [Service accounts table](https://bettersupabase.com/recipes/service-accounts-table.md): Machine identities with their scopes, last use and a button to disable one.
- [Signing keys rotation](https://bettersupabase.com/recipes/signing-keys-rotation.md): The active and previous signing keys with a button to rotate them.
- [Data export and delete](https://bettersupabase.com/recipes/data-export-delete.md): Buttons to export the caller's data and to request account deletion, with the request status.
- [Job runs table](https://bettersupabase.com/recipes/job-runs-table.md): The latest background job runs with their status, attempts and error, and a button to retry a failed run.
- [Team picker](https://bettersupabase.com/recipes/team-picker.md): A select of the caller's teams in the active organization, to scope a page or assign work.
- [Contract renewals](https://bettersupabase.com/recipes/contract-renewals.md): Active contracts with their value, end date and notice deadline, the nearest deadline first, so a renewal is decided in time.
- [Control posture](https://bettersupabase.com/recipes/control-posture.md): One card per compliance framework with its passing, failing and not started controls, then the overdue evidence tasks.
- [Acknowledgement inbox](https://bettersupabase.com/recipes/acknowledgement-inbox.md): The records a member is asked to read, soonest due first, with the due date and a button that acknowledges the version they read.
- [Consent register](https://bettersupabase.com/recipes/consent-register.md): The purposes an organization asks consent for, with their lawful basis, version, how long a grant lasts and whether it needs a signature.
- [Status page](https://bettersupabase.com/recipes/status-page.md): A public status page: the overall status, each public component with its daily uptime, and the public incident updates.
- [Trial balance](https://bettersupabase.com/recipes/trial-balance.md): Total assets, liabilities and equity and this year's net income, then each account's debit, credit and balance with the totals.
- [Production order board](https://bettersupabase.com/recipes/production-order-board.md): Production orders in status columns from draft to done; dragging a draft to Released releases it, and a running order to Done completes it.
- [Bank reconciliation](https://bettersupabase.com/recipes/bank-reconciliation.md): Each bank account's statement balance and what is left to match, then its latest transactions; an unmatched one offers its best invoice to match or can be ignored.
- [Payroll runs](https://bettersupabase.com/recipes/payroll-runs.md): The organization's payroll runs, newest period first, with their line count, export format and whether they are locked.
- [Record grid](https://bettersupabase.com/recipes/record-grid.md): An app table as a data grid with search, filters, saved views and bulk actions on the selected rows, including a Set field action.
- [Record form](https://bettersupabase.com/recipes/record-form.md): A create form whose inputs follow each column: a length limit for text, a select for options, a date input and a searchable picker for references.
- [Record page](https://bettersupabase.com/recipes/record-page.md): One row as a page: its fields, the rows that reference it, and comments and tags once the table is a subject.
- [Record board](https://bettersupabase.com/recipes/record-board.md): An app table as a board with a column per option value, where dragging a card writes the value and its rank.
- [Record calendar](https://bettersupabase.com/recipes/record-calendar.md): Rows on a month grid by a date column, with the month in the URL and a count of rows without a date.
- [Record timeline](https://bettersupabase.com/recipes/record-timeline.md): Rows as bars from a start date to an end date over four weeks, with a lane per assignee.
- [Record Gantt chart](https://bettersupabase.com/recipes/record-gantt.md): A row per record grouped by its parent, with a bar for its planned dates and a marker for rows without dates.
- [Record history](https://bettersupabase.com/recipes/record-history.md): Every version `subject.versions` kept of a row, with the fields each one changed and a restore per field.
- [Upsert import](https://bettersupabase.com/recipes/upsert-import.md): Paste CSV, map its columns, preview the rows it creates and changes, then upsert them on one of the table's unique sets.
- [Risk register](https://bettersupabase.com/recipes/risk-register.md): The organization's risks in a data grid with their residual band, status and next review date, the highest residual score first.
- [Risk heatmap](https://bettersupabase.com/recipes/risk-heatmap.md): The open risks on the default matrix, one cell per likelihood and impact with the count in the band's color.
- [Observation chart](https://bettersupabase.com/recipes/observation-chart.md): A record's latest vital signs with the flag against each reference range and a sparkline of the recent readings.
- [Case board](https://bettersupabase.com/recipes/case-board.md): The open cases in stage columns, reported to verifying; dragging a card moves the case to that stage of its kind's pipeline.
- [Case detail](https://bettersupabase.com/recipes/case-detail.md): One case with its severity, root cause, what still blocks closing it and its actions, and a Close button once nothing blocks it.
- [Inspection programme calendar](https://bettersupabase.com/recipes/inspection-program-calendar.md): The audit programme in a data grid: each inspection in the month it is planned, with its number, kind, programme and status.
- [Inspection run](https://bettersupabase.com/recipes/inspection-run.md): One inspection with its status, checklist and team, its findings with a Raise case button for each nonconformity, and a Close button once every one has its case.
- [Meeting agenda](https://bettersupabase.com/recipes/meeting-agenda.md): The organization's meetings in a data grid with their kind, place and status, the most recent first, each linking to its minutes.
- [Meeting minutes](https://bettersupabase.com/recipes/meeting-minutes.md): One meeting with the minutes of each agenda item, its decisions with the votes so far and a Settle button, the tasks it opened, and Start and Hold buttons for the people who run it.
