惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Last Watchdog
The Last Watchdog
博客园_首页
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
美团技术团队
小众软件
小众软件
V
V2EX
博客园 - Franky
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Attack and Defense Labs
Attack and Defense Labs
S
Security Affairs
Simon Willison's Weblog
Simon Willison's Weblog
I
Intezer
T
The Exploit Database - CXSecurity.com
有赞技术团队
有赞技术团队
S
Schneier on Security
人人都是产品经理
人人都是产品经理
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
K
Kaspersky official blog
PCI Perspectives
PCI Perspectives
AI
AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客
O
OpenAI News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Register - Security
The Register - Security
V
Vulnerabilities – Threatpost
GbyAI
GbyAI
博客园 - 【当耐特】
C
Cisco Blogs
大猫的无限游戏
大猫的无限游戏
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
S
Securelist
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
L
LangChain Blog
SecWiki News
SecWiki News
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V2EX - 技术
V2EX - 技术
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
L
LINUX DO - 热门话题
Cisco Talos Blog
Cisco Talos Blog

Supabase Blog

AI Agents Know About Supabase. They Don't Always Use It Right. Custom OIDC Providers for Supabase Auth 100,000 GitHub stars Supabase docs over SSH Navigating Regional Network Blocks Supabase Joins the Stripe Projects Developer Preview Log Drains: Now available on Pro Supabase Storage: major performance, security, and reliability updates Supabase incident on February 12, 2026 Hydra joins Supabase X / Twitter OAuth 2.0 is now available for Supabase Auth BKND joins Supabase Supabase is now an official Claude connector Supabase PrivateLink is now available Introducing: Postgres Best Practices When to use Read Replicas vs. bigger compute Introducing TRAE SOLO integration with Supabase Supabase Security Retro: 2025 Sync Stripe Data to Your Supabase Database in One Click Building ChatGPT Apps with Supabase Edge Functions and mcp-use Own Your Observability: Supabase Metrics API Introducing iceberg-js: A JavaScript Client for Apache Iceberg Introducing Supabase for Platforms Adding Async Streaming to Postgres Foreign Data Wrappers Build "Sign in with Your App" using Supabase Auth Introducing Seven New Email Templates for Supabase Auth The new Supabase power for Kiro Introducing Supabase ETL Introducing Analytics Buckets Introducing Vector Buckets Snap, Inc. Launches Snap Cloud, Powered by Supabase Triplit joins Supabase Supabase Series E 1000 Y Combinator Founders Choose Supabase gm 👋 web3, welcome aboard to Sign in with Web3 (Solana, Ethereum) Announcing the Supabase Remote MCP Server Enterprise speed, enterprise standards with Bolt Cloud + Supabase PostgREST 13 Lovable Cloud + Supabase: The Default Platform for AI Builders Processing large jobs with Edge Functions, Cron, and Queues Defense in Depth for MCP Servers OrioleDB Patent: now freely available to the Postgres community Supabase Launch Week 15 Hackathon Winner Announcement The Vibe Coder's Guide to Supabase Environments Testing for Vibe Coders: From Zero to Production Confidence The Vibe Coding Master Checklist Vibe Coding: Best Practices for Prompting Supabase Auth: Build vs. Buy Top 10 Launches of Launch Week 15 Supabase Launch Week 15 Hackathon Storage: 10x Larger Uploads, 3x Cheaper Cached Egress, and 2x Egress Quota Persistent Storage and 97% Faster Cold Starts for Edge Functions Algolia Connector for Supabase New Observability Features in Supabase Improved Security Controls and A New Home for Security Introducing Branching 2.0 Stripe-To-Postgres Sync Engine as standalone Library Supabase Analytics Buckets with Iceberg Support Create a Supabase backend using Figma Make Introducing JWT Signing Keys Supabase UI: Platform Kit Build a Personalized AI Assistant with Postgres Announcing Multigres: Vitess for Postgres Building on open table formats Open Data Standards: Postgres, OTel, and Iceberg Simplifying back-end complexity with Supabase Data APIs PostgreSQL Event Triggers without superuser access Top 10 Launches of Launch Week 14 Supabase MCP Server Data API Routes to Nearest Read Replica Declarative Schemas for Simpler Database Management Realtime: Broadcast from Database Keeping Tabs on What's New in Supabase Studio Edge Functions: Deploy from the Dashboard + Deno 2.1 Automatic Embeddings in Postgres Introducing the Supabase UI Library Supabase Auth: Bring Your Own Clerk Postgres Language Server: Initial Release Migrating from Fauna to Supabase Migrating from the MongoDB Data API to Supabase Dedicated Poolers Postgres as a Graph Database: (Ab)using pgRouting AI Hackathon at Y Combinator Calendars in Postgres using Foreign Data Wrappers Supabase Launch Week 13 Hackathon Winners How to Hack the Base! Running Durable Workflows in Postgres using DBOS database.build v2: Bring-your-own-LLM Restore to a New Project Hack the Base! with Supabase Top 10 Launches of Launch Week 13 Supabase Queues High Performance Disk Supabase Cron Supabase CLI v2: Config as Code Supabase Edge Functions: Introducing Background Tasks, Ephemeral Storage, and WebSockets Supabase AI Assistant v2 OrioleDB Public Alpha Executing Dynamic JavaScript Code on Supabase with Edge Functions ClickHouse Partnership, improved Postgres Replication, and Disk Management
Cal.com launches Expert Marketplace built with Next.js and Supabase.
Richard Poelderl, Peer Richelsen, Thor Schaeff · 2024-06-18 · via Supabase Blog

