A collaborative shopping list PWA built with Next.js 16, enabling real-time shared shopping experiences through simple 6-digit codes.
- Shareable Shopping Lists: Create a shopping list and share it with anyone using a unique 6-digit code
- Real-Time Collaboration: All users viewing the same list see updates instantly as items are added, edited, or checked off
- Easy Access:
- Sign in to initiate your own shopping list
- Join existing lists by entering a 6-digit code (no sign-in required)
- Full Shopping List Management: Add, edit, delete, and check off items collaboratively
- Progressive Web App: Install on mobile devices for a native app-like experience
- Theme Support: Toggle between Light and Dark modes with persistence
- Modern UI: Built with Tailwind CSS and shadcn/ui for accessibility and aesthetics
- Create: Sign in with Clerk to create your shopping list and receive a unique 6-digit code
- Share: Share your 6-digit code with family, friends, or roommates
- Collaborate: Anyone with the code can access the list at
/todo/[6-digit-code]and make changes - Sync: All changes are synchronized in real-time across all users viewing the list
- Framework: Next.js 16 (App Router with Turbopack)
- Authentication: Clerk
- Database: Supabase (PostgreSQL)
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Icons: Lucide React
- PWA: @ducanh2912/next-pwa
- Package Manager: pnpm
- Node.js 18+ and pnpm
- Supabase account and project
- Clerk account and application
-
Install dependencies:
pnpm install
-
Set up environment variables in
.env.local:NEXT_PUBLIC_SUPABASE_URL=your_supabase_url SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key CLERK_SECRET_KEY=your_clerk_secret_key
-
Run the development server:
pnpm dev
-
Open http://localhost:3000 to see the application.
src/app: Next.js App Router pages, layouts, and server actionssrc/components: Reusable UI components (TodoList, ShareButton, etc.)src/components/ui: shadcn/ui components (Button, Checkbox, etc.)src/lib: Utilities, database client, and user servicesrc/types: TypeScript type definitions
users table:
user_id(text, primary key) - Clerk user IDuser_todo_id(text, unique) - 6-digit shareable codename(text)created_at(timestamp)
todos table:
id(uuid, primary key)text(text)completed(boolean)user_todo_id(text, foreign key) - Links to shared listcreated_at(timestamp)
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm test- Run Jest tests