A modern, responsive 3D cafΓ© website built with React, Tailwind CSS, Framer Motion, and React Three Fiber. Experience the perfect blend of real-world photography and 3D motion elements in a warm, cozy cafΓ© atmosphere.
- 3D Coffee Cup Animation - Interactive rotating coffee cup with steam particles
- Floating Coffee Beans - 3D coffee beans with physics-based animations
- Smooth Animations - Framer Motion powered scroll animations and transitions
- Responsive Design - Fully adaptive for phones, tablets, and desktops
- Dark Mode Toggle - Beautiful dark/light theme switching
- Interactive Gallery - Carousel with modal view and touch/swipe support
- Reservation System - Modal form with email notifications
- Parallax Effects - Depth and perspective on scroll
- Loading Screen - Elegant loading animation with coffee theme
- Express.js API - RESTful API endpoints
- Email Notifications - Reservation confirmations and contact form
- Rate Limiting - Protection against spam and abuse
- CORS Configuration - Secure cross-origin requests
- Error Handling - Comprehensive error management
- Security Headers - Helmet.js for security
- React 18 - Modern React with hooks
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- React Three Fiber - React renderer for Three.js
- @react-three/drei - Useful helpers for R3F
- Three.js - 3D graphics library
- React Icons - Icon library
- HeadlessUI - Unstyled UI components
- Lucide React - Beautiful icons
- Express.js - Web framework
- Nodemailer - Email sending
- CORS - Cross-origin resource sharing
- Helmet - Security headers
- Express Rate Limit - Rate limiting
- Dotenv - Environment variables
- Node.js 16+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd 3d-cafe-website
-
Install all dependencies
npm run install:all
-
Set up environment variables
cd server cp env.example .env # Edit .env with your email configuration (optional)
-
Start development servers
npm run dev
This will start:
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
# Install all dependencies
npm run install:all
# Start both client and server
npm run dev
# Start only client
npm run dev:client
# Start only server
npm run dev:server
# Build for production
npm run build3d-cafe-website/
βββ client/ # React frontend
β βββ src/
β β βββ components/ # React components
β β β βββ 3D/ # 3D components (Three.js)
β β β βββ HeroSection.jsx
β β β βββ AboutSection.jsx
β β β βββ MenuSection.jsx
β β β βββ GallerySection.jsx
β β β βββ FindUsSection.jsx
β β β βββ Footer.jsx
β β β βββ Navbar.jsx
β β β βββ LoadingScreen.jsx
β β βββ App.jsx
β β βββ main.jsx
β β βββ index.css
β βββ package.json
β βββ vite.config.js
β βββ tailwind.config.js
β βββ index.html
βββ server/ # Express backend
β βββ server.js # Main server file
β βββ package.json
β βββ env.example
βββ package.json # Root package.json
βββ README.md
- Cream:
#fdf6ec- Primary background - Chocolate:
#4b2e05- Primary text - Gold:
#d6a05e- Accent color - Chocolate Light:
#6b3e0a- Secondary text - Gold Light:
#e6b366- Hover states
- Serif: Playfair Display (headings)
- Sans: Inter (body text)
- Float: Gentle up/down movement
- Steam: Particle-like steam animation
- Rotate: Slow continuous rotation
- Hover: Scale and shadow effects
GET /api/menu- Get all menu items by category
GET /api/gallery- Get gallery images
POST /api/reservations- Submit reservation request
POST /api/contact- Submit contact form
POST /api/newsletter- Subscribe to newsletter
GET /api/health- API health check
To enable email notifications, configure your email service in server/.env:
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-passwordFor Gmail, you'll need to:
- Enable 2-factor authentication
- Generate an app password
- Use the app password in
EMAIL_PASS
- Fullscreen hero with 3D coffee cup
- Parallax scroll effects
- Smooth fade-in animations
- Call-to-action buttons
- Tilt-3D hover effects on images
- Statistics with animated counters
- Background patterns and decorations
- Responsive grid layout
- Category filtering
- Hover animations with 3D depth
- Best seller badges
- Touch/swipe carousel
- Modal image viewer
- 3D coffee beans background
- Social sharing buttons
- Google Maps integration ready
- Contact information
- Reservation modal with form validation
- Email notifications
- Social media links
- Newsletter subscription
- Dark mode toggle
- Scroll to top button
cd client
npm run build
# Deploy the dist foldercd server
# Set environment variables
# Deploy the server folder- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Unsplash for beautiful coffee images
- Three.js community for 3D inspiration
- Framer Motion for smooth animations
- Tailwind CSS for rapid styling
For support, email hello@brewandbean.com or create an issue in the repository.
Brewed with β€οΈ using modern web technologies