Skip to content

Coffee-Shop is a NextJS 14 Static Frontend Webpage, using React.js, Typescript, TailwindCSS, Framer-Motion, Locomotive-Scroll, Gsap, React-Icons, Split-Type, Swiper, Mobile NavBar features and deploed on Vercel.

Notifications You must be signed in to change notification settings

arnobt78/CoffeeShop-1--NextJS-Frontend

Repository files navigation

Coffee Shop 1 - Next.js TailwindCSS Project β˜•οΈ

Screenshot 2024-09-13 at 01 47 46 Screenshot 2024-09-13 at 01 48 08 Screenshot 2024-09-13 at 01 48 43 Screenshot 2024-09-13 at 01 49 07 Screenshot 2024-09-13 at 01 49 27 Screenshot 2024-09-13 at 01 51 04 Screenshot 2024-09-13 at 01 51 58


Project Summary

CoffeeShop is a visually rich, fully responsive static frontend webpage built with Next.js 14, React.js, TypeScript, and TailwindCSS. This project simulates a modern coffee shop’s digital presence, featuring smooth animations, custom components, advanced scrolling effects, and a mobile-first design. It leverages Framer Motion, Locomotive Scroll, GSAP, React Icons, Split-Type, Swiper, and more, making it an excellent learning resource for web developers interested in advanced UI/UX and modern frontend technologies.

Note: View my Coffee Shop 2 template for another showcase of my design and development skills:


Table of Contents


Features

  • ✨ Modern UI with smooth animations and transitions
  • 🎯 Responsive and mobile-friendly design
  • πŸš€ Fast static site powered by Next.js 14
  • πŸŽ₯ Scroll-based and motion animations using Framer Motion, Locomotive Scroll, and GSAP
  • 🧩 Modular component-based architecture
  • πŸ“± Mobile navigation bar and touch-friendly sliders (Swiper)
  • πŸ–ΌοΈ SVG icons with React Icons
  • πŸ’‘ Code splitting and font optimization with next/font
  • πŸ”₯ Custom Google Fonts integration
  • πŸŒ— Easy to deploy on Vercel or Netlify

Tech Stack


Project Structure

.
β”œβ”€β”€ app/                # Next.js app directory (routes, pages)
β”œβ”€β”€ components/         # Reusable React components
β”‚   β”œβ”€β”€ About.tsx
β”‚   β”œβ”€β”€ Badge.tsx
β”‚   β”œβ”€β”€ Footer.tsx
β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”œβ”€β”€ Hero.tsx
β”‚   β”œβ”€β”€ OpeningHours.tsx
β”‚   β”œβ”€β”€ Separator.tsx
β”‚   β”œβ”€β”€ Testimonials.tsx
β”‚   β”œβ”€β”€ Explore/        # Subcomponents
β”‚   β”œβ”€β”€ Menu/
β”‚   └── Nav/
β”œβ”€β”€ public/             # Static assets (images, icons)
β”œβ”€β”€ styles/             # Tailwind and global styles
β”œβ”€β”€ .eslintrc.json      # Linting configuration
β”œβ”€β”€ netlify.toml        # Netlify deployment config
β”œβ”€β”€ next.config.mjs     # Next.js configuration
β”œβ”€β”€ package.json        # Project dependencies
β”œβ”€β”€ postcss.config.mjs  # PostCSS config
β”œβ”€β”€ tailwind.config.ts  # TailwindCSS config
β”œβ”€β”€ tsconfig.json       # TypeScript config
└── type.d.ts           # TypeScript type definitions

Key Components

  • Header.tsx: Top navigation bar, branding, and links.
  • Hero.tsx: Hero section with eye-catching imagery and main call-to-action.
  • About.tsx: Info about the coffee shop, mission, and values.
  • Menu/: Menu component(s) showing products or offerings.
  • Explore/: Call-to-action and exploration features.
  • Testimonials.tsx: Customer testimonials with Swiper slider.
  • Footer.tsx: Closing section with contact info and links.
  • Nav/: Handles the mobile and desktop navigation.

Each component is written in TypeScript for safety and clarity, and is styled with TailwindCSS utility classes.


How to Run the Project

1. Prerequisites

  • Node.js: Install from nodejs.org
  • npm (comes with Node.js), yarn, pnpm, or bun

2. Install Dependencies

npm install
# or
yarn install
# or
pnpm install

You may need to install additional packages:

npm i gsap react-icons split-type swiper
npm install locomotive-scroll@beta
npm i framer-motion

3. Start the Development Server

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 in your browser.


API, Routes & Functionality

This project is a static frontendβ€”it does not connect to a backend API. All content and interactivity are handled on the client-side using React components and Next.js routing.

  • Routing: Uses Next.js App Router (app/ directory). Page editing starts in app/page.js or app/page.tsx.
  • Fonts: Uses Next.js next/font for Google font optimization.
  • Scroll Animation: Locomotive Scroll and GSAP provide advanced scroll effects (parallax, smooth scrolling).
  • Sliders: Swiper.js implements interactive testimonial and product sliders.
  • Responsiveness: TailwindCSS ensures the site looks great on all devices.
  • Motion/Transitions: Framer Motion animates elements for engaging UI/UX.

Learning & Examples

Example: Adding a New Component

Here’s how you might add a new section to the homepage:

// components/NewSection.tsx
import React from "react";

export default function NewSection() {
  return (
    <section className="py-12 bg-gray-100">
      <div className="container mx-auto">
        <h2 className="text-3xl font-bold mb-4">Our Special Roasts</h2>
        <p className="text-lg">Explore our exclusive coffee blends handpicked by our experts.</p>
      </div>
    </section>
  );
}

Import and use it in your main page:

import NewSection from "@/components/NewSection";

export default function HomePage() {
  return (
    <main>
      {/* ...other sections... */}
      <NewSection />
      {/* ...other sections... */}
    </main>
  );
}

Example: Using Tailwind with Framer Motion

import { motion } from "framer-motion";

<motion.div
  className="p-6 bg-white rounded shadow"
  initial={{ opacity: 0, y: 50 }}
  animate={{ opacity: 1, y: 0 }}
  transition={{ duration: 0.5 }}
>
  Animated Section!
</motion.div>

Useful Links & Tutorials


Deployment

  • Vercel: Click here to deploy on Vercel in seconds.
  • Netlify: Use netlify.toml for Netlify configuration.
  • See the Next.js deployment docs for more options.

Keywords

Next.js, React, TailwindCSS, Coffee Shop Website, Framer Motion, Locomotive Scroll, GSAP, Swiper, TypeScript, Static Site, Modern UI, Responsive Design, Web Animations, Component Architecture, Frontend, Web Development, Teaching Project, Learning Resource


Conclusion

This project is a robust example of modern frontend engineering using the React and Next.js ecosystem, packed with animations and best practices in component design, styling, and deployment.
It is a perfect resource for both learning and teaching advanced frontend concepts, as well as a solid template for real-world coffee shop/business websites.


Happy Coding! πŸš€

Thank you for checking out this project. Enjoy building and learning!

About

Coffee-Shop is a NextJS 14 Static Frontend Webpage, using React.js, Typescript, TailwindCSS, Framer-Motion, Locomotive-Scroll, Gsap, React-Icons, Split-Type, Swiper, Mobile NavBar features and deploed on Vercel.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published