Skip to content

Project: Indian Restaurant Website with HTML CSS JavaScript. Created at https://spectra.codes, which is owned by @Drix10

Notifications You must be signed in to change notification settings

coslynx/spice-odyssey-restaurant-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


spice-odyssey-restaurant-website

A dynamic and visually captivating website for an Indian restaurant, "Spice Odyssey"

Developed with the software and tools below.

Framework: Next.js Frontend: Javascript, Html, Css Backend: Node.js LLMs: Custom, Gemini, OpenAI

git-last-commit GitHub commit activity GitHub top language

πŸ“‘ Table of Contents

  • πŸ“ Overview
  • πŸ“¦ Features
  • πŸ“‚ Structure
  • πŸ’» Installation
  • πŸ—οΈ Usage
  • 🌐 Hosting
  • πŸ“„ License
  • πŸ‘ Authors

πŸ“ Overview

This repository houses the "spice-odyssey-restaurant-website" project, a dynamic and visually captivating website crafted for an Indian restaurant named "Spice Odyssey." This website serves as a digital gateway for potential customers to experience the restaurant's offerings, ambiance, and convenience.

πŸ“¦ Features

Feature Description
βš™οΈ Architecture The codebase follows a modular architecture pattern with separate directories for different functionalities, such as pages, components, and utility functions, ensuring easier maintenance and scalability.
πŸ“„ Documentation The repository includes a README file that provides a detailed overview of the project, its dependencies, and usage instructions.
πŸ”— Dependencies The codebase relies on various external libraries and packages such as React, Next.js, Tailwind CSS, Prisma, and Express.js, which are essential for building and styling the UI components, handling database interactions, and managing API requests.
🧩 Modularity The modular structure allows for easier maintenance and reusability of the code, with separate directories and files for different functionalities.
πŸ§ͺ Testing Implement unit tests using frameworks like Jest or React Testing Library to ensure the reliability and robustness of the codebase.
⚑️ Performance The performance of the system can be optimized based on factors such as the browser and hardware being used. Consider implementing performance optimizations such as code splitting, lazy loading, and image optimization for better efficiency.
πŸ” Security Enhance security by implementing measures such as input validation, data sanitization, and secure communication protocols using libraries like Helmet.
πŸ”€ Version Control Utilizes Git for version control with GitHub Actions workflow files for automated build and release processes.
πŸ”Œ Integrations Integrates with third-party APIs for functionalities like displaying restaurant location using Google Maps API, dynamically displaying customer ratings and reviews using Yelp or Google Reviews API, and potentially fetching weather information using OpenWeatherMap API.
πŸ“Ά Scalability Design the system to handle increased user load and data volume, utilizing caching strategies and cloud-based solutions such as AWS or GCP for better scalability.

πŸ“‚ Structure

spice-odyssey-restaurant-website/
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ contact.js
β”‚   β”œβ”€β”€ gallery.js
β”‚   β”œβ”€β”€ menu.js
β”‚   β”œβ”€β”€ reservations.js
β”‚   └── index.js
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ header.js
β”‚   β”œβ”€β”€ footer.js
β”‚   β”œβ”€β”€ menuCard.js
β”‚   β”œβ”€β”€ galleryImage.js
β”‚   β”œβ”€β”€ contactForm.js
β”‚   β”œβ”€β”€ reservationForm.js
β”‚   β”œβ”€β”€ hero.js
β”‚   β”œβ”€β”€ about.js
β”‚   └── menuSection.js
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ api.js
β”‚   β”œβ”€β”€ formatDate.js
β”‚   β”œβ”€β”€ getWeather.js
β”‚   β”œβ”€β”€ getReviews.js
β”‚   β”œβ”€β”€ validateEmail.js
β”‚   └── getDistance.js
β”œβ”€β”€ prisma/
β”‚   β”œβ”€β”€ schema.prisma
β”‚   └── migrations/
β”‚       β”œβ”€β”€ 20240312123456_init/
β”‚       β”‚   β”œβ”€β”€ migration.sql
β”‚       β”‚   └── _meta.json
β”‚       └── 20240313123456_add_reservations/
β”‚           β”œβ”€β”€ migration.sql
β”‚           └── _meta.json
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”œβ”€β”€ logo.svg
β”‚   └── assets/
β”‚       β”œβ”€β”€ images/
β”‚       β”‚   β”œβ”€β”€ restaurant-interior.jpg
β”‚       β”‚   β”œβ”€β”€ restaurant-exterior.jpg
β”‚       β”‚   β”œβ”€β”€ dish1.jpg
β”‚       β”‚   β”œβ”€β”€ dish2.jpg
β”‚       β”‚   └── dish3.jpg
β”‚       └── fonts/
β”‚           └── myfont.ttf
β”œβ”€β”€ .env
β”œβ”€β”€ package.json
└── README.md

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/spectra-ai-codegen/spice-odyssey-restaurant-website.git
  2. Navigate to the project directory:
    • cd spice-odyssey-restaurant-website
  3. Install dependencies:
    • npm install

πŸ—οΈ Usage

πŸƒβ€β™‚οΈ Running the Project

  1. Start the development server:
    • npm start
  2. Open your browser and navigate to http://localhost:3000.

βš™οΈ Configuration

Adjust configuration settings in .env file with variables like:

  • DB_HOST: Database host
  • DB_USER: Database user
  • DB_PASS: Database password
  • GOOGLE_MAPS_API_KEY: Google Maps API Key

πŸ“š Examples

  • πŸ“ Example 1: How to view the restaurant's menu: Navigate to the "Menu" page on the website to view the full menu, categorized by dishes.
  • πŸ“ Example 2: How to book a reservation: Click the "Reservations" page to make a table reservation for a specific date and time.
  • πŸ“ Example 3: How to view the restaurant's gallery: Navigate to the "Gallery" page to browse through images of the restaurant's ambiance and food.

🌐 Hosting

πŸš€ Deployment Instructions

Heroku

  1. Install the Heroku CLI:
    • npm install -g heroku
  2. Login to Heroku:
    • heroku login
  3. Create a new Heroku app:
    • heroku create spice-odyssey-restaurant-website
  4. Configure environment variables:
    • heroku config:set DB_HOST=your_database_host DB_USER=your_database_user DB_PASS=your_database_password GOOGLE_MAPS_API_KEY=your_api_key
  5. Deploy the code:
    • git push heroku main

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/dishes: Retrieves a list of dishes from the database.
  • POST /api/reservations: Creates a new reservation in the database.
  • GET /api/reviews: Retrieves customer reviews using the Yelp or Google Reviews API.
  • GET /api/location: Retrieves the restaurant's location using the Google Maps API.

πŸ”’ Authentication

Implement authentication using JWT tokens (optional) to secure API access and enhance user security.

πŸ“ Examples

  • curl -X GET http://localhost:3000/api/dishes
  • curl -X POST http://localhost:3000/api/reservations -H "Content-Type: application/json" -d '{"date": "2024-03-15", "time": "19:00", "guests": 2}'

πŸ“œ License

This project is licensed under the MIT License.

πŸ‘₯ Authors

🌐 Spectra.Codes

Why only generate Code? When you can generate the whole Repository!