https://github.com/sohamsshah/next-prisma-supabase-blog
Next.js + Prisma + Supabase simple Blog example
https://github.com/sohamsshah/next-prisma-supabase-blog
Last synced: 3 months ago
JSON representation
Next.js + Prisma + Supabase simple Blog example
- Host: GitHub
- URL: https://github.com/sohamsshah/next-prisma-supabase-blog
- Owner: sohamsshah
- Created: 2022-02-07T07:22:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-08T14:16:43.000Z (over 4 years ago)
- Last Synced: 2025-04-22T10:43:21.752Z (about 1 year ago)
- Language: TypeScript
- Size: 46.9 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Next.js + Prisma + Supabase Blog Project
## About the Project
- Prisma connects the PostgreSQL Database provided by Supabase by using postgres connection string.
- Write the Database Schemas in `prisma/schema.prisma`
- `lib/prisma.ts` contains prisma client config
- Use prisma client APIs on `getStaticProps` and `getServerSideProps` in the Next.js project. Also you can use them in `pages/api/` as well to perform Database Operations.
- Prisma Client APIs cannot be used in the Frontend application.
- This App performs basic CRUD Operations with Prisma + Supabase DB + Next FE and Server
## Get Started
- Create a `.env` as below
```
DATABASE_URL=
```
- npm install
- npm run dev
Also, you can visualize the database on local with:
```
npx prisma studio
```
If you are using `prisma migrate dev`, please refer [this](https://stackoverflow.com/questions/67551593/supabase-client-permission-denied-for-schema-public) without fail.