Skip to content

Alirezaalireza77/restaurant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Django-based web application to manage a restaurant, including menu management, customer orders, reservations, and more. Table of Contents

. Features
. Technologies Used
. Setup and Installation
. Usage
. Database Setup
. Testing
. Contributing
. License

Features

Manage restaurant menu (add, edit, delete items)
Place customer orders
Handle table reservations
User authentication (staff login, customer login)
Admin dashboard for managing operations
Order tracking and invoice generation
Responsive design for mobile and desktop users

Technologies Used

Python 3.x
Django Framework
PostgreSQL (or any database of your choice)
HTML5, CSS3, JavaScript (for frontend)
Bootstrap (for responsive design)

Setup and Installation Prerequisites

Ensure you have the following installed:

Python 3.u or above
Django 4.x
PostgreSQL or any relational database system
Git (for version control)

Steps

Clone the repository:

bash

  git clone https://github.com/yourusername/restaurant.git
  cd restaurant-project

Create a virtual environment and activate it:

bash

python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

Install required dependencies:

bash

pip install -r requirements.txt

Set up environment variables in a .env file (for database and secret keys):

bash

SECRET_KEY='your-secret-key'
DEBUG=True
DB_NAME='your-db-name'
DB_USER='your-db-user'
DB_PASSWORD='your-db-password'
DB_HOST='localhost'
DB_PORT='5432'

Run database migrations:

bash

python manage.py migrate

Create a superuser for accessing the admin dashboard:

bash

python manage.py createsuperuser

Start the development server:

bash

python manage.py runserver

Visit http://127.0.0.1:8000/ to view the application.

Usage

Admin can log in to the dashboard via /admin/ and manage the menu, orders, and reservations.
Customers can view the menu, place orders, and make reservations through the main interface.

Database Setup

This project uses PostgreSQL by default. To set up the database:

Install PostgreSQL (if not already installed).

Create a database and user:

bash

  psql
  CREATE DATABASE restaurant_db;
  CREATE USER restaurant_user WITH PASSWORD 'password';
  ALTER ROLE restaurant_user SET client_encoding TO 'utf8';
  ALTER ROLE restaurant_user SET default_transaction_isolation TO 'read committed';
  ALTER ROLE restaurant_user SET timezone TO 'UTC';
  GRANT ALL PRIVILEGES ON DATABASE restaurant_db TO restaurant_user;

Update the .env file with your database credentials.

Testing

To run tests:

bash

python manage.py test

Feel free to submit issues and pull requests. Before contributing, please ensure that you have followed the project's code style and have written unit tests for any new features or bug fixes.

This project is licensed under the MIT License - see the LICENSE file for details.

Feel free to adapt the above template to match your project's specifics!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published