Skip to content

Matnazar-Matnazarov/F12_KITCHEN

Repository files navigation

πŸ” F12KITCHEN - Professional Restaurant Management System

Django Python Redis WebSocket License

A modern, real-time restaurant management system built for speed, efficiency, and reliability

πŸš€ Quick Start β€’ πŸ“– Documentation β€’ πŸ› οΈ Installation β€’ 🀝 Contributing


🌟 Overview

F12KITCHEN is a comprehensive, enterprise-grade restaurant management system designed for fast-food and quick-service restaurants. Built with modern technologies including Django 5, WebSockets, and Redis, it provides real-time order management, kitchen display systems, and seamless point-of-sale operations.

🎯 Why F12KITCHEN?

  • ⚑ Real-time Operations: Instant order updates across all devices using WebSockets
  • πŸ‘₯ Multi-role Support: Cashiers, kitchen staff, managers, and directors with role-based access
  • πŸ–¨οΈ Professional Receipt System: PDF generation with thermal printer support
  • πŸ“± Responsive Design: Works perfectly on desktop, tablet, and mobile devices
  • πŸ”’ Enterprise Security: Role-based authentication and secure data handling
  • πŸš€ Production Ready: Docker support, environment-based configuration

✨ Features

πŸͺ Point of Sale (POS)

  • Fast Order Entry: Intuitive interface for quick order processing
  • Menu Management: Categories, items, pricing, and availability control
  • Payment Processing: Multiple payment methods (cash, card, online)
  • Receipt Generation: Professional PDF receipts with company branding

πŸ‘¨β€πŸ³ Kitchen Display System (KDS)

  • Real-time Order Queue: Live updates without page refresh
  • Order Management: Mark orders as in-progress, completed, or cancelled
  • Visual Status Indicators: Color-coded order types and statuses
  • Auto-refresh: Seamless WebSocket-based updates

πŸ“Š Management Dashboard

  • Sales Analytics: Real-time sales data and reporting
  • User Management: Create and manage staff with role-based permissions
  • Inventory Tracking: Monitor stock levels and low inventory alerts
  • Advertisement System: Digital signage and promotional content

πŸ”§ Technical Features

  • WebSocket Communication: Real-time bidirectional communication
  • Celery Task Queue: Background task processing for heavy operations
  • Redis Caching: High-performance data caching and session management
  • Docker Support: Containerized deployment for easy scaling
  • API Integration: RESTful APIs for third-party integrations

πŸ› οΈ Tech Stack

Backend Frontend Database Infrastructure
  • Django 5.2 - Web framework
  • Django Channels - WebSocket support
  • Celery - Task queue
  • Django REST Framework - API development
  • TailwindCSS - Modern styling
  • JavaScript ES6+ - Interactive UI
  • WebSocket API - Real-time updates
  • Jinja2 Templates - Server-side rendering
  • PostgreSQL - Primary database
  • SQLite - Development database
  • Redis - Caching & message broker
  • Docker - Containerization
  • Nginx - Reverse proxy
  • Gunicorn - WSGI server
  • WhiteNoise - Static file serving

πŸš€ Quick Start

Prerequisites

  • Python 3.12+
  • Redis Server
  • PostgreSQL (optional, SQLite for development)
  • Git

πŸ“¦ Installation

1️⃣ Clone the Repository

git clone https://github.com/your-org/F12KITCHEN.git
cd F12KITCHEN

2️⃣ Create Virtual Environment

# Create virtual environment
python -m venv .venv

# Activate (Linux/Mac)
source .venv/bin/activate

# Activate (Windows)
.venv\Scripts\activate

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Environment Configuration

# Copy environment template
cp .env.example .env

# Edit configuration
nano .env  # or your preferred editor

5️⃣ Database Setup

# Run migrations
python manage.py migrate

# Create superuser
python manage.py createsuperuser

# Load sample data (optional)
python manage.py loaddata sample_data.json

6️⃣ Start Services

# Terminal 1: Redis (if not running as service)
redis-server

# Terminal 2: Celery Worker
celery -A config worker -l info

# Terminal 3: Celery Beat
celery -A config beat -l info

# Terminal 4: Django Development Server
python manage.py runserver

7️⃣ Access the Application


