Skip to content
/ Foodzy_ Public

Fullstack Restaurant Mgmt using Postgresql,Flask

Notifications You must be signed in to change notification settings

22pt16/Foodzy_

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š README.md for GitHub:

# 🍽️ Foodzy - Restaurant Management System

Foodzy PostgreSQL HTML CSS

Foodzy is a full-stack **Restaurant Management System** built using Flask, PostgreSQL, and vanilla HTML/CSS. It provides seamless CRUD operations for managing:
- 🍴 Menus
- πŸ“ Orders
- πŸ’³ Billing
- 🌟 Customer Testimonials

---

## 🎯 **Features**

βœ… Role-based Admin & Staff Panels  
βœ… Manage Menus, Orders, and Tables  
βœ… Customer Feedback with Testimonial Management  
βœ… Beautiful Responsive UI  
βœ… Secure Login System & CRUD APIs  

---

## πŸ—‚οΈ **Project Structure**

Foodzy/ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ init.py # Flask App Initialization β”‚ β”œβ”€β”€ models/ # SQLAlchemy ORM Models β”‚ β”œβ”€β”€ routes/ # All Flask Routes β”‚ β”‚ β”œβ”€β”€ routes.py β”‚ └── static/ β”‚ β”œβ”€β”€ assets/ β”‚ └── css, js, images/ β”œβ”€β”€ templates/ # HTML Pages β”œβ”€β”€ sql/ # DB Initialization Scripts β”œβ”€β”€ venv/ # Virtual Environment └── run.py # Main App Runner


---

## βš™οΈ **Setup & Installation**

### 1. Clone Repository
```bash
git clone https://github.com/yourusername/Foodzy.git
cd Foodzy

2. Create Virtual Environment

# For Windows
python -m venv venv
venv\Scripts\activate

# For Mac/Linux
python3 -m venv venv
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Set Up PostgreSQL Database

  • Create a database foodzy_db
  • Update DB config in app/__init__.py

5. Run Application

python run.py
  • Open your browser at http://127.0.0.1:5000/

πŸ“¦ Database Design

πŸ—„οΈ Tables & Schema

  • users - Admin and Staff Login
  • menus - Menu Management
  • orders - Customer Orders
  • bills - Billing Data
  • testimonials - Customer Feedback

πŸ“Š Entity-Relationship Diagram (ERD)

erDiagram
    USERS {
        int id PK
        varchar username
        varchar password
        varchar role
    }
    MENUS {
        int id PK
        varchar name
        float price
        varchar category
    }
    ORDERS {
        int id PK
        int table_no
        datetime order_date
        float total_amount
    }
    BILLS {
        int id PK
        int order_id FK
        float amount
        datetime bill_date
    }
    TESTIMONIALS {
        int id PK
        varchar name
        text feedback
        datetime date_submitted
    }

    USERS ||--o{ ORDERS : manages
    MENUS ||--o{ ORDERS : contains
    ORDERS ||--o{ BILLS : generates
    USERS ||--o{ TESTIMONIALS : reviews
Loading

πŸš€ API Endpoints

Method Endpoint Description
GET / Home Page
GET /menu Menu Listing
POST /add_order Place New Order
POST /add_testimonial Add Customer Feedback
GET /admin Admin Dashboard

🎨 UI Preview

Foodzy Dashboard


πŸ“„ License

This project is licensed under the MIT License.


🌐 Live Demo (Optional)

Check Live Deployment


---

## πŸ“š `DB DESIGN.md` (DMD)

```markdown
# πŸ—‚οΈ Foodzy - Database Design (DMD)

---

## 🎯 **Database Overview**

The foodzy_db database contains 5 primary tables:

  1. users - Admin/Staff User Data
  2. menus - Menu Information
  3. orders - Customer Order Details
  4. bills - Billing and Payment Info
  5. testimonials - Customer Reviews

πŸ“Š Table Descriptions

1. users Table

CREATE TABLE users (
    id SERIAL PRIMARY KEY,
    username VARCHAR(50) NOT NULL,
    password VARCHAR(255) NOT NULL,
    role VARCHAR(20) CHECK (role IN ('admin', 'staff')) NOT NULL
);

2. menus Table

CREATE TABLE menus (
    id SERIAL PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    price FLOAT NOT NULL,
    category VARCHAR(50)
);

3. orders Table

CREATE TABLE orders (
    id SERIAL PRIMARY KEY,
    table_no INT NOT NULL,
    order_date TIMESTAMP DEFAULT NOW(),
    total_amount FLOAT NOT NULL
);

4. bills Table

CREATE TABLE bills (
    id SERIAL PRIMARY KEY,
    order_id INT REFERENCES orders(id),
    amount FLOAT NOT NULL,
    bill_date TIMESTAMP DEFAULT NOW()
);

5. testimonials Table

CREATE TABLE testimonials (
    id SERIAL PRIMARY KEY,
    name VARCHAR(50) NOT NULL,
    feedback TEXT NOT NULL,
    date_submitted TIMESTAMP DEFAULT NOW()
);

πŸ”— Relationships

  • users ↔️ orders - One-to-Many
  • menus ↔️ orders - Many-to-Many
  • orders ↔️ bills - One-to-One
  • users ↔️ testimonials - One-to-Many

πŸ“‘ Test Data Examples

1. Insert Admin/Staff Users

INSERT INTO users (username, password, role)
VALUES
('admin1', 'hashed_password1', 'admin'),
('staff1', 'hashed_password2', 'staff');

2. Insert Sample Menus

INSERT INTO menus (name, price, category)
VALUES
('Pasta', 250.00, 'Main Course'),
('Pizza', 300.00, 'Main Course'),
('Brownie', 150.00, 'Dessert');

3. Insert Sample Orders

INSERT INTO orders (table_no, total_amount)
VALUES
(5, 750.00),
(3, 300.00);

About

Fullstack Restaurant Mgmt using Postgresql,Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published