Skip to main content

Get Started with Bar Galileo

This guide will help you get Bar Galileo running on your local machine quickly. You’ll have a fully functional restaurant management system ready to use.
1

Clone the Repository

Get the source code from GitHub:
git clone https://github.com/Christian3h/bar-galileo.git
cd bar-galileo
2

Set Up Python Environment

Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate
Bar Galileo requires Python 3.11 or higher. Check your version with python --version
3

Install Dependencies

Install all required Python packages:
pip install -r requirements.txt
This installs Django 5.2.4, Django Channels for WebSocket support, and all other dependencies including:
  • MySQL client
  • ReportLab (PDF generation)
  • OpenPyXL (Excel export)
  • Sentence Transformers & FAISS (AI chat)
4

Configure Database

Create a MySQL database for Bar Galileo:
sudo mysql -u root
CREATE DATABASE bar_galileo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'bar_galileo_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON bar_galileo.* TO 'bar_galileo_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Replace your_password with a strong password. You’ll need it in the next step.
5

Set Environment Variables

Create a .env file in bar_galileo/bar_galileo/ directory:
cd bar_galileo
touch bar_galileo/.env
Add your configuration:
bar_galileo/bar_galileo/.env
secret_key=your-secret-key-here
DB_NAME=bar_galileo
DB_USER=bar_galileo_user
DB_PASSWORD=your_password
DB_HOST=localhost
DB_PORT=3306
DEBUG=True
Generate a secure secret_key using: python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
6

Run Database Migrations

Initialize the database schema:
python manage.py migrate
This creates all necessary tables for products, orders, inventory, users, and more.
7

Create Admin User

Create your superuser account:
python manage.py createsuperuser
Follow the prompts to set username, email, and password.
8

Start the Server

Launch the development server:
python manage.py runserver
The run_server.sh script uses Uvicorn for better WebSocket support and automatic reload on file changes.

Access Your Application

Once the server is running, you can access Bar Galileo at:
  • Local access: http://localhost:8000
  • Network access: http://YOUR_LOCAL_IP:8000 (shown in terminal when using run_server.sh)

First Login

Log in with the superuser credentials you created. You’ll have access to:
  • Admin Dashboard - Overview of restaurant operations
  • Tables & Orders - Manage tables and customer orders
  • Products - Add and manage your menu items
  • Inventory - Track stock levels
  • Reports - Generate PDF and Excel reports
  • Users & Roles - Manage staff permissions

Example: Create Your First Product

After logging in, try adding a product:
1

Navigate to Products

Click on “Products” in the main navigation menu.
2

Add a Category

First, create a category (e.g., “Cocktails”, “Appetizers”).
3

Add a Product

Click “New Product” and fill in:
  • Product name
  • Category
  • Price
  • Stock quantity
  • Description
  • Upload an image (PNG, JPG, or WEBP)
Product images are automatically converted to WebP format for optimal performance.

Key Features to Explore

Real-time Notifications

WebSocket-powered notifications keep staff updated on new orders and inventory alerts.

AI Chat Assistant

RAG-powered chatbot helps answer questions about your restaurant’s documents.

Automated Backups

Schedule automatic encrypted backups of your database and media files.

Multi-format Reports

Export sales, inventory, and expense reports in PDF or Excel format.

Next Steps

Installation Guide

Learn about advanced configuration options

Configuration

Configure email, OAuth, and production settings

Need Help?

If you encounter issues:
  1. Check that MySQL is running: sudo systemctl status mysql
  2. Verify your .env file has correct database credentials
  3. Ensure Python 3.11+ is installed: python --version
  4. Check the Django logs for error messages
If you see “Error loading mysqlclient”, make sure you have MySQL development libraries installed:
  • Ubuntu/Debian: sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
  • macOS: brew install mysql

Build docs developers (and LLMs) love