Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 976 Bytes

File metadata and controls

54 lines (35 loc) · 976 Bytes

nextjs-supabase-realtime-task example

A full-stack collaborative solution demonstrating real-time synchronization using Next.js, powered by Legend-State for granular state management and Supabase for backend services. Core capabilities include:

  • Real-time bidirectional synchronization: Instant updates with millisecond latency via Supabase Realtime
  • Automatic timestamp tracking: Built-in creation and modification time recording
  • End-to-end type safety: Strict TypeScript definitions across database models
  • Optimized reactivity: Efficient state updates through Legend-State's observable system

Setup

Create .env.local

cp .env.local.example .env.local

Link Supabase

supabase link

Apply Database

supabase db push

Run

Install

pnpm install

Start

pnpm run dev

Types

Generate types.ts

supabase start
supabase gen types --lang=typescript --local > src/lib/types.ts