A modern Pinterest-inspired photo-sharing frontend application, built with React, Node, CSS, and Vite. This is the frontend for a full-stack MERN application, enabling users to upload, explore, and interact with images in a clean, Pinterest-like interface.
π View Live Demo
-
User Interface
- Clean and intuitive navigation
- Responsive grid layout for image display
- Smooth animations and transitions
-
User Authentication UI
- Registration and login forms
- Error handling and form validation
-
Content Creation
- Interactive image upload with preview
- Form for adding descriptions and tags
- Edit and delete options for user's own content
-
Social Interaction Components
- Like and save buttons with counter displays
- Comment section with threaded replies
- User follow functionality
- Share options for social media platforms
-
Content Discovery Features
- Search bar with auto-suggestions
- Advanced filters and category selection
- Infinite scroll implementation
-
Profile Management
- Editable user profile interface
- Activity tracking visualization
- Collection management tools
- Settings and preferences panel
-
Responsive Design
- Mobile-first approach
- Adaptive layouts for all screen sizes
- Touch-friendly interfaces
- Optimized performance on all devices
- React.js: Core library for building the user interface
- React Router: For navigation between pages
- Zustand: State management across the application
- Axios: API calls to the backend
- Emoji Picker: For selecting emojis
- CSS: For custom styling solutions
- Imagekitio React: For maintaining images
- React Colorful: For selecting different colors
- React Infinite Scroll Component: For handling infinite scrolling feature
- Vite: Frontend build tool and development server
- ESLint & Prettier: Code quality and formatting
Before you begin, ensure you have the following installed:
- Node.js (v18.0.0 or higher)
- npm (v6.0.0 or higher)
git clone https://github.com/Narotam-Mishra/react-pinterest-frontend.git
cd react-pinterest-frontend
npm install
Create a .env
file in the root directory with the following variables:
VITE_URL_IK_ENDPOINT=your_imageio_url
VITE_API_URL=your_backend_apis_url
npm run dev
The application will be available at http://localhost:5173
npm run build
frontend/
βββ src/ # Source code
βββ public/ # Public assets and index.html
β βββ components/ # Reusable UI components
β β βββ boards/ # borads for maintaining images collection
β β βββ comments/ # For comment section
β β βββ editor/ # For image edit options
β β βββ gallery/ # For image gallery
β β βββ galleryItems/ # For collection of images
β β βββ image/ # For using Image component
β β βββ leftBar/ # Left side bar
β β βββ postInteraction/ # For post interaction
β β βββ topBar/ # Top bar of app
β β βββ userButton/
β βββ routes/ # Application routes
β β βββ authPage/
β β βββ createPage/
β β βββ homePage/
β β βββ layouts/
β β βββ postPage/
β β βββ profilePage/
β β βββ searchPage/
β βββ utils/ # Utility functions and helpers
β βββ App.css
β βββ App.jsx # Main application component
β βββ index.css # Global styles
β βββ main.jsx # Application entry point
βββ .env # Environment variables
βββ .gitignore # Git ignore configuration
The application follows a modular component architecture, separating concerns for better maintainability and reuse. Components are organized by feature and include both presentational and container components.
Zustand is used for global state management, with separate slices for different features such as authentication, pins, and user profiles. Local component state is used where appropriate for UI-specific functionality.
The interface is built using a mobile-first approach with responsive breakpoints. The layout adjusts dynamically to different screen sizes through CSS media queries and flexible grid systems.
- Lazy loading of images and components
- Memoization of expensive components using React.memo
- Code splitting for route-based component loading
- Optimized re-renders using careful state management
The Pinterest-style masonry layout is implemented using using grid layout, providing a responsive and visually appealing grid that adjusts based on the viewport size.
Forms throughout the application use React Hook Form for state management and Yup schema validation to ensure data integrity before submission.
Run the test suite with:
npm test
The frontend components are tested using:
- Jest for unit testing
- React Testing Library for component testing
- Mock Service Worker for API mocking
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your 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.
Narotam Mishra
- GitHub: @Narotam-Mishra
- LinkedIn: Narotam Mishra
- React.js Documentation
- Vite
- Pinterest for design inspiration
- All the contributors to the open-source libraries used in this project
Made with β€οΈ by Narotam Mishra