All Templates / Starters
Next.js + Supabase (Prisma + tRPC)
A sensible modern set of defaults for a Next.js app with Supabase (+ auth!)
nextjs-app
bambrose24/nextjs-supabase-template
Just deployed
This is a project template that sets you up with all of the basics required to build an interesting full stack app. It combines these frameworks into a setup that should empower you to build with sensible defaults.
It is based on the T3 Stack, bootstrapped with create-t3-app
, and then hand-tuned by Bob Ambrose.
Things that this template comes with
This is everything you need to start building an advanced app.
To be very clear — you get a login page automatically with this template!!
If you're familiar with these systems, here's your guide to getting going. The short of it is that you need an account with Supabase, and the rest will take care of itself. See .env.example
to know what to add; you'll add this to your .env
file. See the Supabase Docs for what specifically to do
Once you do this, you can start the development server with npm run dev
and visit localhost:3000
to get started.
I can't possibly explain the systems better than they explain themselves, but if you're new to any of this tech, I'll do my best to explain the overall picture. But first, some links to each of the projects involved here.
Generally speaking, here's how things click together:
This template doesn't enforce an opinion on data fetching strategies, but you do have basically two options
trpc
component to fetch data in the React Lifecycle. This is the pre- React Server Components way to fetch data.trpc
client to fetch data in React Server Components. You can take full advantage of Suspense and have the first response from the server return interesting HTML.There is lengthy debate on what the right approach will be for each use case. I encourage you to think critically about what one is best for you. If you're not sure, try starting with the TanStack query option and try pre-fetching queries in the server component for the page.
You can see examples in prefetch/page.tsx
, server-only-fetch/page.tsx
, and client-only-fetch/page.tsx
. It's also worth noting that you can pre-fetch data in the initial SSR render of client components too, but I digress.
Template Content
nextjs-app
bambrose24/nextjs-supabase-templateDIRECT_URL
Same as DATABASE_URL but should be the direct link (likely with port 5432). See https://supabase.com/docs/guides/database/connecting-to-postgres
DATABASE_URL
Get from the Supabase dashboard. It probably has port 6543, whereas the DIRECT_URL has port 5432.
NEXT_PUBLIC_SUPABASE_URL
From Supabase dash
NEXT_PUBLIC_SUPABASE_ANON_KEY
From Supabase dash
Details
Bob Ambrose's Projects
Created on Jun 25, 2024
24 total projects
6 active projects
40% success on recent deploys
TypeScript, JavaScript, CSS, Shell
Starters
More templates in this category
Django Monolith
A Django app connected to a Postgres database with Celery and Celery Beat.
Odogwu Machalla's Projects
37