Skip to content

MasuRii/restaurant-website-template

Repository files navigation

RisΕ« & Oak - Restaurant Website Template

Astro React Tailwind CSS TypeScript

Deploy Version PRs Welcome

A high-performance, accessible, and SEO-optimized restaurant website template built with Astro, React, and Tailwind CSS.

Screenshot of the Website

Live Demo | Documentation | Quick Start


Features

  • Blazing Fast - Built with Astro for optimal performance and minimal JavaScript
  • Modern Stack - React 19, Tailwind CSS 4, and TypeScript for type safety
  • Reservation System - Interactive reservation form with date/time selection
  • Dynamic Menu - JSON-based menu management with category filtering
  • Dark/Light Mode - Theme toggle with system preference detection
  • Fully Responsive - Mobile-first design that looks great on all devices
  • SEO Optimized - Built-in sitemap, meta tags, and structured data (JSON-LD)
  • Accessibility First - WCAG 2.1 AA compliant with keyboard navigation
  • i18n Ready - Internationalization support with i18next
  • Performance Monitoring - Web Vitals integration for real user monitoring
  • Interactive Map - Leaflet.js + OpenStreetMap integration (no API key required)
  • Instagram Feed - Social media integration showcase

Tech Stack

Category Technology
Framework Astro v5.16.9
UI Library React v19.2.3
Styling Tailwind CSS v4.1.18
Internationalization i18next v25.7.4
Image Optimization Sharp v0.34.5
Performance Web Vitals v5.1.0
E2E Testing Playwright v1.57.0
Deployment Vercel

Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/MasuRii/restaurant-website-template.git
cd restaurant-website-template

# Install dependencies
bun install  # or npm install

# Start development server
bun dev  # or npm run dev

The site will be available at http://localhost:4321

Commands

All commands are run from the root of the project:

Command Description
bun install Install dependencies
bun dev Start local dev server at localhost:4321
bun build Build production site to ./dist/
bun preview Preview production build locally
bun run lint Run ESLint for code quality
bun run lint:fix Run ESLint and auto-fix issues
bun run format Run Prettier for code formatting
bun test Run unit tests
bun run test:e2e Run E2E tests with Playwright
bun run deploy Deploy to Vercel

Project Structure

restaurant-website-template/
β”œβ”€β”€ public/                    # Static assets (favicon, robots.txt)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/               # Images and fonts
β”‚   β”‚   └── images/           # Optimized images (hero, gallery, etc.)
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ analytics/        # Web Vitals and performance monitoring
β”‚   β”‚   β”œβ”€β”€ ui/               # UI components (OptimizedImage, etc.)
β”‚   β”‚   β”œβ”€β”€ Header.astro      # Navigation header
β”‚   β”‚   β”œβ”€β”€ Footer.astro      # Site footer with contact info
β”‚   β”‚   β”œβ”€β”€ Hero.astro        # Landing hero section
β”‚   β”‚   β”œβ”€β”€ Menu.astro        # Menu display section
β”‚   β”‚   β”œβ”€β”€ MenuDisplay.tsx   # Interactive menu component
β”‚   β”‚   β”œβ”€β”€ ReservationForm.tsx # Booking form component
β”‚   β”‚   β”œβ”€β”€ Gallery.astro     # Photo gallery section
β”‚   β”‚   β”œβ”€β”€ Testimonials.astro # Customer reviews
β”‚   β”‚   └── ...               # Other components
β”‚   β”œβ”€β”€ data/                 # JSON content files
β”‚   β”‚   β”œβ”€β”€ restaurant.json   # Restaurant info (name, hours, contact)
β”‚   β”‚   β”œβ”€β”€ menu.json         # Menu items and categories
β”‚   β”‚   β”œβ”€β”€ gallery.json      # Gallery images
β”‚   β”‚   β”œβ”€β”€ testimonials.json # Customer testimonials
β”‚   β”‚   β”œβ”€β”€ events.json       # Special events
β”‚   β”‚   └── team.json         # Team members
β”‚   β”œβ”€β”€ layouts/              # Page layouts
β”‚   β”œβ”€β”€ lib/                  # Utility functions
β”‚   β”‚   β”œβ”€β”€ analytics.ts      # Analytics utilities
β”‚   β”‚   β”œβ”€β”€ web-vitals.ts     # Performance monitoring
β”‚   β”‚   β”œβ”€β”€ i18n.ts           # Internationalization setup
β”‚   β”‚   └── image-presets.ts  # Image optimization presets
β”‚   β”œβ”€β”€ locales/              # Translation files
β”‚   β”‚   └── en/common.json    # English translations
β”‚   β”œβ”€β”€ pages/                # Astro pages
β”‚   β”‚   β”œβ”€β”€ index.astro       # Home page
β”‚   β”‚   └── 404.astro         # Error page
β”‚   └── styles/               # Global CSS
β”‚       └── global.css        # Tailwind and custom styles
β”œβ”€β”€ tests/                    # Test files
β”‚   └── unit/                 # Unit tests
β”œβ”€β”€ docs/                     # Documentation
β”‚   β”œβ”€β”€ research/             # Research & Strategy docs
β”‚   └── wireframes/           # Wireframes & Architecture
└── package.json

Customization

Content

Edit the JSON files in src/data/ to update your restaurant content:

  • restaurant.json - Restaurant name, address, phone, hours, social links
  • menu.json - Menu items with categories, descriptions, prices
  • gallery.json - Gallery images for food and interior
  • testimonials.json - Customer reviews and ratings
  • events.json - Special events and seasonal offerings
  • team.json - Chef and staff information

Styling

The project uses Tailwind CSS with a custom design system. Key customization points:

  • Colors and theme variables in src/styles/global.css
  • Typography using Playfair Display and DM Sans fonts
  • Component-specific styles in their respective .astro files

Translations

Update or add translations in src/locales/ for multi-language support.

Deployment

This project supports both GitHub Pages and Vercel deployment:

GitHub Pages (Automatic)

  1. Push your code to GitHub
  2. Enable GitHub Pages in repository settings (Settings β†’ Pages β†’ Source: GitHub Actions)
  3. The included workflow will automatically build and deploy on every push to main
  4. Your site will be available at https://<username>.github.io/<repo-name>/

Vercel

  1. Push your code to GitHub
  2. Import the repository in Vercel
  3. Deploy!

Or use the CLI:

bun run deploy

Other Platforms

For other platforms, run bun build and deploy the dist/ folder.

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting a pull request.

We follow:


Built with love by MasuRii

If you found this helpful, please consider giving it a star!

GitHub stars

About

🍽️ High-performance restaurant website template built with Astro, React, and Tailwind CSS. Features responsive design, accessibility, SEO optimization, and beautiful animations. Perfect for restaurants, cafes, and food businesses.

Topics

Resources

Stars

Watchers

Forks

Contributors