Skip to content

Nextjs 14 APP Router, t3 stack, Supabase (Auth, storage, database)

Notifications You must be signed in to change notification settings

eLearningHub/nextbase

 
 

Repository files navigation

nextbase

Getting started

  • Define the following variables:

    export PROJECT_ID=supabase_project_name
    export PROJECT_REF=supabase_project_reference_key
    
  • supabase link --project-ref ${PROJECT_REF}

  • pnpm prepare:remote

  • pnpm dev

T3 stack + Supabase + App directory

This project is Edge ready (Vercel Edge runtime)

This is a starter project/boilerplate to start out with:

  • TRPC
  • App directory/router
  • Prisma
  • Supabase (Auth, Storage, Serverless Queries)
  • Tailwind
  • Edge Ready
  • Umami analytics

It allows us to call database in server components through supabase-js, for client component we are using trpc+prisma due to the superior DX

Projects using this starter

What's next? How do I make an app with this?

  • Clone this project
  • Run
pnpm install
  • Copy the .env.example into .env and fill out the envs

Initial Setup

If you want to develop on local supabase instance, follow the steps below:

Then go to supabase/config.toml file and change your service name.

Start the database:

  • supabase start
  • pnpm prepare:local

If you want to develop on remote supabase instance, follow the steps below:

Connect supabase to remote instance:

  • supabase link --project-ref <your_project_id>
  • pnpm prepare:remote

Common steps

  • Fill out environment variables
  • Create Secrets on Github

If you want to create migrations by hand, go ahead and use this command:

  • supabase migration new <migration_name>

Then go to supabase/migrations folder and add your SQL there.

If you want to make changes with studio, use

  • pnpm db:diff <migration_name>

Run these initial commands

Every time you change something on local instance:

pnpm prepare:local
  • If you develop on cloud supabase run:
pnpm prepare:remote
  • Run the project
pnpm dev

If you are not familiar with the different technologies used in this project, please refer to the respective docs.

Authors

👤 Milosz Jankiewicz

👤 Jakub Czarnowski

Learn More

To learn more about the T3 Stack, take a look at the following resources:

You can check out the create-t3-app GitHub repository — your feedback and contributions are welcome!

How do I deploy this?

Follow deployment guides for Vercel, Netlify and Docker for more information.

About

Nextjs 14 APP Router, t3 stack, Supabase (Auth, storage, database)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 89.6%
  • JavaScript 6.1%
  • PLpgSQL 2.2%
  • CSS 2.1%