Skip to content

Xaque8787/roux

Repository files navigation

roux

Food Cost Management System

A comprehensive web application for managing restaurant food costs, ingredients, recipes, batches, dishes, inventory, and utilities.

Features

🔐 Authentication & Authorization

  • Secure JWT-based authentication with HTTP-only cookies
  • Role-based access control (Admin/User roles)
  • One-time setup wizard for initial admin user

🥕 Ingredients Management

  • Track ingredients with units and costs
  • Categorize ingredients for better organization
  • Cost tracking for accurate recipe pricing

📖 Recipe Management

  • Create reusable recipe templates
  • Define ingredient quantities and ratios
  • Calculate total recipe costs automatically

👨‍🍳 Batch Production

  • Track actual prep work based on recipes
  • Record yields and labor time
  • Support for portion breakdowns (half, quarter batches)

🍽️ Dish/Menu Management

  • Create menu items using batch portions
  • Set sale prices and calculate profit margins
  • Track food cost vs. sale price

📦 Inventory Management

  • Daily inventory tracking with par levels
  • Visual indicators for below/near par items
  • Task assignment and time tracking
  • Day finalization for record keeping

⚡ Utility Cost Tracking

  • Track monthly utility costs (power, gas, water)
  • Prorate costs for accurate dish pricing
  • Admin-only utility management

Quick Start

Using Docker (Recommended)

  1. Clone the repository:
git clone https://github.com/Xaque8787/roux
cd roux
  1. Create environment file:
cp .env.example .env
# Edit .env with your settings
  1. Start the application:
docker-compose up -d
  1. Access the application at http://localhost:8000

  2. Complete the initial setup by creating an admin user

Note: The docker-compose.yml file uses pre-built images from GitHub Container Registry. For local development with builds, use docker-compose.local.yml instead.

Local Development (Bare Metal)

Use the included startup script for local development:

./start.sh

The script will:

  • Create and activate a virtual environment
  • Install all dependencies
  • Run database migrations if needed
  • Start the development server on http://localhost:8000

Usage Guide

Initial Setup

  1. Navigate to the application URL
  2. You'll be redirected to the setup page
  3. Create the first admin user
  4. Default categories will be created automatically

Core Features

For detailed documentation on each feature, see the docs folder:

Complete guide to setting up and managing ingredients, including:

  • Purchase configurations (single items, cases, breakable units)
  • Unit conversions and baking measurements
  • Vendor management and pricing methods
  • Cost calculations and tracking

Detailed instructions for building recipes:

  • Adding ingredients with quantities and units
  • Using batch portions in recipes
  • Cost calculations and recipe organization
  • Multi-stage production workflows

Comprehensive guide to production batches:

  • Yield configuration (fixed and variable)
  • Labor tracking and cost estimation
  • Batch scaling options
  • Historical performance analysis

Everything about creating and costing dishes:

  • Building dishes from batch portions
  • Direct ingredient additions
  • Multiple cost calculation methods
  • Profit margin and food cost percentage analysis

Complete inventory management system:

  • Inventory item setup and par levels
  • Daily counting and task creation
  • Task assignment and time tracking
  • Reports and performance analysis

Quick Reference

Managing Ingredients

  1. Go to Ingredients section
  2. Add ingredients with their units and costs
  3. Assign categories for better organization

Creating Recipes

  1. Go to Recipes section
  2. Create recipes by selecting ingredients and quantities
  3. View recipe details including total cost

Production Batches

  1. Go to Batches section
  2. Select a recipe and enter yield amount and labor time
  3. Optionally enable portion breakdowns

Menu Items (Dishes)

  1. Go to Dishes section
  2. Create dishes using portions from batches
  3. Set sale prices to calculate profit margins

Daily Inventory

  1. Go to Inventory section
  2. Add inventory items with par levels
  3. Start a new day and assign employees
  4. Enter daily quantities (items below par are highlighted)
  5. Create and track tasks
  6. Finalize the day when complete

Utility Costs (Admin Only)

  1. Go to Utilities section
  2. Add monthly costs for utilities
  3. View daily prorated costs

System Architecture

Backend

  • FastAPI: Modern Python web framework
  • SQLAlchemy: ORM for database operations
  • Pydantic: Data validation and serialization
  • JWT: Secure authentication
  • Jinja2: Server-side templating

Frontend

  • Bootstrap 5: Responsive UI framework
  • Font Awesome: Icons
  • Vanilla JavaScript: Form enhancements

Database

  • SQLite: Default database (production-ready)
  • PostgreSQL: Optional for larger deployments

Deployment

  • Docker: Containerized deployment
  • Gunicorn: Production WSGI server
  • Multi-stage builds: Optimized container images

Security Features

  • HTTP-only cookies for JWT storage
  • Password hashing with bcrypt
  • Role-based access control
  • CSRF protection via SameSite cookies
  • Input validation and sanitization

Data Persistence

  • Database files stored in ./data directory
  • Docker volume mounting for data persistence
  • Automatic database table creation

API Endpoints

Authentication

  • GET /setup - Initial setup form
  • POST /setup - Create admin user
  • GET /login - Login form
  • POST /login - Authenticate user
  • GET /logout - Logout user

Core Features

  • /ingredients - Ingredient management
  • /recipes - Recipe management
  • /batches - Batch production
  • /dishes - Menu item management
  • /inventory - Daily inventory tracking
  • /utilities - Utility cost management (admin only)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.

Support

For support, please create an issue in the repository or contact the development team.

About

Food and Labor Cost Tracking, Inventory Management, Recipe Catalog, Daily Tasks and Reporting System.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages