An Instagram-inspired application for cat lovers, built with React, TypeScript, and modern web technologies. Browse, upload, and interact with cat images in a familiar social media interface.
Live Demo: https://catstagram-rosy.vercel.app/
- Explore Page: Browse an infinite-scrolling gallery of random cat images
- User Profile: View your uploaded and favorited cat images
- Upload System: Share your own cat images with image cropping and filters
- Social Features: Like & vote on cat images (built comment system UI - but not yet available)
- Responsive design for mobile and desktop
- Instagram-inspired UI with infinite scrolling
- Modal dialogs for detailed content viewing
- Optimized image loading and error handling
Catstagram uses an ad-hoc user authentication system:
- Each browser session automatically generates a unique user identity
- User data is stored in localStorage with a randomly generated
sub_id
- Random usernames are created using adjective + cat breed + number format
- No login required - just visit the site and start using it immediately
- Each user session is maintained across page refreshes
- Profile customization (username, avatar) is saved to the current session
- Frontend: React 19, TypeScript, Vite
- Styling: TailwindCSS, Material UI
- State Management: React Context API, React Query
- API Integration: Axios, TheCatAPI
- Deployment: Vercel
-
Clone the repository:
git clone <repository-url> cd catstagram
-
Install dependencies:
npm install
-
Create a
.env
file with your TheCatAPI key:VITE_CAT_API_KEY=your_api_key_here
-
Start the development server:
npm run dev
-
Build for production:
npm run build
src/components/
- Reusable UI componentssrc/contexts/
- React context providers (UserContext, ToastContext)src/hooks/
- Custom React hooks for data fetching and UI logicsrc/pages/
- Main application pages (Home, Explore, Upload)src/services/
- API services and user managementsrc/utils/
- Utility functions for various app featuressrc/theme.ts
- Material UI theme configuration
This project uses The Cat API for cat data. Features include:
- Fetching random cat images
- Uploading user cat images
- Favoriting and voting on images
- Managing user uploads
- Keyboard navigation support
- Image optimization for faster loading
- Error boundaries for graceful error handling
- Responsive design for all device sizes