InstaSpot is a modern web application built with React that allows users to share and discover travel photos. It features a clean, Instagram-inspired interface with Material-UI components and responsive design.
- 📸 Photo sharing with captions
- 🖼️ Image preview modal
- ❤️ Like functionality for posts
- 👤 User profile management
- 🎨 Modern UI with Material-UI
- 📱 Responsive design for all devices
- 🔄 Real-time updates with React Query
- 🖼️ Integration with Unsplash API for travel images
- React 19
- Material-UI (MUI)
- React Aria
- TanStack Query (React Query)
- Vite
- Tailwind CSS
- Unsplash API
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher)
- npm or pnpm
- Clone the repository:
git clone [repository-url]
cd react-instaSpot- Install dependencies:
npm install
# or
pnpm install- Create a
config.jsfile in the root directory with your API keys:
export const config = {
UNSPLASH_API_KEY: 'your_unsplash_api_key',
};- Start the development server:
npm run dev
# or
pnpm run devsrc/
├── assets/
│ └── images/ # Static images and icons
├── components/
│ ├── cards.jsx # Photo grid and post display
│ ├── footer.jsx # Footer component
│ ├── navbar.jsx # Navigation and logo
│ └── profile.jsx # User profile and post creation
├── services/
│ └── api.jsx # API integration
├── styles/
│ └── reset.css # CSS reset
├── App.jsx # Main application component
├── main.jsx # Application entry point
└── index.css # Global styles
- Responsive grid layout using Material-UI
- Image preview modal
- Like functionality with local state
- Integration with Unsplash API
- Fallback to local images when API is unavailable
- Profile picture upload
- Bio and name editing
- New post creation with image upload
- Form validation
- Responsive layout
- Unsplash API for travel images
- Rate limiting handling
- Error handling with fallback to local images
- React Query for data fetching and caching
The project uses a combination of:
- Material-UI for component styling
- Tailwind CSS for utility classes
- Custom CSS for specific styling needs
The color scheme is based on a warm, travel-inspired palette:
- Background: #fcf5e5
- Text: #212121
- Accent colors from Material-UI theme
pnpm run dev- Start development serverpnpm run build- Build for productionpnpm run preview- Preview production build
The project follows modern React best practices:
- Functional components with hooks
- Proper prop typing
- Component composition
- Responsive design patterns
- Unsplash for providing the image API
- Material-UI for the component library
- React Query for data fetching and caching