Cal.com launches Expert Marketplace built with Next.js and Supabase.

Contrary to popular belief, due to the biggest online beef marketing campaign in modern history, Cal.com and Supabase are actually supa good friends, united by a common mission to build open source software.

So when the Cal.com team reached out about collaborating on their new platform starter kit, we were excited to work together. Finally we could collaborate on a Product Hunt launch instead of competing against each other.

Initially the application was built to be run on SQLite. However, once requirements grew to include file storage, the Cal.com team remembered their Supabase frenemies and luckily, thanks to Prisma and Supabase, switching things over to Postgres three days before launch was a breeze.

Prisma configuration for usage with Postgres on Supabase#

When working with Prisma, your application will connect directly to your Postgres databases hosted on Supabase. To handle connection management efficiently, especially when working with serverless applications like Next.js, Supabase provides a connection pooler called Supavisor to make sure your database runs efficiently with increasing traffic.

The configuration is specified in the schema.prisma file where you provide the following connection strings:


_10

datasource db {

_10

provider = "postgresql"

_10

url = env("POSTGRES_PRISMA_URL")

_10

directUrl = env("POSTGRES_URL_NON_POOLING")

_10

schemas = ["prisma"] // see multi-schema support below

_10

}


This loads the relevant Supabase connections strings from your .env file


_10

POSTGRES_PRISMA_URL="postgres://postgres.YOUR-PROJECT-REF:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1" # Transaction Mode

_10

POSTGRES_URL_NON_POOLING="postgres://postgres.YOUR-PROJECT-REF:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:5432/postgres" # Session Mode


You can find the values in the project connect page of your Supabase Dashboard.

For more details on using Prisma with Supabase, read the official docs.

Multischema support in Prisma#

In Supabase the public schema is exposed via the autogenerated PostgREST API, which allows you to connect with your database from any environment that speaks HTTPS using the Supabase client libraries like supabase-js for example.

Since Prisma connects directly to your database, it's advisable to put your data on a separate schema that is not exposed via the API.

We can do this by enabling multischema support in the schema.prisma file:


_11

generator client {

_11

provider = "prisma-client-js"

_11

previewFeatures = ["multiSchema"]

_11

}

_11

_11

model Account {

_11

id String @id @default(cuid())

_11

// ...

_11

_11

@@schema("prisma")

_11

}


Supabase Storage is an S3 compatible cloud-based object store that allows you to store files securely. It is conveniently integrated with Supabase Auth allowing you to easily limit access for uploads and downloads.

Cal.com's Platforms Starter Kit runs their authentication on Next.js' Auth.js. Luckily though, Supabase Storage is supa flexible, allowing you to easily create signed upload URLs server-side to then upload assets from the client-side -- no matter which tech you choose to use for handling authentication for your app.

To facilitate this, we can create an API route in Next.js to generate these signed URLs:

src/app/api/supabase/storage/route.ts


_31

import { auth } from '@/auth'

_31

import { env } from '@/env'

_31

import { createClient } from '@supabase/supabase-js'

_31

_31

