TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Praashh/buildml/llms.txt
Use this file to discover all available pages before exploring further.
feedbackRouter exposes a single public mutation that collects user feedback and forwards it to a Discord channel as a rich embed. No authentication is required — any visitor can submit feedback. The mutation validates all input with Zod, formats a colour-coded Discord embed based on the feedback type, and returns a success acknowledgement. If the Discord webhook call fails for any reason, a INTERNAL_SERVER_ERROR is thrown.
feedback.submit
Accepts a feedback message from the user, formats it as a Discord embed with type-specific colour and emoji, and POSTs it to the configured Discord webhook URL.
Type: mutation — Auth: public (no session required)
Input
Optional display name of the person submitting feedback. Defaults to
"Anonymous" in the Discord embed if omitted or blank.A valid email address for the submitter. Validated by Zod’s
z.string().email(). Included in the Discord embed for follow-up.The category of feedback. Determines the embed colour and emoji displayed in Discord:
| Value | Label | Emoji | Hex Colour |
|---|---|---|---|
general | General Feedback | 💬 | #6366f1 (purple) |
bug | Bug Report | 🐛 | #ef4444 (red) |
feature | Feature Request | ✨ | #22c55e (green) |
improvement | Improvement Suggestion | 💡 | #f59e0b (amber) |
The feedback message body. Must be at least 10 characters (
z.string().min(10)). Messages longer than 1 024 characters are truncated to 1 021 characters with "..." appended before being sent to Discord (Discord embed field limit).Usage
Response
Always
true on a successful webhook delivery. If the Discord POST is not ok, the procedure throws rather than returning.A human-readable confirmation string:
"Thank you! Your feedback has been submitted successfully."
Suitable for displaying directly in a toast notification.Discord Embed Structure
When the mutation succeeds, Discord receives a payload with the following embed fields:Errors
Because
feedback.submit is a public procedure, it can be called from
unauthenticated pages such as a landing page or a help modal. There is
currently no per-IP or per-email rate limiting on this endpoint — consider
adding one if the feedback form is publicly accessible without any friction.