Spacerr
  • Features
  • Pricing
  • FAQ
  • Docs
Get Access
Spacerr
  • Introduction
  • Features
  • Tech Stack
  • Setup
  • Configuration
  • Agents
  • Database
  • Jobs
  • Admin
  • Settings
  • Billing
  • Storage
  • Email
  • Support
  • Localization
  • SEO
  • Analytics
  • UI And Navigation
  • Deploying To Production
  • Testing And QA
  • Troubleshooting

Search documentation

Search documentation pages.

Documentation/Support

Support

Support has two entry points: the public contact page and the AI assistant support tools. Both routes lead to the same operational goal, helping the user reach the product owner without creating noisy or duplicate support work.

Contact Page

The public contact page lives at /contact.

The page UI lives in:

  • src/features/contact/components/contact-page-content.tsx
  • src/features/contact/components/contact-form.tsx

The server action is src/features/contact/actions/submit-contact-form.action.ts, and validation lives in src/features/contact/schemas/contact-submission.schema.ts.

Contact form submissions are sent through the shared email layer to SUPPORT_EMAIL.

txt
SUPPORT_EMAIL="support@yourdomain.com"

Email Layer

Support email delivery uses the same Resend and React Email infrastructure as auth and onboarding emails.

Important files:

  • src/features/emails/lib/emails.actions.ts
  • src/features/emails/templates/contact-submission.template.tsx
  • src/features/contact/actions/submit-contact-form.action.ts

Keep provider specific email behavior inside the email feature. Contact and AI support flows should call the shared email actions instead of talking to Resend directly.

AI Support Tools

AI support tools live in src/features/ai/chat/tools/chat-support-tools.server.ts.

The included tools can:

  • Fetch the current user's five most recent support tickets.
  • Create a support ticket for the current authenticated user.
  • Read notification preferences.
  • Update notification preferences.

The database and quota logic lives in src/features/ai/chat/repositories/chat-tools.repository.ts.

Escalation Guardrails

The assistant should answer from available policy and product context first. It should only create a support ticket when the user explicitly asks for escalation or insists after the assistant tries to help.

Ticket creation is hard limited to two tickets per user per day. The quota is enforced in a serializable database transaction so concurrent requests cannot easily bypass it.

Support ticket records are stored in SupportTicket in prisma/schema/user.prisma.

Admin And Operator Context

The admin area focuses on users, roles, account state, activity, purchase status, magic links, and impersonation. Support tickets are currently created and emailed, while recent ticket history is available to the AI support tool.

If you add an operator support inbox later, keep it as a feature owned admin surface and reuse the existing SupportTicket model rather than creating a second ticket store.

Where To Customize

  • src/features/contact for the public contact form.
  • src/features/emails for email delivery and templates.
  • src/features/ai/chat/tools/chat-support-tools.server.ts for available AI support tools.
  • src/features/ai/chat/repositories/chat-tools.repository.ts for ticket creation, quota, and recent ticket lookup.
  • prisma/schema/user.prisma for support ticket persistence.
  • src/lib/env.server.ts and .env.example for support email configuration.

When adding new support paths, keep escalation intentional and make sure server side failures are logged with user, ticket, provider, or route context.

Email

Learn how transactional email, React Email templates, and Resend delivery are structured.

Localization

Learn how localized routes, message files, language switching, and locale aware helpers work.

On this page
Contact PageEmail LayerAI Support ToolsEscalation GuardrailsAdmin And Operator ContextWhere To Customize