βš™οΈ Configuration

Environment Variables

Variable Description Default Required
SECRET_KEY Django secret key - βœ…
DEBUG Debug mode False ❌
ALLOWED_HOSTS Allowed hostnames 127.0.0.1,localhost ❌
DB_ENGINE Database engine sqlite3 ❌
DB_NAME Database name db.sqlite3 ❌
DB_USER Database user - ❌
DB_PASSWORD Database password - ❌
REDIS_HOST Redis hostname 127.0.0.1 ❌
REDIS_PORT Redis port 6379 ❌
EMAIL_HOST_USER SMTP username - ❌
EMAIL_HOST_PASSWORD SMTP password - ❌

Production Setup

Using Docker

# Build and run with Docker Compose
docker-compose up -d

# View logs
docker-compose logs -f

Manual Production Deployment

# Install production dependencies
pip install gunicorn psycopg2-binary

# Collect static files
python manage.py collectstatic --noinput

# Run with Gunicorn
gunicorn config.wsgi:application --bind 0.0.0.0:8000

πŸ“± User Roles & Permissions

🎭 Role Hierarchy

Role Permissions Access Level
πŸ‘¨β€πŸ’Ό Director Full system access, reports, user management πŸ”΄ High
πŸ›‘οΈ Admin User management, menu, categories, orders 🟑 Medium
πŸ’° Cashier Order processing, payments, receipts 🟒 Standard
πŸ‘¨β€πŸ³ Cook Kitchen display, order status updates 🟒 Standard
🚚 Courier Delivery orders, status updates 🟒 Standard
πŸ“¦ Storekeeper Inventory management, stock levels 🟒 Standard

πŸ–ΌοΈ Screenshots

Kitchen Display System

Real-time order management for kitchen staff

Point of Sale Interface

Fast and intuitive order entry system

Management Dashboard

Comprehensive analytics and reporting


πŸ§ͺ Testing

# Run all tests
python manage.py test

# Run specific app tests
python manage.py test fastfood

# Run with coverage
coverage run --source='.' manage.py test
coverage report
coverage html

πŸ“š API Documentation

Authentication

# Login endpoint
POST /api/auth/login/
Content-Type: application/json

{
    "username": "your_username",
    "password": "your_password"
}

Orders API

# Get orders
GET /api/orders/

# Create order
POST /api/orders/
Content-Type: application/json

{
    "items": [
        {"menu_id": 1, "quantity": 2},
        {"menu_id": 3, "quantity": 1}
    ],
    "order_type": "dine-in"
}

πŸ”§ Development

Code Style

# Format code with Black
black .

# Lint with Ruff
ruff check .

# Type checking with MyPy
mypy .

Database Migrations

# Create migrations
python manage.py makemigrations

# Apply migrations
python manage.py migrate

# Show migration status
python manage.py showmigrations

Custom Management Commands

# Delete unverified users
python manage.py delete_unverified_users

# Generate sample data
python manage.py seed

# Import menu from CSV
python manage.py import_menu menu.csv

πŸš€ Deployment

Docker Deployment

# docker-compose.yml
version: '3.8'
services:
  web:
    build: .
    ports:
      - "8000:8000"
    environment:
      - DEBUG=False
      - SECRET_KEY=your-secret-key
    depends_on:
      - db
      - redis
  
  db:
    image: postgres:15
    environment:
      POSTGRES_DB: f12kitchen
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: password
  
  redis:
    image: redis:7-alpine

Nginx Configuration

server {
    listen 80;
    server_name your-domain.com;
    
    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
    
    location /ws/ {
        proxy_pass http://127.0.0.1:8000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Standards

  • Follow PEP 8 style guide
  • Write comprehensive tests
  • Update documentation for new features
  • Use conventional commit messages

πŸ“„ License

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


πŸ†˜ Support

πŸ“§ Contact

πŸ› Bug Reports

Please use our Issue Tracker to report bugs.

πŸ’¬ Community


πŸ™ Acknowledgments

  • Django community for the excellent framework
  • Redis team for high-performance caching
  • TailwindCSS for modern styling utilities
  • All contributors who help improve this project

Made with ❀️ by the F12KITCHEN Team

⭐ Star this repo if you find it useful! ⭐

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors