Coder Social home page Coder Social logo

coffee-shop-php's Introduction

The Coffee Spot

New Collection With Laptop Mockup Instagram Post

Welcome to The Coffee Spot - a cozy and inviting coffee shop website where users can browse the menu, learn about services, and place orders online. This project is built using PHP, HTML, CSS, and JavaScript.

Table of Contents

Features

  • User Authentication: Login and registration system with session handling.
  • Dark Mode: Option for users to switch to dark mode.
  • Responsive Design: Fully responsive layout using Bootstrap.
  • Dynamic Content: Display dynamic content based on user sessions.
  • SweetAlert Integration: Interactive alerts and notifications using SweetAlert.
  • Online Ordering: Users can view the menu and place orders online.

Installation

  1. Clone the Repository:

    git clone https://github.com/your-username/the-coffee-spot.git
  2. Navigate to the Project Directory:

    cd the-coffee-spot
  3. Set Up the Environment:

    • Ensure you have a local server (e.g., XAMPP, WAMP, or MAMP) installed.
    • Place the project files in the server's root directory (e.g., htdocs for XAMPP).
  4. Start the Local Server:

    • Start Apache and MySQL services using your local server control panel.
  5. Database Setup:

    • Execute the following SQL queries in your database management system to set up the necessary tables:
    -- Create the 'customers' table
    CREATE TABLE customers (
        customer_id INT AUTO_INCREMENT PRIMARY KEY,
        name VARCHAR(100) NOT NULL,
        email VARCHAR(100) NOT NULL,
        phone VARCHAR(20),
        address VARCHAR(255),
        password VARCHAR(255) NOT NULL
    );
    
    -- Create the 'menu' table
    CREATE TABLE menu (
        item_id INT AUTO_INCREMENT PRIMARY KEY,
        item_name VARCHAR(100) NOT NULL,
        description TEXT,
        price DECIMAL(10, 2) NOT NULL,
        category VARCHAR(50),
        image_url VARCHAR(255)
    );
    
    -- Create the 'orders' table
    CREATE TABLE orders (
        order_id INT AUTO_INCREMENT PRIMARY KEY,
        customer_id INT NOT NULL,
        order_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        quantity INT NOT NULL,
        item_name_quantity VARCHAR(255) NOT NULL,
        total_price DECIMAL(10, 2) NOT NULL,
        FOREIGN KEY (customer_id) REFERENCES customers(customer_id)
    );

Usage

  1. Access the Website:

    • Open your web browser and navigate to http://localhost/the-coffee-spot.
  2. Browse the Menu:

    • Click on the "Menu" link in the navigation bar to view available items.
  3. Place an Order:

    • Navigate to the "Order Now" page to place your order online.
  4. User Authentication:

    • Register a new account or log in with existing credentials to access personalized features.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature-name.
  3. Make your changes and commit them: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/your-feature-name.
  5. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.


This README now includes SQL queries to create the `customers`, `menu`, and `orders` tables under the "Database Setup" section. You can copy and paste these queries into your database management system to set up the necessary tables for the project. Adjust the queries as needed based on your specific database requirements.

coffee-shop-php's People

Contributors

smitparekh84 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.