A full-featured Pinterest clone built with Next.js, Supabase, and TailwindCSS. Share, save, and discover visual content in a beautiful masonry-style grid layout.
- Infinite Scroll Feed - Masonry-style grid displaying pins with automatic infinite loading
- User Authentication - Sign up, sign in, and sign out via Supabase Auth
- Pin Creation - Upload and share images with titles, descriptions, and links
- Pin Details - View full pin information with comments and creator details
- Save to Boards - Save pins to organized boards
- User Profiles - View user profiles with their boards and created pins
- Theme Switching - Multiple visual themes with dark mode support
- SWR Data Fetching - Efficient data fetching with stale-while-revalidate pattern
- Real-time Subscriptions - Live auth state updates via Supabase subscriptions
- Image Optimization - Cloudinary-powered image storage with WebP conversion and blur placeholders
- Responsive Design - Mobile-first approach with TailwindCSS and daisyUI
- CI/CD Pipeline - GitHub Actions for automated linting and deployment
| Category | Technology |
|---|---|
| Frontend Framework | Next.js 13 (SSG) |
| UI Library | React 18 |
| Styling | TailwindCSS + daisyUI |
| Backend/Auth | Supabase (BAAS) |
| Image Storage | Cloudinary |
| Data Fetching | SWR + swr-sync-state |
| Icons | MUI Icons |
| Image Compression | browser-image-compression |
| Deployment | Vercel (frontend) + Firebase (legacy) |
users ──────────< boards ──────────< boards_pins >──────── pins
│ │ │
│ │ │
└── users_followers ─┘ pins_comments ──┘
│
└── boards_comments
- users - User profiles and metadata
- boards - User-created pin collections
- pins - Image pins with titles, descriptions, and links
- boards_pins - Many-to-many relationship between pins and boards
- pins_comments - Comments on pins
- boards_comments - Comments on boards
- boards_members - Board collaboration
- users_followers - User follow relationships
| Route | Description |
|---|---|
/ |
Home feed with all pins (infinite scroll) |
/pin/[pin_uuid] |
Pin detail page with comments |
/profile |
User profile page |
/profile/[board_uuid] |
Board page with pins |
/createPin |
Create new pin page |
- Node.js 16+
- npm or yarn
- Supabase account
- Cloudinary account
- Clone the repository
git clone https://github.com/vikyw89/pinterestClone.git
cd pinterestClone- Install dependencies
cd client
npm install- Configure environment variables
cp .env.example .env.localEdit .env.local with your credentials:
NEXT_PUBLIC_SUPABASE_PROJECT_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name-
Initialize Supabase database Run the SQL schema in
client/supabase.sqlin your Supabase SQL editor. -
Start development server
npm run dev- Open browser Navigate to http://localhost:3000
pinterestClone/
├── client/ # Next.js frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── boards/ # Board-related components
│ │ │ ├── feed/ # Feed and pin card components
│ │ │ ├── pin/ # Pin detail components
│ │ │ ├── profile/ # Profile components
│ │ │ └── signIn/ # Authentication components
│ │ ├── common/ # Shared components
│ │ │ ├── layout/ # Header, footer, page layout
│ │ │ ├── loading/ # Loading states
│ │ │ └── notif/ # Notifications
│ │ ├── lib/ # Utilities
│ │ │ ├── hooks/ # Custom React hooks
│ │ │ ├── supabase/ # Supabase client
│ │ │ ├── cloudinary/ # Cloudinary utilities
│ │ │ └── store/ # State management
│ │ ├── pages/ # Next.js pages
│ │ └── styles/ # Global styles
│ └── supabase.sql # Database schema
└── initSupabase.js # Supabase initialization script
# Development
npm run dev # Start development server
# Production
npm run build # Build for production
npm run start # Start production server
npm run export # Static export
# Code Quality
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint issuesThis project was created as part of The Odin Project curriculum. Contributions welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is available under the MIT License.
- Design inspired by Pinterest
- Built as a learning project for The Odin Project
- Image storage powered by Cloudinary
- Backend services by Supabase

