A modern, secure, and feature-rich art marketplace platform built with React, Node.js, and MongoDB. Connect artists with art enthusiasts, showcase creative works, and facilitate art sales in a beautiful, responsive environment.
- Secure Registration & Login: JWT-based authentication with password hashing
- Role-Based Access: Separate buyer and seller accounts with different permissions
- Profile Management: Comprehensive user profiles with customizable information
- Education & Skills: Artists can showcase their educational background and technical skills
- Contact Information: Secure contact details management
- Artwork Showcase: Beautiful gallery display with high-quality image support
- Advanced Filtering: Filter by style, medium, size, technique, and price range
- Search Functionality: Intelligent search across artwork titles and descriptions
- Artwork Details: Comprehensive information including dimensions, materials, and pricing
- Image Upload: Secure file upload with validation and optimization
- Responsive Gallery: Mobile-first design that works on all devices
- Category Organization: Organized by artistic styles and techniques
- Price Filtering: Range-based price filtering for budget-conscious buyers
- Sorting Options: Multiple sorting criteria for optimal browsing experience
- HTTP Headers Protection: Helmet.js for comprehensive security headers
- Rate Limiting: API protection against abuse and brute force attacks
- Input Validation: Comprehensive data sanitization and validation
- CORS Protection: Restricted cross-origin access for security
- File Upload Security: Secure image upload with type and size validation
- XSS Protection: Cross-site scripting attack prevention
- Environment Security: Secure configuration management
- Mobile-First: Optimized for all screen sizes from mobile to desktop
- Modern UI/UX: Clean, intuitive interface with smooth animations
- Accessibility: WCAG compliant design for inclusive user experience
- Performance: Optimized loading and smooth interactions
- React 18: Modern React with hooks and functional components
- Vite: Fast build tool for rapid development
- Tailwind CSS: Utility-first CSS framework for responsive design
- Context API: State management for user authentication and app state
- React Router: Client-side routing for seamless navigation
- Express.js: Fast, unopinionated web framework
- MongoDB: NoSQL database for flexible data storage
- Mongoose: MongoDB object modeling for Node.js
- JWT: JSON Web Tokens for secure authentication
- Multer: File upload handling with security validation
- Helmet.js: Security headers and protection
- Rate Limiting: API abuse prevention
- Input Validation: Data sanitization and validation
- CORS: Cross-origin resource sharing control
- File Upload Security: Secure file handling
- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- npm or yarn package manager
-
Clone the repository
git clone <your-repo-url> cd art-marketplace
-
Install frontend dependencies
cd my-app npm install -
Environment Setup
# Copy environment template cp env.example .env # Edit .env with your configuration nano .env
-
Database Setup
- Start MongoDB locally or use MongoDB Atlas
- Update
MONGO_URIin your.envfile
-
Generate Security Keys
# Generate JWT secret node -e "console.log(require('crypto').randomBytes(64).toString('hex'))" # Add to .env file JWT_SECRET=your_generated_secret_here
-
Start Frontend Development Server
cd my-app npm run dev # Frontend runs on http://localhost:5173
-
Build for Production
cd my-app npm run build npm run preview
MAX_FILE_SIZE=5242880 ALLOWED_FILE_TYPES=image/jpeg,image/png,image/gif,image/webp
The application includes comprehensive security measures:
- Helmet.js: HTTP security headers
- Rate Limiting: API abuse prevention
- Input Validation: XSS and injection protection
- File Upload Security: Secure image handling
- CORS Protection: Origin validation
- Register as a seller account
- Complete Profile with education, skills, and contact information
- Upload Artwork with detailed descriptions and pricing
- Manage Portfolio with multiple artwork pieces
- Track Sales and manage your art business
- Browse Gallery with advanced filtering options
- Search Artworks by style, medium, or keywords
- View Details of each artwork with high-quality images
- Make Purchases securely through the platform
- Track Orders and purchase history
- Browse artwork gallery
- Advanced search and filtering
- Secure purchase process
- Order history tracking
- User profile management
- Artwork upload and management
- Portfolio customization
- Sales tracking
- Profile enhancement
- Artwork analytics
my-app/
βββ src/ # Frontend source code
β βββ Components/ # Reusable React components
β βββ Context/ # React context providers
β βββ pages/ # Page components
β βββ services/ # API service functions
β βββ assets/ # Static assets
βββ README.md # This file
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint- β XSS Prevention: Input sanitization and CSP headers
- β CSRF Protection: CORS origin validation
- β SQL Injection: MongoDB with parameterized queries
- β File Upload Security: Type validation and size limits
- β Rate Limiting: API abuse prevention
- β Authentication Security: JWT with secure storage
- β Data Validation: Comprehensive input validation
- β Security Headers: Helmet.js protection
- Environment variable management
- Secure file upload handling
- Input sanitization and validation
- Rate limiting and abuse prevention
- Comprehensive error handling
- Security monitoring and logging
- Image Optimization: Compressed and optimized artwork images
- Lazy Loading: Efficient image loading for better performance
- Code Splitting: Optimized bundle sizes
- Caching: Strategic caching for improved response times
- Database Indexing: Optimized MongoDB queries
- API response times
- Database query performance
- File upload speeds
- User interaction metrics
- Error rate tracking
- Environment variables configured
- Strong JWT secrets generated
- HTTPS enabled
- Database optimized
- Security headers verified
- Rate limiting active
- File upload security enabled
- Error monitoring configured
- Vercel: Frontend deployment
- Railway/Heroku: Backend deployment
- MongoDB Atlas: Database hosting
- AWS S3: File storage (optional)
- Cloudflare: CDN and security
π¨ Art Marketplace - Connecting artists with art enthusiasts worldwide.
Built with β€οΈ using React, Node.js, and MongoDB