Skip to content

digitreelab-gkp/caffe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β˜• Brew & Bean - 3D CafΓ© Website

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.

Brew & Bean React Three.js Tailwind CSS

🎯 Features

✨ Frontend Features

  • 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

πŸš€ Backend Features

  • 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

πŸ› οΈ Tech Stack

Frontend

  • 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

Backend

  • Express.js - Web framework
  • Nodemailer - Email sending
  • CORS - Cross-origin resource sharing
  • Helmet - Security headers
  • Express Rate Limit - Rate limiting
  • Dotenv - Environment variables

πŸš€ Quick Start

Prerequisites

  • Node.js 16+
  • npm or yarn

Installation

  1. Clone the repository

    git clone <repository-url>
    cd 3d-cafe-website
  2. Install all dependencies

    npm run install:all
  3. Set up environment variables

    cd server
    cp env.example .env
    # Edit .env with your email configuration (optional)
  4. Start development servers

    npm run dev

This will start:

Individual Commands

# 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 build

πŸ“ Project Structure

3d-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

🎨 Design System

Color Palette

  • Cream: #fdf6ec - Primary background
  • Chocolate: #4b2e05 - Primary text
  • Gold: #d6a05e - Accent color
  • Chocolate Light: #6b3e0a - Secondary text
  • Gold Light: #e6b366 - Hover states

Typography

  • Serif: Playfair Display (headings)
  • Sans: Inter (body text)

Animations

  • Float: Gentle up/down movement
  • Steam: Particle-like steam animation
  • Rotate: Slow continuous rotation
  • Hover: Scale and shadow effects

πŸ”§ API Endpoints

Menu

  • GET /api/menu - Get all menu items by category

Gallery

  • GET /api/gallery - Get gallery images

Reservations

  • POST /api/reservations - Submit reservation request

Contact

  • POST /api/contact - Submit contact form

Newsletter

  • POST /api/newsletter - Subscribe to newsletter

Health

  • GET /api/health - API health check

πŸ“§ Email Configuration

To enable email notifications, configure your email service in server/.env:

EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password

For Gmail, you'll need to:

  1. Enable 2-factor authentication
  2. Generate an app password
  3. Use the app password in EMAIL_PASS

🎯 Features Breakdown

Hero Section

  • Fullscreen hero with 3D coffee cup
  • Parallax scroll effects
  • Smooth fade-in animations
  • Call-to-action buttons

About Section

  • Tilt-3D hover effects on images
  • Statistics with animated counters
  • Background patterns and decorations

Menu Section

  • Responsive grid layout
  • Category filtering
  • Hover animations with 3D depth
  • Best seller badges

Gallery Section

  • Touch/swipe carousel
  • Modal image viewer
  • 3D coffee beans background
  • Social sharing buttons

Find Us Section

  • Google Maps integration ready
  • Contact information
  • Reservation modal with form validation
  • Email notifications

Footer

  • Social media links
  • Newsletter subscription
  • Dark mode toggle
  • Scroll to top button

πŸš€ Deployment

Frontend (Vercel/Netlify)

cd client
npm run build
# Deploy the dist folder

Backend (Railway/Heroku)

cd server
# Set environment variables
# Deploy the server folder

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Unsplash for beautiful coffee images
  • Three.js community for 3D inspiration
  • Framer Motion for smooth animations
  • Tailwind CSS for rapid styling

πŸ“ž Support

For support, email hello@brewandbean.com or create an issue in the repository.


Brewed with ❀️ using modern web technologies

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages