A high-performance, accessible, and SEO-optimized restaurant website template built with Astro, React, and Tailwind CSS.
- 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
| 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 |
# 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 devThe site will be available at http://localhost:4321
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 |
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
Edit the JSON files in src/data/ to update your restaurant content:
restaurant.json- Restaurant name, address, phone, hours, social linksmenu.json- Menu items with categories, descriptions, pricesgallery.json- Gallery images for food and interiortestimonials.json- Customer reviews and ratingsevents.json- Special events and seasonal offeringsteam.json- Chef and staff information
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
.astrofiles
Update or add translations in src/locales/ for multi-language support.
This project supports both GitHub Pages and Vercel deployment:
- Push your code to GitHub
- Enable GitHub Pages in repository settings (Settings β Pages β Source: GitHub Actions)
- The included workflow will automatically build and deploy on every push to
main - Your site will be available at
https://<username>.github.io/<repo-name>/
- Push your code to GitHub
- Import the repository in Vercel
- Deploy!
Or use the CLI:
bun run deployFor other platforms, run bun build and deploy the dist/ folder.
Contributions are welcome! Please read our contributing guidelines before submitting a pull request.
We follow:
- Conventional Commits for commit messages
- ESLint and Prettier for code style
