Skip to content
Submitted 3 days ago

Tech conference site using TanStack Start, Sanity CMS and Tailwind CSS

react, tanstack-query, tanstack-router, zustand, sanity
P
LVL 4
@pritamtirpude
A solution to the Tech conference site challenge

Solution retrospective


What are you most proud of, and what would you do differently next time?

What I'm most proud of

  • Content lives in a CMS, not in code. Speakers and sessions are modelled in Sanity Studio and fetched through TanStack Start server functions. The data goes through TanStack Query, so the route loaders and components share one cache and SSR output is hydrated without refetching.

  • Monorepo structure. The frontend, the Studio and a shared @repo/sanity package (schemas, queries, types) sit in one pnpm + Turborepo workspace. Both apps deploy to Vercel as separate services under a single domain, with the Studio mounted at /studio.

  • Polish beyond the design. I added SEO tags, a sitemap and robots.txt, custom 404, error and loading pages, a sticky mobile header, and an accessible keynote modal.

What I'd do differently next time

  • Add tests early. There's no test runner right now, so I only verify with typecheck, lint and manual checks. Next time I'd add Vitest for the data-mapping code and Playwright for key flows such as the schedule and the modal.

  • Plan the content model before building the UI. I adjusted the Sanity schemas a few times as the design needed more fields. Settling them first would have saved rework.

  • Organise server functions sooner. I'd move them into *.functions.ts files from the start instead of growing them inside route files.

  • Run accessibility checks throughout. I'd test with a screen reader and Lighthouse as I built, not at the end.

What challenges did you encounter, and how did you overcome them?

Monorepo and Vercel deployment. Moving from a single TanStack Start app to a pnpm + Turborepo monorepo with a Sanity Studio broke several things at once. I fixed them in turn:

  • Turbo 2 runs tasks in strict env mode, so build-time variables like VITE_SITE_URL were silently filtered out. Declaring them in turbo.json fixed the SEO tags and the cache.

  • The Studio had to live under /studio on the same domain as the site. I set basePath: '/studio' in the Studio config and used Vercel services with rewrites to route traffic between the two apps.

  • Sanity's default dev port (3333) falls in a Windows reserved range. I moved the Studio to port 4333.

Code
Loading...

Please log in to post a comment

Log in

Community feedback

No feedback yet. Be the first to give feedback on Pritam Tirpude’s solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord