Skip to content

Beyond Emotions

I embedded Sanity Studio in a TanStack Start site for editorial publishing. Separate server actions validate contact requests, persist them to MongoDB, and trigger email notifications.

How it’s built View architecture

How it’s built

Beyond Emotions · Content-managed counselling and devotional website with live chat and admin inbox

Beyond Emotions is a website for a counselling and devotional ministry, with a blog, devotionals, services and a contact path. I built it on TanStack Start with an embedded Sanity Studio backed by 20 schema types, and 29 server functions that validate input with Zod and store contact forms, newsletter sign-ups and visitor chat in 4 MongoDB models. Nodemailer sends email notifications, and a protected dashboard lets the owner read submissions and reply to chats.

Sanity schema types (4 documents, 5 singleton pages, 11 objects)
20
TanStack server functions
29
MongoDB models
4
app routes
15
commits by me
51

Technology and what it does here

TanStack Start
SSR React app with typed server functions for all backend logic
TanStack Router + Query
File-based routes and client data fetching
Sanity
Embedded Studio at /cms with singleton pages, blog posts, books and testimonials
Portable Text
Renders Sanity rich text in blog posts and pages
Mongoose / MongoDB
Stores chat sessions, messages, contact submissions and subscribers
Zod
Validates every server function input
Nodemailer
Notifies the owner of new contacts and chat messages
Tailwind CSS 4
Site styling
Nitro + Vercel
Server build output and hosting

Implementation details

  • Visitor chat is cookie-scoped: server functions create a ChatSession, persist ChatMessage records and email the owner on new chats and messages.
  • Page loaders fall back to bundled content when Sanity is unavailable, so the public site still renders.
  • Sanity Studio is mounted inside the app on a catch-all route instead of being deployed separately.

System architecture

Sanity manages editorial content for the site. Contact and chat are separate application workflows backed by MongoDB.

Drag to rotate

Editorial publishing

  1. Passes to the next component: Content update
  2. Passes to the next component: Published content

Contact messages

  1. Passes to the next component: Form fields
  2. Passes to the next component: Validated message

Component details

Technologies

  • TanStack Start
  • Sanity
  • MongoDB

Next project · Full Stack Software Engineer

Sigmant

Portfolio assistant

Gabriel’s projects, experience, and research