| π― | Pin Discovery Explore millions of high-quality images from Unsplash |
π | Pin Creation Create and share your own pins effortlessly |
| π | Board Management Organize pins into custom boards |
π | Smart Search Find exactly what you're looking for |
| π€ | Google Authentication Secure login with Google OAuth |
π | Dark/Light Mode Toggle between themes seamlessly |
| π± | Responsive Design Perfect on all devices |
β‘ | Lightning Fast Optimized performance with Next.js 15 |
This project uses a client-side only architecture with:
- Unsplash API as the sole backend service for images
- Custom Google OAuth implementation for authentication
- Local Storage for data persistence
- No traditional database - keeping it lightweight and fast!
User Authentication β Google OAuth β Local Storage
Image Data β Unsplash API β React State β UI Components
User Actions β Local Storage β State Updates
Make sure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/PouyaBirvand/megapinterest.git cd megapinterest -
Install dependencies
npm install # or yarn install -
Set up environment variables
cp .env.example .env.local
Fill in your API keys:
NEXT_PUBLIC_UNSPLASH_ACCESS_KEY=your-unsplash-access-key NEXT_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret-key
-
Get your API keys
- Unsplash API: Visit Unsplash Developers to get your access key
- Google OAuth: Go to Google Cloud Console to set up OAuth credentials
-
Run the development server
npm run dev # or yarn dev -
Open your browser Navigate to http://localhost:3000
megapinterest/
βββ π app/ # Next.js 13+ App Router
β βββ π auth/ # Authentication pages
β βββ π boards/ # Board management
β βββ π explore/ # Explore page
β βββ π pin/ # Pin details
β βββ π pin-builder/ # Pin creation
β βββ π profile/ # User profiles
β βββ π saved/ # Saved pins
β βββ π settings/ # User settings
βββ π components/ # Reusable components
β βββ π boards/ # Board components
β βββ π comments/ # Comment system
β βββ π explore/ # Explore components
β βββ π home/ # Home page components
β βββ π layout/ # Layout components
β βββ π pin/ # Pin components
β βββ π pin-builder/ # Pin creation components
β βββ π profile/ # Profile components
β βββ π saved/ # Saved pins components
β βββ π settings/ # Settings components
β βββ π ui/ # UI components
βββ π contexts/ # React contexts
βββ π hooks/ # Custom hooks
β βββ π boardhooks/ # Board-related hooks
β βββ π explorehooks/ # Explore-related hooks
β βββ π pinhooks/ # Pin-related hooks
β βββ useGoogleAuth.ts # Custom Google Auth hook
βββ π lib/ # Utility functions
βββ π types/ # TypeScript types
- Infinite scroll masonry layout
- Real-time image loading from Unsplash API
- Smart caching with local storage
- Responsive grid system
- Save pins from Unsplash to personal boards
- Create custom boards and organize pins
- Local storage persistence
- Fast search and filtering
- Custom Google OAuth implementation
- No external auth libraries - built from scratch
- Secure token management
- Persistent login sessions
- Pinterest-inspired design
- Smooth animations with Framer Motion
- Dark/Light theme support
- Mobile-first responsive design
| Command | Description |
|---|---|
npm run dev |
Start development server with Turbopack |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run format |
Format code with Prettier |
npm run format:check |
Check code formatting |
- β‘ Next.js 15 with Turbopack for faster builds
- πΌοΈ Image Optimization with Next.js Image component
- π Infinite Scrolling for better UX
- π± Mobile-first responsive design
- π¨ Tailwind CSS for optimal styling
- πΎ Local Storage for instant data access
- π Client-side rendering for fast interactions
- Search Photos - Find images by keywords
- Random Photos - Get random high-quality images
- Photo Details - Fetch detailed photo information
- Collections - Browse curated photo collections
- User Photos - Get photos from specific photographers
- Manual implementation without external libraries
- Token management with secure storage
- User profile integration
- Session persistence across browser sessions
We love contributions! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Pinterest for the design inspiration
- Unsplash for providing amazing free photos
- Google for OAuth services
- Next.js Team for the amazing framework
- Tailwind CSS for the utility-first CSS framework
Made with β€οΈ and lots of π€
If you found this project helpful, please give it a β




