Skip to content

This Pinterest clone used Next.js, Prisma, and PostgreSQL to build a user system with settings, image uploads, authentication, and real-time updates. It added pagination for pins and began like/save features, using Tailwind CSS and Cloudinary to support a scalable, social media-style platform.

Notifications You must be signed in to change notification settings

Mkaify/Pinterest_Clone

Repository files navigation

πŸ“Œ Pinterest Clone

A full-featured Pinterest clone built with Next.js 14, featuring user authentication, pin management, user discovery, privacy controls, and a modern responsive design.

✨ Features

πŸ” Authentication & User Management

  • Google OAuth Integration with NextAuth.js
  • User Registration & Login with email/password
  • Profile Management with avatar uploads
  • Privacy Settings with granular controls

πŸ“ Pin Management

  • Create Pins with image uploads via Cloudinary
  • Save & Like functionality with real-time updates
  • Masonry Grid Layout for optimal viewing
  • Pin Details with full-screen view and interactions

πŸ‘₯ User Discovery & Social Features

  • User Search with privacy-respecting results
  • Follow System with public/private profile support
  • User Profiles with created and saved pins
  • Privacy Controls for profile and search visibility

🎨 Modern UI/UX

  • Pinterest-inspired Design with clean, modern interface
  • Responsive Layout optimized for all devices
  • Sidebar Navigation with intuitive iconography
  • Real-time Updates with optimistic UI patterns

πŸ“ Project Structure

pinterest-clone/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router pages
β”‚   β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”‚   β”œβ”€β”€ auth/              # Authentication pages
β”‚   β”‚   β”œβ”€β”€ create/            # Pin creation
β”‚   β”‚   β”œβ”€β”€ pin/[id]/          # Pin details
β”‚   β”‚   β”œβ”€β”€ search/            # Search functionality
β”‚   β”‚   └── user/              # User profiles & settings
β”‚   β”œβ”€β”€ components/            # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ navbar/            # Navigation components
β”‚   β”‚   β”œβ”€β”€ masonry/           # Grid layout
β”‚   β”‚   └── providers/         # Context providers
β”‚   └── lib/                   # Utility functions
β”œβ”€β”€ prisma/                    # Database schema & migrations
β”œβ”€β”€ public/                    # Static assets
└── images/                    # Project screenshots

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm/pnpm/yarn
  • Google Cloud Console account (for OAuth)
  • Cloudinary account (for image uploads)

Installation

  1. Clone the repository

    git clone https://github.com/Mkaify/Pinterest_Clone.git
    cd Pinterest_Clone
  2. Install dependencies

    npm install
    # or
    pnpm install
    # or
    yarn install
  3. Environment Setup

    cp env.example .env.local

    Fill in your environment variables in .env.local:

    # Database
    DATABASE_URL="file:./dev.db"  # SQLite for development
    
    # NextAuth
    NEXTAUTH_URL="http://localhost:3000"
    NEXTAUTH_SECRET="your-nextauth-secret-here"
    
    # Google OAuth
    GOOGLE_CLIENT_ID="your-google-client-id"
    GOOGLE_CLIENT_SECRET="your-google-client-secret"
    
    # Cloudinary
    CLOUDINARY_CLOUD_NAME="your-cloud-name"
    CLOUDINARY_API_KEY="your-api-key"
    CLOUDINARY_API_SECRET="your-api-secret"
  4. Database Setup

    npx prisma generate
    npx prisma db push
  5. Run the development server

    npm run dev
    # or
    pnpm dev
    # or
    yarn dev
  6. Open your browser Navigate to http://localhost:3000

πŸ› οΈ Tech Stack

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Database: Prisma ORM with SQLite/PostgreSQL
  • Authentication: NextAuth.js with Google OAuth
  • Image Upload: Cloudinary
  • UI Components: Custom components with Tailwind
  • Icons: Heroicons
  • Deployment: Vercel/Netlify ready

🚒 Deployment

Vercel (Recommended)

  1. Push code to GitHub
  2. Connect repository to Vercel
  3. Configure environment variables
  4. Deploy automatically

Environment Variables for Production

  • Use PostgreSQL for production database
  • Update NEXTAUTH_URL to your domain
  • Configure OAuth callbacks for production domain

πŸ“Έ Screenshots

🏠 Home & Feed

Home Feed
Guest View
Pin Hover
Login/SignUp

πŸ” Search & Discovery

Search Results
Home Feed
User Search
User Discovery & Search

πŸ‘€ User Profiles & Social Features

User Profile
Searching
Profile Tabs
Explore

πŸ“Œ Pin Details & Interactions

Pin Detail
Create Pin
Pin Actions
Messages/Inbox

βž• Create & Upload

Create Pin
Updates Pop-Up
Upload Interface
Favourite Pins

πŸ” Authentication

Login
User Profile
Signup
Settings Dashboard

βš™οΈ Settings & Privacy

User Settings
Profile Settings
Privacy Settings
Password Settings

πŸ“± Responsive Design

Mobile View
Privacy Settings
Tablet View
Notification Settings
Navigation
Account Settings

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is open source and available under the MIT License.

πŸ‘¨β€πŸ’» Developer

Created by Mkaify


⭐ Star this repository if you found it helpful!

About

This Pinterest clone used Next.js, Prisma, and PostgreSQL to build a user system with settings, image uploads, authentication, and real-time updates. It added pagination for pins and began like/save features, using Tailwind CSS and Cloudinary to support a scalable, social media-style platform.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages