Skip to main content
PAE Inventory System Hero

Overview

PAE Inventory System is a comprehensive web-based solution for managing the Programa de Alimentación Escolar (School Food Program) at Escuela Nacional Maestro Carlos González. Built with modern technologies, it streamlines inventory tracking, menu planning, and daily operations for school cafeteria management.

Quick Start

Get up and running in minutes with our step-by-step guide

Installation

Set up your local development environment

User Management

Learn about roles and permissions

Inventory Tracking

Manage products, stock levels, and categories

Key Features

Inventory Management

Track food items, stock levels, and categories with real-time updates. The system supports multiple units of measurement (kg, liters, units) and provides low-stock alerts.

FIFO & Batch Tracking

Automatic First-In-First-Out (FIFO) inventory management with detailed batch tracking including expiration dates. The system alerts you when items are approaching expiration.

Maker-Checker Workflow

Two-step approval process for incoming deliveries (guías de entrada). Staff can create entries, but only Directors can approve them to update inventory levels.

Role-Based Access Control

Four distinct user roles with granular permissions:
  • Director - Full administrative access
  • Madre Procesadora - Operational kitchen and inventory management
  • Supervisor - Read-only access for oversight
  • Desarrollador - Technical administrator (database-level only)

Daily Operations

Register daily attendance and menu planning for breakfast, lunch, and snacks. The system automatically calculates portion requirements and updates inventory using FIFO logic.

Comprehensive Reporting

Generate reports on inventory levels, historical transactions, audit logs, and daily operations. All actions are tracked for accountability.

Technology Stack

The PAE Inventory System is built with modern, reliable technologies:

React 18

Modern UI with hooks and functional components

Supabase

PostgreSQL database with real-time subscriptions

Vite

Lightning-fast build tool and dev server

Tailwind CSS

Utility-first CSS framework

React Router

Client-side routing and navigation

Lucide Icons

Beautiful, consistent icon library

Architecture

The system follows a modern SaaS architecture:
The system uses Supabase Row Level Security (RLS) policies to enforce permissions at the database level, ensuring data security even if client-side validation is bypassed.

Database Structure

Key database tables and their relationships:
  • users - User accounts linked to Supabase Auth
  • rol - User role definitions (Director, Madre Procesadora, etc.)
  • product - Product catalog with stock levels
  • category - Product categories (Lácteos, Proteínas, etc.)
  • guia_entrada - Incoming delivery guides (with approval workflow)
  • input - Delivery line items with FIFO batch tracking
  • output - Inventory withdrawals for daily operations
  • registro_diario - Daily attendance and meal service records
  • receta_porcion - Portion yield per product
  • audit_log - Comprehensive audit trail
The database schema includes legacy tables (asistencia_diaria, menu_diario, menu_detalle) that have been replaced by registro_diario. Do not use these tables for new features.

Security Features

All tables use Supabase RLS policies to restrict access based on user roles. Even with direct database access, users can only see and modify data they’re authorized to access.
PostgreSQL triggers enforce business rules:
  • Prevent unauthorized role changes
  • Automatically update stock on transactions
  • Log all critical operations to audit trail
Separation of duties for inventory updates:
  • Staff creates delivery guides
  • Directors approve/reject before stock updates
  • All approvals are logged with timestamps
Every INSERT, UPDATE, DELETE, APPROVE, and REJECT operation is logged with:
  • User ID and timestamp
  • Table and record affected
  • Complete before/after data
  • IP address tracking

Next Steps

1

Quick Start

Follow the Quick Start Guide to create an account and explore the system
2

Set Up Development

Clone the repository and follow the Installation Guide for local development
3

Explore Features

4

Review Security

Understand the Security Model and Database Schema

Support

For questions, issues, or feature requests, contact the development team or refer to the source code documentation.
Ready to get started? Head over to the Quick Start Guide!

Build docs developers (and LLMs) love