export const dynamic = 'force-dynamic' // defaults to auto

_31

export async function GET(request: Request) {

_31

try {

_31

const session = await auth()

_31

if (!session || !session.user.id) {

_31

return new Response('Unauthorized', { status: 401 })

_31

}

_31

const {

_31

user: { id },

_31

} = session

_31

// Generate signed upload url to use on client.

_31

const supabaseAdmin = createClient(env.NEXT_PUBLIC_SUPABASE_URL, env.SUPABASE_SERVICE_ROLE_KEY)

_31

_31

const { data, error } = await supabaseAdmin.storage

_31

.from('avatars')

_31

.createSignedUploadUrl(id, { upsert: true })

_31

console.log(error)

_31

if (error) throw error

_31

_31

return new Response(JSON.stringify(data), {

_31

status: 200,

_31

})

_31

} catch (e) {

_31

console.error(e)

_31

return new Response('Internal Server Error', { status: 500 })

_31

}

_31

}


The createSignedUploadUrl method returns a token which we can then use on the client-side to upload the file selected by React Dropzone:

src/app/dashboard/settings/_components/supabase-react-dropzone.tsx


_42

'use client'

_42

_42

import { env } from '@/env'

_42

import { createClient } from '@supabase/supabase-js'

_42

import Image from 'next/image'

_42

import React, { useState } from 'react'

_42

import { useDropzone } from 'react-dropzone'

_42

_42

export default function SupabaseReactDropzone({ userId }: { userId?: string } = {}) {

_42

const supabaseBrowserClient = createClient(

_42

env.NEXT_PUBLIC_SUPABASE_URL,

_42

env.NEXT_PUBLIC_SUPABASE_ANON_KEY

_42

)

_42

const { acceptedFiles, fileRejections, getRootProps, getInputProps } = useDropzone({

_42

maxFiles: 1,

_42

accept: {

_42

'image/jpeg': [],

_42

'image/png': [],

_42

},

_42

onDropAccepted: async (acceptedFiles) => {

_42

setAvatar(null)

_42

console.log(acceptedFiles)

_42

const { path, token }: { path: string; token: string } = await fetch(

_42

'/api/supabase/storage'

_42

).then((res) => res.json())

_42

_42

const { data, error } = await supabaseBrowserClient.storage

_42

.from('avatars')

_42

.uploadToSignedUrl(path, token, acceptedFiles[0])

_42

},

_42

})

_42

_42

return (

_42

<div className="mx-auto mt-4 grid w-full gap-2">

_42

<div {...getRootProps({ className: 'dropzone' })}>

_42

<input {...getInputProps()} />

_42

<p>Drag 'n' drop some files here, or click to select files</p>

_42

<em>(Only *.jpeg and *.png images will be accepted)</em>

_42

</div>

_42

</div>

_42

)

_42

}


Supabase Storage also conveniently integrates with the Next.js Image paradigm, by creating a custom loader:

src/lib/supabase-image-loader.ts


_10

import { env } from '@/env'

_10

_10

export default function supabaseLoader({ src, width, quality }) {

_10

return `${env.NEXT_PUBLIC_SUPABASE_URL}/storage/v1/object/public/${src}?width=${width}&quality=${quality || 75}`

_10

}


Now we just need to register the custom loader in the next.config.js file:


_10

images: {

_10

loader: "custom",

_10

loaderFile: "./src/lib/supabase-image-loader.ts",

_10

},


and we can start using the Next.js Image component by simply providing the file path within Supabase Storage:


_10

<Image

_10

alt="Expert image"

_10

className="aspect-square rounded-md object-cover"

_10

src="your-bucket-name/image.png"

_10

height="64"

_10

width="64"

_10

/>


Supabase also provides a Vercel Integration which makes managing environment variables across branches and deploy previews a breeze. When you connect your Supabase project to your Vercel project, the integration will keep your environment variables in sync.

And when using the Vercel Deploy Button the integration will automatically create a new Supabase project for you, populate the environment variables, and even run the database migration and seed scripts, meaning you're up and running with a full end-to-end application in no time!

Both Cal.com and Supabase are on a mission to create open source software, therefore this new platform starter kit is of course also open-source, allowing you to spin up your own marketplace with convenient scheduling in minutes! Of course this also means that you are very welcome to contribute additional features to the starter kit! You can find the repository on GitHub!